PDA

View Full Version : Multipass vs. Multitexturing



BwB
03-18-2001, 09:04 PM
Are there any examples available that show to to emulate multitexturing with multipass rendering? I can think of all sorts of problems I can run up against primarily sorting and z-buffer problems and I've never been good with blending modes.. which ones properly emulate GL_MODULATE and GL_ADD (in respect to multitexturing)?

zed
03-18-2001, 11:34 PM
just render your second pass with glDepthFunc(GL_EQUAL) also depth writes off.

Jorrit
03-19-2001, 03:51 AM
also, for the first pass you need to set:

glBlendFunc(GL_ONE, GL_ZERO)

And for the other passes:

GL_MODULATE -> glBlendFunc(GL_DST_COLOR, GL_ZERO)

GL_ADD -> glBlendFunc(GL_ONE, GL_ONE)

BwB
03-19-2001, 05:09 AM
Thank you both very, very much!!

ET3D
03-25-2001, 11:36 AM
Also, modulate x2 is (GL_DST_COLOR, GL_SRC_COLOR)