Jump to content
  • Advertisement
Sign in to follow this  
IrYoKu1

Shadow mapping with orthogonal projection matrices

This topic is 2484 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 guys,

I'm trying to setup a orthogonal projection matrix for a directional light, but it's giving me problems. I just implemented regular spotlight shadow mapping, then switched the projection matrix to an orthogonal one. But as soon as I did that, shadow mapping stopped working (getting really weird non-informative results, so it's probably not very useful to post images). Looking at the shadow map itself, it looks good, the scene is being rendered there properly.

Any general hints about what I can be doing wrongly?

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
You shouldn't have any issues going between an orthographic and a perspective projection, assuming you set them up correctly. It's not necessary to divide by W with an orthographic projection but it won't hurt anything if you do, since W will be 1.0. Are you doing anything fancy when you sample the shadow map in your shader?

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!