We have seen in Chapter 3 that image-based hard shadows are prone to aliasing. recall that errors due to the discrete shadow-map sampling can be categorized into intitial sampling errors (which happen when creating the shadow map) and resampling errors (which happen when creating the shadowmap) and resampling
errors (which happen when rendering using the shadow map). Chapter 4
showed several approaches to reduce initial sampling error (i.e., undersampling)
by adapting the shadow-map resolution in various manners.
in this chapter, we will discuss several filtering methods for shadow mapping, which are mainly used for reducing resampling error. furthermore, filtering is also often used to make undersampling artifacts less pronounced by smoothing or blurring the shadow boundaries. in fact, simple upscaling techniques for lowresolution
images also rely on lters to remove the quad appearance induced by
the pixels of the input image. At second glance, this becomes even more interesting
because it results in shadow boundaries that resemble to some extent the
appearance of physically based soŸ shadows at amuch lower computational ešort.
However, none of the followingmethods in this chapter give physicallymeaningful
soft shadows—their main purpose is to address the aliasing problem e›ciently.
In practice, most of the techniques presented in this chapter, as well as their
extensions, which we will discuss in Section 6.5.3, are standard solutions in game
contexts and are of high practical value.e simplicity of the implementation, the
relatively good performance, the simple tradeoš between performance and quality,
and the reasonable outcome (at least for most congurations) make them usually
a good choice.
the interested reader is also referred to the talk by Bavoil atGDC08 [Bavoil08a].
this talk summarizes many of the practical implementation aspects and serves as a good overview for the techniques that will be presented in this chapter.
We will first discuss why filtering shadow maps needs special attention (Section 5.1),
then show the applications of filtering (Section 5.2), namely blurring, proper filtering and reconstruction, and faking soft shadows.
Section 5.3 will deal with the important topic of accelerating the evaluation of larger filter kernels using precomputation.