Depth Coloring - Stylized Fog
The Depth Coloring effect allows you to apply a color gradient based on the distance from the camera, creating atmospheric depth effects, fog variations, and stylized scenes. This effect is extremely useful for establishing mood and improving visual depth perception in your 3D scenes.

To use the Depth Coloring effect, follow these steps.
1. Enable the Effect
Section titled “1. Enable the Effect”In the material inspector, on every material that should take the color:

2. Create a Depth Coloring Properties asset
Section titled “2. Create a Depth Coloring Properties asset”- Right-click in the Project window
- Select Create → AllIn13DShader → Others → Depth Coloring Properties
- Name your new asset appropriately (e.g., “FoggyMountain” or “StylizedFog”)
3. Add the Depth Coloring Camera Component
Section titled “3. Add the Depth Coloring Camera Component”- Select your main Camera in the Hierarchy
- Add the Depth Coloring Camera component
- Assign your asset to its Depth Coloring Properties field

4. Configure the values
Section titled “4. Configure the values”Edit the values on the camera’s inspector rather than on the asset, because that is what sends them to the shader. Assigning the asset alone doesn’t: disable and enable the component, or change a value there, to apply it.
The alpha of the gradient sets how strongly the color is applied at each depth.
