Skip to content

GL SSAO pass leaves units 0/1/2 bound to GBuffer attachments: genuine framebuffer feedback loop #159

Open

Description

@CanReader

src/Graphics/OpenGL/OpenGLRenderer.cpp:1356-1359, :137; assets/shaders/gbuffer_gl.frag:21-22

ExecuteSSAOPass exits with texture units 0, 1 and 2 still bound to m_gbufferDepth,
m_gbufferNormalRough and the SSAO noise texture (:1356-1359). Nothing unbinds them.

The next frame, BeginRender binds m_gbufferFBO (:137): for which m_gbufferDepth and
m_gbufferNormalRough are live attachments. A texture simultaneously bound for sampling and attached for
writing is a framebuffer feedback loop: undefined values per the GL spec, and on some drivers a hang.

Compounding it, gbuffer_gl.frag:21-22 declares units 0/1 as diffuseTexture / normalTexture: so the
geometry pass samples the depth and normal-roughness buffers as if they were material maps.

Severity: corruption (undefined behavior + wrong sampling).

Found by a full audit of the graphics layer. Assessed severity: corruption.

Activity

  1. added this to the 0.1 Stability milestone on Sep 4, 2026
  2. added
    bugSomething isn't working
    area: renderingRenderer, shaders, post processing
    backend: openglSpecific to the opengl backend
    priority: criticalCrash, data loss, or blocks other work
    visualIncorrect or degraded rendering output
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: renderingRenderer, shaders, post processingbackend: openglSpecific to the opengl backendbugSomething isn't workingpriority: criticalCrash, data loss, or blocks other workvisualIncorrect or degraded rendering output

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions