Introduction
Sparse NanoVDB volumes on WebGPU, with no engine inside the core.
Summary
@pmndrs/vdb reads and renders sparse volumes (OpenVDB and NanoVDB) on WebGPU. A WGSL module walks the NanoVDB
tree on the GPU, pure-TypeScript tools parse, build, quantize and write the files, and a three.js adapter puts the
grids into materials and a froxel volume renderer.
The package is one install with three subpaths. The core imports no engine, the tools need no GPU, and only the three.js subpath imports three.
What it is for
- Many grids in one storage buffer, bound at one slot, so a kernel that already uses most of its storage-buffer budget can still read volumes.
- Full-resolution sparse data on the GPU: Float, Fp4, Fp8, Fp16, FpN and Half grids are decoded in the shader, with no dense 3D texture in between.
- A device you own. Nothing here creates or destroys a
GPUDevice, so the volumes share it with other pmndrs tools and compose in the same frame.
Where to go
- Installation and First render.
- The grid pool and the WGSL module for raw WebGPU.
- Tools to get from a
.vdbto a grid image. - three.js for materials, sequences and the froxel renderer.
- The live examples: sixteen demos, from a hello-world read to the froxel renderer, level sets and streaming.