Game Development Reference
In-Depth Information
to correctly shade each pixel. A major part of this article describes how to
store and to sort incoming fragments with Direct3D 11 in order to reconstruct
the transmittance function and have a suitable representation that allows a fast
lookup of the transmittance.
As with most shadow mapping algorithms, deep shadow mapping is also prone
to aliasing artifacts. However, most of these artifacts can be overcome by adapt-
ing techniques that are also used for traditional shadow maps, e.g., percentage-
closer filtering (PCF) [Reeves et al. 87]. We will show how DSMs can be filtered
eciently by exploiting spatial coherence among neighboring pixels. Further-
more, we extend this concept to allow filtering with exponential shadow maps
(ESMs) [Annen et al. 08].
1.2
Transmittance Function
The major difference between traditional (binary) shadow maps and deep shadow
maps is that for each deep shadow map test the transmittance function has to be
evaluated for the current pixel's depth. Hence this function has to be created and
stored first. Creation is made feasible for rasterization hardware by calculating
transmittance out of surface opacities. The idea is to rasterize all geometry as
seen from the point of view of the light, storing not only the first depth but also
all depths (and associated opacities) in a list for each texel. After sorting these
lists by depth, the transmittance at a certain depth d at a given texel location
can be calculated out of the opacities α i of all list entries with depth smaller than
d (see Figure 1.2 ) by
n ( d )
τ ( d )=
α i ) ,
(1
(1.1)
i =0
where n ( d ) is the number of fragments before depth d . During shadow lookups,
the depth of the current fragment can then be used to look up the correct shading
value (i.e., percentage of light transmitted) for shadowing the pixels. In the
next section we will show how to create and store such a function eciently on
Direct3D 11 hardware.
1.3
Algorithm
Our algorithm can be divided into the following steps:
Creating list entries. The scene is rendered from the light source. The
alpha value and depth value of all incoming fragments are stored in a two-
dimensional structure of linked lists. Note that the sizes of the linked lists
are only limited by video memory, which allows us to store transmittance
functions of varying depth complexity.
 
Search Nedrilad ::




Custom Search