February 18, 2015  by  
Tags: , ,

I’ve given the shadow system some much needed love, so I figured I’d throw up a quick demo. It looks considerably better than the previous version. Here’s what changed:

  • Removed the horizontal “swing” effect by skewing every vertex in a sprite based on its position relative to each light source, rather than skewing all vertices by a uniform value. This also has the added effect of allowing shadows to appear on both sides of a building when standing in front of it.
  • Added a transparency lerp when close to the object’s pivot (vertically). This eliminated the vertical “swing” effect, and corrected issues with large objects (the inn) not being tall enough to properly overlap a large light source.
  • Blur added. This also corrected an issue where the tops of fence posts appeared warped.
  • Added a configurable vertical shadow offset for each sprite, which makes tree shadows look significantly better.

Web player (requires Unity Web Player)



Comments are closed here.