webgpu-wgsl-memory-layout
Installation
SKILL.md
WGSL Memory Layout and Address Spaces
Lay out WGSL structs so a host-side typed array writes to the exact byte offsets the shader reads, pick the correct address space, and avoid the vec3 16-byte trap.
Quick Reference
WGSL is the shading language of WebGPU 1.0-stable: Chrome 113+, Safari 26+, Firefox 141+.
The six WGSL address spaces: