View Full Version : in dx its called multiply blend mode.. and in ogl?

06-30-2005, 07:50 AM
I want to use multiply blending mode so i can mix a texture with a lightmap in directx I achived the desired effect, however in opengl I could only achiv e a lighter shiny blending and not the same as in DX, I tried what someone suggested for lightmaps but it looked way too shiny, and yes I got lighting disabled on both ends. thats not the problem I think its just the blending modes.. am I wrong or in total theres more than 22 possible convinations of blending in opengl??.

if it serves as a hint, the unlit parts of the lightmap are black, the lit parts are multicolor (white, red, orange, etc) I need to multiply the colors and take the black out with the blending, how???

06-30-2005, 09:23 AM
can you be a bit more specific. there is no "multiply" "blending mode" in d3d.

is this for a texture environment combining or for frame buffer blending?

for single pass lighting, GL_MODULATE is generally what you want as your env color op.

all the color/alpha ops are defined in the spec.

06-30-2005, 12:22 PM
speak english freak

06-30-2005, 01:14 PM
You really want "multiply blending" ? Right :
glBlendFunc(GL_DST_COLOR, GL_ZERO) //Blending formula with these factors : srcColor*destColor+0

Freak yourself :p

06-30-2005, 01:46 PM
:cool: :rolleyes: :D :p ;) :confused: :cool:

06-30-2005, 01:54 PM
thats toooo dark!! i tried GL_SRC_COLOR,GL_SRC_COLOR and it worked with one of my tests on the other with a white light it didnt work why?

06-30-2005, 01:57 PM
try dst_color, src_color. that gives you 2x modulate.