   weird shadowmapping problem
  hello,i am having a weird issue with my shadowmap implementation. the shadows seem to be "stuck" on objects. for example i have a wheel that shows some shadows, and when i rotate the wheel, the shadows rotate with them as if was just a second texture on it.when i render the scene from the lightsource i get the matrices like this:glGetFloatv(GL_PROJECTION_MATRIX, lpm);glGetFloatv(GL_MODELVIEW_MATRIX, lvm);and i forward them to shader like this:int loc = glGetUniformLocation(m_prog, "lightProjection");glUniformMatrix4fv(loc, 1, false, lpm);int loc = glGetUniformLocation(m_prog, "lightView");glUniformMatrix4fv(loc, 1, false, lvm);if i visualize the shadowmap itself, it looks good. objects that are nearer to the light are darker. the shadowmap is visualized in the lower left corner here:notice the strange shadows on the wheels. if the wheels rotate, the shadows rotate with them, as if it were a multitexture.vertexshaderuniform mat4 lightView, lightProjection;varying vec4 shadowTexCoord;const mat4 biasMatrix = mat4(0.5, 0.0, 0.0, 0.0,0.0, 0.5, 0.0, 0.0,0.0, 0.0, 0.5, 0.0,0.5, 0.5, 0.5, 1.0);//bias from [-1, 1] to [0, 1]void main(){gl_Position = ftransform();mat4 shadowMatrix = biasMatrix * lightProjection * lightView;shadowTexCoord = shadowMatrix * gl_Vertex;    }fragmentshaderuniform sampler2DShadow shadowmap;varying vec4 shadowTexCoord;void main() {   vec4 shadow = shadow2DProj(shadowmap, shadowTexCoord, 0.0);    float colorshadow = shadow.r < 0.1 ? 0.5 : 1.0;vec4 color = vec4(1,1,1,1);gl_FragColor = vec4( color*colorshadow, color.w );}thanks for any help on this!   
  anyone? :D   ;  It's been a looooooooooooooooooong time since I've even looked at shadow mapping stuff (and GLSL for that matter), but are you sure you want to be using the untransformed vertex position for shadowTexCoord?   ;  thanks! yeah, the shadows being only on untransformed objects, that would explain a lot!but how do i get the vertex transformations into the shadowtexcoords? i tried something like this:shadowTexCoord = shadowMatrix * gl_ModelViewProjectionMatrix * gl_Vertex;  but that doesnt give me any shadows at all.   ;  Again, looooooong time since I've done any GLSL stuff :)Surely you've already got the transformed vertex in gl_Position?   ;  thanks!so you mean something like this?shadowTexCoord = shadowMatrix * gl_Position;also no shadows :(   