PDA

View Full Version : opengl es and multipass shader



giuseppe500
04-20-2011, 08:38 AM
hello.
How i can use multi pass rendering with 2 pass shader in opengl es 2.0?
I would use this for webgl.
Is possible?
thanks.

StefanG
04-24-2011, 02:50 AM
You need to render to a "framebuffer object" (FBO), and
then change the role of that FBO and bind it as a texture
in the next pass. It is done the same way in "proper"
OpenGL, so apart from the difference in syntax when using
JavaScript to interface to OpenGL, you should be able to
do it like FBO tutorials tell you.

You can find a number of good FBO and multipass rendering
tutorials and examples on the web. This is not the best
forum to ask questions that are not directly related to
GLSL, so for the FBO topic you will probably find better
help in the more general forums. Good luck!