Yes, I know that i must use GL_MODULATE to mix texture1 (which i do with texture0) with the GL_LIGHT influence but the problem is that i must also apply GL_INTERPOLATE function to get alpha belnding between texture0 and texture1…
real dilemma isn’t it ?
when i use GL_MODULATE both textures are lighted correctly
but when I want to use GL_INTERPOLATE lighting on texture1 disappear.
the only differrence is usage of arg2 to interpolate (source2 : texture0, operand0 : src_alpha) and I can’t find why it so…
well… on nvidia and ati hardware you have some support for using all textures in every combiner (as they get fetched before, and then combined…)
on ati this is called crossbar, on nvidia its well… its known fact (register combiners prove this)
this means:
you can do in the first stage
curcolor = lerp(alpha,tex0,tex1);
and in the second one:
curcolor = curcolor*primarycolor;
that way you get:
output = primarycolor*(lerp(alpha,tex0,tex1))
or in words:
the interpolated combination of the two textures gets lightened by primarycolor, and this is the final result…
first stage :
you get texture0 in unit0
you get texture1 in unit1
you interpolate via alpha source
(tex0alpha + tex1(1-alpha))
then you have the current color
second stage :
you modulate current color with primary color.
(curColor*PrimaryColor)
but don’t understand is for the second stage, to modulate both current and primary color you have to set them respectivily in unit0 and unit1, no?
so where do you register current color while you do this ?
(sorry to ask, as if I were 4 years old but i’m quite not at ease with multitexture )
“i cant find any good info about something from nvidia”
well then you are COMPLETELY BLIND…
nvidia’s development server is filled with tons of pdf’s, of ppt’s of zip’s of exe’s of cpp’s of c’s of h’s about EVERYTHING from nvidia…
for mpech
well i don’t know the syntax that well of the texenv for multittexturing (as i always use registercombiners)
but you got the idea…
first stage:
unit0 = tex0
unit1 = tex1
//unit2 = alphasource i just don’t know from where you want your alpha, and not sure how to set this for GL_INTERPOLATE…
combinermode: GL_INTERPOLATE
for implementation-details, just read some docs and specs etc… myBollux has some nice code on his page i think (but i don’t know the link… the guy with something/myBollux should now put this link in…)