Taos API Reference
    Preparing search index...

    Class CompositePass

    Final fullscreen pass that composes the post-processed HDR scene with fog, stars, the underwater effect and tonemapping into the backbuffer (render-graph version). Replaces the legacy fog + underwater + tonemap pass chain by combining all three operations in a single fragment shader, eliminating two intermediate HDR textures and two render-pass boundaries.

    Hierarchy (View Summary)

    • Pass<CompositeDeps, void>
      • CompositePass
    Index

    Properties

    name: "CompositePass" = 'CompositePass'

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

    depthFogEnabled: boolean = true
    underwaterFogEnabled: boolean = true

    When true, submerged frames get a blue distance-fog murk (gated on isUnderwater). Toggled by the underwater_fog effect.

    depthDensity: number = 1.0
    depthBegin: number = 32
    depthEnd: number = 128
    depthCurve: number = 1.5
    heightFogEnabled: boolean = false
    heightDensity: number = 0.7
    heightMin: number = 48
    heightMax: number = 80
    heightCurve: number = 1.0
    fogColor: [number, number, number] = ...
    blackLowerHemisphere: boolean = false

    Fade sky pixels to black below the horizon. Off by default (samples with a full HDR environment want its lower hemisphere). Worlds whose geometry doesn't wrap to the horizon turn this on so a downward look past the terrain edge shows black instead of noisy lower-hemisphere atmosphere.

    starsEnabled: boolean = true

    Draw the procedural night star field. On by default; samples that want a clean sky (e.g. judging cloud quality at night) can turn it off.

    Methods

    • Pack fog/underwater/tonemap parameters into the GPU uniform buffer.

      Parameters

      • ctx: RenderContext
      • isUnderwater: boolean
      • uwTime: number
      • aces: boolean
      • debugAO: boolean
      • hdrCanvas: boolean
      • uwDepth: number = 0

      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: CompositeDeps

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

      Returns void

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