View Full Version : combiners... multiplying two textures

01-03-2003, 09:57 AM
Ok I knew how to do this but I forgot... the idea is to multiply two textures EASILY... no shaders and anything like that. Now I have:

1.- render a vertex array
2.- render some triangles again, but using immediate mode

Ok so the deal is that the second pass should multiply the first one. To give you an idea, it's an armor I'm rendering, with a base texture and a second pass for dirt etc. so I re-render some triangles with a new map and different U,V pairs, and I need the setup code to send this down the pipe


01-03-2003, 11:23 AM
What about using the blending mode GL_DST_COLOR, GL_ZERO ?

glBlendFunc( GL_DST_COLOR, GL_ZERO );

Or you can set glTexEnv to GL_MODULATE for your second texture unit so when you render the second tex unit will be multiplied with the first. This will not require to render the geometry again if that's all you need.