GPU overview
Mach uses WebGPU as its graphics API, this is an overview of that, links to learning resources and more information about how to use it.
Learning resources
Things to reference as you go
Video tutorials
@GetIntoGameDev has an excellent series of around 30 “WebGPU for Beginners” tutorials, they are using JavaScript but the APIs and concepts are the same. They go into an interesting raytracing-using-compute-shaders technique towards the end.
Code examples
- mach-core has an example showcase with 15+ Zig examples.
- JS examples: https://github.com/webgpu/webgpu-samples
- C examples: https://github.com/samdauwe/webgpu-native-examples
Articles
- Buffers uploads by @tojiro
- WebGPU GLTF case study by @tojiro
- Using WebGPU Compute Shaders with Vertex Data (compute skinning) - by @tojiro
- “Raw WebGPU” has great diagrams of the basic concepts behind WebGPU - by @alain
- Surma.dev’s article covers WebGPU compute shaders in detail