Render to and from same MRT

Hi,

should it be possible to render from one of the attached buffers of an MRT into another attached buffer of the samt MRT?

/A.B.

no, that could create bad race condition artifacts.
Just use them separately.

Originally posted by zeoverlord:
no, that could create bad race condition artifacts.
If the source and destination are different attachments (GL_COLOR_ATTACHMENT0_EXT and GL_COLOR_ATTACHMENT1_EXT for example) I don’t see why there would be a race condition?

The reason I wan’t to do this is to minimize the number of calls to glBindFramebufferEXT which is mindbogglingly slow, at least with recent nvidia drivers.

/A.B.

True, but if that where possible it would also be possible to do all the wrong things, so it’s a safeguard.
And according issue 23 in the GLSL spec it would possibly be slower than binding a frame buffer object.

actually in one of the early fbo slides by nvidia, they recommended just switching the drawbuffer, being the fastest method, of changing render-texture, next fastest was changing attachment, and slowest was binding new fbo.

just be aware that of course you can never read/write from the same attachment.

but alternating glDrawBuffer(attach0 / attach1) should work