PDA

View Full Version : Blending with multiplication



MarcusL
08-28-2002, 08:03 AM
Hi!

glBlendEquation only allows addition and subtraction. Is it possible to do rgb-multiplication with the frame buffer as well?

(For example to do multipass rendering, base texture + multichromatic lightmaps.)

Arath
08-29-2002, 06:08 AM
You can do a multiplication with multiple pass (glBlendOp) or in a single pass with multitexturing.

with the glBlendFunc(GL_DSTCOLOR, GL_ZERO) you should multiply

result = src * GL_DSTCOLOR + 0

Hope it helps
Arath