Nano WebGPU API - v0.11.0
    Preparing search index...

    Class PipelineManager

    PipelineManager acts as a centralized caching compiling system for GPURenderPipelines. Allocates reusable bind group layouts, caches compiled standard/custom/shadow/post-processing pipelines to avoid redundant shader compilation overhead, and manages standard pipeline layouts.

    Index

    Constructors

    Methods

    • Resolves GPUBindGroupLayout representing custom parameter-less materials.

      Returns GPUBindGroupLayout

      Custom bind group layout interface.

    • Resolves GPUBindGroupLayout representing custom parameter-enabled materials.

      Returns GPUBindGroupLayout

      Custom params bind group layout interface.

    • Resolves the pipeline layout driving parameter-enabled custom materials (includes Globals, Model, Material, and CustomParams bind groups).

      Parameters

      • useCSM: boolean = false

      Returns GPUPipelineLayout

      The custom params GPUPipelineLayout.

    • Compiles or returns a cached render pipeline driving simple custom ShaderMaterials without uniforms.

      Parameters

      • shaderCode: string

        WGSL custom source string.

      • topology: GPUPrimitiveTopology = "triangle-list"

        Primitive topology. Defaults to "triangle-list".

      • indexFormat: GPUIndexFormat = "uint16"

        Index format used for geometry strip restarts. Defaults to "uint16".

      • OptionalcullMode: GPUCullMode

        Face culling specification.

      • depthWriteEnabled: boolean = true

        Toggle depth testing buffer updates. Defaults to true.

      • depthCompare: GPUCompareFunction = "less"

        Depth comparative filter function. Defaults to "less".

      • useCSM: boolean = false

        If true, compiles CSM variant depth array sampling operations. Defaults to false.

      Returns GPURenderPipeline

      The resolved custom GPURenderPipeline.

    • Resolves the pipeline layout driving basic custom materials (includes Globals, Model, Material, and Custom bind groups).

      Parameters

      • useCSM: boolean = false

      Returns GPUPipelineLayout

      The custom GPUPipelineLayout.

    • Compiles or returns a cached render pipeline driving parameter-enabled ShaderMaterials. Passes configurable uniforms in group 3 binding 0.

      Parameters

      • shaderCode: string

        WGSL custom source string.

      • topology: GPUPrimitiveTopology = "triangle-list"

        Primitive topology. Defaults to "triangle-list".

      • indexFormat: GPUIndexFormat = "uint16"

        Index format used for geometry strip restarts. Defaults to "uint16".

      • OptionalcullMode: GPUCullMode

        Face culling specification.

      • depthWriteEnabled: boolean = true

        Toggle depth testing buffer updates. Defaults to true.

      • depthCompare: GPUCompareFunction = "less"

        Depth comparative filter function. Defaults to "less".

      • useCSM: boolean = false

        If true, compiles CSM variant depth array sampling operations. Defaults to false.

      Returns GPURenderPipeline

      The resolved custom GPURenderPipeline.

    • Resolves GPUBindGroupLayout representing global parameters.

      Parameters

      • useCSM: boolean = false

      Returns GPUBindGroupLayout

      Global bind group layout interface.

    • Resolves GPUBindGroupLayout representing standard PBR materials.

      Returns GPUBindGroupLayout

      Material bind group layout interface.

    • Resolves GPUBindGroupLayout representing instanced model transformation arrays.

      Returns GPUBindGroupLayout

      Model bind group layout interface.

    • Resolves the bind group layout driving fullscreen post processing passes (sampler, color attachment, render settings, bloom).

      Returns GPUBindGroupLayout

      The post process GPUBindGroupLayout.

    • Compiles and returns the unified post processing pipeline.

      Returns GPURenderPipeline

      The compiled post-processing GPURenderPipeline.

    • Resolves the bind group layout driving shadow rendering (maps light view-projection uniforms at binding 0).

      Returns GPUBindGroupLayout

      The shadow GPUBindGroupLayout.

    • Compiles and returns the unified shadow map generation pipeline. Employs front-face culling to mitigate shadow maps peter-panning artifacts.

      Returns GPURenderPipeline

      The compiled shadow GPURenderPipeline.

    • Fetches or programmatically compiles a standard PBR render pipeline matching specific topologies and shadow modes. Compiles shaders lazily once and caches them to avoid duplicate compile latency.

      Parameters

      • usePCF: boolean

        If true, compiles PCF soft shadow sampling operations. Otherwise uses cheap hard shadows.

      • topology: GPUPrimitiveTopology = "triangle-list"

        Primitive rendering topology. Defaults to "triangle-list".

      • indexFormat: GPUIndexFormat = "uint16"

        Index buffer format used for geometry strip restarts. Defaults to "uint16".

      • OptionalcullMode: GPUCullMode

        Culling specification.

      • depthWriteEnabled: boolean = true

        Toggle depth testing buffer updates. Defaults to true.

      • depthCompare: GPUCompareFunction = "less"

        Depth comparative filter function. Defaults to "less".

      • useCSM: boolean = false

        If true, compiles CSM variant depth array sampling operations. Defaults to false.

      Returns GPURenderPipeline

      The resolved GPURenderPipeline.

    • Resolves the pipeline layout driving standard materials (includes Globals, Model, and Material bind groups).

      Parameters

      • useCSM: boolean = false

      Returns GPUPipelineLayout

      The standard GPUPipelineLayout.