Dynamic shadows in orthographic camera.


I’m trying to use shadows with orthographic camera. I can only see shadows with directional lighting, not with points light. (I have enabled “deferred lighting” for see shadows with points light).

I want to get an effect like this video:

I was researching and creator of the game was asking to create the shadows, he uses camera with projection matrix. Look at this post:


There are several problems. I have no idea how he has done that, and how should I work with cameras matrix in Unity. Nor do I know if this is possible in Unity, because he uses OpenGL (I think).

Anyone would think an easier way to get it? Or another way? Or you can help me to understand what they have done to achieve this?

Thank you.

PS. I need to do this before I finish the month free trial of Unity Pro. Accomplish this will be what decides if I buy Unity or not. Because I need to know if this is possible in Unity, or if I can do it.

Put your Ortho camera really close to your objects. Then set the Clipping Plane to a low number, like 50. Your will see your shadows.

Point lights get no shadows in orthographic. Just found that out myself, actually. I didn’t fully grasp the explanations, but here’s a thread with some discussion on this:


Your proposed workaround is possible in principle. Pretty sure I’ve seen it done in Unity. Heck, I did it with XNA, so it’s sure do-able. Incidentally, Unity Pro allows direct use of (some? all major?) OpenGL commands.

Note the really, really, stupidly clever suggestion proposed in the linked thread: Use a very, very distant perspective camera with a tiny, tiny viewing angle to imitate an ortho camera