Taos API Reference
    Preparing search index...

    Class SdfTextPass

    Abstract base class for a render graph pass.

    A pass is a container for long-lived GPU state — pipelines, bind group layouts, samplers, persistent uniform buffers — that on each frame is inserted into a RenderGraph via addToGraph. The graph itself does not store pass instances; it stores the read/write declarations and execute callback that addToGraph registers via the supplied PassBuilder.

    Subclasses parameterize the dependency and output types so the factory can wire passes together with type-checked handles:

    class GeometryPass extends Pass<{ camera: ResourceHandle }, { albedo, normal, depth }> {
    readonly name = 'GeometryPass';
    addToGraph(graph, deps) { ... }
    }

    The convention is that the constructor builds long-lived state (pipelines etc.), addToGraph declares per-frame resource flow, and destroy releases anything the pass owns.

    Hierarchy (View Summary)

    Index

    Properties

    name: "SdfTextPass" = 'SdfTextPass'

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

    Methods

    • Uploads this frame's glyph instances (count glyphs, GLYPH_FLOATS floats each) + the viewport size. instances must hold at least count * GLYPH_FLOATS floats. halo is the black-outline reach below the glyph edge (0 = clean text; ~0.2 for a legibility outline over a busy background — keep it small at low point sizes or it fills letter counters).

      Parameters

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

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

      Returns SdfTextOutputs

      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