Jump to content
  • Advertisement
Sign in to follow this  
ade-the-heat

render to more than one texture in shader with fbo's

This topic is 4091 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

For the output of a shader we can use gl_FragColor= whatever. If I want to render to more than one texture in a shader using FBOs how do I do it ? I thought it was gl_FragColor[0] = vec4(...); gl_FragColor[1] = vec4(...); etc but I get compile errors about each of the above statements. By the way my card seems to support glDrawBuffers

Share this post


Link to post
Share on other sites
Advertisement
Read the Framebuffer Object 201 Article in the OpenGL section of this page. It describes very good how to do this.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!