Create a compute instance. Note that this is supported on WebGPU only and is a no-op on other platforms.
The graphics device.
The compute shader.
Optional
name: string = 'Unnamed'The name of the compute instance, used for debugging only.
Returns the value of a shader parameter from the compute instance.
The name of the parameter to get.
The value of the specified parameter.
Sets a shader parameter on a compute instance.
The name of the parameter to set.
The value for the specified parameter.
Prepare the compute work dispatch.
X dimension of the grid of work-groups to dispatch.
Optional
y: numberY dimension of the grid of work-groups to dispatch.
Optional
z: numberZ dimension of the grid of work-groups to dispatch.
A representation of a compute shader with the associated resources, that can be executed on the GPU. Only supported on WebGPU platform.