multiple Render targets with back and front FBO?


i am thninking about one optimization to mi render that they have two passes, but the rendering works how to if only have one pass.

its in first step when i compute all scene, i dont try making deferred shading. The case is that i can get optimize me render using an second step only for compute specific layer that i extract from first pass with MTR.
(yes, to like blur shadows noise)
but actually i need attach the second layer that is all FragColor from first step, and how i dont using deferred shading it makes little sense using one FBO color texture for this, (the specifict layer that i have interest of compute in Quad is a 8bits GLRED)

i asking me if its possible use the first layer directly in topFBO screen and the second in my MRT tarjet to compute in second pass.

As a native English speaker, I’m having trouble deciphering what you’re trying to say here. I’ll give it a shot though.

Is this what you’re saying?

If so, the answer is “yes”.

In the 1st pass, just write the 2nd layer to a texture (by attaching it to one of the FBO’s color attachments), and then in the 2nd pass, bind that texture to a shader sampler as input.