@pixi/3d
    Preparing search index...

    Interface TextureBindingAdvanced

    Where PassBuilder#sample puts a texture: a binding in a bind group, and optionally one beside it for the texture's sampler

    The graph writes the frame's texture into the binding before the pass renders. Make one for each input in a bind group the pass owns, or use one of PassBuilder#globalTextureBindings. slot and styleSlot are binding names the pass's shader declares; pixi matches them by name, so their order in the group doesn't matter.

    class MyPass extends RenderPass {
    private readonly _source: ColorHandle = model.sceneColor;
    private readonly _group = new BindGroup({
    uTexture: Texture.WHITE.source,
    uTextureSampler: Texture.WHITE.source.style,
    });
    private readonly _input: TextureBinding = {
    group: this._group,
    slot: 'uTexture',
    styleSlot: 'uTextureSampler',
    };

    public override setup(b: PassBuilder): void {
    b.sample(this._source, this._input);
    b.sample(model.opaqueDepth, b.globalTextureBindings.opaqueDepth);
    }
    }
    interface TextureBinding {
        group: BindGroup;
        slot: string;
        styleSlot?: string;
    }
    Index
    group: BindGroup

    The bind group the texture goes in

    slot: string

    Name of the binding the texture goes in

    styleSlot?: string

    Name of the binding the texture's own sampler goes in; leave it out to bind a sampler of your own. A depth texture has none, and PassBuilder#sample throws if it's set.