Graphics Reference
In-Depth Information
0.12
g = 0.0
g = 0.3
g = 0.5
g = 0.7
g = 0.8
0.06
-180°
180°
Figure 3.6. Henyey-Greenstein phase function result for different values of g .
in the atmosphere that cause the light to scatter, but for practical reasons we use
a constant value for it which can be tweaked by artists.
Then, we calculate the scattering factor f SF for a certain view angle as
f SF ( θ )= f HG ( θ )
·
scattering amount .
(3.2)
3.3 Low-Resolution Rendering
The straightforward ray-marching approach we use is nice because it's relatively
simple to implement. However, the drawback is that we need quite a lot of
samples to make it look good. The more samples we take, the more expensive
the volumetric light shader will be.
To improve the rendering performance, we decided to render the effect at a
lower resolution. We have tried to render at quarter resolution but found that the
loss of quality was too big, so we decided to render the effect to a half-resolution
buffer we call the volumetric light buffer . To be able to render at lower resolution
we also need to downscale the depth buffer accordingly so we can still use the
depth test when rendering the volumetric light. Another advantage of this is
that sampling from a half-resolution depth buffer when reconstructing the pixel's
world position will be a lot faster.
3.3.1 Bilateral Upsampling
The half-resolution volumetric light buffer will be composited using a bilateral up-
sampling shader, which is rendered additively to the scene. Bilateral upsampling
[Sloan et al. 07] will make sure that we can composite the half-resolution buffer
nicely without causing blurry artifacts on object edges in the high-resolution
image (Figure 3.7(a)).
Search WWH ::




Custom Search