Compatibility and limits

three version, WebGPU requirements, supported grid types, WGSL size budgets and known divergences.

three

@pmndrs/vdb/three supports three >=0.187.0 <0.188.0 (r187) and needs WebGPURenderer on the WebGPU backend. VDBGridNode relies on three's backend internals, so it checks them: another three revision warns once, and the first node on a backend self-tests the disposal guard (VDB_ENGINE_MISMATCH if it fails). Core and tools have no three dependency.

WebGPU

  • The pool needs a core (non-compatibility) GPUDevice with at least one storage buffer per shader stage, a storage-buffer binding limit of at least the pool's minimum, and a device that is not lost. VDBGridPool.unsupportedReason(device) says which.
  • Request the device with VDBGridPool.requiredLimits(adapter) (maxStorageBufferBindingSize and maxBufferSize of the adapter). The pool never grows past the device's storage-buffer binding size, and VDB_POOL_LIMIT is the error when it would.
  • A kernel uses one storage binding for the pool, at a slot you choose. No textures or samplers are required by the core. The dense frame-renderer source and the pyramid use 3D textures.
  • CI runs the WebGPU paths on SwiftShader; hardware checks run on Chrome with an Apple GPU. Timings recorded so far are provisional (D25).

Grids

Supported
Pool and WGSLScalar grids: Float, Fp4, Fp8, Fp16, FpN, Half (NanoVDB 13.2+ GridType::Half). Generate the module for every type you add, or use VDB_ALL_SCALAR_TYPES.
NvdbFile, readValue, vdbSampleTrilinearCpuFloat, Fp4, Fp8, Fp16, FpN, Half. Half grids written by NanoVDB v14 (createNanoGrid<…, nanovdb::Half>) are read bit for bit, and vdbQuantize(…, 'half') writes the same values and min/max. Fp4 and Fp16 are decoded per PNanoVDB.h; there are no native Fp4/Fp16 fixtures, so they are tested against quantize output (CPU round-trip, bit-exact GPU parity on SwiftShader).
Vec3fBuilt by buildFromVdb, read on the CPU by vdbReadValueVec3Cpu and vdbSampleTrilinearVec3Cpu. Not in the pool.
.vdbFile version 225 and older (OpenVDB v14 writes 225). 5-4-3 float, half (read as float), vec3 and point-data grids; Blosc (LZ4, BloscLZ, zlib) and zlib.
.nvdbNanoVDB 32.x (OpenVDB 10 to 14; another major throws VDBUnsupportedError). Codecs NONE, ZIP and BLOSC (NanoVDB's LZ4 and Warp's BloscLZ) are read; writeNvdb writes NONE, ZIP and BLOSC (LZ4 frames byte-identical to native NanoVDB v14's).
SizeChild offsets are read as 32-bit words, so a grid over 4 GiB is not supported.

WGSL size budgets

Budgets per profile and type set are in the WGSL module. CI runs pnpm wgsl:size and fails a generated module that grows past its budget.

Known divergences

Where this package does something differently from emcfarlane's pnanovdb.wgsl, OpenVDB, NanoVDB, or mjurczyk's renderer, the difference and its reason are listed in DIVERGES.md. Read it before comparing images or bytes against another implementation.

Stability

  • 0.x: a minor release may break; the changelog lists every break with what to do. Each entry point's export list is frozen by a snapshot test, so nothing leaves or joins the public API by accident.
  • Experimental: the network data of multipleScattering: 'neural' / 'mlp' (VDBFrameMlp, VDBFrameMlpLayer, frameRenderer.mlp). The modes and their default weights are supported; the data shape may change before 1.0.
  • Not public: anything imported from a path under dist/ (dist/core/internal.js and friends). Those are test oracles and A/B settings and change without notice.

Not in 0.2

  • VDBGridNode with the majorant profile (VDB_BAD_OPTION): the profile is for raw WGSL hosts (vdbModuleWgsl, see the WGSL module).
  • A Babylon.js adapter.