View Full Version : Render to and from same MRT
05-29-2007, 04:18 AM
should it be possible to render from one of the attached buffers of an MRT into another attached buffer of the samt MRT?
05-29-2007, 05:39 AM
no, that could create bad race condition artifacts.
Just use them separately.
05-29-2007, 06:12 AM
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.
05-29-2007, 03:11 PM
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.
05-30-2007, 02:41 AM
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
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.