AnsweredAssumed Answered

Occlusion Queries and GLSL shader discard

Question asked by joshklint on Nov 3, 2014

It appears that occlusion queries somehow ignore shader discards, as if the depth buffer is still being written to:

Leadwerks Game Engine - Transparency Bug - Bug Reports - Forum



The transparency shader discards every other pixel, as a way to approximate alpha blending in a deferred renderer.  I did a quick post-process effect to view depth values, and the discarded pixels are definitely not being written to the depth buffer.  Yet somehow the occlusion queries are acting as though the discard didn't happen.


The reason the results are not pixel-perfect is because the occlusion routine discards octree nodes rather than individual objects.


I am able to produce this error with an AMD R9 290 on Windows 7 64-bit, with driver 14.9.  The renderer is using OpenGL 4.  I can provide Steam keys for the application for testing upon request.