View Full Version : 2d textrure lookup in NV

Paul js Im
10-09-2002, 03:00 PM
I am trying to do
And then look it up on a 2d texture.
N is from a normal map
L is from a cube map
V is from a cube map

I tried to do it in texture shadier and register combiner but I just can't find a way to do this in on pass using nv256 chip

You help will be greatly appreciated.

10-09-2002, 03:16 PM
I'm not sure what an "nv256" chip is, but I'll assume you meant nv25.

I don't think what you're asking for is possible on a GeForce 4. I haven't fully investigated texture_shader_3 yet, but I'm not sure it has the facilities to do what you're looking for.

If N, L, and V didn't come from textures, but were texture coordinates, I think you might be able to do it. I think this operation is simply beyond the limits of texture shaders.

Paul js Im
10-09-2002, 03:58 PM
Yes, I mean GeForce 4.

texture shader2 you can do a dot product and look up on a 1d texture.

I was going to try 2 pass where I do
L dot N and look up a 1d texture ( in texrue shader)
(2 pass) N dot V look up a 1d texture (in texrue shader)then do L dot N (in the combiner) then mul to the lookup texture color and added to screen buffer.

I hope this works http://www.opengl.org/discussion_boards/ubb/frown.gif I really hope there is a better way though.