Archived

This topic is now archived and is closed to further replies.

Electron

Multitexturing, how to set a unique color on each texture?

Recommended Posts

The problem is this: Say if i want to render two textures on a surface, but with the color intensity of 25% from the first texture, and 75% of the other? I understand how to deal with multitexturing, but i cannot find any way to add a color to each texture. (or at least i fail trying). It is imperative that it is solved with multitexturing. I cannot cheat by rendering the surface twice with blending. Electron

"Your truth can be changed simply by the way you accept it."


Share this post


Link to post
Share on other sites
I did, but i never got any results, so my guess was that the color was used for another purpose. (For instance, i saw that this color only was used when using texenv mode GL_BLEND, or am i wrong?)

Electron

"The truth can be changed simply by the way you accept it."


Share this post


Link to post
Share on other sites
Just say that i want to blend two textures using multitexturing, how do i do to make, for instance, the first texture appear of 25% oparcity and the other with 75?

Electron

"The truth can be changed simply by the way you accept it."


Share this post


Link to post
Share on other sites
I''d be also interested if anyone knows a way to multitexture two textures each having a different color... but I don''t know of any way this can be done, except perhaps with register combiners or pixel shaders. ie.
1) multitexture pass #1 with one vertex color using GL_DECAL/GL_REPLACE
2) multitexture pass #2 with another different vertex color using GL_DECAL/GL_REPLACE

The problem is that one can only specify one vertex color afaik.

I think this is different from what Electron wants, which sounds like a problem of picking blend paramaters/equation for the second texture unit.

Share this post


Link to post
Share on other sites
>>Just say that i want to blend two textures using multitexturing, how do i do to make, for instance, the first texture appear of 25% oparcity and the other with 75? <<

thus u want
tex0 * 0.25 + tex1 * 0.75

this can be achieved with interpolate with tex_env_combine
which lets u do
tex0 * A + tex1 * (1-A)

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites