I'm trying to implement some kind of simple lighting in a GLSL vertex shader.
Currently I'm using a directional light and I'm trying to get the L-Vector for the diffuse calculation like this:
vec3 lightDir = normalize(gl_LightSource.position.xyz)
The only problem is, this position doesn't change if I rotate the scene, etc.
(I tried this by simple setting the vertex-color to that value)
The GL-Spec says, that the position gets stored after having been transformed by the modelview-matrix, so it should change when I rotate the view.
If I use fixed-function lighting, it works.
Has anybody else experienced this issue or can tell me what I'm doing wrong?
I'm using an ATI Radeon 9800 with Catalyst 4.1