SPLV (Voxel Video Codec)

September 2024 — Present At True3D (YC W21)
  • WebGPU
  • WGSL
  • C
  • WebAssembly
  • Compression
  • GPU parallelism

SPLV is True3D's flagship volumetric video codec, discretizing an arbitrary 3D scene using voxels. I wrote the core spec, encoder, and decoder from scratch in C. The codec leverages arithmetic coding, vector quantization, and inter-frame prediction to achieve a 20:1 compression ratio with visually lossless quality. To allow in-browser decoding, I targeted WebAssembly for compilation, and multithreaded it using SharedArrayBuffer + Web Workers. This, coupled with the high compression ratio, enabled real-time streaming and decoding of volumetric video on the web. To push the performance even further, I wrote a hardware-accelerated version of the decoder using WebGPU compute shaders, bit-identical to and 3× the performance of the WASM implementation. This powered all of the real-time demos used in True3D's seed raise.

Highlights

  • 20:1 compression ratio with visually lossless quality, achieved with arithmetic coding, vector quantization, and P-frames.
  • Multithreaded (SharedArrayBuffer + Web Workers) WebAssembly encoder + decoder, 6.5× faster than single-threaded at 8 cores.
  • WebGPU decoder, 3× faster than the prior WASM implementation. Leveraged a block-parallel entropy decoder and a work-efficient prefix sum to achieve 10B voxels/s in-browser on consumer laptops.

Media

A screenshot of a complex scene
A 512x512x512 scene, captured in real-time from Unity, rendered in-browser.
1B voxels decoding and rendering at 30fps in Chrome, 1080p on an M4 MacBook.