Adds distance and height-based fog to the scene. Features several color modes:
Fog will be a single color
Samples a horizontal gradient texture from left (near) to right (far). Will expose a
distance parameter to control the length of the gradient.
Fog will take on the color of the skybox, making it seamlessly blend in.
Height fog density can be controlled by supplying a grayscale texture.
The light scattering feature will perform another bloom pass inside of the fog. Though, this is not available in URP.
Because the effect relies on the depth texture Unity renders, transparent materials will not be affected by fog. Since they don’t contribute to the depth texture, this also applies to unlit or sprite materials. The only way around this is to incorporate the fog shading into custom transparent shader, and using that instead.
For URP, it’s possible to add fog support when using Shader Graph. In the SC Post Effects\Runtime\Fog\ShaderGraph folder, you’ll find an example shader that illustrates how this can be achieved.