Taos API Reference
    Preparing search index...

    Class AutoExposurePass

    Auto-exposure compute pass (render-graph version).

    Two compute dispatches per frame: build a 64-bin luminance histogram of the HDR scene, then reduce + temporally smooth into a 1-float exposure value. The exposure buffer is persistent so downstream passes (composite) can read it via a stable handle.

    Hierarchy (View Summary)

    • Pass<AutoExposureDeps, AutoExposureOutputs>
      • AutoExposurePass
    Index

    Properties

    name: "AutoExposurePass" = 'AutoExposurePass'

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

    enabled: boolean = true

    Accessors

    • get exposureGpuBuffer(): GPUBuffer | null

      The resolved persistent GPU buffer holding the current exposure value (float at offset 0), or null before the pass has executed once. The buffer has COPY_SRC usage, so callers can copy it into a mappable staging buffer to read the adapting exposure back on the CPU (debug / HUD readout). Valid in both adaptive and fixed modes.

      Returns GPUBuffer | null

    Methods

    • Override the exposure value used both for the initial buffer state and for the value written each frame when enabled is false. Pass a sensible fixed exposure (e.g. 0.1 for a bright outdoor scene) when locking the tonemap to a constant value.

      Parameters

      • value: number

      Returns void

    • Insert the pass into graph for one frame. Implementations call graph.addPass(name, type, b => { ... }) exactly once and use the supplied PassBuilder to declare reads, writes, transient resources, and the execute callback.

      Parameters

      • graph: RenderGraph

        Graph being built this frame.

      • deps: AutoExposureDeps

        Pass-specific dependency record (handles, scene data, etc.).

      Returns AutoExposureOutputs

      Pass-specific output record (typically a set of handles downstream passes will consume).