Hi,
my app uses 1 FBO with 2 color attachments.
the main loop alogorithm is basic :
bind the mrt
render the scene
unbind
render the scene (to GL_BACK).
Unfortunatelly, I have a performance issue. A single render pass is very expensive and I would like to avoid one pass.
The best solution would be to have a MRT with 3 attachments : GL_BACK and 2 GL_COLOR_ATTACHMENT.
AFAIK, this is not possible : in glsl gl_FragData could only be used to write into a color_attachement and we can’t use gl_FragData and gl_FragColor in the same time.
Am I right ?
If I am wrong
PLEASE tell me how to do!!!
else :
So I can render my scene into 3 color attachements, and then copy the content of one fbo texture into GL_BACK.
My goal is then to find the most efficient way to copy.
The GL_EXT_framebuffer_blit extension provide the fastest copy from one fbo to another. Does a similar method exist to copy/swap a fbo texture to the back buffer ?
The only way I know to do that would be to use a quad and use a texture on it.
Is there a better solution ?
thanks!