I am trying to do
N DOT L
N DOT V
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.
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.
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 I really hope there is a better way though.