Jump to content
  • Advertisement
Sign in to follow this  
meanwhile

Compositing

This topic is 2387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to render a scene, then perform some raster post-effects on the resulting image, then render another one and put it over the previous with alpha etc, all in realtime.


What is the proper way of doing it in OpenGL?

Share this post


Link to post
Share on other sites
Advertisement
You need to first render to an off screen buffer. To do that look up OpenGL FBO (Frame Buffer Object). You will bind a texture to the frame buffer.

Once you render the scene, you change the FBO, you take the resulting texture rendered to previously and apply that on a quad that covers the entire screen to render post rendering effects.

In a nutshell that is what you need to do. I hope this helps point you in the right direction.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!