Parameters used to create a ComputeMaterial

interface ComputeMaterialParams {
    uniforms?: ReadOnlyInputBindings;
    storages?: ReadWriteInputBindings;
    bindings?: BindGroupBindingElement[];
    label?: string;
    shaders?: MaterialShaders;
    useAsyncPipeline?: boolean;
    bindGroups?: BindGroup[];
    samplers?: Sampler[];
    textures?: Texture[];
    domTextures?: DOMTexture[];
    dispatchSize?: number | number[];
}

Hierarchy (view full)

Properties

uniforms input to pass to a BindGroup

read only or read/write storages input to pass to a BindGroup

array of already created bindings (buffers, texture, etc.) to pass to this BindGroup

label?: string

The label of the Material, sent to various GPU objects for debugging purpose

shaders?: MaterialShaders

Shaders to use with this Material

useAsyncPipeline?: boolean

Whether to compile the Material GPUPipelineBase | pipeline asynchronously or not

bindGroups?: BindGroup[]

Array of already created bind groups to be used by this Material

samplers?: Sampler[]

Array of already created samplers to be used by this Material

textures?: Texture[]

Array of already created Texture to be used by this Material

domTextures?: DOMTexture[]

Array of already created DOMTexture to be used by this Material

dispatchSize?: number | number[]

Main/first work group dispatch size to use with this ComputeMaterial