Taos API Reference
    Preparing search index...

    Class BlockGeometryPass

    G-Buffer fill pass for voxel world chunks (render-graph version).

    Rasterizes opaque, transparent and prop chunk geometry into the GBuffer attachments (albedo+roughness, normal+metallic, depth). When deps.gbuffer is supplied the pass loads + writes those handles; otherwise it creates a fresh transient GBuffer and clears it.

    Hierarchy (View Summary)

    • Pass<BlockGeometryDeps, BlockGeometryOutputs>
      • BlockGeometryPass
    Index

    Properties

    name: "BlockGeometryPass" = 'BlockGeometryPass'

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

    drawCalls: number = 0

    Number of draw calls issued during the most recent execute.

    triangles: number = 0

    Triangle count submitted during the most recent execute.

    Methods

    • Opt foliage (leaf) blocks into the subsurface shading model. When enabled, registers a leaf-green subsurface entry in the device's MaterialParams table and tags every LEAVES block type with its id (written into the G-buffer's material_data.a), so the deferred + point/spot lighting passes give canopy leaves a back-lit translucent glow. Disabling reverts them to opaque shading. Re-uploads the BlockData SSBO; no chunk re-meshing needed.

      Parameters

      • enabled: boolean

      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: BlockGeometryDeps = {}

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

      Returns BlockGeometryOutputs

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