I’m having a multitexturing problem. I’m trying to have a textured object lit with a lightmap. The oops is that I would like my lightmap to depend on a light color that can change (like a disco light). Calculating and uploading the new lightmap every frame wouldn’t be such a good idea.
Here is the exact function I’m trying to build :
PixelColor = (BaseColor + (LightmapTexel * LightColor)) * TextureTexel.
BaseColor is the object color in flat shading.
LightColor is the color of my Light.
LightmapTexel is my GL_LUMINANCE map, so the shape of my Light is customisable (like a projected square spotlight).
And my TextureTexel is the base texture for my object using GL_MODULATE.
Question : Can I do this in one pass using multitexturing (and maybe some obscure extensions I don’t know ) ?