Deck.gl transitioning from WebGL to WebGPU
summary
deck.gl migrates its rendering core from WebGL2 to WebGPU by adopting Luma 9.0, replacing global state with uniform buffer objects and shader modules and adding TypeScript cross-checks that catch mismatched uniforms before a black screen. A concrete port of the PointCloud layer uses UBOs, the Layer Browser verifies behavior, and a lighting + SDF emboss module turns flat text into cheap per-frame 3D normals. The approach drops WebGL1, preserves WebGL2 support, and yields cleaner APIs and measurable performance gains.
AI-written summary · about
chapters (14)
- 0:00Introduction to deck.gl
- 1:08WebGL vs. WebGPU differences
- 2:21Global state vs. modern models
- 3:42Shader language comparison
- 5:39Uniform Buffer Objects (UBOs)
- 7:22The ShaderModule architecture
- 10:32Porting PointCloudLayer to UBO
- 14:46TypeScript type safety
- 18:02Integration and refinement
- 22:12Flexible API with getUniforms
- 23:28Lighting in deck.gl
- 26:05Upgrading TextLayer
- 28:32SDF and Emboss effects
- 30:49Demo and conclusion
