Geforce3 vertex shader question

I’ve got a question about what happens to lighting normals after vertex shader translations.

If you have a simple triangle and lets say the normal of this triangle points directly at a light sorce so the triangle should be fully lit by that light. Now lets say one of the vertexs on that triangle is translated directly toward the light source. The triangle’s light normal should no longer be pointing directly at the light source, but a transpose will not affect a normal vector.

Do you guys see what I’m talking about? The example above is just one of the worst cases I could think of. Is the normal just left alone or what? (I’d really apricate it if one of you Nvidia guys that check out this site gave me your answer.)


if any of the vertices of the triangle are moved u have to recalculate the normal again.


When using NV_vertex_program, you’re responsible for all T&L. That means that if you distort the geometry, you have to account for it in your lighting calculations. The normal that comes in to the vertex program is exactly as it was passed in by your application. If you light in eye space, you’ll have to transform the normal by the inverse transpose of the modelview matrix, but you have the option of lighting in whatever space you like.

Vertex programs give you great freedom, but they definitely don’t do any of the math for you.

Thanks -