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.

ImportWhat it holds
@pmndrs/vdbThe core: VDBGridPool, the generated WGSL module (vdbModuleWgsl), compute tools, the volume-source seam. No engine.
@pmndrs/vdb/toolsThe CPU half in plain TypeScript: .vdb parser, NanoVDB builder, quantizer, resampler, .nvdb and .wvdb I/O, CPU twins of the WGSL.
@pmndrs/vdb/threeThe three.js adapter: VDBGridNode, VDBVolumeMaterial, VDBSequence, and the froxel renderer VDBFrameVolume.
@pmndrs/vdb/pnanovdb.wgslThe vendored traversal module as raw text.

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