Details
Description
Supporting all properties that can change dynamically and generating material shaders for those are not really feasible. We can however let the user (or the design tool) tell the shadergen tool which properties are dynamic and then have the tool generate those, either by additional input arguments or a description file (json?). Or we could be a bit more strict and only support components created up front, the difference is not that big and we don't need to invent yet another description file...
E.g.,
// SceneEnvirontmentDefault -> Default Scene env. component. SceneEnvironment { <property A> } // SceneEnvirontmentA -> Alternative Scene env. component. SceneEnvironment { <property B> } // Material A Material { <property A> } // Material B Material { <property B> }
It should now be trivial for the shader gen to create shaders for both materials using both environments. Actually, there's not that many properties in the scene environment, so it might just make sense to generate for all variants...