Screen Door Shadow Mapping

I developed this technique 2 or 3 years ago to solve one of the main issues with shadow mapping: transparency. The only other solution I had heard of at the time was Deep Shadow Maps, which didn’t seem like something that could be done in real time.

It’s a really, really simple idea. First, render the shadow map, drawing semi-transparent objects with screen door transparency. Apply some softening to the shadows, and voila. Of course, there are two major drawbacks.

  1. It’s still noisy, unless you use a massive filter.
  2. The only softening technique that works is PCF. VSM (and possible ESM) doesn’t work because the method naturally creates big depth discontinuities, and the conventional fix for light bleeding eliminates the transparent effect.
Here’s a screenshot from 2-3 years ago. Looking at it again after all that time… if I had the capacity for it, I’d probably be embarrassed at how obscure it is. The filtering used was VSM, and you can see the problems – the shadows on the balls further away are cut off.
Since I am terrible at coming up with names, I called this technique “Screen Door Shadow Mapping”.
A few years wiser, I decided to have another go, making a couple of improvements:
  1. More reliable transparency pattern generation.
  2. Color.
I’ll go over the finer detail of this technique in a later post. For now, you can have these test screens, which, hopefully, make a little more sense than the last one. Because three floating boxes casting shadows on a dimly lit room make more sense than four floating spheres casting shadows on a dimly lit sky-sphere.
I’ll post one last image with amplified colors.
This shot got me thinking – what if I could use this to fake caustics?
I’ll make sure to have a better demo scene next time. Until then…
YellPika
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s