Game Development Reference

In-Depth Information

To accelerate the lookup time, we have to simplify the transmittance func-

tion. In the case of volume data, a sophisticated algorithm for handling the

inclination of the transmittance function has been proposed in the original DSM

paper [Lokovic and Veach 00]. In the case of hair rendering, however, we deal

with a simple, piecewise constant version of the transmittance function. Hence,

it turned out that a simple but ecient optimization strategy is to merely cut

off the transmittance function after its value does not change significantly any

more, i.e., if
k
+1

i
=0

<
i
=0
(1

α
i
). In our experiments the frame

time has been improved by approximately 40% using an
of 0
.
001, which does

not visibly compromise the quality of the shadows. Note that a more sophisti-

cated GPU-friendly compression scheme has been proposed by Salvi et al. [Salvi

et al. 10] that limits the transmittance functions to a fixed size and works for

shadowing both hair and participating media. This method could alternatively

be used instead of the simple truncation, and we believe that it would work well

in combination with our neighbor-linking approach (possibly further accelerating

the lookup time).

1.3.3 Neighbor Linking

In this step we store links with each entry (fragment) of a linked list to those

entries (fragments) in the neighboring linked lists that are closest to it in terms

of light-space depth. The reasoning behind this step is that for adjacent pixels

in screen space, it's very likely that they have approximately the same depth

in light space due to spatial coherence. During filtering, the links enable direct

access to the depth-nearest neighbors of a fragment in the DSM. Once we found

a fragment corresponding to a given light-space depth, the other corresponding

fragments of nearby filter samples can be found very quickly. Note that we only

create links for the great majority of pixels where the assumption of coherence of

depth values holds.

In order to keep the memory overhead as low as possible,
only
links to the left

and upper neighbor are stored. This suces for computing all other filter samples

when starting from the lower-left corner of a rectangular filtering window. For

creating the links, in each thread (note that there is one thread for each shadow-

map texel) we simultaneously traverse the linked list associated with the texel

in question as well as the lists associated with the right texel neighbor and the

upper texel neighbor. For each fragment, we traverse each neighboring list until

we either find a fragment that is farther in depth or encounter the end of the list.

Then, either the last traversed or the previously traversed neighboring fragment

will be the one that is closest in depth to the current fragment. We link the current

fragment to its depth-nearest neighbors by storing their indices, which we denote

right
and
upper
for each list element. The expense of storing three additional

integers per list element (the two neighbor links and the
prev
link) increases the

overall memory requirements by about 25%, but this pays off during filtering as

will become clear in
Section 1.3.5.

α
i
)

(1

−

−

−

Search Nedrilad ::

Custom Search