MasterSelects: A GPU-First Browser-Based Video Editor Built on WebGPU
Key Takeaways
- ▸MasterSelects demonstrates WebGPU's viability for professional-grade video editing in the browser, eliminating the need for native applications or server-side rendering
- ▸The architecture achieves remarkable code efficiency with a single 618-line shader handling complex layer compositing, 37 blend modes, and 3D transformations—a showcase of GPU-first design philosophy
- ▸The open-source codebase (MIT licensed) with minimal dependencies (13 total) serves as a reference implementation for building scalable WebGPU applications
Summary
MasterSelects is a fully browser-based video editor that leverages WebGPU to deliver native-app-level performance without requiring installation or server-side processing. Built by Roman Kuskowski, the editor treats the GPU as a first-class citizen, handling video composition, effects, and real-time rendering entirely on the client side. The architecture uses a single 618-line WGSL shader to manage unlimited layers with 37 blend modes and full 3D rotation, while a 3-tier caching system (300 VRAM textures, per-video cache, and 900-frame RAM preview) enables instant scrubbing and responsive playback.
The feature set is comprehensive: 31 GPU-accelerated effects, real-time color scopes (histogram, vectorscope, waveform), optical flow scene detection, and SAM2 segmentation powered by ONNX Runtime running on-device. Video export bypasses CPU bottlenecks by capturing frames directly from the GPU canvas without staging buffers or readPixels operations. The entire codebase is remarkably lean—approximately 2,400 lines of WGSL, 100K lines of TypeScript, and just 13 production dependencies—making it one of the cleanest WebGPU implementations at scale.
The project is open-source under the MIT license with full source code available on GitHub. An optional Native Helper companion enables additional features like YouTube downloader integration and AI tool bridging through localhost WebSocket and HTTP connections. The live demo is available at masterselects.com.
- GPU-accelerated features including SAM2 segmentation, optical flow detection, and real-time color scopes bring professional broadcast standards to the browser
Editorial Opinion
MasterSelects represents a watershed moment for web-based creative tools, proving that GPU-first architecture can deliver professional performance entirely in the browser. The project's obsessive attention to efficiency—from its single monolithic shader to its 3-tier caching strategy—demonstrates that browser constraints can drive innovation rather than compromise. For developers and designers, this is both an impressive tool and an invaluable reference for understanding how to architect modern WebGPU applications at production scale.



