[SOLVED] Shaders hot swap

Thanks for explanation of your vision of dialog. No complaints from my side.

I haven’t found anything like this in JME SDK (in text part of documentation and by manual examination of SDK).

I didn’t see any hot discussion about this, so decided to start this one. My reference point is the way how hot reload usually works in java web development and how shaders hot reload implemented in another popular engine - very similar to java web dev way.

I’d propose to have some “dev mode” AssetManager that just watch files of all loaded materials for changes and reloads changed materials right now and here. In case of broken material it shows pink stub at place of broken material (and shows correct version as soon it’s fixed).

And actually, in background of this discussion I’ve found this topic about MaterialDebugAppState class that is already in core jar, which allows to configure “watchers” for specified assets names. The only difference from my proposal is that solution of my dream watches all existing (or just used) materials by default.

1 Like