Graphics Reference
In-Depth Information
(a)
(b)
(c)
Figure 3.12. (a) Dithered source image. (b) Result after applying horizontal bilateral
Gaussian blur pass. (c) Final result after applying vertical bilateral Gaussian blur pass.
In the second pass we copy the image back using the same technique but now
we will sample three pixels above and three pixels below the current pixel to get
a vertical blur. The final result is a smooth looking image in which the sharp
object edges are still preserved (Figure 3.12(c)).
3.5 Controlling the Amount of Scattering
Till now our implementation gave us some nice looking volumetric light effects.
However, the effect looked too uniform and too static. It lacked a dusty or
smoky feel to it. We also didn't have enough control to define where, when, and
how much volumetric light should be visible in certain areas of the scene. We
needed a way to control the amount of volumetric light more accurately and more
dynamically.
To overcome these problems, we came up with a solution that uses particle
effects to control the amount of scatting. The reason to use particle effects is
because they allow us to define a volume in a very flexible way, they're integrated
in all our other game systems, and they are ideal for creating animated smoke-
and dust-like effects.
The particles are rendered to a 3D texture that will hold multiple scattering
amount values over depth for each pixel on the screen. The 3D texture has a
width and height that is 1/8th of the native render resolution and has 16 depth
slices. The buffer holds single 16-bit float values to store the amount values and
will be used to store the amounts for depths up to 128 meters. To increase the
depth resolution close to the camera we distribute the depth slices using the
following equation:
d ( i )=
C
i
R.
(3.3)
( N
1)
Search WWH ::




Custom Search