Hello OpenGL community,
first off, I’d like to say that I try to implement this W3 like multitexturing with OGRE. The reason for posting my issue here is that I didn’t succeed in doing it and I still try to understand the reason. So I investigated Ogre and looked into its OpenGL Rendersystem. There is a part where they use multiple function calls of “glTexEnvi” with certain parameters. I am sure that these parameters are the key to my problem, so here we go:
Imagine a simple quad. This quad is using four uv texture coordinate sets. Four uv sets because it shall use four textures. Each texture contains alpha and colour information and I want to blend them in the following way:
newState = previousState * (1-A) + (polygonColour * currentTexture * A)
Where A is the alpha information (opacity) of the texture of the current state and I hope the other variables are self explanatory.
The reason why I am sure that this is possible is that Blizzard succeeded in implementing such a multitexturing approach in some way (the evidence). They didn’t use (programmable) shaders and the video cards the game supports got four texture units at their maximum.
So now my question is: Which parameters do I have to use for glTexEnvi to get these results? Or do I have to do something else too?
BTW: If you want to see the original thread of the OGRE forums, please look here: Ogre Multitexturing Problem