Graphics Reference
In-Depth Information
(a)
(b)
Figure 3.8. (a) Ray-march samples without dithered offset. (b) Ray-march samples
with dithered offset.
(a)
(b)
Figure 3.9. (a) 4 × 4 pixel dither pattern texture. (b) Sample offsets. Values in the
texture are 1/16th of the values shown.
3.4.1 Bilateral Gaussian Blur
Using a bilateral Gaussian blur filter we can filter the dither pattern, which will
result in a smooth looking image (Figure 3.10(d)). The bilateral Gaussian blur
is performed in two passes [Pham and van Vliet 05]. In the first pass the filter
will blur the image horizontally. Using a shader we will copy the dithered image
to another buffer. The shader will sample the source pixel and three pixels on
either side of it. For each sample a weight is calculated based on the Gaussian
distribution function. Each weight is then scaled based on the difference in depth
of the sample compared to the depth of the source pixel. A bigger difference in
depth results in a lower weight (Figure 3.11). We will normalize the weights by
dividing them by their total sum. The final shader output color is calculated by
adding all weighted samples together (Figure 3.12(b)).
Search WWH ::




Custom Search