render to more than one texture in shader with fbo's
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
Read the Framebuffer Object 201 Article in the OpenGL section of this page. It describes very good how to do this.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement