While developing a small 2D engine, I stumbled across a little design problem which I'm unfortunately with my level of knowledge unable to solve without the help of you.
Let me explain: The game I'm developing the 2D engine for should contain complex effects, which likely would require multiple render passes. The problem is, I'm not sure if I understood the concept of multipass rendering right.
At this level of knowledge, I would implement it this way:
- Initially create, setup (attach it to a texture, ...) and bind a frame buffer object
- Now render the stuff onto which the effect should be applied to the FBO's attached texture
- Render that texture to the same FBO by using the shader for the first pass
- Unbind the FBO and render the attached texture to the standard FBO by using the shader for the last pass
The question is now if this is the most efficent way of solving my problem, or if there are any better ways of doing this out there.