Skip to content

DataMaterial.createBindGroupLayout

Summary

DataMaterial.createBindGroupLayout operates on a DataMaterial runtime object to update state, query data, or manage lifecycle.

Syntax

DataMaterial.createBindGroupLayout(device: GPUDevice): GPUBindGroupLayout
const result = material.createBindGroupLayout(device);

Parameters

Name Type Required Description
device GPUDevice Yes GPUDevice used to allocate pipelines, buffers, layouts, or textures.

Returns

GPUBindGroupLayout - GPU bind-group layout describing required shader bindings for this object.

Type Details

// No additional descriptor expansion is required for this signature.

Example

const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);

const material = wgpu.material.data({ data: new Float32Array([0.2, 0.4, 0.7, 1.0]), scaleTransform: { mode: "linear", domainMin: 0, domainMax: 1 }, colormap: "viridis" });
const device = wgpu.gpu.device;
const result = material.createBindGroupLayout(device);
console.log(result);

See Also