A small collection of WebGPU demonstrations and starter material focused on GPU compute (e.g., array/matrix multiplication) and GPU rendering (e.g., basic rendering and graph rendering) in the browser.
This repository is organized as a set of self-contained topic folders.
Demo folders:
Starting a Project/Array Multiplication/Matrix Multiplication/Basic Rendering/Graph Rendering/
WebGPU is a modern browser API for high-performance graphics and compute on the GPU. Use a recent WebGPU-capable browser (commonly a current Chromium-based browser).
Each demo folder is intended to be self-contained.
A starter template / scaffolding folder intended to provide:
- Minimal boilerplate for WebGPU initialization
- A recommended project layout
This module explores the essential components of WebGPU's device model through a simple compute pipeline—multiplying each element of an array by 2.
This module explores how to create an application for GPU-accelerated matrix multiplication.
This module demonstrates how to create a WebGPU application for GPU rendering of instanced triangles.
This module demonstrates how to create a WebGPU application that combines GPU compute and rendering to visualize graphs.
- Confirm you’re running a WebGPU-capable browser (https://caniuse.com/webgpu).
- Check browser settings/flags for WebGPU availability.