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

Started by
4 comments, last by JakeM 16 years, 11 months ago
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
Advertisement
Read the Framebuffer Object 201 Article in the OpenGL section of this page. It describes very good how to do this.
http://3d.benjamin-thaut.de
OpenGL FrameBuffer Object 201
Is there a FBO 101 tutorial? Searches come up empty.
Quote:Original post by JakeM
Is there a FBO 101 tutorial? Searches come up empty.


FBO 101

Ah, great thanks!

This topic is closed to new replies.

Advertisement