Documentation
    Preparing search index...

    Interface WgpuPipelineDescriptor

    Everything a GPURenderPipeline bakes in — the cache's key material.

    A plain readonly record rather than a class: it is a value, it is built once per draw on the stack, and pipelineKey is a pure function of it.

    interface WgpuPipelineDescriptor {
        batch?: WgpuBatchStream | null;
        blend: "none" | "normal" | "additive" | "multiply" | "screen";
        colorFormat: string;
        colorWrite: boolean;
        depthFormat: string | null;
        depthTest: boolean;
        depthWrite: boolean;
        effect?: WgpuEffectKind | null;
        gpuInstances?: boolean;
        kind: WgpuPipelineKind;
        map: boolean;
        metalRoughness?: boolean;
        normals?: boolean;
        shadow?: boolean;
        stencil?: WgpuStencilDescriptor | null;
        topology: "triangle-list" | "line-list";
        vertexColors: boolean;
    }
    Index
    batch?: WgpuBatchStream | null

    The interleaved stream of a kind: "batch" pipeline; absent/null for every other kind.

    blend: "none" | "normal" | "additive" | "multiply" | "screen"

    §57's blend mode, or "none" for an opaque draw.

    colorFormat: string

    The colour attachment's texel format — the swap chain's, in this tier.

    colorWrite: boolean

    §57's colorWrite, all four channels together as §57 declares it.

    depthFormat: string | null

    The depth attachment's format, or null for a pass with no depth.

    depthTest: boolean

    §57's depthTest — "always" when off, "less" when on (GL's default).

    depthWrite: boolean

    §57's depthWrite.

    effect?: WgpuEffectKind | null

    Which §70 effect a kind: "effect" pipeline draws (WP-R1.6), or absent/null for every other kind — module identity, exactly as vertexColors/map are for the unlit family, carried as its own member because the effect kinds are not a boolean pair. Appends a key segment only when carried (the stencil/batch/normals rule, fourth application), so every landed key is byte-identical.

    gpuInstances?: boolean

    Whether a kind: "particles" pipeline sources instance positions from a GPU simulation's storage buffer instead of the interleaved CPU stream (§36 simulation: "gpu", R-31 wiring, 2026-08-29) — vertex-layout identity (PARTICLE_GPU_VERTEX_BUFFER_LAYOUTS vs PARTICLE_VERTEX_BUFFER_LAYOUTS) over the same WGSL module. Appended to the key only when true (the shadow rule, second application): false and absent name the very pipeline every landed CPU-simulated transcript compiled, so its key and its fourJS:<key> label stay byte-identical.

    Which shader family (and so which WGSL module).

    map: boolean

    Whether the variant samples §57's map — and therefore reads the uv stream and binds group 1 (§77, WP-R1.2).

    A pipeline field rather than a uniform, for the reason wgpu-unlit.ts gives at length: the cache is lazy, so a variant nothing draws is never created, which inverts R-19's measured argument for the WebGL backend.

    metalRoughness?: boolean

    Whether a kind: "standard" variant samples §59's packed metallic-roughness map (wgpu-standard.ts) — GL's per-draw useMetalRoughnessMap as pipeline identity. Appended to the key only when true (the shadow rule, third application): false and absent name the very pipeline every landed scalar-only transcript compiled. The renderer passes the flag on shaded draws; the lit family ignores it (layout and module stay the unmapped/mapped pair they always were).

    normals?: boolean

    Whether a shaded variant reads the §53 normal stream (§68, WP-R1.5), or absent for every unshaded kind.

    Optional, and carried — true or false — by exactly the shaded kinds: on WebGPU the normal stream is a vertex-layout fact a pipeline bakes in (wgpu-lit.ts's departure 2), so both values are pipeline identity and both append a key segment; absence appends nothing, which is what keeps every pre-WP-R1.5 key — and every fourJS:<key> label in landed transcripts — byte-identical (the stencil/batch rule, third application).

    shadow?: boolean

    Whether a shaded variant multiplies §69's shadow term in (WP-R1.7, wgpu-shadow.ts) — GL's per-draw useShadow uniform as pipeline identity, appended to the key only when true: a non-receiver inside a shadowed frame then shares the very pipeline (and key, and transcript label) a shadowless frame compiles, exactly as GL's useShadow: false draw is the plain program path. false and absent are deliberately one key — they name identical pipeline content — so the renderer may pass the flag unconditionally on shaded draws.

    stencil?: WgpuStencilDescriptor | null

    §67's stencil state, or absent/null for the overwhelmingly common draw that tests nothing — every draw of every scene that predates §67, whose key and whose createRenderPipeline descriptor are unchanged to the byte (see pipelineKey). Requires a stencil-capable depthFormat.

    topology: "triangle-list" | "line-list"

    §53's draw mode.

    vertexColors: boolean

    Whether the variant reads the per-vertex colour stream (§53, §60a).