webgpu-wgsl-compute-shaders
Installation
SKILL.md
WGSL Compute Shaders
Write a WGSL @compute entry point with a correct workgroup size, invocation ids,
shared workgroup memory, atomics, and barriers, without shader-creation errors or
workgroup-memory data races.
Quick Reference
WGSL is the shading language of WebGPU 1.0-stable (Chrome 113+, Safari 26+,
Firefox 141+). A compute shader is one function marked @compute and
@workgroup_size(x, y, z). The host dispatches a grid of workgroups; each workgroup
runs x*y*z invocations that can share var<workgroup> memory.
Compute builtin values
All compute builtins are inputs declared with @builtin(name) on entry-point
parameters. All are vec3<u32> except local_invocation_index.