Builtin Library
- ..
- .metadata17 B
- README.md493 B
- bindings.yaml206 B
- shader.wgsl1.2 KB
README.md
compute_add_vectors
Reference compute shader that adds two float arrays element-wise into a third — the multi-buffer pattern with read-only inputs.
Bindings (see bindings.yaml): a (read), b (read), result (read_write) — all
array<f32>.
Usage: dispatch by identity — it resolves to the shader's stable guid and
auto-compiles on first use (no setup):
compute.dispatch("@builtin::shaders.compute_add_vectors", { buffers = { "a", "b", "result" }, workgroups = { 1, 1, 1 } }).