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!
Shadow mapping with orthogonal projection matrices
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement