title: Lighting 2D Objects from behind
body: <p>I am working on a 2.5D lighting problem. I wanted to create an effect where the moon was lighting 2D things from behind. Have you ever seen a solution to a problem like this? I'm trying to use normal maps on a sprite in Unity, which looks fine-ish when the moon is poking out from behind something -- but when it's completely behind it (as in the third picture), the effect doesn't work -- because to light a 2D element in 3D, you have to light it from the front, so far as I know Perhaps there's a solution that doesn't involve real light, but only shaders which reveal an angle-based mask. Do you have any bright (HAW!) ideas?</p>
  
  <p><a href="https://i.stack.imgur.com/7DEQM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7DEQM.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/cewk8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cewk8.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/kOwQk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kOwQk.png" alt="bad"></a></p>
  
  <p><a href="https://i.stack.imgur.com/cKcAI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cKcAI.png" alt="enter image description here"></a></p>