Taos API Reference
    Preparing search index...

    Class HiZPass

    Builds a Hi-Z (hierarchical depth) pyramid from the scene depth buffer for GPU occlusion culling. Run it after the geometry you want to treat as occluders (e.g. terrain) has written depth, then feed the pyramid to GpuCullPass to skip geometry hidden behind it.

    The pyramid is owned by this pass (a persistent texture, reallocated on resize) and built inside a single transfer pass with its own per-mip render passes — this keeps the render graph out of the per-mip read+write hazard and lets the cull pass see one mipped texture. The reduction is conservative (see the shader), so it never causes a visible object to be culled.

    Hierarchy (View Summary)

    Index

    Properties

    name: "HiZPass" = 'HiZPass'

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

    Accessors

    Methods

    • 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: HiZDeps

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

      Returns HiZOutputs

      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