A straightforward volumetric fog, lighting, and shadows effect.

Developed in regards to Unity 6.2, URP.

Quickstart (Overview)

This effect works as a renderer feature for URP.

See the included demo scene + render pipeline asset for quick previewing.

Assign the included asset under Quality from the Project Settings.

image.png

image.png

Settings on the material are self-explanatory.

image.png

<aside> 💡

If you do not want the scattering/blur/mist effect, set both the remap min and max to 1.0.

</aside>

The demo scene shows how a second camera renders to a low-resolution texture, which is then blurred by a custom render texture, which is itself then assigned as the blur texture input to the volumetric fog shader/material. You can also do this as a renderer feature.

image.png

The material allows for customized outputs, so you can easily do your own compositing (for intermediate-advanced users). Source code is all included, and neatly commented + organized.

Raymarch steps, and all the lighting switches determine quality/performance.

You must have a VolumetricFogController.cs object (simply any game object in the scene with that script attached) for ambient light and additional lights support.

image.png