opensim-creator
opensim-creator copied to clipboard
Fix uniform values aren't reset if a material does not contain them
Edge-case issue in the rendering API: the shader/material API doesn't re-default uniform values if they aren't set by the caller.
This becomes an issue when other parts of the codebase aren't setting uniforms and other parts are. The parts of the codebase that explicitly set uniform values mutate the underlying OpenGL shader handle to have the as-set values. The parts of the codebase that do not set uniform values will use whatever is stored in the shader (the set value), which creates shared state issues
This can all be summarized as "fucking OpenGL..." etc.