Shadow Mapping (GLSL) doesn't work

Started by
10 comments, last by Argo15 13 years, 4 months ago
bump
Vista sucks
Advertisement
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;

This topic is closed to new replies.

Advertisement