Taos API Reference
    Preparing search index...

    Class RenderGraph

    RenderGraph: declares passes, compiles a dependency graph from their read/write declarations, and executes them in topological order against pooled physical resources.

    Lifecycle (per frame):

    1. Build a fresh RenderGraph(ctx, cache).
    2. Call addPass(name, type, setup) for each pass; the setup callback uses the PassBuilder to declare reads/writes and register an execute callback.
    3. Call setBackbuffer(...) once with the swapchain target.
    4. compile() produces a CompiledGraph (validate, cull, sort, bind).
    5. execute(compiled) records and submits a single command buffer.

    The PhysicalResourceCache is owned externally and survives across frames so transient resources are pooled and persistent resources persist.

    Index

    Constructors

    Properties

    Accessors

    Methods

    • Returns descriptive info about the virtual resource identified by id, or null when the id is unknown.

      Parameters

      • id: number

      Returns
          | {
              kind: "texture"
              | "buffer";
              label: string;
              format?: string;
              isBackbuffer?: boolean;
              width?: number;
              height?: number;
              size?: number;
          }
          | null

    • Constrain the backbuffer-writing pass to a sub-rectangle (viewport + scissor) and choose whether it clears the whole backbuffer first. See _outputViewport. Pass null (default) for the full backbuffer.

      Parameters

      • vp:
            | {
                x: number;
                y: number;
                width: number;
                height: number;
                clear: boolean;
                viewDescriptor?: GPUTextureViewDescriptor;
                clearValue?: GPUColor;
            }
            | null

      Returns void