Howdy
My OpenGL app performs dot 3 normalmapping. Now, I need two texture units for this normalmapping. First one is a normalization cube map, second one is the normalmap. I also have a vertex shader that transforms things into tangent space, and I also wish to do some simple light effects, such as attenuation and light color.
I can calculate these effects in my vertex shader, and put them into the output color, but the only way I can get this to be used in the combiner, is if I use 3 units, and have the last texture unit set to just modulate the previous result (after the normalmapping), with GL_PRIMARY_COLOR. I can’t find any way to get the output color from my vertex shader used in just two texture units! (And unfortunatly my target platform only has two texture units )
Can anyone help me?