Adding WebGPU to the luma.gl 3D rendering engine
summary
Luma.gl gains WebGPU-first internals and a WebGL fallback, with a concrete migration: uniform buffers (UBOs) implemented across hundreds of shader modules via new ShaderInputs and UniformLayout helpers, a dual-WGSL + GLSL dual shaders strategy, and a slim portability core plus an engine layer for mutability (sync textures). Tooling includes shader error overlays, Spector.js integration, and validation/error-scope hooks. Measured effect is expected CPU-side wins from UBOs of 10–15% CPU savings and another ~10% from immutable-object validation reductions, with v9.x rolling these changes out.
AI-written summary · about
chapters (12)
- 0:00Introduction and background
- 3:10WebGPU transition challenges
- 7:44New shading language WGSL
- 12:17Shader module system changes
- 18:34WGSL structure limitations
- 20:43Immutable WebGPU objects
- 22:50WebGPU texture features
- 24:15Performance reality check
- 27:03Texture readback improvements
- 28:28Compute shaders and optimizations
- 29:08Debugging GPU code
- 31:55WebGPU validation API
