WebGPU is an old new technology that is now supported by all major browsers (including Safari) and three.js. The rationale:
- GPU-driven rendering — WebGPU compute shaders can handle instanced hit rendering (thousands of BoxHits) entirely on GPU, reducing CPU overhead
- Compute-based BVH traversal — move raycasting/picking from CPU to GPU compute shaders, significantly faster for large geometries
- Better batching — WebGPU's bind group model reduces draw call overhead vs WebGL's per-uniform state changes, helping with merged detector geometries
- GPU-side time filtering — painters currently filter hits/trajectories by time on CPU; a compute shader could cull/animate thousands of objects per frame with near-zero CPU cost
- Indirect rendering — GPU can decide what to draw (frustum culling, LOD selection) without CPU roundtrips, critical for full-detector views
- Parallel geometry processing — geometry optimization/merging steps could run as compute passes during load
- Modern pipeline state — explicit pipeline objects avoid WebGL's hidden state validation overhead, more predictable frame times
- Larger buffers — WebGPU supports storage buffers well beyond WebGL's uniform buffer limits, enabling bigger event datasets in GPU memory
WebGPU is an old new technology that is now supported by all major browsers (including Safari) and three.js. The rationale: