PDA

View Full Version : multitexturing, advice on a test



pepeio
03-25-2002, 04:44 AM
Hello.
I'm actually trying to do some multitexturing, and what i tried does not work. I'd like to know if i'm doing it the right way.
First, what i want... i'd like to have (at least) two textures one on each other, but having the blending based on an alpha that would not be embeded in the second image's data. To be clearere, i want to use an image A for background, and map onto it an image B, but using an image C to control the blending levels. ARB_texture_env_combine mode does that work, for the second level.
What i'm doing is: first image mapped as combine modulate using primary color, second is mapped the same way, and then i'm applying a combine interpolate to the third texture unit using the third image as interpolator, previous unit as mapping, and a transparent constant color as texture.
What i get is that i have my two last levels and white where the background texture should appear. It seems that giving a transparent constant color has no effect. How, then, can i use the interpolate to get what i need?
Am i on a wrong path?

thanks a lot.

zeckensack
03-25-2002, 05:03 AM
You need three texture units for that. Are you sure you have them? An ATI Radeon would certainly work, but I don't think the Geforces have more than two tex environments (I'm pretty sure up to GF2, not so sure about GF3/GF4Ti).

On NVIDIA (all caps!) hardware, the register combiner extensions should be able to do it, but you have to access the constant color in the second environment - the third one simply isn't there.

pepeio
03-25-2002, 05:22 AM
i have 3 texture units. (radeon mobility m6)
I'm not sure to understand what you mean with 'the third isn't there'...
Do you have any example of someone that used this technique? can't find an article or tutorial that talks about it.

Thanks a lot.

pepeio
03-28-2002, 05:42 AM
Well.
Has someone an idea about the validity of setting a transparent color to a combine_modulate source in order to see the mapping under?