Problem with shadowmaps

Finally i got depth texture projection working, but now i get some weird boxes rendered.
Look at this screenshot .
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

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.