Volumetric Lighting
Light scattered through a participating medium
Also known as: God rays · Light shafts · Volumetric fog
Definition
Volumetric lighting renders the visible interaction of light with air, fog, smoke, or dust — the "god rays" streaming through cathedral windows or fog headlights cutting through night air. Modern engines compute this via ray-marched volumetric integration through a 3D fog texture or analytical density function. Cinematic UE5 scenes lean heavily on volumetric fog to add atmosphere and depth cues.
In production
UE5 Exponential Height Fog → enable Volumetric Fog. Point/spot lights need their "Volumetric Scattering Intensity" set above 0 to contribute, and directional lights need "Atmosphere Sun Light" enabled to cast visible god rays through the fog volume. Performance scales with fog resolution and view distance — tune carefully on console, since the froxel grid (a 3D volume texture ray-marched through the camera frustum) can dominate the GPU frame budget if set too fine or extended too far. Unity's HDRP implements the same froxel-based approach under "Fog," plus optional Local Volumetric Fog volumes for scoped effects like a foggy cave section without paying the cost scene-wide. A common mistake is enabling volumetric fog globally at high density for a single dramatic shaft-of-light moment, tanking frame rate everywhere else in the level — the fix is usually a Local Volumetric Fog volume scoped tightly around the light source instead.
