Doubled Shadow maps?

Started by
2 comments, last by Aressera 16 years, 2 months ago
Hey, I just got an almost working simple implementation of shadow mapping done, however, I'm getting strange behavior where the shadow is projected from the light source in the direction of the object, and then also in the opposite direction, such that if the light is beneath a floating object, it projects a shadow on the floor and the ceiling. Does anyone have any clue why this could be happening? I'm using OpenGL and shader code copied straight out of the Orange Book.
Advertisement
This is a well known property of projective texturing. I don't have much time right now so see this paper for more information and some ways to avoid it.
That sounds kind of strange. Are you intending to just use a spotlight? If you are just using a single projective shadow map it will only be valid for the area inside of the frustum of the projection. For a spotlight you want to make sure the light is completely attenuated before reaching the edges of the shadow map.

If you want omni directional light then you will need to use a cube-map or dual parabaloid maps.

Cheers!

Eric
Problem solved!

thanks for pointing me in the right direction, everything works now.

This topic is closed to new replies.

Advertisement