Game Development Reference
Figure 2.6. Final composition of the three composition buffers (front, focus, and back)
as in Equation (2.7). The focus point is the pillar in the back, which is different to
results shown in Figure 2.7 .
where σ k focus = 0. In the previous example, this means that layer L 0 is as strongly
blurred as it would have been if a bigger filter H 0 ( σ 0 calculated by Equation (2.6))
has been used for blurring. Although the filtering results are not exactly the same,
due to occlusions that are avoided if each layer is blurred separately, the results
are sucient for approximating DoF. In our implementation, we use a standard
deviation of σ k = | k − k focus | for the recursive Gaussians, thus there are smaller
kernel-size changes around the focal plane, which results in less visible grading.
The final composition I is calculated by alpha-blending the composition
buffers from front to back (Figure 2.6):
I = I front ⊕
I focus ⊕
I back .