Options used to create this Material.

interface MaterialOptions {
    uniforms?: ReadOnlyInputBindings;
    storages?: ReadWriteInputBindings;
    bindings?: BindGroupBindingElement[];
    label: string;
    shaders: MaterialShaders;
    useAsyncPipeline?: boolean;
    bindGroups?: BindGroup[];
    samplers?: Sampler[];
    textures?: MaterialTexture[];
}

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 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.