Taos API Reference
    Preparing search index...

    Interface ForwardPlusFeatureOptions

    interface ForwardPlusFeatureOptions {
        pointLights: () => readonly PointLight[];
        directional?: () => DirectionalLight;
        skinnedDrawItems?: () => readonly SkinnedForwardDrawItem[];
        drawItems?: () => readonly ForwardDrawItem[];
        areaLights?: () => readonly AreaLight[];
        cullMode?: ForwardPlusCullMode;
        ibl?: IblTextures;
        useSphericalHarmonics?: boolean;
        areaLightLtc?: boolean;
        shadowFilter?: "pcss" | "vsm";
        shadowVsmBlur?: number;
        shadowVsmBleed?: number;
        shadowVsmPrecision?: "auto" | "fp32" | "fp16";
    }
    Index

    Properties

    pointLights: () => readonly PointLight[]

    Many-light source; the tiled depth pre-pass bins these into screen tiles so each pixel only shades the lights that actually reach it.

    directional?: () => DirectionalLight

    Override the directional source. Defaults to the scene's first DirectionalLight component.

    skinnedDrawItems?: () => readonly SkinnedForwardDrawItem[]

    Optional skinned-mesh draws. Opaque skinned items participate in the depth pre-pass (so the light-culling tile bounds see the live pose) and the tile-shaded forward+ pass. Transparent skinned items only render in the shading pass with depth-write off.

    drawItems?: () => readonly ForwardDrawItem[]

    Override the non-skinned (static-mesh) draw source. By default these come from frame.opaque + frame.transparent (the scene's MeshRenderers). Pass a callback to inject items from a sample-local builder that doesn't go through the scene graph — mirrors GeometryFeature's drawItems, so the same draw list can feed both the deferred and forward paths.

    areaLights?: () => readonly AreaLight[]

    Representative-point area lights (sphere / tube / rect).

    Light-culling strategy — 'clustered' (default) or 'tiled'. Clustered bins point lights into a 3D froxel grid whose bounds are projection-only, so it drops the depth pre-pass and lights transparents by their own view-Z. See ForwardPlusPass.cullMode. Mutable per-frame via ForwardPlusFeature.cullMode.

    ibl?: IblTextures

    IBL texture set for ambient + specular indirect lighting. When omitted the forward+ pass falls back to a black default cubemap (no IBL).

    useSphericalHarmonics?: boolean

    When true, the diffuse IBL term is read from order-3 spherical-harmonic coefficients (IblTextures.shBuffer) instead of the irradiance cube — the IBL_DIFFUSE_SH shader variant. Set at construction (it selects the pipeline + bind-group layout); default false keeps the irradiance cube.

    areaLightLtc?: boolean

    When true, rect area lights are shaded with reference-quality Linearly Transformed Cosines instead of the representative-point approximation (sphere/tube unaffected). Opt-in (default false): compiles the LTC shader variant + uploads two small vendored fit tables. Toggle live with setAreaLightLtc. See TODO/ltc-area-lights.md.

    shadowFilter?: "pcss" | "vsm"

    Directional shadow filtering — 'pcss' (default) or 'vsm' (EVSM2). Set at construction (it selects the pipelines + bind-group layout). 'vsm' runs a DirectionalVsmPass to bake a filterable moment map and samples it via the Chebyshev bound — constant-cost soft edges, at the cost of some light bleeding (reduced by shadowVsmBleed).

    shadowVsmBlur?: number

    EVSM2 moment-map blur radius (scales the linear-sampling Gaussian). Default 1.2; clamped to ~1.5.

    shadowVsmBleed?: number

    EVSM2 light-bleed reduction in [0,1). Default 0.2.

    shadowVsmPrecision?: "auto" | "fp32" | "fp16"

    EVSM2 moment precision / memory trade-off — 'auto' (default), 'fp32', or 'fp16' (half memory, ≈ plain VSM). See DirectionalVsmPass.create.