View Full Version : Multipass Rendering
iris_raj
05-17-2007, 10:23 PM
Dear OpenglProgrammers,
How to implement Multipass Rendering using Opengl and GLSL.
Any examples will be of great use.
Thanks in advance
RAJESH.R
Vexator
05-17-2007, 11:37 PM
- enable depth test
- render depth (and optionally ambient color)
- enable additive blending
- disable depth test
for each light:
- render lighting
- disable additive blending
PaladinOfKaos
05-18-2007, 11:12 AM
Actually, you want to keep depth test enabled, and disable depth _writes_. It should be:
*enable depth test
*for each frame:
*set depth test to GL_LEQUAL or GL_LESS
*enable depth writes
*disable color writes (unless you want ambient)
*render
*disable depth writes
*enable color writes
*set depth test to GL_EQUAL
*enable additive blending
*for each light:
*render lighting
*disable additive blending
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.