Documentation
    Preparing search index...

    Interface CustomRenderPass

    A pass that drives the renderer itself — the escape hatch (see the module header).

    graph.addPass("ping-pong", {
    kind: "custom",
    target: back,
    execute: (renderer, context) => {
    renderer.render(scene, [view], context.interpolation, front);
    renderer.render(scene, [view], context.interpolation, back);
    },
    });

    Declaring CustomRenderPass.target is optional but recommended: it is what lets a later pass's sampling of that surface be validated, and what RenderGraph.describe prints. Nothing enforces that the function actually writes it — the graph cannot see inside, which is exactly what the "opaque" validation issue says.

    interface CustomRenderPass {
        execute: (renderer: Renderer, context: RenderPassContext) => void;
        kind: "custom";
        target?: RenderTarget | null;
    }
    Index
    execute: (renderer: Renderer, context: RenderPassContext) => void

    Runs the pass. Called once per RenderGraph.execute while the pass is enabled, with the graph's renderer and the frame's context.

    kind: "custom"

    Required, and the only value — this is the discriminant.

    target?: RenderTarget | null

    The surface this pass is declared to write, for validation and RenderGraph.describe. Absent means "the screen, or unknown".