I'm trying to implement Weighted, Blended Order-Independent Transparency
There are three passes:
- 3D opaque surfaces to a primary framebuffer
- 3D transparency accumulation to an off-screen framebuffer
- 2D compositing transparency over the primary framebuffer
I need to test transparent objects against default depth buffer. I created a framebuff for transparency pass and also created a depth buffer for maybe I can copy default depth to this buffer if this is the only way. But I don't know how to do that because I created depth buffer with GL_DEPTH_COMPONENT24
but I don't know default depth format.
Is it possible to bind default framebuffer's depth buffer to another framebuffer? If not, how can I copy default depth to another depth buff, or what is best way to do this?