You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is the problem. Why are you binding a program, then afterwards binding another one without having rendered anything in the first place? Can't you avoid binding the first program since it's not used for rendering?
fincs
changed the title
Setting a uniform in a geometry shader can overwrite vertex shader uniforms in later programs
Binding programs without drawing anything can result in inconsistent uniform state
Sep 13, 2017
Context: I'm adding particle effects to a game I'm working on. The rendering code configures the shading, etc., binds the program, then loops through all particle sources, sets up buffers and calls DrawArrays. Regular objects get drawn afterwards. If there aren't any particle sources, the graphics get glitchy.
So yes, I can easily avoid binding the program at all. But this is really confusing behaviour. If this is intentional, IMO it should be documented somewhere.
Adding a
C3D_UpdateUniforms(GPU_GEOMETRY_SHADER)
between steps 2 and 3 fixes the problem.If I understand the internals correctly, the problem is that the
C3D_{FV,IV,Bool}UnifDirty
flags don't get cleared when binding a new program.The text was updated successfully, but these errors were encountered: