PDA

View Full Version : NV Register Combiners on TNT2



DarkWIng
01-07-2002, 08:46 AM
Can anyone give me an example how to use register register combiners on TNT2

harsman
01-07-2002, 11:56 AM
NV_register_combiners is not available on the TNT, you'll have to make do with ARB_texture_env_combine (or OpenGL1.3) and NV_texture_env_combine4.

DarkWIng
01-08-2002, 12:42 AM
Can then someone please give me an example of useing NV_texture_env_combine4. (I've read nVidia's documentation but that doesn't give me any idea how to realy use it)

DarkWIng
01-09-2002, 08:24 AM
Anyone? Please!

Bob
01-09-2002, 10:18 AM
Read the spec for the extensions ARB_texture_env_combine and NV_texture_env_combine4. They provide all the information you need. Begin with ARB_texture_env_combine, and make sure you UNDERSTAND it, before moving into combine4.

DarkWIng
01-11-2002, 05:20 AM
I already readed those documents but they dont help me very much...

OK.. to be more specific. here is what I need:

I have a terrain with 2 textures. One for flat land the other for slopes. Each vertex also has it's color. Alpha component of color of vertex represents how much of each texture is on this vertex.

example:
0.0 - 100% texture0 + 0% texture1
0.3 - 60% texture0 + 30% texture1
1.0 - 0% texture0 + 100% texture1

Until now I have been rendering this in two passes. first draw all with texture0 and then blend texture1 where needed. Now I want to render all this in single pass with multitexturing. How do I do this?

harsman
01-12-2002, 04:53 AM
Check out the interpolate combine mode. It does exactly this. Also see this thread (http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00003934&forum=3dtheory&id=-1) on flipcode.

DarkWIng
01-12-2002, 11:55 PM
thanks harsman!

This is what I needed. Well almoast. Now I need just to add color to terrain.

Something like:

result = ( alpha * texture0 + (1-alpha) * texture1 ) * color

Is this possible in 1 pass?

Bob
01-13-2002, 05:02 AM
That specific formula is not possible in one pass if you only have two combiners. It requires three, one to fetch the first texture, one to interpolate the first and second texture, and one to modulate with the color.