Game Development Reference
In-Depth Information
Processing the fragments. The fragments are sorted, and the transmittance
functions are precomputed for the fragment depths from the individual
alpha values (using Equation (1.1)) to allow a fast lookup into the transfer
function. Finally the transmittance functions are simplified.
Neighbor linking. For each fragment, the neighboring fragments at the same
position in the linked lists are also linked, in order to quickly find those
neighboring fragments that are nearest in terms of depth to the light source
and achieve quicker filtering.
Deferred shadowing. DSM lookups can become quite expensive for complex
hair models (i.e., with big depth complexity and transmittance functions
with many stored values). Hence, deferred shading is used to render the
scene first and then compute the shading value only once for each pixel
during deferred shading.
Spatial filtering. At this point, we utilize neighbor links to provide fast
lookups for large filter kernels. The DSM idea is combined with two well-
known filtering methods for binary shadow maps.
The first three steps can be summarized as building up the DSM structure
from the light; the last two steps apply the DSM for the final shading from the
camera.
Each of these steps will be discussed in more detail in the following
sections.
1.3.1 Creating List Entries
One of the main issues for implementing DSMs on a modern GPU is that the
amount of per-texel data is dependent on the depth complexity of the scene at
the texel position and therefore can vary arbitrarily. In Direct3D 11, this problem
can be solved by storing the depth and alpha values of every incoming fragment
along a light ray in a per-texel linked list. In total each linked list element has the
format shown in Listing 1.1. There, next represents the index of the next element
of a linked list, and it contains
1 if the current element is the last element of the
linked list. We also store additional links to the previous element links (making it
a double-linked list) to fragments from neighboring pixels that come to use later
on.
We create a two-level structure to be able to eciently insert all fragments into
these linked lists during a single rendering pass from the light. All fragments in
the linked lists are stored in a structure that we denote as the list element buffer .
For every pixel, we store the index of the first list element in each linked list in
a separate buffer that we denote as the head buffer , since it points to the first
element of a list. If a linked list corresponding to a shadow map texel is empty,
the value
1 is stored in the head buffer. An example is shown in Figure 1.3.
 
Search Nedrilad ::




Custom Search