Jump to content
  • Advertisement
Sign in to follow this  
Aressera

OpenGL Doubled Shadow maps?

This topic is 3957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!