Taos API Reference
    Preparing search index...

    Class GTAOPass

    Ground Truth Ambient Occlusion (Jiménez et al., GDC 2016).

    Slice-based horizon integration with projected-normal correction. For each slice through the view direction:

    1. March left and right in screen space, tracking the maximum horizon cosine on each side (the "tightest" horizon angle).
    2. Project the surface normal onto the slice plane to get a signed projected-normal angle n relative to the view direction.
    3. Clamp horizons to the visible hemisphere [n - π/2, n + π/2].
    4. Evaluate the cosine-weighted slice integral analytically: (sin(h_pos − n) − sin(h_neg − n)) / 2, weighted by the projected normal length.

    The result is averaged across slices and raised to the strength exponent to control contrast. Output goes through the same separable bilateral / box-blur pipelines as SSAO so consumers see an interchangeable AO factor.

    Compared to classic hemisphere SSAO: smoother falloff, no light-bleed haloing at silhouettes, and a more physically meaningful AO term — at the cost of more arithmetic per pixel (the analytical integral, projected normal math, atan2 per slice).

    Hierarchy (View Summary)

    • Pass<GTAODeps, GTAOOutputs>
      • GTAOPass
    Index

    Properties

    name: "GTAOPass" = 'GTAOPass'

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

    Methods

    • radius — world-space sampling radius. bias — thickness bias; samples farther than radius*(1 + bias*10) from the surface don't lower the horizon (avoids haunting from background geometry). strength — exponent applied to visibility (higher -> more contrast).

      Parameters

      • ctx: RenderContext
      • radius: number = 1.0
      • bias: number = 0.1
      • strength: number = 2.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: GTAODeps

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

      Returns GTAOOutputs

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

    • Release every long-lived GPU resource owned by the pass (pipelines, persistent uniform buffers, samplers, BGLs). Called by the factory or application during teardown. Default implementation is a no-op.

      Returns void