I am using vertex programs, register combiners, and texture shaders in a multi pass rendering algorithm.
For the very last pass, I would like to do a simple modulation between a texture and the result from the previous rendering passes.
A simple modulation setup doesnt work. i.e,
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
Regardless of the last parameter of the glTexEnvi function, the texture is always ADDED to the previous fragment.
Given the info above, could anyone point out how to modulate between a texture and the result of multiple passes?