Game Development Reference
In-Depth Information
d
d 0
d 1
d 2
d 3
α 0
α 1
α 2
α 3
Figure 1.4. To calculate the transmittance for a DSM test evaluation, the opacities α i
of all the surfaces that are nearer than the current pixel's depth d have to be multiplied.
1.3.4
Deferred Shadowing
In the shadowing stage, we search for the depth in the transmittance function,
which corresponds to the depth of the current pixel in the eye view (see Fig-
ure 1.4). This is done by front-to-back traversal of the linked list corresponding
to the current position in the xy -plane. The head of the list is accessed by looking
it up in the head buffer. A lookup of the corresponding element in the transmit-
tance function gives the correct transmittance value, which is used to attenuate
the shading.
An important point for stabilizing the frame rate and to achieve real-time
frame rates is to use a deferred shading pipeline for shadowing. This means that
we first render the geometry to store depth and diffuse shading values in render
targets before using a single shadow lookup per pixel in the deferred shadowing
pass. Consider that with forward rendering, the depth complexity of a hair
model potentially requires multiple costly shadow lookups per pixel (and even
more when using PCF).
1.3.5
Spatial filtering
Spatial antialiasing is as important for DSM as it is for binary shadow maps
in order to achieve high-quality images (see Figure 1.6 ) . Contrary to standard
filtering methods for binary shadow maps (e.g., using PCF), we now deal with
a list of depth values per pixel. In our case, these depth values are not samples
but represent the full transmittance function as it is, which means that we do
not need to deal with reconstruction or filtering in z -direction. Therefore we use
a 2D filter kernel as in the classical PCF formulation and compare light-space
depths of adjacent pixels in screen space.
 
 
Search Nedrilad ::




Custom Search