@pixi/3d
    Preparing search index...

    Interface PassDescriptorAdvanced

    Pass overrides as the engine stores them: PassDescriptorOptions with the shader always a ShaderDescriptor

    When the material's entry for a pass, or the pass's own descriptor, sets shaderDescriptor, as an outline or the shadow pass does, the pass takes each field from the first that is set:

    • shaderDescriptor: the material's entry, then the pass's own.
    • state: the material's entry, the pass's own, then material.state.
    • topology: the material's entry, the pass's own, material.topology, then the geometry's.

    That shader can't read the material's values or textures. Otherwise a material's main pass (opaque, transparent, transmission or blended refraction) draws with the material's shader, from BaseMaterial3D#getPrimaryDescriptor, and skips the pass's own entry: state comes from the material's entry, then material.state, and topology from the material's entry, material.topology, then the geometry's.

    Meshes resolve these values when they build their draw data, so giving a field a new value after a render isn't supported: clone the material with the new entry and assign the copy. A changed field of a state object reaches the meshes after Mesh3D#invalidate on each one.

    // Per-material override for one pass
    new BaseMaterial3D({
    passes: {
    outline: {
    state: customState,
    shaderDescriptor: { bitsGpu: [outlineBitGpu], bitsGl: [outlineBitGl], template: outlineTemplate },
    },
    },
    });

    // Pass-level default for every mesh in the pass
    new MeshPass({
    name: 'xray',
    descriptor: { state: xrayState, shaderDescriptor: xrayShader },
    });
    interface PassDescriptor {
        shaderDescriptor?: ShaderDescriptor;
        state?: State;
        topology?: Topology;
    }
    Index
    shaderDescriptor?: ShaderDescriptor

    Shader to draw with in this pass

    state?: State

    Render state (blending, depth, culling) for this pass

    topology?: Topology

    Primitive topology for this pass