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?: MaterialTexture[];
    dispatchSize?: number | number[];
}

Hierarchy (View Summary)

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 GPURenderPipeline or GPUComputePipeline 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?: MaterialTexture[]

Array of already created Texture or MediaTexture to be used by this Material.

dispatchSize?: number | number[]

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