PDA

View Full Version : Problem with shadowmaps



YengaMatic
08-18-2005, 09:49 AM
Finally i got depth texture projection working, but now i get some weird boxes rendered.
Look at this screenshot (http://img314.imageshack.us/img314/2898/shadowmap8mu.jpg) .
I suppose it's the light frustum being rendered, but no idea how to get rid of it. Any suggestions? I've looked at pauls'project tutorial on SM and nvidia demo, but theres no info on this box artifact :S

Aeluned
08-18-2005, 11:33 AM
First of all, I think you're rendering the shadow map from the wrong point of view, that doesn't look right.

Second, it's not the light frustum being rendered - if you want to use shadow maps with a point light you need to either use hyperbolic-whatever-they're called maps or render to a cube map.

You basically project a shadow map onto the scene - that's exactly what you're getting there...your projected shadow map.

Shadowmaps are best suited for infinite and/or spot lights. There's extra work involved for point lights.