Using Volumetric Fog to enhance your games
In this recipe, we will use Volumetric Fog in the scene from the previous recipe and go through each property and see what they do. Volumetric Fog reacts to light and shadow in real time throughout the scene. It makes your 3D scenes more realistic.
Getting ready
For this recipe, we will use the SDFGI scene that we made in the preceding recipe. You can also download the project from this book’s GitHub repository.
Like the previous recipe, make sure the renderer is set to Forward+.
How to do it…
In this recipe, we will use the same scene from the previous recipe to add Volumetric Fog:
- In the Scene tab, click on WorldEnvironment. Then, in the Environment options, click Volumetric Fog in the Inspector area.
- To the right of Enabled, click On.
- Move the slider of the Density property to the right and left to see its effects. After, click to the left of the slider to return to the default setting of
0.05...