I am just getting started with glsl and was wondering if there is a way to specify default values for uniform variables in a shader so that if the application does not set the uniform variable it has a decent value for the shader. Is this possible?
Nope. You should consider writing code for a shader loader that will automatically do that for you. Have it read the “default values” from a header section of the shader(s) source file(s) and set them right after linking the shaders.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.