Taos API Reference
    Preparing search index...

    Class DeferredLightingFeature

    Deferred lighting. Reads frame.gbuffer, frame.shadowMap, frame.ao, frame.hdr (clear/load behavior matches the legacy DeferredLightingPass deps), and writes the final HDR result into frame.hdr. Exposes the persistent camera/light uniform handles on frame.lightingCameraBuffer / frame.lightingLightBuffer for downstream features (composite, godrays).

    Implements

    Index

    Constructors

    Properties

    name: string = DeferredLightingFeature.name

    Stable identifier used for lookup, signature hashing, and pass-name keying.

    enabled: boolean = true

    When false, the feature is skipped each frame. Toggling triggers a cached-graph invalidation.

    pass: DeferredLightingPass | null = null

    The currently-active lighting pass (SH or cube variant).

    useSphericalHarmonics: boolean

    Diffuse IBL source. true → SH coefficients; false → irradiance cube. Settable at runtime; the matching pass variant is built lazily and cached. Call engine.invalidate() after changing it so the cached graph rebuilds.

    ibl: IblTextures | undefined
    shadowsEnabled: boolean
    shadowSoftness: number
    iblIntensity: number
    minRoughness: number

    Perceptual-roughness floor (~0.045). Mutable at runtime.

    multiBounceAO: boolean

    Per-lobe screen-space AO (multi-bounce GTAO + specular occlusion). Mutable at runtime; false = legacy flat * ao. Default true.

    disableHorizonFade: boolean
    enableAerial: boolean

    Aerial-perspective fog on/off. Mutable at runtime. Default false (opt-in).

    contactShadows: ContactShadowParams | null

    Screen-space contact shadows for the sun (null = off). Mutable at runtime; takes effect on the next frame.

    cookie: CookieParams | null

    Directional light cookie / gobo (null = off). Mutable at runtime — mutate cookie.offset to scroll it (drifting clouds).

    shadowFilter: "pcss" | "vsm"

    Directional shadow filtering — 'pcss' (default) or 'vsm' (EVSM2). Mutable at runtime; call engine.invalidate() so the graph rebuilds.

    shadowVsmBlur: number

    EVSM2 moment-map blur radius in texels. Mutable at runtime.

    shadowVsmBleed: number

    EVSM2 light-bleed reduction [0,1). Mutable at runtime.

    debugMode: number = 0

    G-buffer channel visualization (0 = off / normal lighting). See the debugMode switch in deferred_lighting.wgsl for the channel mapping.

    Methods