Engine API Reference - v2.22.0-beta.0
    Preparing search index...

    Interface VolumetricFog

    Properties related to volumetric fog, a raymarched height fog lit by a directional light. The fog samples the light's cascaded shadow map along each view ray, forming visible shafts of light. The raymarch runs at a reduced resolution and is blended into the scene before TAA, so when TAA is enabled, its noise is temporally resolved to a smooth result.

    interface VolumetricFog {
        ambientColor: Color;
        ambientIntensity: number;
        anisotropy: number;
        density: number;
        enabled: boolean;
        heightBase: number;
        heightFalloff: number;
        intensity: number;
        light: LightComponent | null;
        maxDistance: number;
        scale: number;
        steps: number;
        tint: Color;
    }
    Index
    ambientColor: Color

    The color of the ambient in-scattered light, which keeps the fog in shadowed areas visible. Defaults to white.

    ambientIntensity: number

    The intensity of the ambient in-scattered light. Defaults to 0.02.

    anisotropy: number

    The anisotropy of the scattering, 0-0.95 range. Larger values scatter more light forward, making the fog brighter when looking towards the light. Defaults to 0.6.

    density: number

    The fog density at the base height. Defaults to 0.01.

    enabled: boolean

    Whether the volumetric fog is enabled. Defaults to false.

    heightBase: number

    The world space height at which the fog density starts to fall off. Below it the density is constant. Defaults to 0.

    heightFalloff: number

    The exponential falloff of the fog density with height above the base height. Value of 0 makes the fog uniform. Defaults to 0.05.

    intensity: number

    The intensity of the light scattering. Defaults to 1.

    light: LightComponent | null

    The directional light providing the scattered light. The volumetric fog is only rendered when a directional light is specified - when null or when a different light type is assigned, the effect is disabled. Defaults to null.

    maxDistance: number

    The maximum world space distance the fog is raymarched to. Defaults to 300.

    scale: number

    The resolution scale of the fog texture relative to the scene render target, 0.25-1 range. Defaults to 0.5.

    steps: number

    The number of raymarching steps, 4-128 range. Higher values improve the quality at a higher performance cost. Defaults to 24.

    tint: Color

    The albedo of the fog. Defaults to white.