marciano wrote:
The purpose of the material uniforms is to expose shader parameters which can be tweaked by artists to customize a shader. Matrices are not a use case for that. More complex constants should usually be managed inside the engine code (for example by an extension) and not using the material system. What do you need these more complex uniforms for?
Actually, I use user-supplied matrices in my artist-tweakable post-processing shaders.
A matrix can be used to perform colour shifts (e.g. hue, brightness, etc...) on an RGB-vector. It would be nice to be able to upload this as a mat4.
The data that is put in this matrix will be generated by a tool, so it doesn't really matter to my users if 4 vec4's are used instead of a mat4... but it would simplify my code