Hello everyone,
I have a simple game prototype that uses OpenGL for rendering. I have been wanting to implement a postprocessing step as a compute shader, so I wrote a simple shader that writes pure white to every pixel in the image just as a test.
The problem I'm having is that the shader appears to do absolutely nothing, despite confirming with RenderDoc that it does execute, and that the image is bound correctly.
![](https://uploads.gamedev.net/forums/monthly_2021_10/47b92c06efb449a68c95a40705597778.image.png)
![](https://uploads.gamedev.net/forums/monthly_2021_10/bd8b6a86f4c443679c284c45e424654c.image.png)
To breakdown the CPU-side code: render::main_scene() does the main geometry pass and renders into core_rt, an SRGBA/MSAA rendertarget. We blit this to ping_rt, an RGBA8/non-MSAA rendertarget, and the color attachment of this framebuffer is bound to the image sampler.
The compute shader is then dispatched with a workgroup count hardcoded to work with 1920x1080, just for now. glMemoryBarrier() is called so that the compute shader's work is visible when we do the remaining blits.
When it's all said and done, the final image is no different than if I were to comment out the call to glDispatchCompute(). Also, I have a RenderDoc capture of a frame in case that would help anyone help me.
One final note: I have tried enabling the GL debug context, but the only non-notification messages it gives me are performance warnings about vertex shaders being recompiled, no usage errors are generated.
I have been wrestling with this issue for days now, and across multiple forums, so please gamedev.net, you are my only hope,
-Nick