Skip to content

PostEffect Doesn't clear out constants on shader reload #153

@lukaspj

Description

@lukaspj

This issue was created in the GarageGames Repository (Link to original issue).
The issue was originally created by @jamesu and had a total of 3 comments that may contain additional information. The original issue description is pasted below:

In the PostEffect class, if you cause the shader to be updated (e.g. by changing a macro via setShaderMacro() or reload()), the shader will be cleared in checkRequirements, but the shader constant buffer (mShaderConsts) and the constants list (mEffectConsts) will not be updated to point to the new shader.

This causes problems in the OpenGL renderer as the constant buffer state becomes out of sync with the shader state. e.g. the render target size may be 0,0 since it still thinks the size is 1024,1024. The Direct3D renderer doesn't appear to be affected by this, possibly because it updates using ranges rather than on a per-constant basis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    OpenGLIssue is specifically OpenGL/GLSL relatedbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions