Taos API Reference
    Preparing search index...

    Class SdsmReducer

    Reusable SDSM depth feedback: owns a DepthReductionPass and an async readback ring, and exposes the visible scene's view-linear depth bounds.

    Driven manually so it works in both the feature pipeline (SdsmFeature) and hand-wired graphs (crafty's renderer_setup):

    • pollReadback once per frame before building the graph (it copies the previous frame's reduction result and maps it),
    • addToGraph during graph build to run the reduction on a depth handle.

    The readback is asynchronous, so bounds is the depth from ~1 frame ago (padded), matching the engine's previous-frame-data convention.

    Index

    Properties

    bounds: DepthBounds | null = null

    Latest read-back view-space depth bounds, or null until the first readback resolves (and whenever the scene is entirely sky).

    padding: number = 0.15

    Fractional padding on the read-back bounds to absorb readback latency.

    quantizeStepsPerOctave: number = 4

    Bound-quantization granularity (steps per octave). Higher = tighter range but the cascade re-fits more often (steps more visible); lower = steadier but looser. The bounds snap to 2^(k / quantizeStepsPerOctave).

    Methods

    • Copy the PREVIOUS frame's reduction result into a free readback buffer and map it; the resolved callback validates and publishes bounds. Call once per frame before the graph that runs addToGraph (this frame's reduction overwrites the result buffer later).

      Parameters

      Returns void