@pixi/3d
    Preparing search index...

    Class ShaderDescriptorAdvanced

    The ShaderBits a shader is built from, per backend, with its template and overrides

    A material's descriptor option sets the bits of its main shader. Its passes option gives an extra render pass, such as an outline, a descriptor of its own, keyed by pass name, as options or as a built descriptor. The renderer adds the bits a mesh needs, such as skinning, so a material lists only its own.

    new BaseMaterial3D({
    descriptor: { bitsGpu: [myBit], bitsGl: [myBit] },
    });

    new BaseMaterial3D({
    descriptor: { bitsGpu: [myBit], bitsGl: [myBit] },
    passes: {
    outline: {
    shaderDescriptor: {
    bitsGpu: [outlineBit], bitsGl: [outlineBit],
    template: outlineTemplate,
    },
    },
    },
    });
    Index
    bitsGl: ShaderBit[]

    Shader bits for the WebGL (GLSL) backend

    bitsGpu: ShaderBit[]

    Shader bits for the WebGPU (WGSL) backend

    includeCamera?: boolean
    includeGlobal?: boolean
    outputLocations: readonly string[]

    Which output each location writes, by name; see ShaderDescriptorOptions#outputLocations

    overrides?: Record<string, number>

    Values for the bits' specialization constants; see ShaderDescriptorOptions#overrides

    Custom shader template; see ShaderDescriptorOptions#template

    • Replaces every field from options, as the constructor would; a field left out goes back to its default

      Parameters

      Returns this

      This descriptor, for chaining