Shadow Mapping (GLSL) doesn't work
Someone already mentioned this, but is your depth texture correct? Try binding the texture and draw a quad on the screen to make sure the depth texture looks correct. If it is, then I think the problem is
ShadowCoord = gl_TextureMatrix[5] * gl_Vertex;
should be
ShadowCoord = gl_TextureMatrix[5] * gl_ModelViewMatrix * gl_Vertex;
where
gl_TextureMatrix[5] is the lightProjection*lightModelview*inverseCamera;
ShadowCoord = gl_TextureMatrix[5] * gl_Vertex;
should be
ShadowCoord = gl_TextureMatrix[5] * gl_ModelViewMatrix * gl_Vertex;
where
gl_TextureMatrix[5] is the lightProjection*lightModelview*inverseCamera;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement