top of page

Top-Down View Fog Shader

Screenshot 2026-04-27 021201.png

A smooth cut by the collision box that can be controlled dynamically

Fog Shader

This fog shader is designed for top-down camera scenarios, focusing on achieving stylized visual effects while maintaining high runtime performance.

Instead of relying on traditional volumetric fog, the system uses layered procedural noise and depth-based attenuation to simulate fog density and spatial variation. This approach allows for flexible artistic control and significantly reduces computational cost.

The shader integrates multiple scrolling noise layers to create dynamic fog patterns, combined with depth fade and height-based masking to ensure smooth blending with scene geometry. Additional emissive modulation is used to enhance stylization and visual readability.

Overall, the solution provides a lightweight, scalable alternative to volumetric fog, suitable for real-time applications such as games with strict performance constraints.

Screenshot 2026-04-27 021344.png

Using three different fog noise layers to control the density

Screenshot 2026-04-27 021402.png

Having noise and radial mask for the smooth shader

Masking Calculation Function

Spatial Fog Control (Material Function)

A custom material function is implemented to provide real-time spatial control over fog distribution using gameplay-driven collision volumes.

The system evaluates box-shaped regions defined by center position and extents, transforming world-space positions into a normalized local space to compute a smooth distance-based mask.

Two complementary zone types are used to control fog behavior:

  • Inclusion Zones (Fog Removal)
    These zones subtract fog density within their bounds, effectively carving out clear regions in the fog. They are typically used around gameplay-critical areas such as player paths or interaction spaces to improve visibility.

  • Exclusion Zones (Fog Restoration)
    These zones add fog back into the scene, restoring density in selected areas. They allow fine control over where fog should reappear after subtraction, enabling layered and art-directed fog composition.

Both zone types are driven by Material Parameter Collections, allowing their position, size, and influence to be updated dynamically at runtime based on gameplay logic.

This additive–subtractive approach enables flexible, real-time shaping of fog volumes without relying on expensive volumetric techniques.

Screenshot 2026-04-27 022113.png
Screenshot 2026-04-27 022132.png

Using Inclusion & Exclusion zones to calculate final fog masking

Parameters are passed from blueprint during runtime

bottom of page