Idea · Jun 28, 2026
WebGPU Shader Studio
Students build a browser-native WGSL compute shader playground with animated thread-group visualization, CPU vs. GPU benchmarks, and an AI coach explaining each pipeline stage — culminating in a shared gallery of parallel algorithm implementations.
What it would do
A multi-week classroom project where students implement a full in-browser WGSL compute shader development environment using the WebGPU API. The app includes a Monaco editor for writing shaders, an animated canvas that visualizes thread-group execution as a live grid of colored cells, and a benchmarking panel that compares shader runtime against a JavaScript CPU baseline. A Claude API assistant explains what each pipeline stage does, flags common WGSL pitfalls, and suggests optimization strategies. Students complete a curriculum of five challenges (parallel reduction, prefix scan, matrix multiply, bitonic sort, image blur) and publish their fastest solutions to a class-wide gallery.
Key features
- Monaco editor with WGSL syntax highlighting and error underlining
- Animated thread-group visualization showing dispatch dimensions and workgroup occupancy
- CPU vs. GPU benchmark panel with real execution times and speedup ratio
- Claude API assistant that explains each shader stage, flags WGSL errors, and suggests optimizations
- Five graded challenge levels (parallel reduction through image blur) with automated correctness tests
- Class gallery where students publish and star each other's fastest implementations