i
i
i
i
i
i
i
i
1
IV
Variance Shadow Maps
Light-Bleeding Reduction Tricks
Wojciech Sterna
1.1 Introduction
Variance Shadow Maps (VSMs) were first introduced in [Donnelly and Lau-
ritzen 06] as an alternative to bilinear percentage closer filtering (PCF) to speed
up rendering of smoothed shadows. The algorithm is relatively inexpensive, easy
to implement, and very effective in rendering shadows with large penumbra re-
gions. However, VSM has one major drawback—apparent light-bleeding—which
occurs when two or more shadow casters cover each other in light-space. This ar-
ticle will show techniques that help to reduce the light-bleeding artifacts in VSM.
1.2 VSM Overview
The idea of variance shadow mapping is to store in the shadow map, instead
of a single depth value, a distribution of depth values over some region and to
use elementary statistics to evaluate the shadowing term. This approach makes
it possible to use filtering methods (bilinear, trilinear, blurring) on the shadow
map. A common option is to use Gaussian blur on the shadow map to achieve
soft shadows in O(n) time. This is a great advantage over traditional PCF which
requires O(n
2
) time to achieve the same effect.
To generate the variance shadow map, two values must be written into it.
The first is simply a distance from a light source to a pixel, as with traditional
shadow mapping (one thing that is important here is that this distance should
have a linear metric). The second component of the shadow map is a square of
the first component.
Once the shadow map has been prepared (it contains both depth and a square
of depth), additional filtering can be applied to it. To achieve good-looking soft
shadows, a separable Gaussian filter with 5 ×5 taps can be used.
207