I'm looking to add 2 more features. Feel free to add your comments or make suggestions.
Saving functionality for materials. Realtime editing is already possible, so this is the last obstacle for seamlessly integrating a material editor into your game. The workflow could look like this:
- Write the shaders and base materials in a text editor.
- In the in-game material editor, start creating derived materials and tweaking them by overriding the properties of the base material.
- Once you're satisfied, hit the "save" button and enjoy the exported .mat file. Then repeat from step 2 on
Also nice to have would be a "Reload shaders" functionality, because it's kinda tedious to restart your game every time you've made a shader change. EDIT
: After thinking about it again, this is already possible by just deleting and re-creating the factory
You might notice the current caching functionality (which you can turn on, and is disabled by default) is a bit annoying - it requires you to delete the cache manually every time you change a shader. Of course, this could be "fixed" by not using the cache until the final release of your software is ready - but that's not really optimal. A nice solution would be to save a timestamp of the shader files' "Last modified" time and wipe the corresponding cache if that timestamp changes.
As a side note, we are currently integrating this library into StuntRally
- stay tuned, I will post more when it's done.