PDA

View Full Version : shadow map artefacts based on camera pos



titan
02-27-2003, 07:41 PM
I'm doing shadow maps and I get the same artefacts as valoh as he showed in this screen shot http://www.krautgames.de/valoh/opengl/shadow.jpg

I can't link to a screen shot, but it looks very similar. I have a roof of a house with the sun on one side. The side facing away from the sun has the artefacts (imagine it is the left side of the 'A' with the o as the sun)

o
A

I'm rendering only back facing polygons to the depth buffer and the artefacts go away as I pull the camera further away from my house. I've tried tweaking the offset and bias a lot, but no matter what I do I can't get rid of them.

As the camera moves closer the artefacts "climb" up the slope from the bottom until they almost reach the top.

What am I doing wrong?

titan
02-27-2003, 09:04 PM
The o was supposed to be on the right of the A http://www.opengl.org/discussion_boards/ubb/smile.gif
____o
A

But the spaces got trimmed...

titan
02-28-2003, 08:11 AM
Opps. It was a scaling problem. I had code to in there to scale my objects if needed and I found I hadn't removed all of it.