PDA

View Full Version : Shadow Mapping problem



jonasmr
10-29-2003, 02:37 PM
Hi.

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 http://www.diku.dk/hjemmesider/studerende/meyer/artifact.png
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?

Stuck.

Korval
10-29-2003, 03:01 PM
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.

cass
10-29-2003, 10:27 PM
Are you using PolygonOffset when generating the shadow map, or when applying it?

jonasmr
10-29-2003, 11:23 PM
When I generate it.

MattS
10-30-2003, 01:01 AM
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.