
132 II Lighting and Shading
g = 0.0
g = 0.3
g = 0.5
g = 0.7
g = 0.8
0.12
0.06
–180° 0° 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,