Documentation
    Preparing search index...

    Interface WgpuNodeMaterialPipelines

    One renderer's node pipeline store (§60; WP-R1.9) — created lazily on the first frame that needs it, dropped whole on device loss, disposed with the renderer. WGSL modules compile per distinct graph on first sight; a graph whose emission fails is latched null (asked once, not once per frame).

    interface WgpuNodeMaterialPipelines {
        programCount: number;
        beginFrame(items: readonly RenderItem[], viewCount: number): boolean;
        dispose(): void;
        draw(
            pass: GpuRenderPassEncoder,
            item: NodeRenderItem,
            frame: WgpuNodeFrameState,
        ): number;
        endFrame(): void;
        forget(): void;
        renderGraphEffect(
            effect: GraphEffect,
            source: RenderTarget,
            destination: RenderTarget | null,
            colorFormat: string,
            colorView: () => object,
            renderTime: number,
            statistics: RenderStatistics | null,
        ): void;
    }

    Implemented by

    Index
    programCount: number

    Distinct WGSL node modules compiled so far — the lazy-compile observable.

    • Pre-sizes the frame (the sized-before-recording discipline): resolves — and on first sight compiles — the program of every "node" item in items, and grows the store's own strided uniform buffer to hold one block per node draw per view. Returns whether any node draw may record this frame. Runs material accessors (material.graph), so the renderer re-checks its own disposal after calling it.

      Parameters

      Returns boolean

    • Uploads the frame's packed node uniform blocks — one writeBuffer, beside the renderer's own, before the submit that reads them (queue order). A frame that recorded no node draw uploads nothing.

      Returns void

    • Draws one §70 "graph" effect (RFC 0001) in its own pass and encoder — the WGSL twin of GL's #renderGraphEffect, bound by renderEffect's contract: everything that will not resolve skips the effect before anything is recorded, and colorView is called only once the draw is certain (an on-screen destination's getCurrentTexture must not be acquired for an effect that then skips).

      Parameters

      Returns void