The Book of WebGPU

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.
Mahesh Venkitachalam is a programmer, writer, and consultant specializing in 3D computer graphics and embedded systems. He is the founder of Electronut Labs, where he has designed open-source hardware and custom devices for clients around the world. His previous book, Python Playground (No Starch Press), introduced thousands of readers to creative coding projects in graphics, audio, and hardware hacking.

About

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.

Author

Mahesh Venkitachalam is a programmer, writer, and consultant specializing in 3D computer graphics and embedded systems. He is the founder of Electronut Labs, where he has designed open-source hardware and custom devices for clients around the world. His previous book, Python Playground (No Starch Press), introduced thousands of readers to creative coding projects in graphics, audio, and hardware hacking.
  • More Websites from
    Penguin Random House
  • Common Reads
  • Library Marketing