Hello everyone. I’m new to webGPU and compute shaders and want to ask how to determine size of workgroup and what these values are used for. Also, do the values of @workgroup_size correspond the values (x, y, z) I pass to the computerShader.dispatch or computerShader.dispatchWhenReady methods, and if so, how? Thank you for your attention.
These resources can help you understand workgroups in compute shaders:
- Compute Shaders and Workgroups in the WebGPU Shading Language spec
- Get started with GPU Compute on the web, and more precisely the Commands submission section
Note that compute shaders are not WebGPU-specific, so any resource about them that you find on the web should also be relevant to WebGPU.