Taos API Reference
    Preparing search index...

    Class DirectionalVsmPass

    Converts the directional cascaded depth shadow map into a pre-filtered EVSM2 moment map for variance-based shadow sampling.

    For each cascade layer: a fullscreen pass warps the depth into moments (E[w], E[w²], w = exp(c·d)), then a separable Gaussian blur (H then V, sharing a single-layer scratch texture) pre-filters them. The lighting pass samples the result with a plain linear sampler and the Chebyshev bound — no comparison sampler, no PCF kernel, constant-cost soft edges.

    Moment precision: rg32float when the device exposes float32-filterable (a strong warp exponent, little light bleeding); otherwise rgba16float, which is always filterable but caps the exponent and is effectively plain VSM.

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    Properties

    name: "DirectionalVsmPass" = 'DirectionalVsmPass'

    Human-readable identifier used in graph node labels and error messages.

    Accessors

    Methods

    • Parameters

      • ctx: RenderContext
      • opts: { momentPrecision?: "auto" | "fp32" | "fp16" } = {}
        • OptionalmomentPrecision?: "auto" | "fp32" | "fp16"

          moment-texture precision / memory trade-off:

          • 'fp32' (rg32float, 8 B/texel): strong warp (exponent 40), little light bleeding. Requires the float32-filterable feature; falls back to 'fp16' when it's absent (fp32 textures can't be linearly sampled then).
          • 'fp16' (rg16float, 4 B/texel): half the memory, but a weak warp (exponent 5.5) — effectively plain VSM. Always available.
          • 'auto' (default): 'fp32' when filterable, else 'fp16'.

      Returns DirectionalVsmPass