Hello
I want to apply multiple image processing effects to an input texture using OpenGL ES.
I successfully managned to apply one post processing effect using a Framebuffer Object but I do not quite understand how, without repeating every single step of my step of my process, I can apply numerous post processing effect without having to redo every step each time.
The steps I am going through right now are the following:
- Loading my shader(s) and getting the desired location to transfer my data
- Initializating my FBO
- Creating a texture using my input data
- Binding FBO
- Activating TEXTURE0 and binding the previously generated texture
- Sending data using the acquired location
- Drawing a full screen quad and making it use my shader program
- Reading the FBO texture (using glReadPixels) and saving the result to an image
- Unbinding everything to clean up.
From what I understand I do need to repeat the step 5,6,7 with my other post processing shader and using the texture I finally got in step 8 but I do not think this is the right way to go as it wil force me to read data from FBO into a texture to then retransfert them which is really costy.
Am I missing something ?