I have a sample GLUT test app where I’ve taken Tom’s Phong shader code from his GLSL demo and used it on a simple object that I drew centered at the origin (in world coordinates) using a display list.
I’ve hard-coded the light position as a constant vec4 in the vertex shader to be
(0.0, 0.0, 5.0, 1.0).
So, I expected the light to be 5 units in front of my object (i.e., 5 units in front of the screen) shining on my object.
Instead, the light appears to be 5 units above my object (in what I know is my positive y-axis).
In order to get what I expect, I have to change my constant light position to be
(0.0, -5.0, 0.0, 1.0), since it appears that the y and z positions are reversed, as well as their signs.
I upgraded my display drivers to Catalyst 4.4 for my ATI 9600 Pro card.
Any ideas? Should I post the source for my app, as well as for my shaders?