Taos API Reference
    Preparing search index...

    Class ShadowFeature

    Cascaded directional shadow map. Writes frame.shadowMap and stashes the frame's cascades + caster list on frame.extras for downstream consumers (e.g. a BlockShadowFeature chain).

    Implements

    Index

    Constructors

    Properties

    name: string = ShadowFeature.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: ShadowPass | null = null
    cascades: CascadeData[] = []

    Filled in by update each frame; reused by addPasses.

    staticCasters: readonly ShadowMeshDraw[] | null = null

    External shadow caster overrides; when null, uses frame.shadowCasters.

    mode: "cascade" | "clipmap"

    Active shadow mode ('cascade' | 'clipmap').

    virtualize: boolean

    Virtual-shadow-map page pooling (only with mode:'clipmap'). Mutable at runtime.

    vsmClusterCaster: VsmClusterCasterProvider | null = null

    Optional clustered-mesh caster for the virtualized clipmap path. Set by ClusterGeometryFeature so meshlet geometry casts into the page pool.

    Methods

    • Register an ADDITIVE source of static instanced shadow casters (the geometry pass's InstancedBatches) — merged every frame. Lets foliage / prop scatterers cast shadows without owning the feature's configuration. Returns an unregister fn.

      Parameters

      Returns () => void