A hands-on, JavaScript-based introduction to WebGPU for real-time 3D graphics and GPU computing in the browser.
The Book of WebGPU is a hands-on introduction to modern browser-based 3D graphics and GPU computing with WebGPU and JavaScript. Readers learn how to use the WebGPU API and the WebGPU Shading Language (WGSL) to render interactive 3D scenes, implement lighting and texturing, and tap into the GPU’s compute pipeline for non-graphics workloads.
The book walks through the full pipeline of creating 3D graphics in the browser, from buffers, shaders, and render passes to camera transforms and physically inspired lighting. Along the way, it reinforces core graphics concepts like coordinate spaces, projections, and materials, while also covering modern JavaScript features such as modules, promises, and async/await.
Every chapter includes guided, browser-based projects and challenging exercises, from fractal visualizations and interactive lighting demos to exploring medical CT data in 3D and experimenting with GPU-accelerated computations. As of 2025, WebGPU is officially supported across Chrome, Edge, Firefox, and Safari, so readers can run these projects in all major browsers without special plugins or native installs.
The result is a complete on-ramp for developers who want to create high-performance, visually rich experiences on the web, whether for games, data visualization, design tools, or emerging AI workflows.