1
\$\begingroup\$

I wanted to know if it's possible to use a texture of an FBO for post-processing and using that texture again for writing or do I need at least two textures?

I hope you understand what I mean.

\$\endgroup\$
4
\$\begingroup\$

You can write to or read from an FBO as many times as you like. What you can't do in general is both read from and write to the same FBO at once. So you can't do an "in-place" operation, using the same FBO as both a render target and a texture in the same draw. This means you may need at least two textures to "ping-pong" between when doing a sequence of image processing operations, such as a separable blur for example. For more information see this OpenGL wiki page.

\$\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.