@pmndrs/vdb 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +727 -0
- package/LICENSE +21 -0
- package/README.md +496 -2
- package/THIRD_PARTY_NOTICES.md +315 -0
- package/dist/core/compute/atlas.d.ts +102 -0
- package/dist/core/compute/atlas.js +103 -0
- package/dist/core/compute/atlas.js.map +1 -0
- package/dist/core/compute/index.d.ts +13 -0
- package/dist/core/compute/index.js +9 -0
- package/dist/core/compute/index.js.map +1 -0
- package/dist/core/compute/majorant-build.d.ts +45 -0
- package/dist/core/compute/majorant-build.js +193 -0
- package/dist/core/compute/majorant-build.js.map +1 -0
- package/dist/core/compute/multi-scale.d.ts +155 -0
- package/dist/core/compute/multi-scale.js +684 -0
- package/dist/core/compute/multi-scale.js.map +1 -0
- package/dist/core/compute/pyramid.d.ts +120 -0
- package/dist/core/compute/pyramid.js +468 -0
- package/dist/core/compute/pyramid.js.map +1 -0
- package/dist/core/compute/shared.d.ts +116 -0
- package/dist/core/compute/shared.js +211 -0
- package/dist/core/compute/shared.js.map +1 -0
- package/dist/core/compute/stats.d.ts +78 -0
- package/dist/core/compute/stats.js +193 -0
- package/dist/core/compute/stats.js.map +1 -0
- package/dist/core/compute/value-transform.d.ts +30 -0
- package/dist/core/compute/value-transform.js +64 -0
- package/dist/core/compute/value-transform.js.map +1 -0
- package/dist/core/errors.d.ts +21 -0
- package/dist/core/errors.js +17 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/frame/emission.d.ts +85 -0
- package/dist/core/frame/emission.js +422 -0
- package/dist/core/frame/emission.js.map +1 -0
- package/dist/core/frame/environment.d.ts +47 -0
- package/dist/core/frame/environment.js +178 -0
- package/dist/core/frame/environment.js.map +1 -0
- package/dist/core/frame/index.d.ts +39 -0
- package/dist/core/frame/index.js +27 -0
- package/dist/core/frame/index.js.map +1 -0
- package/dist/core/frame/kernels.d.ts +115 -0
- package/dist/core/frame/kernels.js +496 -0
- package/dist/core/frame/kernels.js.map +1 -0
- package/dist/core/frame/limits.d.ts +67 -0
- package/dist/core/frame/limits.js +109 -0
- package/dist/core/frame/limits.js.map +1 -0
- package/dist/core/frame/phase.d.ts +17 -0
- package/dist/core/frame/phase.js +53 -0
- package/dist/core/frame/phase.js.map +1 -0
- package/dist/core/frame/pipelines.d.ts +49 -0
- package/dist/core/frame/pipelines.js +147 -0
- package/dist/core/frame/pipelines.js.map +1 -0
- package/dist/core/frame/renderer.d.ts +122 -0
- package/dist/core/frame/renderer.js +1712 -0
- package/dist/core/frame/renderer.js.map +1 -0
- package/dist/core/frame/resources.d.ts +71 -0
- package/dist/core/frame/resources.js +100 -0
- package/dist/core/frame/resources.js.map +1 -0
- package/dist/core/frame/scattering.d.ts +97 -0
- package/dist/core/frame/scattering.js +332 -0
- package/dist/core/frame/scattering.js.map +1 -0
- package/dist/core/frame/settings.d.ts +243 -0
- package/dist/core/frame/settings.js +67 -0
- package/dist/core/frame/settings.js.map +1 -0
- package/dist/core/frame/shadows.d.ts +55 -0
- package/dist/core/frame/shadows.js +460 -0
- package/dist/core/frame/shadows.js.map +1 -0
- package/dist/core/frame/types.d.ts +415 -0
- package/dist/core/frame/types.js +49 -0
- package/dist/core/frame/types.js.map +1 -0
- package/dist/core/frame/uniforms.d.ts +105 -0
- package/dist/core/frame/uniforms.js +276 -0
- package/dist/core/frame/uniforms.js.map +1 -0
- package/dist/core/frame/wgsl/chunks.d.ts +4 -0
- package/dist/core/frame/wgsl/chunks.js +728 -0
- package/dist/core/frame/wgsl/chunks.js.map +1 -0
- package/dist/core/frame/wgsl/emission.d.ts +82 -0
- package/dist/core/frame/wgsl/emission.js +353 -0
- package/dist/core/frame/wgsl/emission.js.map +1 -0
- package/dist/core/frame/wgsl/environment.d.ts +42 -0
- package/dist/core/frame/wgsl/environment.js +711 -0
- package/dist/core/frame/wgsl/environment.js.map +1 -0
- package/dist/core/frame/wgsl/gather.d.ts +55 -0
- package/dist/core/frame/wgsl/gather.js +850 -0
- package/dist/core/frame/wgsl/gather.js.map +1 -0
- package/dist/core/frame/wgsl/integrate.d.ts +78 -0
- package/dist/core/frame/wgsl/integrate.js +213 -0
- package/dist/core/frame/wgsl/integrate.js.map +1 -0
- package/dist/core/frame/wgsl/lighting.d.ts +103 -0
- package/dist/core/frame/wgsl/lighting.js +1636 -0
- package/dist/core/frame/wgsl/lighting.js.map +1 -0
- package/dist/core/frame/wgsl/occluders.d.ts +20 -0
- package/dist/core/frame/wgsl/occluders.js +95 -0
- package/dist/core/frame/wgsl/occluders.js.map +1 -0
- package/dist/core/frame/wgsl/resolve.d.ts +19 -0
- package/dist/core/frame/wgsl/resolve.js +205 -0
- package/dist/core/frame/wgsl/resolve.js.map +1 -0
- package/dist/core/frame/wgsl/shadows.d.ts +35 -0
- package/dist/core/frame/wgsl/shadows.js +328 -0
- package/dist/core/frame/wgsl/shadows.js.map +1 -0
- package/dist/core/half.d.ts +11 -0
- package/dist/core/half.js +22 -0
- package/dist/core/half.js.map +1 -0
- package/dist/core/index.d.ts +52 -0
- package/dist/core/index.js +46 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/internal.d.ts +31 -0
- package/dist/core/internal.js +32 -0
- package/dist/core/internal.js.map +1 -0
- package/dist/core/pool/affine.d.ts +34 -0
- package/dist/core/pool/affine.js +100 -0
- package/dist/core/pool/affine.js.map +1 -0
- package/dist/core/pool/allocator.d.ts +32 -0
- package/dist/core/pool/allocator.js +81 -0
- package/dist/core/pool/allocator.js.map +1 -0
- package/dist/core/pool/image-header.d.ts +93 -0
- package/dist/core/pool/image-header.js +194 -0
- package/dist/core/pool/image-header.js.map +1 -0
- package/dist/core/pool/layout.d.ts +198 -0
- package/dist/core/pool/layout.js +316 -0
- package/dist/core/pool/layout.js.map +1 -0
- package/dist/core/pool/limits.d.ts +41 -0
- package/dist/core/pool/limits.js +80 -0
- package/dist/core/pool/limits.js.map +1 -0
- package/dist/core/pool/pool.d.ts +384 -0
- package/dist/core/pool/pool.js +1184 -0
- package/dist/core/pool/pool.js.map +1 -0
- package/dist/core/reference/index.d.ts +6 -0
- package/dist/core/reference/index.js +7 -0
- package/dist/core/reference/index.js.map +1 -0
- package/dist/core/reference/renderer.d.ts +105 -0
- package/dist/core/reference/renderer.js +474 -0
- package/dist/core/reference/renderer.js.map +1 -0
- package/dist/core/reference/wgsl.d.ts +65 -0
- package/dist/core/reference/wgsl.js +803 -0
- package/dist/core/reference/wgsl.js.map +1 -0
- package/dist/core/sequence.d.ts +347 -0
- package/dist/core/sequence.js +548 -0
- package/dist/core/sequence.js.map +1 -0
- package/dist/core/source/brick-cache.d.ts +165 -0
- package/dist/core/source/brick-cache.js +627 -0
- package/dist/core/source/brick-cache.js.map +1 -0
- package/dist/core/source/dense-fill.d.ts +53 -0
- package/dist/core/source/dense-fill.js +377 -0
- package/dist/core/source/dense-fill.js.map +1 -0
- package/dist/core/source/dense.d.ts +50 -0
- package/dist/core/source/dense.js +384 -0
- package/dist/core/source/dense.js.map +1 -0
- package/dist/core/source/sparse-wgsl.d.ts +92 -0
- package/dist/core/source/sparse-wgsl.js +481 -0
- package/dist/core/source/sparse-wgsl.js.map +1 -0
- package/dist/core/source/sparse.d.ts +192 -0
- package/dist/core/source/sparse.js +762 -0
- package/dist/core/source/sparse.js.map +1 -0
- package/dist/core/source/types.d.ts +120 -0
- package/dist/core/source/types.js +9 -0
- package/dist/core/source/types.js.map +1 -0
- package/dist/core/surface/index.d.ts +10 -0
- package/dist/core/surface/index.js +9 -0
- package/dist/core/surface/index.js.map +1 -0
- package/dist/core/surface/level-set-pass.d.ts +140 -0
- package/dist/core/surface/level-set-pass.js +291 -0
- package/dist/core/surface/level-set-pass.js.map +1 -0
- package/dist/core/surface/level-set-wgsl.d.ts +46 -0
- package/dist/core/surface/level-set-wgsl.js +99 -0
- package/dist/core/surface/level-set-wgsl.js.map +1 -0
- package/dist/core/surface/points.d.ts +109 -0
- package/dist/core/surface/points.js +226 -0
- package/dist/core/surface/points.js.map +1 -0
- package/dist/core/types.d.ts +37 -0
- package/dist/core/types.js +32 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/wgsl/api.d.ts +65 -0
- package/dist/core/wgsl/api.js +546 -0
- package/dist/core/wgsl/api.js.map +1 -0
- package/dist/core/wgsl/generate.d.ts +90 -0
- package/dist/core/wgsl/generate.js +678 -0
- package/dist/core/wgsl/generate.js.map +1 -0
- package/dist/core/wgsl/lean.d.ts +50 -0
- package/dist/core/wgsl/lean.js +327 -0
- package/dist/core/wgsl/lean.js.map +1 -0
- package/dist/core/wgsl/level-set.d.ts +58 -0
- package/dist/core/wgsl/level-set.js +200 -0
- package/dist/core/wgsl/level-set.js.map +1 -0
- package/dist/core/wgsl/majorant.d.ts +62 -0
- package/dist/core/wgsl/majorant.js +381 -0
- package/dist/core/wgsl/majorant.js.map +1 -0
- package/dist/core/wgsl/pnanovdb.chunks.generated.d.ts +14 -0
- package/dist/core/wgsl/pnanovdb.chunks.generated.js +333 -0
- package/dist/core/wgsl/pnanovdb.chunks.generated.js.map +1 -0
- package/dist/core/wgsl/reserved.d.ts +9 -0
- package/dist/core/wgsl/reserved.js +26 -0
- package/dist/core/wgsl/reserved.js.map +1 -0
- package/dist/core/wgsl/types.d.ts +198 -0
- package/dist/core/wgsl/types.js +2 -0
- package/dist/core/wgsl/types.js.map +1 -0
- package/dist/three/coarse-first.d.ts +207 -0
- package/dist/three/coarse-first.js +205 -0
- package/dist/three/coarse-first.js.map +1 -0
- package/dist/three/compute.d.ts +73 -0
- package/dist/three/compute.js +66 -0
- package/dist/three/compute.js.map +1 -0
- package/dist/three/device.d.ts +66 -0
- package/dist/three/device.js +62 -0
- package/dist/three/device.js.map +1 -0
- package/dist/three/frame/core-environment.d.ts +38 -0
- package/dist/three/frame/core-environment.js +154 -0
- package/dist/three/frame/core-environment.js.map +1 -0
- package/dist/three/frame/core-integrate-material.d.ts +34 -0
- package/dist/three/frame/core-integrate-material.js +162 -0
- package/dist/three/frame/core-integrate-material.js.map +1 -0
- package/dist/three/frame/core-occluders.d.ts +53 -0
- package/dist/three/frame/core-occluders.js +193 -0
- package/dist/three/frame/core-occluders.js.map +1 -0
- package/dist/three/frame/core-structs.d.ts +34 -0
- package/dist/three/frame/core-structs.js +61 -0
- package/dist/three/frame/core-structs.js.map +1 -0
- package/dist/three/frame/core-textures.d.ts +41 -0
- package/dist/three/frame/core-textures.js +114 -0
- package/dist/three/frame/core-textures.js.map +1 -0
- package/dist/three/frame/emission-light.d.ts +117 -0
- package/dist/three/frame/emission-light.js +276 -0
- package/dist/three/frame/emission-light.js.map +1 -0
- package/dist/three/frame/index.d.ts +19 -0
- package/dist/three/frame/index.js +15 -0
- package/dist/three/frame/index.js.map +1 -0
- package/dist/three/frame/medium.d.ts +33 -0
- package/dist/three/frame/medium.js +29 -0
- package/dist/three/frame/medium.js.map +1 -0
- package/dist/three/frame/renderer.d.ts +97 -0
- package/dist/three/frame/renderer.js +480 -0
- package/dist/three/frame/renderer.js.map +1 -0
- package/dist/three/frame/spectrum.d.ts +4 -0
- package/dist/three/frame/spectrum.js +15 -0
- package/dist/three/frame/spectrum.js.map +1 -0
- package/dist/three/frame/three-internals.d.ts +60 -0
- package/dist/three/frame/three-internals.js +152 -0
- package/dist/three/frame/three-internals.js.map +1 -0
- package/dist/three/frame/volume-shadows.d.ts +139 -0
- package/dist/three/frame/volume-shadows.js +403 -0
- package/dist/three/frame/volume-shadows.js.map +1 -0
- package/dist/three/frame/volume.d.ts +230 -0
- package/dist/three/frame/volume.js +268 -0
- package/dist/three/frame/volume.js.map +1 -0
- package/dist/three/grid-node.d.ts +229 -0
- package/dist/three/grid-node.js +545 -0
- package/dist/three/grid-node.js.map +1 -0
- package/dist/three/index.d.ts +52 -0
- package/dist/three/index.js +58 -0
- package/dist/three/index.js.map +1 -0
- package/dist/three/internal.d.ts +20 -0
- package/dist/three/internal.js +18 -0
- package/dist/three/internal.js.map +1 -0
- package/dist/three/level-set-material.d.ts +185 -0
- package/dist/three/level-set-material.js +241 -0
- package/dist/three/level-set-material.js.map +1 -0
- package/dist/three/level-set-physical-material.d.ts +154 -0
- package/dist/three/level-set-physical-material.js +253 -0
- package/dist/three/level-set-physical-material.js.map +1 -0
- package/dist/three/level-set-velocity.d.ts +94 -0
- package/dist/three/level-set-velocity.js +208 -0
- package/dist/three/level-set-velocity.js.map +1 -0
- package/dist/three/material.d.ts +324 -0
- package/dist/three/material.js +502 -0
- package/dist/three/material.js.map +1 -0
- package/dist/three/points.d.ts +140 -0
- package/dist/three/points.js +261 -0
- package/dist/three/points.js.map +1 -0
- package/dist/three/sparse-source.d.ts +165 -0
- package/dist/three/sparse-source.js +405 -0
- package/dist/three/sparse-source.js.map +1 -0
- package/dist/three/volume-source.d.ts +22 -0
- package/dist/three/volume-source.js +110 -0
- package/dist/three/volume-source.js.map +1 -0
- package/dist/tools/cpu/brick-atlas.d.ts +36 -0
- package/dist/tools/cpu/brick-atlas.js +129 -0
- package/dist/tools/cpu/brick-atlas.js.map +1 -0
- package/dist/tools/cpu/compute.d.ts +116 -0
- package/dist/tools/cpu/compute.js +239 -0
- package/dist/tools/cpu/compute.js.map +1 -0
- package/dist/tools/cpu/lean-reads.d.ts +81 -0
- package/dist/tools/cpu/lean-reads.js +262 -0
- package/dist/tools/cpu/lean-reads.js.map +1 -0
- package/dist/tools/cpu/level-set.d.ts +111 -0
- package/dist/tools/cpu/level-set.js +313 -0
- package/dist/tools/cpu/level-set.js.map +1 -0
- package/dist/tools/cpu/majorant.d.ts +265 -0
- package/dist/tools/cpu/majorant.js +541 -0
- package/dist/tools/cpu/majorant.js.map +1 -0
- package/dist/tools/cpu/march.d.ts +297 -0
- package/dist/tools/cpu/march.js +726 -0
- package/dist/tools/cpu/march.js.map +1 -0
- package/dist/tools/cpu/mesh-decimate.d.ts +124 -0
- package/dist/tools/cpu/mesh-decimate.js +1225 -0
- package/dist/tools/cpu/mesh-decimate.js.map +1 -0
- package/dist/tools/cpu/points.d.ts +29 -0
- package/dist/tools/cpu/points.js +38 -0
- package/dist/tools/cpu/points.js.map +1 -0
- package/dist/tools/cpu/probe-coords.d.ts +70 -0
- package/dist/tools/cpu/probe-coords.js +116 -0
- package/dist/tools/cpu/probe-coords.js.map +1 -0
- package/dist/tools/cpu/read-value.d.ts +44 -0
- package/dist/tools/cpu/read-value.js +351 -0
- package/dist/tools/cpu/read-value.js.map +1 -0
- package/dist/tools/cpu/sample-trilinear.d.ts +43 -0
- package/dist/tools/cpu/sample-trilinear.js +168 -0
- package/dist/tools/cpu/sample-trilinear.js.map +1 -0
- package/dist/tools/cpu/stride-tables.d.ts +56 -0
- package/dist/tools/cpu/stride-tables.generated.d.ts +1059 -0
- package/dist/tools/cpu/stride-tables.generated.js +1267 -0
- package/dist/tools/cpu/stride-tables.generated.js.map +1 -0
- package/dist/tools/cpu/stride-tables.js +78 -0
- package/dist/tools/cpu/stride-tables.js.map +1 -0
- package/dist/tools/cpu/surface-nets.d.ts +90 -0
- package/dist/tools/cpu/surface-nets.js +597 -0
- package/dist/tools/cpu/surface-nets.js.map +1 -0
- package/dist/tools/errors.d.ts +66 -0
- package/dist/tools/errors.js +67 -0
- package/dist/tools/errors.js.map +1 -0
- package/dist/tools/frame/ambient.d.ts +98 -0
- package/dist/tools/frame/ambient.js +274 -0
- package/dist/tools/frame/ambient.js.map +1 -0
- package/dist/tools/frame/blackbody.d.ts +57 -0
- package/dist/tools/frame/blackbody.js +151 -0
- package/dist/tools/frame/blackbody.js.map +1 -0
- package/dist/tools/frame/brick-cache.d.ts +165 -0
- package/dist/tools/frame/brick-cache.js +326 -0
- package/dist/tools/frame/brick-cache.js.map +1 -0
- package/dist/tools/frame/emission.d.ts +137 -0
- package/dist/tools/frame/emission.js +290 -0
- package/dist/tools/frame/emission.js.map +1 -0
- package/dist/tools/frame/environment-gpu.d.ts +111 -0
- package/dist/tools/frame/environment-gpu.js +280 -0
- package/dist/tools/frame/environment-gpu.js.map +1 -0
- package/dist/tools/frame/environment.d.ts +106 -0
- package/dist/tools/frame/environment.js +272 -0
- package/dist/tools/frame/environment.js.map +1 -0
- package/dist/tools/frame/froxel.d.ts +58 -0
- package/dist/tools/frame/froxel.js +115 -0
- package/dist/tools/frame/froxel.js.map +1 -0
- package/dist/tools/frame/grid.d.ts +392 -0
- package/dist/tools/frame/grid.js +802 -0
- package/dist/tools/frame/grid.js.map +1 -0
- package/dist/tools/frame/index.d.ts +150 -0
- package/dist/tools/frame/index.js +389 -0
- package/dist/tools/frame/index.js.map +1 -0
- package/dist/tools/frame/medium.d.ts +77 -0
- package/dist/tools/frame/medium.js +101 -0
- package/dist/tools/frame/medium.js.map +1 -0
- package/dist/tools/frame/mie-table.d.ts +6 -0
- package/dist/tools/frame/mie-table.js +16 -0
- package/dist/tools/frame/mie-table.js.map +1 -0
- package/dist/tools/frame/mie.d.ts +63 -0
- package/dist/tools/frame/mie.js +194 -0
- package/dist/tools/frame/mie.js.map +1 -0
- package/dist/tools/frame/mlp-nn.d.ts +36 -0
- package/dist/tools/frame/mlp-nn.js +159 -0
- package/dist/tools/frame/mlp-nn.js.map +1 -0
- package/dist/tools/frame/mlp-tza.d.ts +29 -0
- package/dist/tools/frame/mlp-tza.js +186 -0
- package/dist/tools/frame/mlp-tza.js.map +1 -0
- package/dist/tools/frame/mlp.d.ts +183 -0
- package/dist/tools/frame/mlp.js +434 -0
- package/dist/tools/frame/mlp.js.map +1 -0
- package/dist/tools/frame/ms-exit.d.ts +42 -0
- package/dist/tools/frame/ms-exit.js +90 -0
- package/dist/tools/frame/ms-exit.js.map +1 -0
- package/dist/tools/frame/multi-scale.d.ts +152 -0
- package/dist/tools/frame/multi-scale.js +302 -0
- package/dist/tools/frame/multi-scale.js.map +1 -0
- package/dist/tools/frame/neural-weights.d.ts +10 -0
- package/dist/tools/frame/neural-weights.js +244 -0
- package/dist/tools/frame/neural-weights.js.map +1 -0
- package/dist/tools/frame/neural.d.ts +80 -0
- package/dist/tools/frame/neural.js +150 -0
- package/dist/tools/frame/neural.js.map +1 -0
- package/dist/tools/frame/occluders.d.ts +51 -0
- package/dist/tools/frame/occluders.js +72 -0
- package/dist/tools/frame/occluders.js.map +1 -0
- package/dist/tools/frame/pyramid-layout.d.ts +55 -0
- package/dist/tools/frame/pyramid-layout.js +100 -0
- package/dist/tools/frame/pyramid-layout.js.map +1 -0
- package/dist/tools/frame/shadows.d.ts +190 -0
- package/dist/tools/frame/shadows.js +468 -0
- package/dist/tools/frame/shadows.js.map +1 -0
- package/dist/tools/frame/sparse.d.ts +147 -0
- package/dist/tools/frame/sparse.js +432 -0
- package/dist/tools/frame/sparse.js.map +1 -0
- package/dist/tools/frame/spectral-stack.d.ts +159 -0
- package/dist/tools/frame/spectral-stack.js +391 -0
- package/dist/tools/frame/spectral-stack.js.map +1 -0
- package/dist/tools/frame/spectral.d.ts +222 -0
- package/dist/tools/frame/spectral.js +572 -0
- package/dist/tools/frame/spectral.js.map +1 -0
- package/dist/tools/frame/stack.d.ts +115 -0
- package/dist/tools/frame/stack.js +290 -0
- package/dist/tools/frame/stack.js.map +1 -0
- package/dist/tools/frame/view.d.ts +131 -0
- package/dist/tools/frame/view.js +337 -0
- package/dist/tools/frame/view.js.map +1 -0
- package/dist/tools/index.d.ts +157 -0
- package/dist/tools/index.js +132 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/internal.d.ts +87 -0
- package/dist/tools/internal.js +85 -0
- package/dist/tools/internal.js.map +1 -0
- package/dist/tools/nanovdb/build-from-vdb.d.ts +59 -0
- package/dist/tools/nanovdb/build-from-vdb.js +100 -0
- package/dist/tools/nanovdb/build-from-vdb.js.map +1 -0
- package/dist/tools/nanovdb/bytes.d.ts +233 -0
- package/dist/tools/nanovdb/bytes.js +388 -0
- package/dist/tools/nanovdb/bytes.js.map +1 -0
- package/dist/tools/nanovdb/coarse-first.d.ts +78 -0
- package/dist/tools/nanovdb/coarse-first.js +92 -0
- package/dist/tools/nanovdb/coarse-first.js.map +1 -0
- package/dist/tools/nanovdb/half.d.ts +22 -0
- package/dist/tools/nanovdb/half.js +73 -0
- package/dist/tools/nanovdb/half.js.map +1 -0
- package/dist/tools/nanovdb/index.d.ts +34 -0
- package/dist/tools/nanovdb/index.js +25 -0
- package/dist/tools/nanovdb/index.js.map +1 -0
- package/dist/tools/nanovdb/inspect.d.ts +33 -0
- package/dist/tools/nanovdb/inspect.js +70 -0
- package/dist/tools/nanovdb/inspect.js.map +1 -0
- package/dist/tools/nanovdb/leaf-codec.d.ts +119 -0
- package/dist/tools/nanovdb/leaf-codec.js +356 -0
- package/dist/tools/nanovdb/leaf-codec.js.map +1 -0
- package/dist/tools/nanovdb/quantize.d.ts +72 -0
- package/dist/tools/nanovdb/quantize.js +329 -0
- package/dist/tools/nanovdb/quantize.js.map +1 -0
- package/dist/tools/nanovdb/resample.d.ts +177 -0
- package/dist/tools/nanovdb/resample.js +692 -0
- package/dist/tools/nanovdb/resample.js.map +1 -0
- package/dist/tools/nanovdb/serialize.d.ts +176 -0
- package/dist/tools/nanovdb/serialize.js +439 -0
- package/dist/tools/nanovdb/serialize.js.map +1 -0
- package/dist/tools/nanovdb/stats.d.ts +87 -0
- package/dist/tools/nanovdb/stats.js +225 -0
- package/dist/tools/nanovdb/stats.js.map +1 -0
- package/dist/tools/nanovdb/transform.d.ts +30 -0
- package/dist/tools/nanovdb/transform.js +94 -0
- package/dist/tools/nanovdb/transform.js.map +1 -0
- package/dist/tools/nanovdb/tree.d.ts +186 -0
- package/dist/tools/nanovdb/tree.js +530 -0
- package/dist/tools/nanovdb/tree.js.map +1 -0
- package/dist/tools/nanovdb/write-nvdb.d.ts +74 -0
- package/dist/tools/nanovdb/write-nvdb.js +290 -0
- package/dist/tools/nanovdb/write-nvdb.js.map +1 -0
- package/dist/tools/nvdb-file.d.ts +265 -0
- package/dist/tools/nvdb-file.js +763 -0
- package/dist/tools/nvdb-file.js.map +1 -0
- package/dist/tools/nvdb-stream.d.ts +154 -0
- package/dist/tools/nvdb-stream.js +409 -0
- package/dist/tools/nvdb-stream.js.map +1 -0
- package/dist/tools/reference/analytic.d.ts +41 -0
- package/dist/tools/reference/analytic.js +95 -0
- package/dist/tools/reference/analytic.js.map +1 -0
- package/dist/tools/reference/environment.d.ts +62 -0
- package/dist/tools/reference/environment.js +154 -0
- package/dist/tools/reference/environment.js.map +1 -0
- package/dist/tools/reference/index.d.ts +12 -0
- package/dist/tools/reference/index.js +13 -0
- package/dist/tools/reference/index.js.map +1 -0
- package/dist/tools/reference/media.d.ts +14 -0
- package/dist/tools/reference/media.js +30 -0
- package/dist/tools/reference/media.js.map +1 -0
- package/dist/tools/reference/rng.d.ts +20 -0
- package/dist/tools/reference/rng.js +30 -0
- package/dist/tools/reference/rng.js.map +1 -0
- package/dist/tools/reference/scene.d.ts +312 -0
- package/dist/tools/reference/scene.js +169 -0
- package/dist/tools/reference/scene.js.map +1 -0
- package/dist/tools/reference/tables.d.ts +98 -0
- package/dist/tools/reference/tables.js +264 -0
- package/dist/tools/reference/tables.js.map +1 -0
- package/dist/tools/reference/trace.d.ts +160 -0
- package/dist/tools/reference/trace.js +497 -0
- package/dist/tools/reference/trace.js.map +1 -0
- package/dist/tools/vdb/bit-utils.d.ts +20 -0
- package/dist/tools/vdb/bit-utils.js +42 -0
- package/dist/tools/vdb/bit-utils.js.map +1 -0
- package/dist/tools/vdb/blosc-write.d.ts +43 -0
- package/dist/tools/vdb/blosc-write.js +197 -0
- package/dist/tools/vdb/blosc-write.js.map +1 -0
- package/dist/tools/vdb/blosc.d.ts +86 -0
- package/dist/tools/vdb/blosc.js +287 -0
- package/dist/tools/vdb/blosc.js.map +1 -0
- package/dist/tools/vdb/blosclz.d.ts +33 -0
- package/dist/tools/vdb/blosclz.js +112 -0
- package/dist/tools/vdb/blosclz.js.map +1 -0
- package/dist/tools/vdb/byte-reader.d.ts +50 -0
- package/dist/tools/vdb/byte-reader.js +161 -0
- package/dist/tools/vdb/byte-reader.js.map +1 -0
- package/dist/tools/vdb/compression.d.ts +81 -0
- package/dist/tools/vdb/compression.js +260 -0
- package/dist/tools/vdb/compression.js.map +1 -0
- package/dist/tools/vdb/errors.d.ts +10 -0
- package/dist/tools/vdb/errors.js +11 -0
- package/dist/tools/vdb/errors.js.map +1 -0
- package/dist/tools/vdb/grid.d.ts +37 -0
- package/dist/tools/vdb/grid.js +153 -0
- package/dist/tools/vdb/grid.js.map +1 -0
- package/dist/tools/vdb/half-float.d.ts +9 -0
- package/dist/tools/vdb/half-float.js +24 -0
- package/dist/tools/vdb/half-float.js.map +1 -0
- package/dist/tools/vdb/index.d.ts +4 -0
- package/dist/tools/vdb/index.js +3 -0
- package/dist/tools/vdb/index.js.map +1 -0
- package/dist/tools/vdb/inflate.d.ts +24 -0
- package/dist/tools/vdb/inflate.js +334 -0
- package/dist/tools/vdb/inflate.js.map +1 -0
- package/dist/tools/vdb/lz4.d.ts +30 -0
- package/dist/tools/vdb/lz4.js +228 -0
- package/dist/tools/vdb/lz4.js.map +1 -0
- package/dist/tools/vdb/metadata.d.ts +17 -0
- package/dist/tools/vdb/metadata.js +72 -0
- package/dist/tools/vdb/metadata.js.map +1 -0
- package/dist/tools/vdb/parse.d.ts +47 -0
- package/dist/tools/vdb/parse.js +241 -0
- package/dist/tools/vdb/parse.js.map +1 -0
- package/dist/tools/vdb/point-render-data.d.ts +79 -0
- package/dist/tools/vdb/point-render-data.js +137 -0
- package/dist/tools/vdb/point-render-data.js.map +1 -0
- package/dist/tools/vdb/points.d.ts +186 -0
- package/dist/tools/vdb/points.js +835 -0
- package/dist/tools/vdb/points.js.map +1 -0
- package/dist/tools/vdb/transform.d.ts +23 -0
- package/dist/tools/vdb/transform.js +54 -0
- package/dist/tools/vdb/transform.js.map +1 -0
- package/dist/tools/vdb/tree.d.ts +111 -0
- package/dist/tools/vdb/tree.js +228 -0
- package/dist/tools/vdb/tree.js.map +1 -0
- package/dist/tools/vdb/types.d.ts +195 -0
- package/dist/tools/vdb/types.js +3 -0
- package/dist/tools/vdb/types.js.map +1 -0
- package/dist/tools/wvdb/bake.d.ts +145 -0
- package/dist/tools/wvdb/bake.js +361 -0
- package/dist/tools/wvdb/bake.js.map +1 -0
- package/dist/tools/wvdb/dense.d.ts +191 -0
- package/dist/tools/wvdb/dense.js +368 -0
- package/dist/tools/wvdb/dense.js.map +1 -0
- package/dist/tools/wvdb/format.d.ts +220 -0
- package/dist/tools/wvdb/format.js +306 -0
- package/dist/tools/wvdb/format.js.map +1 -0
- package/dist/tools/wvdb/index.d.ts +14 -0
- package/dist/tools/wvdb/index.js +15 -0
- package/dist/tools/wvdb/index.js.map +1 -0
- package/dist/tools/wvdb/level-set.d.ts +56 -0
- package/dist/tools/wvdb/level-set.js +153 -0
- package/dist/tools/wvdb/level-set.js.map +1 -0
- package/dist/tools/wvdb/nanovdb.d.ts +59 -0
- package/dist/tools/wvdb/nanovdb.js +64 -0
- package/dist/tools/wvdb/nanovdb.js.map +1 -0
- package/dist/tools/wvdb/partial.d.ts +74 -0
- package/dist/tools/wvdb/partial.js +233 -0
- package/dist/tools/wvdb/partial.js.map +1 -0
- package/dist/tools/wvdb/read.d.ts +336 -0
- package/dist/tools/wvdb/read.js +766 -0
- package/dist/tools/wvdb/read.js.map +1 -0
- package/dist/tools/wvdb/sha256.d.ts +7 -0
- package/dist/tools/wvdb/sha256.js +76 -0
- package/dist/tools/wvdb/sha256.js.map +1 -0
- package/dist/tools/wvdb/write.d.ts +149 -0
- package/dist/tools/wvdb/write.js +403 -0
- package/dist/tools/wvdb/write.js.map +1 -0
- package/package.json +83 -4
- package/vendor/LICENSE +201 -0
- package/vendor/NOTICE +19 -0
- package/vendor/VENDOR.md +100 -0
- package/vendor/pnanovdb.wgsl +1577 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import type { VDBVec3 } from "../vdb/types.js";
|
|
2
|
+
import { type Vec3 } from "./march.js";
|
|
3
|
+
/**
|
|
4
|
+
* Brick-majorant bounds for one grid: a dense grid of cells, x fastest, cell `c` covering the index
|
|
5
|
+
* positions `[origin + B c, origin + B (c + 1))` with `B = 2^brickLog2`. Built by
|
|
6
|
+
* {@link vdbBrickMajorant}; the core's `VDBGridPool.setMajorant` stores it next to the grid
|
|
7
|
+
* (the core exports this same type).
|
|
8
|
+
*/
|
|
9
|
+
export interface VDBBrickMajorant {
|
|
10
|
+
/** log2 of the brick edge in index voxels (3 for 8³ bricks). */
|
|
11
|
+
brickLog2: number;
|
|
12
|
+
/** Cells along x, y, z. */
|
|
13
|
+
dims: VDBVec3;
|
|
14
|
+
/** `dims[0] * dims[1] * dims[2]` upper bounds, x fastest. */
|
|
15
|
+
data: Float32Array;
|
|
16
|
+
/**
|
|
17
|
+
* Index position of cell 0's min corner. Default (when a host builds the grid itself and leaves it out):
|
|
18
|
+
* the grid's `indexBBoxMin - 1`, where the trilinear support starts.
|
|
19
|
+
*/
|
|
20
|
+
origin?: VDBVec3;
|
|
21
|
+
/** Lower bounds, as `data` (optional; the `minima` module option reads them). */
|
|
22
|
+
minima?: Float32Array;
|
|
23
|
+
}
|
|
24
|
+
/** Options of {@link vdbBrickMajorant}. */
|
|
25
|
+
export interface VDBBrickMajorantOptions {
|
|
26
|
+
/** log2 of the brick edge (0..10). Default 3 (8³ voxels, the pathtracer's brick). */
|
|
27
|
+
brickLog2?: number;
|
|
28
|
+
/** Also build lower bounds (`minima`). Default false. */
|
|
29
|
+
minima?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Where the cells sit.
|
|
32
|
+
* - `'support'` (default): origin `indexBBoxMin - 1`, `ceil((max - min + 2) / B)` cells per axis: the
|
|
33
|
+
* smallest grid that covers the trilinear support `[min - 1, max + 1)`.
|
|
34
|
+
* - `'pathtracer'`: pmndrs/pathtracer's `brickMajorants` layout for a dense grid of `resolution` voxels
|
|
35
|
+
* at index `[0, n)`: origin -1, `floor((n + B) / B)` cells, cell c over `[B c - 1, B c + B - 1)`. Bounds
|
|
36
|
+
* are at least 0 and a cell whose taps reach `[0, n - 1]`'s faces has minimum 0 (its rule, kept
|
|
37
|
+
* bit for bit, so the arrays equal its `brickMajorants` on the same dense array). Implies
|
|
38
|
+
* `outside: 'zero'`; the grid's bbox must lie in `[0, resolution - 1]`.
|
|
39
|
+
*/
|
|
40
|
+
align?: "support" | "pathtracer";
|
|
41
|
+
/**
|
|
42
|
+
* The field the bounds are for, as the module's `outside` option: `'background'` (default) reads the
|
|
43
|
+
* tree everywhere; `'zero'` is 0 outside the index bbox (a tap outside it reads 0).
|
|
44
|
+
*/
|
|
45
|
+
outside?: "background" | "zero";
|
|
46
|
+
/** `align: 'pathtracer'`: the dense grid's voxel counts. Default `indexBBoxMax + 1`. */
|
|
47
|
+
resolution?: VDBVec3;
|
|
48
|
+
}
|
|
49
|
+
/** Where the cells of a brick majorant sit, and the field it bounds ({@link brickMajorantLayout}). */
|
|
50
|
+
export interface BrickMajorantLayout {
|
|
51
|
+
brickLog2: number;
|
|
52
|
+
align: "support" | "pathtracer";
|
|
53
|
+
/** The bounds are for the field that is 0 outside the index bbox. */
|
|
54
|
+
zero: boolean;
|
|
55
|
+
/** The index bbox is empty (`max < min` on an axis). */
|
|
56
|
+
empty: boolean;
|
|
57
|
+
/** Index position of cell 0's min corner. */
|
|
58
|
+
origin: Vec3;
|
|
59
|
+
/** Cells per axis. */
|
|
60
|
+
dims: Vec3;
|
|
61
|
+
/** `align: 'pathtracer'`: the dense grid's voxel counts; `[0, 0, 0]` for `'support'`. */
|
|
62
|
+
resolution: Vec3;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Checks the options of {@link vdbBrickMajorant} and lays out its cells for a grid with index bbox `[min, max]`
|
|
66
|
+
* (tools internal). The core's GPU builder (`VDBGridPool.buildMajorant`, P1.15) takes the same layout, so the two
|
|
67
|
+
* builders agree on origin and dims by construction.
|
|
68
|
+
*
|
|
69
|
+
* @throws VDBToolsError `VDB_BAD_OPTION` for invalid options or a bbox outside `resolution`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function brickMajorantLayout(min: Vec3, max: Vec3, options?: VDBBrickMajorantOptions): BrickMajorantLayout;
|
|
72
|
+
/**
|
|
73
|
+
* Builds brick-majorant bounds of a NanoVDB grid image (P1.2) for the core's `majorant` profile
|
|
74
|
+
* (`pool.setMajorant(id, vdbBrickMajorant(image))`, module option `majorant: 'brick'`).
|
|
75
|
+
*
|
|
76
|
+
* A cell's bound is the max (and with `minima`, the min) of every value a trilinear sample inside it
|
|
77
|
+
* can read: its `B + 1` taps per axis, leaf voxels active or not, tiles and the background, or 0 for a
|
|
78
|
+
* tap outside the index bbox with `outside: 'zero'`. So every trilinear (or nearest) sample in the cell
|
|
79
|
+
* lies in `[minima, data]`. Works on every scalar grid type (Fp values as the GPU decodes them).
|
|
80
|
+
*
|
|
81
|
+
* @param image The grid image (little-endian u32 words, `GridData` at word 0).
|
|
82
|
+
* @param options Brick size, minima, alignment and the `outside` field.
|
|
83
|
+
* @throws VDBToolsError `VDB_BAD_OPTION` for invalid options or a bbox outside `resolution`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function vdbBrickMajorant(image: Uint32Array, options?: VDBBrickMajorantOptions): VDBBrickMajorant;
|
|
86
|
+
/** Options of {@link vdbValueRange}. */
|
|
87
|
+
export interface VDBValueRangeOptions {
|
|
88
|
+
/**
|
|
89
|
+
* The field the range is for, as the module's `outside` option: `'background'` (default) reads the tree
|
|
90
|
+
* everywhere; `'zero'` is 0 outside the index bbox.
|
|
91
|
+
*/
|
|
92
|
+
outside?: "background" | "zero";
|
|
93
|
+
}
|
|
94
|
+
/** The range of a grid's sampled field ({@link vdbValueRange}). */
|
|
95
|
+
export interface VDBValueRange {
|
|
96
|
+
/** The smallest value a sample can take. */
|
|
97
|
+
min: number;
|
|
98
|
+
/** The largest value a sample can take: the grid's global majorant. */
|
|
99
|
+
max: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The exact range of the field a shader samples from a grid image inside its support box (EX1f-a): every
|
|
103
|
+
* trilinear or nearest sample at a point of `[min - 1, max + 1]` (the index bbox grown by one voxel, the box
|
|
104
|
+
* the majorant walks cover) lies in `[min, max]`. It reads every value a tap there can read: leaf voxels
|
|
105
|
+
* active or not, tiles, and the background where no root tile covers the box; with `outside: 'zero'` only
|
|
106
|
+
* the values inside the index bbox, and 0. Beyond the support box the field is 0 (`'zero'`) or whatever the
|
|
107
|
+
* tree holds there (`'background'`), which no walk visits.
|
|
108
|
+
*
|
|
109
|
+
* `max` is the tightest global majorant: `pool.setValueMax(id, vdbValueRange(image, { outside }).max)`.
|
|
110
|
+
* The pool's own default, `max(root max, background)`, costs nothing and holds when the inactive values are
|
|
111
|
+
* the background, but it counts a root background that no voxel near the grid may hold (3 against 1 on a fog
|
|
112
|
+
* volume converted from a level set). The root max alone is not a bound: node statistics cover active
|
|
113
|
+
* values only.
|
|
114
|
+
*
|
|
115
|
+
* It walks the whole tree (as {@link vdbBrickMajorant} does), so call it once per image, not per frame.
|
|
116
|
+
*
|
|
117
|
+
* @param image The grid image (little-endian u32 words, `GridData` at word 0).
|
|
118
|
+
* @param options The `outside` field.
|
|
119
|
+
* @throws VDBToolsError `VDB_BAD_OPTION` for an invalid `outside`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function vdbValueRange(image: Uint32Array, options?: VDBValueRangeOptions): VDBValueRange;
|
|
122
|
+
/** One segment of the majorant walk ({@link vdbMajorantWalk}): every sample on `[t0, t1)` lies in `[min, max]`. */
|
|
123
|
+
export interface VDBMajorantSegment {
|
|
124
|
+
t0: number;
|
|
125
|
+
t1: number;
|
|
126
|
+
/** Upper bound of the sampled field on the segment. */
|
|
127
|
+
max: number;
|
|
128
|
+
/** Lower bound: the brick minimum with minima, else 0 (a valid minorant of a non-negative field). */
|
|
129
|
+
min: number;
|
|
130
|
+
/** Accessor queries the segment cost (`vdbGetDim` / `vdbNodeMax`; 1 brick load, 2 with minima). */
|
|
131
|
+
lookups: number;
|
|
132
|
+
}
|
|
133
|
+
/** The internal name of {@link VDBMajorantSegment} (tests and harnesses). */
|
|
134
|
+
export type MajorantSegment = VDBMajorantSegment;
|
|
135
|
+
/** Options of {@link vdbMajorantWalk}. */
|
|
136
|
+
export interface VDBMajorantWalkOptions {
|
|
137
|
+
/** The module's `majorant` option. `'brick'` with no brick majorant walks as `'global'`. Default `'brick'`. */
|
|
138
|
+
mode?: "brick" | "global" | "nodeMax";
|
|
139
|
+
/** Ray interval before clipping. Default `[0, 3.4e38]`. */
|
|
140
|
+
tMin?: number;
|
|
141
|
+
tMax?: number;
|
|
142
|
+
/** The record's `valueMax` (default {@link defaultValueMax}: the pool's default). */
|
|
143
|
+
valueMax?: number;
|
|
144
|
+
/** The module's sampler (the support box of `global` and `nodeMax`). Default `'trilinear'`. */
|
|
145
|
+
sampler?: "trilinear" | "nearest";
|
|
146
|
+
/** The module's `outside`; `'zero'` raises a bound below 0 to 0 (`global`, `nodeMax`). Default `'background'`. */
|
|
147
|
+
outside?: "background" | "zero";
|
|
148
|
+
/** The module's `minima` option (read the brick minima when it has them). Default false. */
|
|
149
|
+
minima?: boolean;
|
|
150
|
+
/** Safety cap on segments. Default 1 << 16. */
|
|
151
|
+
maxSegments?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Twin of `vdbMajorantInitWorld` (helper `'majorantWorld'`): the grid's world-to-index affine, 3x4 row-major
|
|
154
|
+
* (`pool.info(id).worldToIndex`). `origin` and `direction` are then a world-space ray; it is taken to index
|
|
155
|
+
* space as the shader does (f32 rows; the direction is not renormalized, so `t` stays a world parameter).
|
|
156
|
+
*/
|
|
157
|
+
worldToIndex?: ArrayLike<number>;
|
|
158
|
+
}
|
|
159
|
+
/** The internal name of {@link VDBMajorantWalkOptions} (tests and harnesses). */
|
|
160
|
+
export type MajorantWalkOptions = VDBMajorantWalkOptions;
|
|
161
|
+
/**
|
|
162
|
+
* Twin of `vdbMajorantInit(g, o, d, tMin, tMax)` + `vdbMajorantNext` until it ends: the segments the
|
|
163
|
+
* GPU walk returns for an index-space ray (`d` unnormalized; `t` in the caller's units), in order,
|
|
164
|
+
* contiguous (each `t0` is the previous `t1`), none of zero length.
|
|
165
|
+
*
|
|
166
|
+
* - `'brick'` with bounds: the DDA over the brick cells (the pathtracer's `ptDdaInit` / `ptDdaNext`
|
|
167
|
+
* in the module's cell space `(p - origin) / B`), clipped to the cell grid's box.
|
|
168
|
+
* - `'global'` (or `'brick'` without bounds): one segment over the sampler's support box
|
|
169
|
+
* (`[min - 1, max + 1]` trilinear, `[min - 0.5, max + 0.5]` nearest) with bound `valueMax`.
|
|
170
|
+
* - `'nodeMax'` (P1.4): the vendored HDDA at leaf size 8, widening over tiles and empty space, over the
|
|
171
|
+
* support box; a cell's bound is {@link cellBoundTrilinear} (the 2x2x2 block of `dim`-cells from the
|
|
172
|
+
* cell's corner: the "8-leaf support" of a leaf cell). Stats bound ACTIVE values, so this assumes every
|
|
173
|
+
* inactive leaf voxel is <= its leaf's max (fog). Without stats the bound is `valueMax`.
|
|
174
|
+
*
|
|
175
|
+
* `mode: 'global'` with a brick majorant is the twin of `vdbMajorantInitGlobal`; `worldToIndex` makes it the twin
|
|
176
|
+
* of `vdbMajorantInitWorld`.
|
|
177
|
+
*
|
|
178
|
+
* @param gridWords The grid image (little-endian u32 words, `GridData` at word 0).
|
|
179
|
+
* @param majorant The grid's brick bounds (`vdbBrickMajorant`), or `null`.
|
|
180
|
+
* @param origin The ray's origin, in index space (or world space with `worldToIndex`).
|
|
181
|
+
* @param direction The ray's direction, same space; not normalized by the walk.
|
|
182
|
+
* @param options The module's options and the ray interval.
|
|
183
|
+
* @throws VDBToolsError `VDB_BAD_OPTION` for a `worldToIndex` that is not 12 numbers.
|
|
184
|
+
*/
|
|
185
|
+
export declare function vdbMajorantWalk(gridWords: Uint32Array, majorant: VDBBrickMajorant | null, origin: VDBVec3, direction: VDBVec3, options?: VDBMajorantWalkOptions): VDBMajorantSegment[];
|
|
186
|
+
/** The internal name of {@link vdbMajorantWalk} (tests, harnesses and scripts written before EX1f-b published it). */
|
|
187
|
+
export declare const majorantWalk: typeof vdbMajorantWalk;
|
|
188
|
+
/** What {@link vdbDeltaTrack} returns (the WGSL `VdbCollision`). */
|
|
189
|
+
export interface VDBCollision {
|
|
190
|
+
/** The collision's ray parameter; without a hit, where the walk ended (or the tentative collision a truncated track stopped at). */
|
|
191
|
+
t: number;
|
|
192
|
+
/** The grid's sampled value at the collision (0 without a hit). */
|
|
193
|
+
density: number;
|
|
194
|
+
/** A real collision was found. */
|
|
195
|
+
hit: boolean;
|
|
196
|
+
/** `maxLookups` was reached first. */
|
|
197
|
+
truncated: boolean;
|
|
198
|
+
/** Majorant segments walked. */
|
|
199
|
+
steps: number;
|
|
200
|
+
/** Samples of the grid: tentative collisions. */
|
|
201
|
+
lookups: number;
|
|
202
|
+
}
|
|
203
|
+
/** What {@link vdbRatioTrack} returns (the WGSL `VdbTransmittance`). */
|
|
204
|
+
export interface VDBTransmittance {
|
|
205
|
+
/** The transmittance estimate per channel. */
|
|
206
|
+
value: VDBVec3;
|
|
207
|
+
/** `maxLookups` was reached first. */
|
|
208
|
+
truncated: boolean;
|
|
209
|
+
/** Majorant segments walked. */
|
|
210
|
+
steps: number;
|
|
211
|
+
/** Samples of the grid: tentative collisions. */
|
|
212
|
+
lookups: number;
|
|
213
|
+
}
|
|
214
|
+
/** Options of {@link vdbDeltaTrack}: the walk's ({@link VDBMajorantWalkOptions}) and the tracker's. */
|
|
215
|
+
export interface VDBDeltaTrackOptions extends VDBMajorantWalkOptions {
|
|
216
|
+
/** Extinction per unit of `t` at grid value 1. */
|
|
217
|
+
sigma: number;
|
|
218
|
+
/** The random stream: uniform numbers in [0, 1), drawn in the WGSL helper's order. */
|
|
219
|
+
random: () => number;
|
|
220
|
+
/** Stop after this many samples of the grid (`truncated`). Default 2^32 - 1. */
|
|
221
|
+
maxLookups?: number;
|
|
222
|
+
}
|
|
223
|
+
/** Options of {@link vdbRatioTrack}: the walk's ({@link VDBMajorantWalkOptions}) and the tracker's. */
|
|
224
|
+
export interface VDBRatioTrackOptions extends VDBMajorantWalkOptions {
|
|
225
|
+
/** Extinction per unit of `t` at grid value 1: one number, or one per channel (the majorant is the largest channel's). */
|
|
226
|
+
sigma: number | VDBVec3;
|
|
227
|
+
/** The random stream: uniform numbers in [0, 1), drawn in the WGSL helper's order. */
|
|
228
|
+
random: () => number;
|
|
229
|
+
/** Below this transmittance (the largest channel) the estimate plays Russian roulette; 0 (default) never does. */
|
|
230
|
+
cutoff?: number;
|
|
231
|
+
/** Stop after this many samples of the grid (`truncated`). Default 2^32 - 1. */
|
|
232
|
+
maxLookups?: number;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Twin of `vdbMajorantInit` (or its `World` / `Global` helper) followed by the WGSL helper
|
|
236
|
+
* `vdbDeltaTrack(&it, &acc, sigma, maxLookups)` (EX1f-b): delta (Woodcock) tracking along the ray. It returns the
|
|
237
|
+
* next real collision of the medium whose extinction is `sigma` times the grid's sampled value, or `hit: false`
|
|
238
|
+
* when the ray leaves the walk without one. P(no collision) is the transmittance exp(-sigma ∫ value dt).
|
|
239
|
+
*
|
|
240
|
+
* The random numbers are drawn from `options.random` in the helper's order: per tentative collision one for
|
|
241
|
+
* the distance, then one for the accept test.
|
|
242
|
+
*
|
|
243
|
+
* @param gridWords The grid image (little-endian u32 words, `GridData` at word 0).
|
|
244
|
+
* @param majorant The grid's brick bounds, or `null` (see {@link vdbMajorantWalk}).
|
|
245
|
+
* @param origin The ray's origin, in index space (or world space with `worldToIndex`).
|
|
246
|
+
* @param direction The ray's direction, same space; `t` and `sigma` are in its units.
|
|
247
|
+
* @param options The walk's options, `sigma`, `random` and `maxLookups`.
|
|
248
|
+
*/
|
|
249
|
+
export declare function vdbDeltaTrack(gridWords: Uint32Array, majorant: VDBBrickMajorant | null, origin: VDBVec3, direction: VDBVec3, options: VDBDeltaTrackOptions): VDBCollision;
|
|
250
|
+
/**
|
|
251
|
+
* Twin of `vdbMajorantInit` (or its `World` / `Global` helper) followed by the WGSL helper
|
|
252
|
+
* `vdbRatioTrack(&it, &acc, sigma, cutoff, maxLookups)` (EX1f-b): ratio tracking along the ray, an unbiased
|
|
253
|
+
* estimate of the transmittance exp(-sigma ∫ value dt) per channel. All channels share the tentative collisions
|
|
254
|
+
* of the largest channel's majorant, so a spectral medium costs one walk.
|
|
255
|
+
*
|
|
256
|
+
* The random numbers are drawn from `options.random` in the helper's order: one per tentative collision, and one
|
|
257
|
+
* more whenever the roulette plays (the largest channel under `cutoff`).
|
|
258
|
+
*
|
|
259
|
+
* @param gridWords The grid image (little-endian u32 words, `GridData` at word 0).
|
|
260
|
+
* @param majorant The grid's brick bounds, or `null` (see {@link vdbMajorantWalk}).
|
|
261
|
+
* @param origin The ray's origin, in index space (or world space with `worldToIndex`).
|
|
262
|
+
* @param direction The ray's direction, same space; `t` and `sigma` are in its units.
|
|
263
|
+
* @param options The walk's options, `sigma`, `random`, `cutoff` and `maxLookups`.
|
|
264
|
+
*/
|
|
265
|
+
export declare function vdbRatioTrack(gridWords: Uint32Array, majorant: VDBBrickMajorant | null, origin: VDBVec3, direction: VDBVec3, options: VDBRatioTrackOptions): VDBTransmittance;
|