1st Edition
The WebGPU Sourcebook High-Performance Graphics and Machine Learning in the Browser
The WebGPU Sourcebook: High-Performance Graphics and Machine Learning in the Browser explains how to code web applications that access the client’s graphics processor unit, or GPU. This makes it possible to render graphics in a browser at high speed and perform computationally intensive tasks such as machine learning. By taking advantage of WebGPU, web developers can harness the same performance available to desktop developers.
The first part of the book introduces WebGPU at a high level, without graphics theory or heavy math. The chapters in the second part are focused on graphical rendering and the rest of the book focuses on compute shaders.
This book walks through several examples of WebGPU usage. It also:
- Discusses the classes and functions defined in the WebGPU API and shows how they’re used in practice
- Explains the theory of graphical rendering and shows how to implement rendering inside a web application
- Examines the theory of neural networks (machine learning) and shows how to create a web application that trains and executes a neural network
Preface
1. Introduction
2. Fundamental Objects
3. Rendering Graphics
4. The WebGPU Shading Language (WGSL)
5. Uniforms and Transformations
6. Lighting, Textures, and Depth
7. Advanced Features
8. Compute Applications
9. Machine Learning with Neural Networks
10. Image and Video Processing
11. Matrix Operations
12. Filtering Audio with the Fast Fourier Transform (FFT)
Appendix A: Node and TypeScript
Appendix B: WebAssembly, Emscripten, and Google Dawn
Index
Biography
Matthew Scarpino is a software developer at Purdue University. He has worked on many different types of programming projects, including web applications, graphical rendering, and high-performance computing. He received his Master’s in Electrical Engineering in 2002, and has been a professional programmer and author ever since.