Shadow Mapping problem


I have some problems with my shadow maps. I have implemented it all, but it seems that i cannot get the values for PolygonOffset right.

The nvidia paper states 4/1, which i have used in this screenshot
Clearly some ugly articfacts, which I don’t think should be there?

The card is a Radeon 9700, if it makes a difference - and I have no other cards supporting ARB_shadow to test it on.

So what values do people use for this card? Suggestions to what I should try next?


Use “second-depth shadow mapping”. In other words, render the back-faces of the triangles into the shadow map instead of the front ones. As long as all of your objects are closed surfaces, this will work.

Are you using PolygonOffset when generating the shadow map, or when applying it?

When I generate it.

You also want to make the distance between the two clipping planes as close as possible when drawing the shadow map. Pushing the near clipping plane out has a greater effect due to the way the z-buffer is implemented.