Parameters used to create a BufferBinding

interface BufferBindingParams {
    label?: string;
    name?: string;
    visibility?: MaterialShadersType[];
    useStruct?: boolean;
    access?: BufferBindingMemoryAccessType;
    struct?: Record<string, Input>;
    usage?: BufferUsageKeys[];
    bindingType?: BufferBindingType;
    bindings?: BufferBinding[];
}

Hierarchy (view full)

Properties

label?: string

Binding label

name?: string

Binding name/key

visibility?: MaterialShadersType[]

Binding variables shaders visibility as an array of shaders types names

useStruct?: boolean

Whether this BufferBinding should use structured WGSL variables

BufferBinding memory access types (read only or read/write)

struct?: Record<string, Input>

Object containing one or multiple inputs describing the structure of the BufferBinding

usage?: BufferUsageKeys[]

Allowed usages for the BufferBinding#buffer as an array of buffer usages names

bindingType?: BufferBindingType

The binding type of the BufferBinding

bindings?: BufferBinding[]

Optional array of already created BufferBinding to add to this BufferBinding.