Hi,
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[0].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
Thanks,
Jan Eickmann



I downloaded the new ATI drivers (for my radeon 9600 xt, 256MB) and it works fine now. I get a link error when I use noise functions though. This is what i did: