Multiple Render Targets and MSAA framebuffer

Hi all!

I have an frameBuffer object that has multiple colorbuffers attached to use Multiple Render Targets in off-screen drawCalls, I’m trying to use this with a MSAA framebuffer.
My Question is : when I use glBlitFramebuffer() to use with intermediate FBO, how can I make them work with MRT technique ?

Your question isn’t very clear. Let’s clarify a few things:

Ok. So do you mean that your FBO (let’s call this FBO #1) is MSAA? Or do you mean that your system framebuffer (e.g. window) is MSAA?

If the latter, why?

My Question is : when I use glBlitFramebuffer() to use with intermediate FBO, how can I make them work with MRT technique ?

It’s not clear what you’re asking by “make them work with MRT”. What problems are you having now?

Also, is this intermediate FBO different from the FBO in the first part (i.e. this is FBO #2)?

Are you doing MRT just to FBO #1, or to FBO #2 as well?

Why can’t you make it work with MRT now?

And what’s glBlitFramebuffer() have to do with this?

In general when dealing with glBlitFramebuffer() and MSAA render targets, assuming you’re not resizing the images in the blit (i.e. resolution is the same), then you either need the MSAA configuration to match between the framebuffers or you want one to be MSAA and the other not. If src is MSAA and dest is 1x, then the blit will resolve the framebuffer from MSAA to 1x. If src is 1x and dest is MSAA, then the blit will upsample the 1x to MSAA (IIRC).

If you’re talking about the interaction of glBlitFramebuffers() with MRT FBOs, then just realize that there is only one active read buffer (glReadBuffer) for the read framebuffer. So the blit can only resolve one color layer at a time (at least that’s my read):

[QUOTE=Dark Photon;1292655]
If you’re talking about the interaction of glBlitFramebuffers() with MRT FBOs, then just realize that there is only one active read buffer (glReadBuffer) for the read framebuffer. So the blit can only resolve one color layer at a time (at least that’s my read):[/QUOTE]

THIS!

What I try to do is to be able to use a colorBuffer MSAA that is in the same bufferObject that all the colorsAttachment layers, so this is not possible since you have to read and write from different sources when you resolve MSAA framebuffer using glBlitFramebuffers()

[QUOTE=martel;1292658]THIS!

What I try to do is to be able to use a colorBuffer MSAA that is in the same bufferObject that all the colorsAttachment layers, so this is not possible since you have to read and write from different sources when you resolve MSAA framebuffer using glBlitFramebuffers()[/QUOTE]

Right. Just use multiple glBlitFramebuffers() calls, one per color buffer, to do the resolve.