On his blog, Matt Pettineo writes about his experiments on cascaded shadow maps, including cascade optimization, shadow map filtering and GPU scene submission: A Sampling of Shadow Techniques.
Tag Archives: EVSM
Variance Shadow Maps
Shadow mapping is a popular way of getting dynamic shadows, but suffers from aliasing artifacts that cannot be addressed by usual texture filtering. The reason boils down to the fact that the average of depth test results (which is what we want) is not the same as the result of a test on the average of depths (which is what hardware does).
The trivial way to do it anyway is the Percentage Closer Filtering (PCF) technique, and usually stands in papers as the expensive upper bound.
Variance Shadow Maps are a simple technique allowing filtering, including some Gaussian blur for example, thus giving soft shadows (the blur does not depends on the distance from the occluder though). The main drawback of the algorithm is the light bleeding artifact that occurs as soon as the scene complexity is too important. I also found it to be fairly expensive in terms of texture memory since it requires twice as much as regular shadow maps, and another times two for blurring.
- The paper, demo and GDC2006 slides are available on the Variance Shadow Maps page
- The Chapter 8 of the GPU Gems 3 book gives crystal clear explanations of the technique and its implementation, as well as its drawbacks and how to address them (which quite often missing from publications)
- Fabien Sanglard has a simple implementation tutorial (the culling of front faces as usual contradicts the author’s recommendation not to do so though)
- This article by Marco Salvi discusses the light bleeding issue
- This fairly comprehensive article on cascaded shadow maps addresses, among many other things, the use of VSM with CSM
- Andrew Lauritzen (coauthor of the paper) gave some updates of his developments on Beyond3D forum (here and here; keyword: Summed-Area Variance Shadow Maps), and pointed out some more recent ones with Sample Distribution Shadow Maps, and a talk Bungie gave at SIGGRAPH 2009
- At last, this excellent GDC2008 talk gives insights on the different existing shadow mapping techniques
One could argue VSM are some pretty old stuff already, but because of the elegance of the trick they rely upon and the ease of implementation, I really like them.