3
\$\begingroup\$

I wanted to know what the better approach would be for post-processing: swapping between framebuffers or swapping between textures attached to one framebuffer?

\$\endgroup\$
2
\$\begingroup\$

It's almost always better to change a state's object instead of changing an object's state. Mostly for readability, as thats how GL is expected to be used. Even if you have multiple attachments in common between FBOs, I would still suggest binding them to each FBO.

As for performance, its implementation dependent, but framebufferTexture is likely slower due to it having to compute the mapping for the fragment outputs into the texture, while a complete framebuffer already has this mapping computed and just needs to load it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.