I am trying to figure out which is the best way to implement multi-pass post-processing. Basically I want to:
- Render the scene to color buffer A & depth buffer AD.
- Process buffer A + depth buffer AD in a shader, result in color buffer B.
- Process buffer A + buffer B in another shader, result is the final buffer I want to display on screen.
*Background: I am trying to see if I can implement Screen Space Reflection (would be nice if CGE has this built-in, alongside with SSAO). I look at Screen Effects and related documents/source code but looks like it only allow to read & write back to the same color buffer.
Edit: Pull request: https://github.com/castle-engine/castle-engine/pull/181