@pixi/3d
    Preparing search index...

    Interface ShaderDescriptorOptionsAdvanced

    Options for a ShaderDescriptor: the ShaderBits a shader is built from

    Each backend takes its own list, because a few bits exist for one backend only. Most lists name the same bits.

    interface ShaderDescriptorOptions {
        bitsGl?: ShaderBit[];
        bitsGpu?: ShaderBit[];
        includeCamera?: boolean;
        includeGlobal?: boolean;
        outputLocations?: readonly string[];
        overrides?: Record<string, number>;
        template?: ShaderBitTemplate;
    }
    Index
    bitsGl?: ShaderBit[]

    Shader bits for the WebGL (GLSL) backend

    []
    
    bitsGpu?: ShaderBit[]

    Shader bits for the WebGPU (WGSL) backend

    []
    
    includeCamera?: boolean

    Whether the compiler adds the camera's position and matrices in the camera bind group

    Set it to match the template: false for one with no camera group. The compile throws when they disagree. A material's descriptor ignores it and always has them.

    true
    
    includeGlobal?: boolean

    Whether the compiler adds the view-wide values, such as the lights and fog, in the global bind group

    Set false for a template with no global group, or when the bits declare a global group of their own. A material's descriptor ignores it and always has them.

    true
    
    outputLocations?: readonly string[]

    Which of the bits' ShaderBit#outputs each location writes, by name: entry n is location n, the target's colour attachment n

    An output left out never reaches the GPU, and a name no bit declares leaves its attachment alone. A material's descriptor ignores it, since the engine sets a material shader's locations. Each distinct list compiles its own shader. A template without the output slots ignores it.

    ['color']
    
    overrides?: Record<string, number>

    Values for the bits' specialization constants (ShaderOverrideDef), such as { OUTLINE_WIDTH: 0.1 }

    Each distinct set of values compiles its own shader.

    Custom shader template

    Left out, a material's descriptor uses the engine's material template. A pass's descriptor has no default and must set one.