@pmndrs/vdb 0.1.0 → 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 +592 -2
- package/README.md +85 -37
- package/THIRD_PARTY_NOTICES.md +197 -29
- package/dist/core/compute/atlas.d.ts +10 -2
- package/dist/core/compute/atlas.js +6 -1
- package/dist/core/compute/atlas.js.map +1 -1
- package/dist/core/compute/index.d.ts +3 -3
- package/dist/core/compute/index.js +2 -2
- package/dist/core/compute/index.js.map +1 -1
- 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 +22 -7
- package/dist/core/compute/pyramid.js +22 -9
- package/dist/core/compute/pyramid.js.map +1 -1
- package/dist/core/compute/shared.d.ts +1 -0
- package/dist/core/compute/shared.js.map +1 -1
- package/dist/core/compute/stats.d.ts +10 -3
- package/dist/core/compute/stats.js +6 -1
- package/dist/core/compute/stats.js.map +1 -1
- package/dist/core/compute/value-transform.d.ts +8 -1
- package/dist/core/compute/value-transform.js +9 -3
- package/dist/core/compute/value-transform.js.map +1 -1
- package/dist/core/errors.d.ts +10 -0
- package/dist/core/errors.js +8 -0
- package/dist/core/errors.js.map +1 -1
- 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 +25 -3
- package/dist/core/index.js +23 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/internal.d.ts +17 -1
- package/dist/core/internal.js +18 -1
- package/dist/core/internal.js.map +1 -1
- package/dist/core/pool/image-header.d.ts +13 -2
- package/dist/core/pool/image-header.js +24 -5
- package/dist/core/pool/image-header.js.map +1 -1
- package/dist/core/pool/layout.d.ts +35 -1
- package/dist/core/pool/layout.js +51 -2
- package/dist/core/pool/layout.js.map +1 -1
- package/dist/core/pool/limits.d.ts +1 -0
- package/dist/core/pool/limits.js +1 -0
- package/dist/core/pool/limits.js.map +1 -1
- package/dist/core/pool/pool.d.ts +120 -15
- package/dist/core/pool/pool.js +255 -24
- package/dist/core/pool/pool.js.map +1 -1
- 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/{three → core}/sequence.d.ts +32 -2
- package/dist/{three → core}/sequence.js +24 -2
- 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 +33 -2
- package/dist/core/source/dense.js +121 -24
- package/dist/core/source/dense.js.map +1 -1
- 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 +59 -2
- package/dist/core/source/types.js.map +1 -1
- 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 +12 -3
- package/dist/core/types.js +6 -2
- package/dist/core/types.js.map +1 -1
- package/dist/core/wgsl/api.d.ts +29 -5
- package/dist/core/wgsl/api.js +110 -27
- package/dist/core/wgsl/api.js.map +1 -1
- package/dist/core/wgsl/generate.d.ts +8 -0
- package/dist/core/wgsl/generate.js +195 -22
- package/dist/core/wgsl/generate.js.map +1 -1
- 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 +5 -1
- package/dist/core/wgsl/level-set.js +11 -5
- package/dist/core/wgsl/level-set.js.map +1 -1
- 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 +2 -2
- package/dist/core/wgsl/pnanovdb.chunks.generated.js +15 -12
- package/dist/core/wgsl/pnanovdb.chunks.generated.js.map +1 -1
- package/dist/core/wgsl/types.d.ts +97 -3
- package/dist/core/wgsl/types.js.map +1 -1
- package/dist/three/coarse-first.d.ts +53 -8
- package/dist/three/coarse-first.js +24 -6
- package/dist/three/coarse-first.js.map +1 -1
- package/dist/three/compute.d.ts +12 -2
- package/dist/three/compute.js +16 -6
- package/dist/three/compute.js.map +1 -1
- package/dist/three/device.d.ts +7 -0
- package/dist/three/device.js +3 -0
- package/dist/three/device.js.map +1 -1
- 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 +64 -114
- package/dist/three/frame/emission-light.js +188 -567
- package/dist/three/frame/emission-light.js.map +1 -1
- package/dist/three/frame/index.d.ts +11 -31
- package/dist/three/frame/index.js +9 -29
- package/dist/three/frame/index.js.map +1 -1
- package/dist/three/frame/medium.d.ts +12 -0
- package/dist/three/frame/medium.js.map +1 -1
- package/dist/three/frame/renderer.d.ts +58 -454
- package/dist/three/frame/renderer.js +409 -1427
- package/dist/three/frame/renderer.js.map +1 -1
- package/dist/three/frame/spectrum.d.ts +0 -14
- package/dist/three/frame/spectrum.js +2 -23
- package/dist/three/frame/spectrum.js.map +1 -1
- package/dist/three/frame/three-internals.d.ts +3 -8
- package/dist/three/frame/three-internals.js +13 -11
- package/dist/three/frame/three-internals.js.map +1 -1
- package/dist/three/frame/volume-shadows.d.ts +93 -107
- package/dist/three/frame/volume-shadows.js +278 -631
- package/dist/three/frame/volume-shadows.js.map +1 -1
- package/dist/three/frame/volume.d.ts +91 -33
- package/dist/three/frame/volume.js +63 -51
- package/dist/three/frame/volume.js.map +1 -1
- package/dist/three/grid-node.d.ts +34 -1
- package/dist/three/grid-node.js +36 -1
- package/dist/three/grid-node.js.map +1 -1
- package/dist/three/index.d.ts +20 -11
- package/dist/three/index.js +21 -12
- package/dist/three/index.js.map +1 -1
- package/dist/three/internal.d.ts +14 -8
- package/dist/three/internal.js +11 -7
- package/dist/three/internal.js.map +1 -1
- package/dist/three/level-set-material.d.ts +81 -8
- package/dist/three/level-set-material.js +162 -125
- package/dist/three/level-set-material.js.map +1 -1
- 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 +141 -11
- package/dist/three/material.js +161 -18
- package/dist/three/material.js.map +1 -1
- package/dist/three/points.d.ts +60 -4
- package/dist/three/points.js +140 -9
- package/dist/three/points.js.map +1 -1
- package/dist/three/sparse-source.d.ts +49 -117
- package/dist/three/sparse-source.js +109 -580
- package/dist/three/sparse-source.js.map +1 -1
- package/dist/three/volume-source.d.ts +11 -156
- package/dist/three/volume-source.js +29 -272
- package/dist/three/volume-source.js.map +1 -1
- 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 +23 -4
- package/dist/tools/cpu/compute.js +35 -14
- package/dist/tools/cpu/compute.js.map +1 -1
- 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 +42 -3
- package/dist/tools/cpu/level-set.js +59 -7
- package/dist/tools/cpu/level-set.js.map +1 -1
- 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 +93 -2
- package/dist/tools/cpu/march.js +165 -14
- package/dist/tools/cpu/march.js.map +1 -1
- 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/read-value.d.ts +19 -6
- package/dist/tools/cpu/read-value.js +32 -17
- package/dist/tools/cpu/read-value.js.map +1 -1
- package/dist/tools/cpu/sample-trilinear.d.ts +17 -4
- package/dist/tools/cpu/sample-trilinear.js +19 -7
- package/dist/tools/cpu/sample-trilinear.js.map +1 -1
- package/dist/tools/cpu/stride-tables.d.ts +2 -2
- package/dist/tools/cpu/stride-tables.generated.d.ts +6 -5
- package/dist/tools/cpu/stride-tables.generated.js +7 -6
- package/dist/tools/cpu/stride-tables.generated.js.map +1 -1
- package/dist/tools/cpu/stride-tables.js +1 -1
- package/dist/tools/cpu/stride-tables.js.map +1 -1
- 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 +9 -0
- package/dist/tools/errors.js +9 -0
- package/dist/tools/errors.js.map +1 -1
- 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 +15 -0
- package/dist/tools/frame/blackbody.js +35 -0
- package/dist/tools/frame/blackbody.js.map +1 -1
- 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 +9 -0
- package/dist/tools/frame/emission.js +9 -1
- package/dist/tools/frame/emission.js.map +1 -1
- 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 +3 -2
- package/dist/tools/frame/environment.js +8 -4
- package/dist/tools/frame/environment.js.map +1 -1
- 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 +90 -0
- package/dist/tools/frame/grid.js +112 -13
- package/dist/tools/frame/grid.js.map +1 -1
- package/dist/tools/frame/index.d.ts +14 -0
- package/dist/tools/frame/index.js +45 -4
- package/dist/tools/frame/index.js.map +1 -1
- package/dist/tools/frame/medium.d.ts +16 -0
- package/dist/tools/frame/medium.js +3 -1
- package/dist/tools/frame/medium.js.map +1 -1
- package/dist/tools/frame/mie.d.ts +9 -0
- package/dist/tools/frame/mie.js +18 -0
- package/dist/tools/frame/mie.js.map +1 -1
- 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 +6 -5
- package/dist/tools/frame/neural-weights.js +234 -235
- package/dist/tools/frame/neural-weights.js.map +1 -1
- package/dist/tools/frame/neural.js +1 -1
- package/dist/tools/frame/neural.js.map +1 -1
- 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 +17 -0
- package/dist/tools/frame/pyramid-layout.js +47 -0
- package/dist/tools/frame/pyramid-layout.js.map +1 -1
- package/dist/tools/frame/shadows.d.ts +110 -0
- package/dist/tools/frame/shadows.js +286 -0
- package/dist/tools/frame/shadows.js.map +1 -1
- package/dist/tools/frame/sparse.d.ts +82 -0
- package/dist/tools/frame/sparse.js +242 -1
- package/dist/tools/frame/sparse.js.map +1 -1
- 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 +21 -2
- package/dist/tools/frame/spectral.js +30 -8
- package/dist/tools/frame/spectral.js.map +1 -1
- 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 +66 -15
- package/dist/tools/index.js +55 -11
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/internal.d.ts +58 -17
- package/dist/tools/internal.js +65 -11
- package/dist/tools/internal.js.map +1 -1
- package/dist/tools/nanovdb/build-from-vdb.d.ts +11 -2
- package/dist/tools/nanovdb/build-from-vdb.js +10 -2
- package/dist/tools/nanovdb/build-from-vdb.js.map +1 -1
- package/dist/tools/nanovdb/bytes.d.ts +17 -4
- package/dist/tools/nanovdb/bytes.js +46 -3
- package/dist/tools/nanovdb/bytes.js.map +1 -1
- package/dist/tools/nanovdb/coarse-first.d.ts +19 -3
- package/dist/tools/nanovdb/coarse-first.js +7 -1
- package/dist/tools/nanovdb/coarse-first.js.map +1 -1
- 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 +3 -1
- package/dist/tools/nanovdb/index.js +2 -1
- package/dist/tools/nanovdb/index.js.map +1 -1
- package/dist/tools/nanovdb/inspect.d.ts +10 -1
- package/dist/tools/nanovdb/inspect.js +8 -1
- package/dist/tools/nanovdb/inspect.js.map +1 -1
- package/dist/tools/nanovdb/leaf-codec.d.ts +35 -1
- package/dist/tools/nanovdb/leaf-codec.js +40 -4
- package/dist/tools/nanovdb/leaf-codec.js.map +1 -1
- package/dist/tools/nanovdb/quantize.d.ts +39 -10
- package/dist/tools/nanovdb/quantize.js +96 -44
- package/dist/tools/nanovdb/quantize.js.map +1 -1
- package/dist/tools/nanovdb/resample.d.ts +20 -3
- package/dist/tools/nanovdb/resample.js +20 -7
- package/dist/tools/nanovdb/resample.js.map +1 -1
- package/dist/tools/nanovdb/serialize.d.ts +34 -3
- package/dist/tools/nanovdb/serialize.js +51 -7
- package/dist/tools/nanovdb/serialize.js.map +1 -1
- package/dist/tools/nanovdb/stats.d.ts +34 -5
- package/dist/tools/nanovdb/stats.js +87 -11
- package/dist/tools/nanovdb/stats.js.map +1 -1
- package/dist/tools/nanovdb/transform.d.ts +4 -0
- package/dist/tools/nanovdb/transform.js +3 -0
- package/dist/tools/nanovdb/transform.js.map +1 -1
- package/dist/tools/nanovdb/tree.d.ts +14 -3
- package/dist/tools/nanovdb/tree.js +25 -13
- package/dist/tools/nanovdb/tree.js.map +1 -1
- package/dist/tools/nanovdb/write-nvdb.d.ts +47 -12
- package/dist/tools/nanovdb/write-nvdb.js +108 -28
- package/dist/tools/nanovdb/write-nvdb.js.map +1 -1
- package/dist/tools/nvdb-file.d.ts +77 -7
- package/dist/tools/nvdb-file.js +177 -20
- package/dist/tools/nvdb-file.js.map +1 -1
- package/dist/tools/nvdb-stream.d.ts +23 -7
- package/dist/tools/nvdb-stream.js +78 -34
- package/dist/tools/nvdb-stream.js.map +1 -1
- 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/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 +35 -5
- package/dist/tools/vdb/blosc.js +82 -26
- package/dist/tools/vdb/blosc.js.map +1 -1
- 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 +13 -3
- package/dist/tools/vdb/byte-reader.js +26 -4
- package/dist/tools/vdb/byte-reader.js.map +1 -1
- package/dist/tools/vdb/compression.d.ts +13 -5
- package/dist/tools/vdb/compression.js +13 -2
- package/dist/tools/vdb/compression.js.map +1 -1
- package/dist/tools/vdb/grid.js +8 -2
- package/dist/tools/vdb/grid.js.map +1 -1
- package/dist/tools/vdb/index.d.ts +2 -1
- package/dist/tools/vdb/index.js.map +1 -1
- 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.js +1 -1
- package/dist/tools/vdb/metadata.js.map +1 -1
- package/dist/tools/vdb/parse.d.ts +24 -2
- package/dist/tools/vdb/parse.js +102 -32
- package/dist/tools/vdb/parse.js.map +1 -1
- package/dist/tools/vdb/point-render-data.d.ts +49 -1
- package/dist/tools/vdb/point-render-data.js +91 -11
- package/dist/tools/vdb/point-render-data.js.map +1 -1
- package/dist/tools/vdb/points.d.ts +26 -0
- package/dist/tools/vdb/points.js +46 -5
- package/dist/tools/vdb/points.js.map +1 -1
- package/dist/tools/vdb/types.d.ts +59 -2
- package/dist/tools/vdb/types.js.map +1 -1
- package/dist/tools/wvdb/bake.d.ts +38 -9
- package/dist/tools/wvdb/bake.js +63 -13
- package/dist/tools/wvdb/bake.js.map +1 -1
- package/dist/tools/wvdb/dense.d.ts +80 -1
- package/dist/tools/wvdb/dense.js +67 -8
- package/dist/tools/wvdb/dense.js.map +1 -1
- package/dist/tools/wvdb/format.d.ts +59 -0
- package/dist/tools/wvdb/format.js +3 -0
- package/dist/tools/wvdb/format.js.map +1 -1
- package/dist/tools/wvdb/index.d.ts +1 -0
- package/dist/tools/wvdb/index.js +1 -0
- package/dist/tools/wvdb/index.js.map +1 -1
- package/dist/tools/wvdb/level-set.d.ts +10 -2
- package/dist/tools/wvdb/level-set.js.map +1 -1
- package/dist/tools/wvdb/nanovdb.d.ts +6 -1
- package/dist/tools/wvdb/nanovdb.js +5 -1
- package/dist/tools/wvdb/nanovdb.js.map +1 -1
- 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 +77 -1
- package/dist/tools/wvdb/read.js +30 -7
- package/dist/tools/wvdb/read.js.map +1 -1
- package/dist/tools/wvdb/write.d.ts +23 -1
- package/dist/tools/wvdb/write.js +8 -1
- package/dist/tools/wvdb/write.js.map +1 -1
- package/package.json +2 -1
- package/vendor/VENDOR.md +21 -6
- package/vendor/pnanovdb.wgsl +52 -14
- package/dist/three/frame/blackbody.d.ts +0 -42
- package/dist/three/frame/blackbody.js +0 -74
- package/dist/three/frame/blackbody.js.map +0 -1
- package/dist/three/frame/chunks.d.ts +0 -157
- package/dist/three/frame/chunks.js +0 -559
- package/dist/three/frame/chunks.js.map +0 -1
- package/dist/three/frame/density-material.d.ts +0 -53
- package/dist/three/frame/density-material.js +0 -353
- package/dist/three/frame/density-material.js.map +0 -1
- package/dist/three/frame/environment-grid-material.d.ts +0 -21
- package/dist/three/frame/environment-grid-material.js +0 -184
- package/dist/three/frame/environment-grid-material.js.map +0 -1
- package/dist/three/frame/environment-material.d.ts +0 -22
- package/dist/three/frame/environment-material.js +0 -87
- package/dist/three/frame/environment-material.js.map +0 -1
- package/dist/three/frame/grid-mip-material.d.ts +0 -12
- package/dist/three/frame/grid-mip-material.js +0 -61
- package/dist/three/frame/grid-mip-material.js.map +0 -1
- package/dist/three/frame/inject-material.d.ts +0 -56
- package/dist/three/frame/inject-material.js +0 -424
- package/dist/three/frame/inject-material.js.map +0 -1
- package/dist/three/frame/integrate-material.d.ts +0 -26
- package/dist/three/frame/integrate-material.js +0 -198
- package/dist/three/frame/integrate-material.js.map +0 -1
- package/dist/three/frame/layout.d.ts +0 -34
- package/dist/three/frame/layout.js +0 -48
- package/dist/three/frame/layout.js.map +0 -1
- package/dist/three/frame/lighting-material.d.ts +0 -41
- package/dist/three/frame/lighting-material.js +0 -257
- package/dist/three/frame/lighting-material.js.map +0 -1
- package/dist/three/frame/lights.d.ts +0 -11
- package/dist/three/frame/lights.js +0 -16
- package/dist/three/frame/lights.js.map +0 -1
- package/dist/three/frame/neural.d.ts +0 -14
- package/dist/three/frame/neural.js +0 -105
- package/dist/three/frame/neural.js.map +0 -1
- package/dist/three/frame/phase.d.ts +0 -44
- package/dist/three/frame/phase.js +0 -80
- package/dist/three/frame/phase.js.map +0 -1
- package/dist/three/frame/shadow-density-material.d.ts +0 -30
- package/dist/three/frame/shadow-density-material.js +0 -123
- package/dist/three/frame/shadow-density-material.js.map +0 -1
- package/dist/three/frame/temporal-material.d.ts +0 -29
- package/dist/three/frame/temporal-material.js +0 -152
- package/dist/three/frame/temporal-material.js.map +0 -1
- package/dist/three/frame/transmittance-material.d.ts +0 -31
- package/dist/three/frame/transmittance-material.js +0 -315
- package/dist/three/frame/transmittance-material.js.map +0 -1
- package/dist/three/frame/view.d.ts +0 -103
- package/dist/three/frame/view.js +0 -296
- package/dist/three/frame/view.js.map +0 -1
- package/dist/three/frame/volume-shadow-material.d.ts +0 -36
- package/dist/three/frame/volume-shadow-material.js +0 -128
- package/dist/three/frame/volume-shadow-material.js.map +0 -1
- package/dist/three/sequence.js.map +0 -1
|
@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AAa,CAAC,OAAO,EAAE,CAAC;QAE7B,KAAK,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YACvD,KAAK,CAAC,QAAQ,CAAC,CAAC,CAA4B,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;QACpE,CAAC;IACH,CAAC;CACF","sourcesContent":["// Portions derived from mjurczyk/openvdb (MIT), commit 75e7345 (v0.26.0):\n// src/three-openvdb/frame/core/FrameEmissionLight.js L1–287 (FrameEmissionLightBase: emitters, keys, probe\n// cascades, prepareProbes); src/three-openvdb/frame/webgpu/FrameEmissionLight.js L59–658 (probe grid uniforms,\n// the direction / reduce / probe pass materials, FrameEmissionLightNode, FrameEmissionLight: targets, slots,\n// updateProbes, dispose, the node registration).\n// Copyright (c) mjurczyk/openvdb contributors. Licensed under the MIT License (see THIRD_PARTY_NOTICES.md).\n// Changes: TypeScript; one class (his CPU base and WebGPU subclass merged); the direction pass reads each emitter\n// through its own volume source (one direction material per source, as the other passes, DIVERGES V30) instead of\n// one material that swaps 3D textures; no CPU mip step (the sources hold their LOD); the pass materials belong to\n// the light (his are shared by all lights and never freed); the probe cascade maths is engine-free\n// (`@pmndrs/vdb/tools` `vdbFrameEmissionProbeGrid`, with twins of every pass); every three r187 internal goes\n// through `three-internals.ts` (VDB_ENGINE_MISMATCH on another three). Divergences: DIVERGES.md (K3.6 rows).\n\n/**\n * K3.6: light from the emissive grids of every visible `VDBFrameVolume` (his `FrameEmissionLight`). Add one to the\n * scene; three's lit node materials (`MeshStandardMaterial`, `MeshLambertMaterial`, …) receive it as irradiance, like a\n * light probe. Per changed volume: its emitted light along 16 directions × 8² rays (direction pass), the mean and the\n * luminance-weighted centre (reduce pass); then L1 irradiance probes of all volumes as point lights, in up to 4\n * cascades of ≤ 32³ (probe pass). A lit pixel reads 6 texels (12 near a cascade side), for any number of volumes.\n * The passes run before the first lit mesh of each render and only when a volume or the cascades changed.\n *\n * const light = new VDBFrameEmissionLight({ intensity: 25, resolution: 32 });\n * scene.add(light); // volumes need an emission channel; colour: VDBFrameVolume `emissionColor`\n */\n\nimport * as THREE from \"three\";\nimport { AnalyticLightNode, NodeMaterial } from \"three/webgpu\";\nimport * as TSL from \"three/tsl\";\nimport type { VDBTslNode } from \"../grid-node.js\";\nimport { vdbVolumeNodes, type VDBThreeVolumeSource, type VDBVolumeNodesOptions, type VDBVolumeUniforms } from \"../volume-source.js\";\nimport { createFrameVolumeUniforms, createGridNodes, frameFragCoord, frameFullscreenVertex, frameLoad, type FrameVolumeUniforms, type GridUniforms } from \"./chunks.js\";\nimport {\n frameEmissionAtlasColumns as atlasColumns,\n frameEmissionAtlasSize as atlasSize,\n frameEmissionDirections as directionCount,\n frameEmissionGoldenAngle as goldenAngle,\n frameEmissionMaxCascades as maxCascades,\n frameEmissionRays as rayCount,\n vdbFrameEmissionProbeGrid,\n vdbFrameEmitterBounds,\n} from \"../../tools/frame/emission.js\";\nimport { setVolumeUniforms } from \"./renderer.js\";\nimport { vdbFramePrecompiling, vdbFrameRegisterLightNode, vdbFrameRenderUpdateType, vdbFrameRendererUtils } from \"./three-internals.js\";\nimport type { VDBFrameVolume } from \"./volume.js\";\nimport type { FrameVolumeRecord } from \"./view.js\";\nimport type { Vec3 } from \"../../tools/frame/index.js\";\n\nconst { Discard, Fn, If, Loop, Break, abs, clamp, cos, cross, dot, exp, float, floor, int, inverseSqrt, ivec2, luminance, max, min, mix, normalWorld, normalize, outputStruct, positionGeometry, positionWorld, property, renderGroup, select, sin, smoothstep, sqrt, texture, uniform, uniformArray, vec3, vec4 } =\n TSL as unknown as Record<string, VDBTslNode>;\n\ntype N = VDBTslNode;\ntype RendererLike = { render(scene: THREE.Object3D, camera: THREE.Camera): void; setRenderTarget(t: THREE.RenderTarget | null): void; autoClear: boolean };\n\n// NOTE Probe cascades in the uniform names of createGridNodes. Cascade 0 is the finest.\nconst createProbeGridUniforms = (group: N | null = null) => {\n const nodes = {\n frameGridMin: uniformArray(\n Array.from({ length: maxCascades }, () => new THREE.Vector3()),\n \"vec3\",\n ),\n frameGridSize: uniformArray(\n Array.from({ length: maxCascades }, () => new THREE.Vector3(1.0, 1.0, 1.0)),\n \"vec3\",\n ),\n frameGridCount: uniform(0, \"int\"),\n frameGridResolution: uniform(1.0),\n frameGridColumns: uniform(atlasColumns),\n frameGridAtlasSize: uniform(new THREE.Vector2(atlasSize, atlasSize)),\n };\n\n if (group) {\n Object.values(nodes).forEach((node) => node.setGroup(group));\n }\n\n return nodes as unknown as GridUniforms;\n};\n\nconst setProbeGridUniforms = (uniforms: GridUniforms, light: VDBFrameEmissionLight) => {\n const min = uniforms.frameGridMin.array as THREE.Vector3[];\n const size = uniforms.frameGridSize.array as THREE.Vector3[];\n\n for (let i = 0; i < maxCascades; i++) {\n min[i]!.copy(light.cascadeMin[i]!);\n size[i]!.copy(light.cascadeSize[i]!);\n }\n\n uniforms.frameGridCount.value = light.cascadeCount;\n uniforms.frameGridResolution.value = light.probeResolution;\n};\n\nconst fullscreenPositions = [-1, -1, 0, 3, -1, 0, -1, 3, 0];\nconst quadPositions = [-1, -1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, 1, 0];\n\nconst createGeometry = (positions: number[]) => {\n const geometry = new THREE.BufferGeometry();\n geometry.setAttribute(\"position\", new THREE.Float32BufferAttribute(positions, 3));\n\n return geometry;\n};\n\nconst createTarget = (count: number, type: THREE.TextureDataType, filter: THREE.MinificationTextureFilter & THREE.MagnificationTextureFilter, width = 1, height = 1) =>\n new THREE.RenderTarget(width, height, {\n count,\n type,\n format: THREE.RGBAFormat,\n minFilter: filter,\n magFilter: filter,\n generateMipmaps: false,\n depthBuffer: false,\n });\n\nconst setPassMaterial = (material: THREE.Material) => {\n material.side = THREE.DoubleSide;\n material.depthTest = false;\n material.depthWrite = false;\n material.blending = THREE.NoBlending;\n};\n\n/**\n * Light that one volume sends in each of 16 directions: one texel per direction, one row per volume (slot). Parallel\n * rays cover the bounding sphere; each adds the emission with the volume's transmittance. Output 0: intensity\n * (emission × ray area) and the radius. Output 1: the luminance-weighted world position. One material per volume\n * source (the source is compiled in). Twin: `vdbFrameEmissionDirectionTexel`.\n */\nexport class VDBFrameEmissionDirectionMaterial extends NodeMaterial {\n readonly volumeUniforms: FrameVolumeUniforms = createFrameVolumeUniforms();\n readonly sourceUniforms: VDBVolumeUniforms;\n readonly source: VDBThreeVolumeSource;\n readonly emissionColor: VDBVolumeNodesOptions[\"emissionColor\"];\n readonly frameSlot = uniform(0.0);\n readonly frameTargetSize = uniform(new THREE.Vector2(directionCount, 1.0));\n readonly frameEmitterCenter = uniform(new THREE.Vector3());\n readonly frameEmitterRadius = uniform(1.0);\n readonly frameSteps = uniform(24, \"int\");\n mipmaps: boolean;\n\n constructor(o: { source: VDBThreeVolumeSource; sourceUniforms: VDBVolumeUniforms; mipmaps: boolean; emissionColor?: VDBVolumeNodesOptions[\"emissionColor\"] }) {\n super();\n\n this.name = \"VDBFrameEmissionDirectionMaterial\";\n this.source = o.source;\n this.sourceUniforms = o.sourceUniforms;\n this.mipmaps = o.mipmaps;\n this.emissionColor = o.emissionColor;\n this.buildNodes();\n\n setPassMaterial(this);\n }\n\n setMipmaps(mipmaps: boolean): void {\n if (mipmaps !== this.mipmaps) {\n this.mipmaps = mipmaps;\n this.buildNodes();\n this.needsUpdate = true;\n }\n }\n\n buildNodes(): void {\n const volume = vdbVolumeNodes(this.source, this.sourceUniforms, { useMipmaps: this.mipmaps, ...(this.emissionColor ? { emissionColor: this.emissionColor } : {}) });\n const { frameWorldToLocal, frameAbsorbance } = this.volumeUniforms;\n const frameWorldScale = this.sourceUniforms.worldScale;\n const { frameSlot, frameTargetSize, frameEmitterCenter, frameEmitterRadius, frameSteps } = this;\n\n const outputIntensity = property(\"vec4\");\n const outputCenter = property(\"vec4\");\n\n // NOTE The quad covers the row of the slot\n this.vertexNode = vec4(positionGeometry.x, frameSlot.add(positionGeometry.y.mul(0.5).add(0.5)).div(frameTargetSize.y).mul(2.0).sub(1.0), 0.0, 1.0);\n\n this.colorNode = Fn(() => {\n const index = floor(frameFragCoord(frameTargetSize).x).toVar();\n\n // NOTE Fibonacci sphere direction, from the volume to the viewer\n const y = float(1.0).sub(index.mul(2.0).add(1.0).div(directionCount)).toVar();\n const ring = sqrt(max(0.0, float(1.0).sub(y.mul(y))));\n const phi = index.mul(goldenAngle);\n const direction = vec3(cos(phi).mul(ring), y, sin(phi).mul(ring)).toVar();\n const helper = select(abs(direction.y).lessThan(0.999), vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0));\n const tangent = normalize(cross(helper, direction)).toVar();\n const bitangent = cross(direction, tangent).toVar();\n\n const diameter = frameEmitterRadius.mul(2.0).toVar();\n const spacing = diameter.div(rayCount).toVar();\n const stepCount = float(frameSteps).toVar();\n const intensity = vec3(0.0).toVar();\n const center = vec4(0.0).toVar();\n\n Loop({ start: int(0), end: int(rayCount * rayCount), type: \"int\", condition: \"<\", name: \"r\" }, ({ r }: { r: N }) => {\n const u = float(r.mod(int(rayCount))).add(0.5).div(rayCount).mul(2.0).sub(1.0);\n const v = float(r.div(int(rayCount))).add(0.5).div(rayCount).mul(2.0).sub(1.0);\n const worldStart = frameEmitterCenter.add(direction.mul(frameEmitterRadius)).add(tangent.mul(u.mul(frameEmitterRadius))).add(bitangent.mul(v.mul(frameEmitterRadius))).toVar();\n const worldEnd = worldStart.sub(direction.mul(diameter)).toVar();\n const localStart = frameWorldToLocal.mul(vec4(worldStart, 1.0)).xyz.toVar();\n const localEnd = frameWorldToLocal.mul(vec4(worldEnd, 1.0)).xyz.toVar();\n const segment = volume.boxSegment(localStart, localEnd).toVar();\n\n If(segment.x.lessThan(segment.y), () => {\n const segmentLength = segment.y.sub(segment.x).toVar();\n const stepLength = segmentLength.mul(diameter).div(stepCount).toVar();\n // NOTE Smoke uses the mip level of the step. Emission uses level 0: power grows with temperature^4, mipmaps lose it.\n const lod = volume.getLod(stepLength.div(frameWorldScale)).toVar();\n const transmittance = float(1.0).toVar();\n\n Loop({ start: int(0), end: frameSteps, type: \"int\", condition: \"<\", name: \"s\" }, ({ s }: { s: N }) => {\n const t = segment.x.add(segmentLength.mul(float(s).add(0.5).div(stepCount))).toVar();\n const localPosition = mix(localStart, localEnd, t).toVar();\n const extinction = volume.sampleExtinction(localPosition, lod).toVar();\n\n If(extinction.greaterThan(0.0), () => {\n // NOTE Absorbance scales the shadow of the volume, the same as for scene lights\n const alpha = float(1.0).sub(exp(extinction.mul(stepLength).negate()));\n const radiance = volume.sampleEmission(localPosition, float(0.0)).mul(transmittance.mul(alpha)).toVar();\n\n intensity.addAssign(radiance);\n center.addAssign(vec4(mix(worldStart, worldEnd, t), 1.0).mul(luminance(radiance)));\n transmittance.mulAssign(exp(extinction.mul(frameAbsorbance).mul(stepLength).negate()));\n\n If(transmittance.lessThan(0.01), () => {\n Break();\n });\n });\n });\n });\n });\n\n const area = spacing.mul(spacing);\n\n outputIntensity.assign(vec4(intensity.mul(area), frameEmitterRadius));\n outputCenter.assign(center.mul(area));\n\n return vec4(0.0);\n })();\n\n this.outputNode = outputStruct(outputIntensity, outputCenter);\n }\n}\n\n/** One texel per volume: the mean intensity of all directions, and the centre of the visible emission. Twin: `vdbFrameEmissionReduce`. */\nexport class VDBFrameEmissionReduceMaterial extends NodeMaterial {\n readonly frameTargetSize = uniform(new THREE.Vector2(1.0, 1.0));\n readonly frameDirectionSize = uniform(new THREE.Vector2(directionCount, 1.0));\n readonly frameDirectionIntensity = texture(new THREE.Texture());\n readonly frameDirectionCenter = texture(new THREE.Texture());\n\n constructor() {\n super();\n\n this.name = \"VDBFrameEmissionReduceMaterial\";\n\n const outputIntensity = property(\"vec4\");\n const outputCenter = property(\"vec4\");\n\n this.vertexNode = frameFullscreenVertex;\n\n this.colorNode = Fn(() => {\n const row = int(floor(frameFragCoord(this.frameTargetSize).y)).toVar();\n const intensity = vec4(0.0).toVar();\n const center = vec4(0.0).toVar();\n\n Loop(directionCount, ({ i }: { i: N }) => {\n const texel = ivec2(i, row);\n\n intensity.addAssign(frameLoad(this.frameDirectionIntensity, texel, this.frameDirectionSize));\n center.addAssign(frameLoad(this.frameDirectionCenter, texel, this.frameDirectionSize));\n });\n\n const visible = center.w.greaterThan(0.0);\n\n outputIntensity.assign(intensity.div(directionCount));\n outputCenter.assign(select(visible, vec4(center.xyz.div(max(center.w, 1e-12)), 1.0), vec4(0.0)));\n\n return vec4(0.0);\n })();\n\n this.outputNode = outputStruct(outputIntensity, outputCenter);\n\n setPassMaterial(this);\n }\n}\n\n/**\n * L1 irradiance of all volumes at each probe, E(n) = x + dot(yzw, n) per colour channel: each volume is a point light\n * at its emission centre, its radius softening the distance near it. Twin: `vdbFrameEmissionProbe`.\n */\nexport class VDBFrameEmissionProbeMaterial extends NodeMaterial {\n readonly gridUniforms = createProbeGridUniforms();\n readonly frameEmitterCount = uniform(0, \"int\");\n readonly frameEmitterSize = uniform(new THREE.Vector2(1.0, 1.0));\n readonly frameEmitterIntensity = texture(new THREE.Texture());\n readonly frameEmitterCenter = texture(new THREE.Texture());\n\n constructor() {\n super();\n\n this.name = \"VDBFrameEmissionProbeMaterial\";\n\n const outputRed = property(\"vec4\");\n const outputGreen = property(\"vec4\");\n const outputBlue = property(\"vec4\");\n\n const grid = createGridNodes(this.gridUniforms);\n const { frameGridMin, frameGridSize, frameGridCount, frameGridResolution, frameGridAtlasSize } = this.gridUniforms;\n\n this.vertexNode = frameFullscreenVertex;\n\n this.colorNode = Fn(() => {\n const fragCoord = frameFragCoord(frameGridAtlasSize).toVar();\n\n // NOTE Tiles right of the atlas columns are not used. Smaller grids leave them empty.\n If(fragCoord.x.greaterThanEqual(frameGridResolution.mul(atlasColumns)), () => {\n Discard();\n });\n\n const cell = grid.getGridCell(fragCoord);\n\n If(cell.cascade.greaterThanEqual(frameGridCount), () => {\n Discard();\n });\n\n const probe = frameGridMin.element(cell.cascade).add(cell.gridUvw.mul(frameGridSize.element(cell.cascade))).toVar();\n\n const constant = vec3(0.0).toVar();\n const directionRed = vec3(0.0).toVar();\n const directionGreen = vec3(0.0).toVar();\n const directionBlue = vec3(0.0).toVar();\n\n Loop(this.frameEmitterCount, ({ i }: { i: N }) => {\n const texel = ivec2(int(0), i);\n const center = frameLoad(this.frameEmitterCenter, texel, this.frameEmitterSize).toVar();\n\n If(center.w.greaterThan(0.0), () => {\n const emitter = frameLoad(this.frameEmitterIntensity, texel, this.frameEmitterSize).toVar();\n const toProbe = probe.sub(center.xyz).toVar();\n const distanceSquared = dot(toProbe, toProbe).toVar();\n const soft = emitter.w.mul(0.25);\n const softDistanceSquared = distanceSquared.add(soft.mul(soft)).toVar();\n const irradiance = emitter.rgb.div(softDistanceSquared).toVar();\n\n // NOTE L1 projection of a point light: E(n) = E / 4 + E / 2 * dot(l, n). The direction fades near the centre.\n const toLight = toProbe.mul(inverseSqrt(max(distanceSquared, 1e-12))).mul(distanceSquared.div(softDistanceSquared).mul(-0.5)).toVar();\n\n constant.addAssign(irradiance.mul(0.25));\n directionRed.addAssign(toLight.mul(irradiance.r));\n directionGreen.addAssign(toLight.mul(irradiance.g));\n directionBlue.addAssign(toLight.mul(irradiance.b));\n });\n });\n\n outputRed.assign(vec4(constant.r, directionRed));\n outputGreen.assign(vec4(constant.g, directionGreen));\n outputBlue.assign(vec4(constant.b, directionBlue));\n\n return vec4(0.0);\n })();\n\n this.outputNode = outputStruct(outputRed, outputGreen, outputBlue);\n\n setPassMaterial(this);\n }\n}\n\n/**\n * The irradiance at a lit point from the finest probe cascade that contains it; near a cascade side the next one\n * blends in (as the shadow grid); past the last cascade its clamped edge probes fall off with distance squared.\n */\nexport class VDBFrameEmissionLightNode extends AnalyticLightNode<THREE.Light> {\n static get type(): string {\n return \"VDBFrameEmissionLightNode\";\n }\n\n readonly probeMaps: N[];\n readonly gridUniforms: GridUniforms;\n readonly probeCenter: N;\n readonly probeActive: N;\n\n constructor(light: VDBFrameEmissionLight | null = null) {\n super(light as never);\n\n // NOTE The passes run before the first lit mesh of each render, as shadow maps\n const render = vdbFrameRenderUpdateType();\n (this as unknown as { updateType: string; updateBeforeType: string }).updateType = render;\n (this as unknown as { updateType: string; updateBeforeType: string }).updateBeforeType = render;\n\n const maps = light ? light.probeTarget.textures : [new THREE.Texture(), new THREE.Texture(), new THREE.Texture()];\n\n this.probeMaps = maps.map((map) => texture(map));\n\n // NOTE Render group, as three's lights: lit materials without node changes update only shared uniforms\n this.gridUniforms = createProbeGridUniforms(renderGroup);\n this.probeCenter = uniform(new THREE.Vector3()).setGroup(renderGroup);\n this.probeActive = uniform(0.0).setGroup(renderGroup);\n }\n\n private get emissionLight(): VDBFrameEmissionLight {\n return (this as unknown as { light: VDBFrameEmissionLight }).light;\n }\n\n override updateBefore(frame: never): boolean | undefined {\n const { renderer, scene, camera } = frame as { renderer: object; scene: THREE.Scene; camera: THREE.Camera };\n\n // NOTE No passes while three precompiles materials (compileAsync), as shadow maps\n if (vdbFramePrecompiling(renderer)) {\n return undefined;\n }\n\n this.emissionLight.updateProbes(renderer as unknown as RendererLike, scene, camera);\n\n return undefined;\n }\n\n override update(frame: never): boolean | undefined {\n super.update(frame);\n\n const light = this.emissionLight;\n\n setProbeGridUniforms(this.gridUniforms, light);\n this.probeCenter.value.copy(light.probeCenter);\n this.probeActive.value = light.emitterCount > 0 ? 1.0 : 0.0;\n\n return undefined;\n }\n\n override setup(builder: never): null {\n const grid = createGridNodes(this.gridUniforms);\n const { frameGridMin, frameGridSize, frameGridCount, frameGridResolution } = this.gridUniforms;\n const { probeCenter, probeActive } = this;\n const [redMap, greenMap, blueMap] = this.probeMaps;\n\n const irradiance = Fn(() => {\n const position = positionWorld.toVar();\n const red = vec4(0.0).toVar();\n const green = vec4(0.0).toVar();\n const blue = vec4(0.0).toVar();\n const falloff = float(1.0).toVar();\n\n const sampleProbes = (cascade: N, uvw: N, weight: N) => {\n red.assign(mix(red, grid.sampleGrid(redMap, cascade, uvw), weight));\n green.assign(mix(green, grid.sampleGrid(greenMap, cascade, uvw), weight));\n blue.assign(mix(blue, grid.sampleGrid(blueMap, cascade, uvw), weight));\n };\n\n If(frameGridCount.greaterThan(0), () => {\n const cascade = grid.findCascade(position, int(0)).toVar();\n\n If(cascade.greaterThanEqual(0), () => {\n const uvw = grid.gridUvw(cascade, position).toVar();\n\n sampleProbes(cascade, uvw, float(1.0));\n\n const sideDistance = min(uvw, vec3(1.0).sub(uvw));\n const blend = float(1.0).sub(smoothstep(0.0, 0.1, min(sideDistance.x, min(sideDistance.y, sideDistance.z)))).toVar();\n\n If(blend.greaterThan(0.0), () => {\n const nextCascade = grid.findCascade(position, cascade.add(1)).toVar();\n\n If(nextCascade.greaterThanEqual(0), () => {\n sampleProbes(nextCascade, grid.gridUvw(nextCascade, position), blend);\n });\n });\n }).Else(() => {\n const lastCascade = frameGridCount.sub(1).toVar();\n const inset = float(0.5).div(frameGridResolution);\n const uvw = clamp(grid.gridUvw(lastCascade, position), vec3(inset), vec3(float(1.0).sub(inset))).toVar();\n const toEdge = frameGridMin.element(lastCascade).add(uvw.mul(frameGridSize.element(lastCascade))).sub(probeCenter);\n const toPoint = position.sub(probeCenter);\n\n sampleProbes(lastCascade, uvw, float(1.0));\n falloff.assign(min(1.0, dot(toEdge, toEdge).div(max(dot(toPoint, toPoint), 1e-6))));\n });\n });\n\n const normal = normalWorld;\n\n return max(vec3(red.x.add(dot(red.yzw, normal)), green.x.add(dot(green.yzw, normal)), blue.x.add(dot(blue.yzw, normal))), vec3(0.0)).mul(falloff.mul(probeActive));\n })();\n\n const b = builder as unknown as { context: { irradiance: N } };\n const colorNode = (this as unknown as { colorNode: N }).colorNode;\n\n b.context.irradiance.addAssign(colorNode.mul(irradiance));\n\n return null;\n }\n}\n\n/** Props of {@link VDBFrameEmissionLight} (his `FrameEmissionLight` props; same names and defaults). */\nexport interface VDBFrameEmissionLightProps {\n color?: THREE.ColorRepresentation;\n intensity?: number;\n /** Probes on each axis of each cascade, 2–32 (default 16). */\n resolution?: number;\n /** Size of the last cascade as a multiple of the box of all emitting volumes; past it light falls off with distance² (default 3). */\n range?: number;\n /** 1: one grid for all volumes. Up to 4: finer grids around the camera (default 1). */\n cascades?: number;\n /** The finer cascades cover this distance from the camera (default 512). */\n distance?: number;\n /** Steps of each ray in a volume (default 24). */\n steps?: number;\n}\n\n/** One emitting volume of the current render (his `createEmitter`; the record `setVolumeUniforms` reads). */\ninterface Emitter extends FrameVolumeRecord {\n frameVolume: VDBFrameVolume | null;\n key: string;\n center: THREE.Vector3;\n radius: number;\n}\n\nconst unitBox = new THREE.Box3(new THREE.Vector3(-0.5, -0.5, -0.5), new THREE.Vector3(0.5, 0.5, 0.5));\nconst cameraPosition = new THREE.Vector3();\n\nconst createEmitter = (): Emitter => ({\n frameVolume: null,\n key: \"\",\n matrix: new THREE.Matrix4(),\n matrixWorld: new THREE.Matrix4(),\n worldToLocal: new THREE.Matrix4(),\n localToView: new THREE.Matrix4(),\n viewToLocal: new THREE.Matrix4(),\n worldBox: new THREE.Box3(),\n viewNear: 0,\n viewFar: 0,\n ready: true,\n center: new THREE.Vector3(),\n radius: 0.0,\n});\n\n// NOTE An id for each source object (the emitter key: a new source or a replaced grid draws again)\nconst sourceIds = new WeakMap<object, number>();\nlet nextSourceId = 1;\n\nconst sourceKey = (frameVolume: VDBFrameVolume): string => {\n const source = frameVolume.source as unknown as { version?: number; lod?: string; lodLevels: number; textures?: Record<string, { map: THREE.Texture; mip: THREE.Texture | null } | null> };\n let id = sourceIds.get(source);\n\n if (id === undefined) {\n id = nextSourceId++;\n sourceIds.set(source, id);\n }\n\n const values: (number | string)[] = [id, source.version ?? -1, source.lodLevels, source.lod ?? \"-\"];\n\n if (source.textures) {\n for (const name of [\"density\", \"mask\", \"emission\"]) {\n const t = source.textures[name];\n\n values.push(t ? `${t.map.id}.${t.map.version}` : \"-\", t?.mip ? `${t.mip.id}.${t.mip.version}` : \"-\");\n }\n }\n\n // NOTE The colour hook's runtime value (vdbFrameBlackbodyEmission: the soot exponent)\n const hook = frameVolume.emissionColor as unknown as { sootExponent?: { value: number } } | undefined;\n\n values.push(hook?.sootExponent ? hook.sootExponent.value : \"-\");\n\n return values.join(\":\");\n};\n\n/** One registration of the light node class (internal 4), checked at the first construction. */\nlet registered = false;\n\nexport class VDBFrameEmissionLight extends THREE.Light {\n readonly isVDBFrameEmissionLight = true as const;\n\n resolution: number;\n range: number;\n cascades: number;\n distance: number;\n steps: number;\n\n readonly cascadeMin = Array.from({ length: maxCascades }, () => new THREE.Vector3());\n readonly cascadeSize = Array.from({ length: maxCascades }, () => new THREE.Vector3(1.0, 1.0, 1.0));\n cascadeCount = 0;\n probeResolution = 2;\n readonly probeCenter = new THREE.Vector3();\n\n emitters: Emitter[] = [];\n emitterCount = 0;\n slotKeys: string[] = [];\n slotCount = 0;\n probeKey = \"\";\n\n // NOTE Float targets for the volumes: intensities in world units do not overflow\n directionTarget = createTarget(2, THREE.FloatType, THREE.NearestFilter);\n emitterTarget = createTarget(2, THREE.FloatType, THREE.NearestFilter);\n // NOTE The probe atlas has the size for the largest grid and all cascades: lit materials keep its binding\n readonly probeTarget = createTarget(3, THREE.HalfFloatType, THREE.LinearFilter, atlasSize, atlasSize);\n\n // NOTE One draw for each changed volume, in one render\n readonly directionScene = new THREE.Scene();\n directionPool: THREE.Mesh[] = [];\n readonly reduceMaterial = new VDBFrameEmissionReduceMaterial();\n readonly probeMaterial = new VDBFrameEmissionProbeMaterial();\n readonly reduceScene: THREE.Scene;\n readonly probeScene: THREE.Scene;\n // NOTE WebGPURenderer calls updateProjectionMatrix() on the camera\n readonly passCamera = new THREE.OrthographicCamera();\n // NOTE RendererUtils fills this object\n rendererState: object = {};\n /** Volumes drawn in the last probe update and whether the probes were drawn (not his; tests and timing). */\n readonly lastUpdate = { directions: 0, probes: false };\n\n constructor(props: VDBFrameEmissionLightProps = {}) {\n const { color = 0xffffff, intensity = 1.0, resolution = 16, range = 3.0, cascades = 1, distance = 512, steps = 24 } = props;\n\n super(color, intensity);\n\n if (!registered) {\n vdbFrameRegisterLightNode(VDBFrameEmissionLight as unknown as typeof THREE.Light, VDBFrameEmissionLightNode);\n registered = true;\n }\n\n (this as { type: string }).type = \"VDBFrameEmissionLight\";\n this.resolution = resolution;\n this.range = range;\n this.cascades = cascades;\n this.distance = distance;\n this.steps = steps;\n\n this.directionScene.matrixWorldAutoUpdate = false;\n\n const createPassScene = (material: THREE.Material) => {\n const scene = new THREE.Scene();\n const mesh = new THREE.Mesh(createGeometry(fullscreenPositions), material);\n\n mesh.frustumCulled = false;\n scene.matrixWorldAutoUpdate = false;\n scene.add(mesh);\n\n return scene;\n };\n\n this.reduceScene = createPassScene(this.reduceMaterial);\n this.probeScene = createPassScene(this.probeMaterial);\n }\n\n getSteps(): number {\n return Math.max(1, Math.round(this.steps));\n }\n\n /** The direction-pass material of a volume (its source compiled in), made on first use. */\n getDirectionMaterial(frameVolume: VDBFrameVolume): VDBFrameEmissionDirectionMaterial {\n const mipmaps = frameVolume.mipmaps && frameVolume.source.lodLevels > 0;\n let material = frameVolume.emissionDirectionMaterial;\n\n if (!material) {\n material = new VDBFrameEmissionDirectionMaterial({ source: frameVolume.source, sourceUniforms: frameVolume.sourceUniforms, mipmaps, ...(frameVolume.emissionColor ? { emissionColor: frameVolume.emissionColor } : {}) });\n frameVolume.emissionDirectionMaterial = material;\n }\n\n material.setMipmaps(mipmaps);\n\n return material;\n }\n\n // NOTE Emissive volumes of the scene (visible, with an emission channel)\n collectEmitters(scene: THREE.Object3D): void {\n let count = 0;\n const steps = this.getSteps();\n\n scene.traverseVisible((object) => {\n const frameVolume = object as VDBFrameVolume;\n\n if (!frameVolume.isVDBFrameVolume || !frameVolume.source.channels.emission) {\n return;\n }\n\n for (const volume of frameVolume.volumes) {\n if (!volume.ready) {\n continue;\n }\n\n if (!this.emitters[count]) {\n this.emitters[count] = createEmitter();\n }\n\n const emitter = this.emitters[count++]!;\n\n emitter.frameVolume = frameVolume;\n emitter.matrixWorld.multiplyMatrices(frameVolume.matrixWorld, volume.matrix);\n emitter.worldToLocal.copy(emitter.matrixWorld).invert();\n emitter.worldBox.copy(unitBox).applyMatrix4(emitter.matrixWorld);\n\n const bounds = vdbFrameEmitterBounds(emitter.matrixWorld.elements);\n\n emitter.center.fromArray(bounds.center);\n emitter.radius = bounds.radius;\n emitter.key = [\n sourceKey(frameVolume),\n frameVolume.extinction,\n frameVolume.getDensityScale(),\n frameVolume.densityCutoff,\n frameVolume.absorbance,\n frameVolume.emissiveIntensity,\n frameVolume.temperatureRange.x,\n frameVolume.temperatureRange.y,\n frameVolume.offset3D.x,\n frameVolume.offset3D.y,\n frameVolume.offset3D.z,\n frameVolume.wrap3D,\n frameVolume.mipmaps,\n steps,\n ...emitter.matrixWorld.elements,\n ].join(\",\");\n }\n });\n\n this.emitterCount = count;\n }\n\n // NOTE The probe cascades (tools/frame/emission.ts). Returns a key that changes with them.\n updateProbeGrid(camera: THREE.Camera): string {\n cameraPosition.setFromMatrixPosition(camera.matrixWorld);\n\n const boxes = this.emitters.slice(0, this.emitterCount).map((e) => ({ min: e.worldBox.min.toArray() as Vec3, max: e.worldBox.max.toArray() as Vec3 }));\n const grid = vdbFrameEmissionProbeGrid({ resolution: this.resolution, range: this.range, cascades: this.cascades, distance: this.distance }, boxes, cameraPosition.toArray() as Vec3);\n\n this.probeResolution = grid.resolution;\n this.probeCenter.fromArray(grid.center);\n\n for (let i = 0; i < grid.count; i++) {\n this.cascadeMin[i]!.fromArray(grid.min[i]!);\n this.cascadeSize[i]!.fromArray(grid.size[i]!);\n }\n\n this.cascadeCount = grid.count;\n\n return grid.key;\n }\n\n // NOTE The changed volumes as { emitter, slot }, or null when the probes stay the same.\n // Slots grow to the next power of two. New targets are empty, so all volumes draw again.\n prepareProbes(scene: THREE.Object3D, camera: THREE.Camera): { emitter: Emitter; slot: number }[] | null {\n this.collectEmitters(scene);\n\n if (this.emitterCount > this.slotCount) {\n this.slotCount = Math.pow(2, Math.ceil(Math.log2(this.emitterCount)));\n this.slotKeys = [];\n this.resizeSlots();\n }\n\n const changed: { emitter: Emitter; slot: number }[] = [];\n\n for (let i = 0; i < this.emitterCount; i++) {\n const emitter = this.emitters[i]!;\n\n if (this.slotKeys[i] !== emitter.key) {\n this.slotKeys[i] = emitter.key;\n changed.push({ emitter, slot: i });\n }\n }\n\n if (this.emitterCount === 0) {\n this.probeKey = \"\";\n\n return null;\n }\n\n const probeKey = `${this.emitterCount},${this.updateProbeGrid(camera)}`;\n\n if (changed.length === 0 && probeKey === this.probeKey) {\n return null;\n }\n\n this.probeKey = probeKey;\n\n return changed;\n }\n\n // NOTE New targets, because setSize() destroys the GPU textures that materials still bind\n resizeSlots(): void {\n this.directionTarget.dispose();\n this.emitterTarget.dispose();\n this.directionTarget = createTarget(2, THREE.FloatType, THREE.NearestFilter, directionCount, this.slotCount);\n this.emitterTarget = createTarget(2, THREE.FloatType, THREE.NearestFilter, 1, this.slotCount);\n }\n\n getDirectionMesh(index: number): THREE.Mesh {\n if (!this.directionPool[index]) {\n const mesh = new THREE.Mesh(createGeometry(quadPositions), new THREE.MeshBasicMaterial());\n\n mesh.frustumCulled = false;\n mesh.matrixAutoUpdate = false;\n mesh.onBeforeRender = () => {\n const { emitter, slot } = mesh.userData as { emitter: Emitter; slot: number };\n const material = mesh.material as unknown as VDBFrameEmissionDirectionMaterial;\n\n setVolumeUniforms(material, emitter.frameVolume!, emitter);\n material.frameSlot.value = slot;\n material.frameTargetSize.value.set(directionCount, this.slotCount);\n material.frameEmitterCenter.value.copy(emitter.center);\n material.frameEmitterRadius.value = emitter.radius;\n material.frameSteps.value = this.getSteps();\n };\n\n this.directionScene.add(mesh);\n this.directionPool[index] = mesh;\n }\n\n return this.directionPool[index]!;\n }\n\n /** Runs the passes of changed volumes. The light node calls it before the lit meshes of each render. */\n updateProbes(renderer: RendererLike, scene: THREE.Object3D, viewCamera: THREE.Camera): void {\n this.lastUpdate.directions = 0;\n this.lastUpdate.probes = false;\n\n const changed = this.prepareProbes(scene, viewCamera);\n\n if (!changed) {\n return;\n }\n\n changed.forEach(({ emitter, slot }, index) => {\n const mesh = this.getDirectionMesh(index);\n\n mesh.material = this.getDirectionMaterial(emitter.frameVolume!);\n mesh.userData.emitter = emitter;\n mesh.userData.slot = slot;\n });\n\n const { reduceMaterial, probeMaterial, reduceScene, probeScene, passCamera: camera } = this;\n const utils = vdbFrameRendererUtils();\n\n this.rendererState = utils.resetRendererState(renderer, this.rendererState);\n\n // NOTE Each pass writes all its texels. Rows of volumes that did not change stay.\n renderer.autoClear = false;\n\n try {\n if (changed.length > 0) {\n this.directionPool.forEach((mesh, index) => {\n mesh.visible = index < changed.length;\n });\n\n renderer.setRenderTarget(this.directionTarget);\n renderer.render(this.directionScene, camera);\n\n reduceMaterial.frameTargetSize.value.set(1, this.slotCount);\n reduceMaterial.frameDirectionSize.value.set(directionCount, this.slotCount);\n reduceMaterial.frameDirectionIntensity.value = this.directionTarget.textures[0];\n reduceMaterial.frameDirectionCenter.value = this.directionTarget.textures[1];\n\n renderer.setRenderTarget(this.emitterTarget);\n renderer.render(reduceScene, camera);\n }\n\n setProbeGridUniforms(probeMaterial.gridUniforms, this);\n probeMaterial.frameEmitterCount.value = this.emitterCount;\n probeMaterial.frameEmitterSize.value.set(1, this.slotCount);\n probeMaterial.frameEmitterIntensity.value = this.emitterTarget.textures[0];\n probeMaterial.frameEmitterCenter.value = this.emitterTarget.textures[1];\n\n renderer.setRenderTarget(this.probeTarget);\n renderer.render(probeScene, camera);\n this.lastUpdate.directions = changed.length;\n this.lastUpdate.probes = true;\n } finally {\n utils.restoreRendererState(renderer, this.rendererState);\n }\n }\n\n override dispose(): void {\n super.dispose();\n\n this.slotKeys = [];\n this.slotCount = 0;\n this.probeKey = \"\";\n this.directionTarget.dispose();\n this.emitterTarget.dispose();\n this.probeTarget.dispose();\n this.directionPool.forEach((mesh) => mesh.geometry.dispose());\n this.directionPool = [];\n this.reduceMaterial.dispose();\n this.probeMaterial.dispose();\n\n for (const scene of [this.reduceScene, this.probeScene]) {\n (scene.children[0] as THREE.Mesh | undefined)?.geometry.dispose();\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"emission-light.js","sourceRoot":"","sources":["../../../src/three/frame/emission-light.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,+GAA+G;AAC/G,oHAAoH;AACpH,4GAA4G;AAC5G,4GAA4G;AAC5G,uHAAuH;AACvH,qHAAqH;AACrH,yHAAyH;AACzH,0GAA0G;AAC1G,0HAA0H;AAC1H,qBAAqB;AAErB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAA+B,MAAM,cAAc,CAAC;AAC9E,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAmB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,wBAAwB,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC1I,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAA4B,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAK5F,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,GAA4C,CAAC;AAI/H,wCAAwC;AACxC,MAAM,UAAU,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAE1D,kHAAkH;AAClH,IAAI,YAAY,GAAa,IAAI,CAAC;AAClC,MAAM,gBAAgB,GAAG,GAAM,EAAE,CAAC,CAAC,YA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AAG,CAAC,CAAC;YACtB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YACtB,OAAO;QACT,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,MAA6B,CAAC,CAAC;QAChE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAE,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAwB,CAAC,CAAC;YACnE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAwB,CAAC,CAAC;QACvE,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;QAC1D,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;IACpD,CAAC;IAEQ,OAAO;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACF","sourcesContent":["// Portions derived from mjurczyk/openvdb (MIT), commit 75e7345 (v0.26.0):\n// src/three-openvdb/frame/core/FrameEmissionLight.js L1–287 (FrameEmissionLightBase: props, probe cascades);\n// src/three-openvdb/frame/webgpu/FrameEmissionLight.js L59–658 (FrameEmissionLightNode: the probe lookup with the\n// cascade blend and the falloff past the last cascade; FrameEmissionLight: props, the node registration).\n// Copyright (c) mjurczyk/openvdb contributors. Licensed under the MIT License (see THIRD_PARTY_NOTICES.md).\n// Changes: TypeScript; K6.8: the emitters and probes are the core frame renderer's (its emission kernels, a stacked 3D\n// texture read with hardware trilinear); this light carries the settings and lights meshes; K6.8b: the lookup is the\n// core's own WGSL (`vdbEmissionIrradiance` of `vdbEmissionProbeWgsl()`) through a `wgslFn`, the probe grid read from the\n// core's buffer through a storage stand-in, instead of a TSL port; every three r187 internal goes through\n// `three-internals.ts` or the stand-in self-tests (VDB_ENGINE_MISMATCH on another three). Divergences: DIVERGES.md (K3.6,\n// K6.5, K6.8b rows).\n\n/**\n * K3.6 / K6.5: light from the emissive grids of every visible `VDBFrameVolume` (his `FrameEmissionLight`). Add one to\n * the scene; three's lit node materials (`MeshStandardMaterial`, `MeshLambertMaterial`, …) receive it as irradiance,\n * like a light probe. The core frame renderer of the scene's volumes draws the emitters and L1 irradiance probes (up to\n * 4 cascades of ≤ 32³) when a volume or the cascades changed; a lit pixel reads 6 texels (12 near a cascade side).\n *\n * const light = new VDBFrameEmissionLight({ intensity: 25, resolution: 32 });\n * scene.add(light); // volumes need an emission channel; colour: VDBFrameVolume `emissionColor`\n *\n * K6.8b: a lit pixel runs the core's `vdbEmissionIrradiance(probes, smp, grid, world, normal)` (`vdbEmissionProbeWgsl()`,\n * twin `vdbFrameEmissionLookup` + `vdbFrameEmissionIrradiance`) through a `wgslFn`: `probes` is the core's probe stack\n * (`outputs.emissionProbes.texture`, a 3D texture stand-in) and `grid` its `VdbEmissionGrid` buffer\n * (`outputs.emissionProbes.grid`, bound through a storage stand-in and unpacked from `array<vec4u>`; the core rewrites it\n * each update). The texture and storage nodes are made once; their `value` follows the core (placeholders while it has no\n * probes: a 1³ texture and a zero grid, which lights nothing). three r187 re-reads a plain material's texture and storage\n * bindings only on a full refresh, so a new core object (a new probe resolution, a released stack, another frame\n * renderer) also rebuilds the receivers: the light keeps `castShadow` on (it casts no shadow) and its node bumps\n * `version`, which three's lights cache key holds for a `castShadow` light. They rebuild at their next render; the core\n * keeps the old stack alive two more updates (the K6.10 finding-8 class).\n */\n\nimport * as THREE from \"three\";\nimport { AnalyticLightNode, type StorageBufferAttribute } from \"three/webgpu\";\nimport * as TSL from \"three/tsl\";\nimport { vdbThreeStorageStandIn, type VDBTslNode } from \"../grid-node.js\";\nimport { getDevice } from \"../device.js\";\nimport { frameEmissionMaxCascades as maxCascades } from \"../../tools/frame/emission.js\";\nimport { vdbFrameCheckLightReset, vdbFramePrecompiling, vdbFrameRegisterLightNode, vdbFrameRenderUpdateType } from \"./three-internals.js\";\nimport { VDBCoreTextureBinding, vdbCoreTextureSelfTest } from \"./core-textures.js\";\nimport { VDBFrameStructLoaderNode, vdbFrameStructWords, type VDBFrameStorageNode } from \"./core-structs.js\";\nimport { VDB_EMISSION_GRID, vdbEmissionProbeWgsl } from \"../../core/frame/wgsl/emission.js\";\nimport type { VDBFrameEmissionProbes } from \"../../core/frame/types.js\";\nimport type { VDBFrameRenderer } from \"./renderer.js\";\nimport type { VDBFrameVolume } from \"./volume.js\";\n\nconst { code, normalWorld, positionWorld, sampler, storage, texture3D, wgslFn } = TSL as unknown as Record<string, VDBTslNode>;\n\ntype N = VDBTslNode;\n\n/** `vec4u` words of the grid struct. */\nconst GRID_WORDS = vdbFrameStructWords(VDB_EMISSION_GRID);\n\n/** The core's receiver function and the grid struct, one code node shared by every receiver (once per shader). */\nlet receiverCode: N | null = null;\nconst receiverCodeNode = (): N => (receiverCode ??= code(vdbEmissionProbeWgsl()));\n\n/** Light nodes made so far: names each one's storage binding and WGSL functions. */\nlet names = 0;\n\n/** What the receivers bind while the core has no probes: a 1³ stack and a zero grid (`info.x` 0: no light, no sample). */\ninterface Placeholders {\n texture: GPUTexture;\n grid: GPUBuffer;\n}\n\n/** A light node's three nodes; made at its first receiver build, their values follow the core. */\ninterface ReceiverNodes {\n renderer: object;\n placeholders: Placeholders;\n probes: N;\n grid: VDBFrameStorageNode;\n /** The grid buffer bound now (the core's or the placeholder). */\n gridBuffer: GPUBuffer;\n fn: (inputs: Record<string, N>) => N;\n}\n\n/**\n * The irradiance at a lit point from the core's probe cascades (`vdbEmissionIrradiance`: the finest cascade that holds\n * it, blended into the next one near its sides; past the last cascade its clamped edge probes fall off with distance\n * squared), times the light's colour × intensity.\n */\nexport class VDBFrameEmissionLightNode extends AnalyticLightNode<THREE.Light> {\n static get type(): string {\n return \"VDBFrameEmissionLightNode\";\n }\n\n /** Unique per light node: names the storage binding and the WGSL functions. */\n readonly k = names++;\n #nodes: ReceiverNodes | null = null;\n // NOTE Replaced grid stand-ins. update() runs mid-render, so the next update() disposes them.\n #retired: StorageBufferAttribute[] = [];\n\n constructor(light: VDBFrameEmissionLight | null = null) {\n super(light as never);\n // NOTE The core update runs before the first lit mesh of each render, as shadow maps\n const render = vdbFrameRenderUpdateType();\n (this as unknown as { updateType: string; updateBeforeType: string }).updateType = render;\n (this as unknown as { updateType: string; updateBeforeType: string }).updateBeforeType = render;\n }\n\n private get emissionLight(): VDBFrameEmissionLight {\n return (this as unknown as { light: VDBFrameEmissionLight }).light;\n }\n\n /** The probe stack and grid bound now (null before the first receiver build); tests and harnesses. @internal */\n get bound(): { texture: GPUTexture | null; grid: GPUBuffer; placeholder: boolean } | null {\n const nodes = this.#nodes;\n if (!nodes) return null;\n return { texture: this.emissionLight.coreBinding.gpu, grid: nodes.gridBuffer, placeholder: nodes.gridBuffer === nodes.placeholders.grid };\n }\n\n override updateBefore(frame: never): boolean | undefined {\n const { renderer, scene, camera } = frame as { renderer: object; scene: THREE.Scene; camera: THREE.Camera };\n // NOTE No update while three precompiles materials (compileAsync), as shadow maps\n if (vdbFramePrecompiling(renderer)) return undefined;\n this.emissionLight.updateProbes(renderer, scene, camera);\n return undefined;\n }\n\n override update(frame: never): boolean | undefined {\n super.update(frame);\n this.#retired.forEach((a) => a.dispose());\n this.#retired.length = 0;\n this.#bind(this.emissionLight.coreProbes);\n return undefined;\n }\n\n /**\n * Points the nodes at the core's probes (null: the placeholders). A new core object gets a new stand-in as the node's\n * `value` and bumps this node's `version`, so the receivers rebuild at their next render (see the file comment).\n */\n #bind(probes: VDBFrameEmissionProbes | null): void {\n const nodes = this.#nodes;\n if (!nodes) return;\n const p = nodes.placeholders;\n let changed = false;\n const binding = this.emissionLight.coreBinding;\n if (binding.set(probes?.texture ?? p.texture)) {\n nodes.probes.value = binding.texture;\n changed = true;\n }\n const grid = probes?.grid ?? p.grid;\n if (grid !== nodes.gridBuffer) {\n this.#retired.push(nodes.grid.value as StorageBufferAttribute);\n nodes.grid.value = vdbThreeStorageStandIn(nodes.renderer, grid, `vdbEmissionGrid${this.k}`);\n nodes.gridBuffer = grid;\n changed = true;\n }\n if (changed) (this as unknown as { needsUpdate: boolean }).needsUpdate = true;\n }\n\n #nodesOf(renderer: object): ReceiverNodes {\n if (this.#nodes) {\n if (this.#nodes.renderer === renderer) return this.#nodes;\n throw new Error(\"VDBFrameEmissionLight: its receivers were built by a second renderer; a light (and its scene) belongs to one renderer\");\n }\n // NOTE The rebuild on a new core object needs three's lights cache key to follow this node's version (internal 1)\n vdbFrameCheckLightReset();\n const device = getDevice(renderer as never);\n vdbCoreTextureSelfTest(renderer as never, device);\n const placeholders: Placeholders = {\n texture: device.createTexture({ label: \"@pmndrs/vdb/three emission probes placeholder\", size: [1, 1, 1], dimension: \"3d\", format: \"rgba16float\", usage: 0x04 /* TEXTURE_BINDING */ }),\n // A zero grid: info.x (cascades) 0, so vdbEmissionIrradiance returns 0 without sampling\n grid: device.createBuffer({ label: \"@pmndrs/vdb/three emission grid placeholder\", size: VDB_EMISSION_GRID.size, usage: 0x80 /* STORAGE */ }),\n };\n const light = this.emissionLight;\n const probes = light.coreProbes;\n light.coreBinding.set(probes?.texture ?? placeholders.texture);\n const gridBuffer = probes?.grid ?? placeholders.grid;\n const grid = storage(vdbThreeStorageStandIn(renderer, gridBuffer, `vdbEmissionGrid${this.k}`), \"uvec4\", GRID_WORDS).toReadOnly() as VDBFrameStorageNode;\n grid.setName(`vdbEmissionGrid${this.k}`);\n const loader = new VDBFrameStructLoaderNode(grid, VDB_EMISSION_GRID, `vdbFrameEmissionGrid${this.k}`);\n const name = `vdbFrameEmissionReceiver${this.k}`;\n const source = `fn ${name}(probes: texture_3d<f32>, smp: sampler, world: vec3f, normal: vec3f) -> vec3f {\\n return vdbEmissionIrradiance(probes, smp, ${loader.fnName}(), world, normal);\\n}`;\n const fn = wgslFn(source, [receiverCodeNode(), loader]) as (inputs: Record<string, N>) => N;\n this.#nodes = { renderer, placeholders, probes: texture3D(light.coreBinding.texture), grid, gridBuffer, fn };\n return this.#nodes;\n }\n\n override setup(builder: never): null {\n const b = builder as unknown as { renderer: object; context: { irradiance: N } };\n const nodes = this.#nodesOf(b.renderer);\n const irradiance = nodes.fn({ probes: nodes.probes, smp: sampler(nodes.probes), world: positionWorld, normal: normalWorld });\n const colorNode = (this as unknown as { colorNode: N }).colorNode;\n b.context.irradiance.addAssign(colorNode.mul(irradiance));\n return null;\n }\n\n override dispose(): void {\n const nodes = this.#nodes;\n if (nodes) {\n this.#retired.push(nodes.grid.value as StorageBufferAttribute);\n const p = nodes.placeholders;\n // NOTE A bind group of this render may still name them: destroy after the task that submits it\n setTimeout(() => {\n p.texture.destroy();\n p.grid.destroy();\n }, 0);\n this.#nodes = null;\n }\n this.#retired.forEach((a) => a.dispose());\n this.#retired.length = 0;\n super.dispose();\n }\n}\n\n/** Props of {@link VDBFrameEmissionLight} (his `FrameEmissionLight` props; same names and defaults). */\nexport interface VDBFrameEmissionLightProps {\n /** Light colour (default white). */\n color?: THREE.ColorRepresentation;\n /** Light intensity, a multiplier of the volumes' emitted light (default 1). */\n intensity?: number;\n /** Probes on each axis of each cascade, 2–32 (default 16). */\n resolution?: number;\n /** Size of the last cascade as a multiple of the box of all emitting volumes; past it light falls off with distance² (default 3). */\n range?: number;\n /** 1: one grid for all volumes. Up to 4: finer grids around the camera (default 1). */\n cascades?: number;\n /** The finer cascades cover this distance from the camera (default 512). */\n distance?: number;\n /** Steps of each ray in a volume (default 24). */\n steps?: number;\n}\n\n/** One registration of the light node class (internal 4), checked at the first construction. */\nlet registered = false;\n\n/**\n * Light that lights lit meshes with the emission of emissive `VDBFrameVolume`s (his `FrameEmissionLight`): the core\n * frame renderer of the scene's volumes draws the emitters and the probe cascades; this light's node reads them. Add\n * it to the scene.\n */\nexport class VDBFrameEmissionLight extends THREE.Light {\n /** Type flag. */\n readonly isVDBFrameEmissionLight = true as const;\n\n /** Probes on each axis of each cascade, 2 to 32. */\n resolution: number;\n /** Size of the last cascade as a multiple of the box of all emitting volumes. */\n range: number;\n /** Probe grid cascades, 1 to 4 (1: one grid for all volumes). */\n cascades: number;\n /** Distance from the camera that the finer cascades cover. */\n distance: number;\n /** Steps of each ray in a volume (rounded, at least 1). */\n steps: number;\n\n /** Minimum corner of each cascade in world space (valid for the first `cascadeCount`). */\n readonly cascadeMin = Array.from({ length: maxCascades }, () => new THREE.Vector3());\n /** Size of each cascade in world space (valid for the first `cascadeCount`). */\n readonly cascadeSize = Array.from({ length: maxCascades }, () => new THREE.Vector3(1.0, 1.0, 1.0));\n /** Cascades in use after the last probe update. */\n cascadeCount = 0;\n /** Probes on each axis of each cascade after the last update. */\n probeResolution = 2;\n /** World centre of the probe grid after the last update. */\n readonly probeCenter = new THREE.Vector3();\n /** Emissive volumes in the last update. */\n emitterCount = 0;\n /** Volumes drawn in the last probe update and whether the probes were drawn (not his; tests and timing). */\n readonly lastUpdate = { directions: 0, probes: false };\n /** The core's probes after the last update (null: none). */\n coreProbes: VDBFrameEmissionProbes | null = null;\n /** @internal The stand-in of the core probe stack. */\n readonly coreBinding = new VDBCoreTextureBinding(\"3d\");\n\n /**\n * Makes the light with its probe grid settings.\n * @param props {@link VDBFrameEmissionLightProps}; all fields optional.\n */\n constructor(props: VDBFrameEmissionLightProps = {}) {\n const { color = 0xffffff, intensity = 1.0, resolution = 16, range = 3.0, cascades = 1, distance = 512, steps = 24 } = props;\n super(color, intensity);\n if (!registered) {\n vdbFrameRegisterLightNode(VDBFrameEmissionLight as unknown as typeof THREE.Light, VDBFrameEmissionLightNode);\n registered = true;\n }\n (this as { type: string }).type = \"VDBFrameEmissionLight\";\n // K6.8b: always on, and the light casts no shadow (its node draws none). three r187's lights cache key holds the node\n // version of a castShadow light only; the node bumps it to rebuild its receivers when the core makes new probes.\n Object.defineProperty(this, \"castShadow\", { get: () => true, set: () => {}, configurable: true, enumerable: true });\n this.resolution = resolution;\n this.range = range;\n this.cascades = cascades;\n this.distance = distance;\n this.steps = steps;\n }\n\n /** Steps of each ray, rounded and at least 1. */\n getSteps(): number {\n return Math.max(1, Math.round(this.steps));\n }\n\n /**\n * The core frame of this render (the frame renderer of the scene's first visible volume) draws the emitters and the\n * probes; this light copies the probe grid for its node. The light node calls it before the lit meshes of each render.\n */\n updateProbes(renderer: object, scene: THREE.Object3D, viewCamera: THREE.Camera): void {\n this.lastUpdate.directions = 0;\n this.lastUpdate.probes = false;\n let frameRenderer: VDBFrameRenderer | null = null;\n scene.traverseVisible((object) => {\n const v = object as VDBFrameVolume;\n if (!frameRenderer && v.isVDBFrameVolume) frameRenderer = v.frameRenderer;\n });\n const fr = frameRenderer as VDBFrameRenderer | null;\n fr?.coreFrame(renderer as never, scene as never, viewCamera);\n const probes = fr?.core?.outputs.emissionProbes ?? null;\n this.coreProbes = probes;\n if (!probes) {\n this.emitterCount = 0;\n this.cascadeCount = 0;\n return;\n }\n const { state } = probes;\n this.emitterCount = state.emitters;\n this.cascadeCount = state.count;\n this.probeResolution = state.resolution;\n this.probeCenter.fromArray(state.center as unknown as number[]);\n for (let i = 0; i < state.count; i++) {\n this.cascadeMin[i]!.fromArray(state.min[i] as unknown as number[]);\n this.cascadeSize[i]!.fromArray(state.size[i] as unknown as number[]);\n }\n this.lastUpdate.directions = probes.lastUpdate.directions;\n this.lastUpdate.probes = probes.lastUpdate.probes;\n }\n\n override dispose(): void {\n super.dispose();\n this.coreBinding.dispose();\n }\n}\n"]}
|
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* The froxel renderer in `./three` (K6.8): a thin adapter over the core frame renderer (design §6). `VDBFrameVolume`
|
|
3
|
+
* (his FrameVolume) holds the props; `VDBFrameRenderer` runs the core on three's device and composites; the volume
|
|
4
|
+
* shadow receivers and the emission light read the core's maps and probes.
|
|
4
5
|
*/
|
|
5
6
|
export { VDBFrameVolume } from "./volume.js";
|
|
6
|
-
export type { VDBFrameVolumeProps } from "./volume.js";
|
|
7
|
-
export { VDBFrameRenderer, vdbFrameRenderer
|
|
8
|
-
export type {
|
|
9
|
-
export { VDBFrameShadowDensityMaterial } from "./shadow-density-material.js";
|
|
10
|
-
export { VDBFrameTransmittanceMaterial, frameShadowLightSlots } from "./transmittance-material.js";
|
|
11
|
-
export { VDBFrameDensityMaterial, createDensityShadowUniforms, frameDensityEnvironment } from "./density-material.js";
|
|
12
|
-
export { VDBFrameLightingMaterial } from "./lighting-material.js";
|
|
13
|
-
export { VDBFrameTemporalMaterial } from "./temporal-material.js";
|
|
14
|
-
export { VDBFrameEnvironmentMaterial, VDBFrameEnvironmentMapMaterial } from "./environment-material.js";
|
|
15
|
-
export { VDBFrameEnvironmentGridMaterial } from "./environment-grid-material.js";
|
|
16
|
-
export { VDBFrameGridMipMaterial } from "./grid-mip-material.js";
|
|
17
|
-
export { createNeuralNodes } from "./neural.js";
|
|
18
|
-
export { frameNeuralMipLevels } from "./transmittance-material.js";
|
|
19
|
-
export { VDBFrameInjectMaterial } from "./inject-material.js";
|
|
20
|
-
export type { VDBFrameInjectMaterialOptions } from "./inject-material.js";
|
|
21
|
-
export { VDBFrameIntegrateMaterial } from "./integrate-material.js";
|
|
22
|
-
export { vdbFrameLights, vdbFrameAllLights } from "./lights.js";
|
|
23
|
-
export { getFramePhase, getFramePhaseSpectrum, getFramePhaseAsymmetry, getFrameMultipleScattering, getFrameScatteringOctaves, getFrameTwoSidedDiffusion, getFrameMieTexels, isFrameDiffusion, } from "./phase.js";
|
|
24
|
-
export type { VDBFramePhase, VDBFrameMultipleScattering, VDBFramePhaseSource } from "./phase.js";
|
|
25
|
-
export { getAtlasLayout, getFroxelSize } from "./layout.js";
|
|
7
|
+
export type { VDBFrameVolumeProps, VDBFramePhaseSettings } from "./volume.js";
|
|
8
|
+
export { VDBFrameRenderer, vdbFrameRenderer } from "./renderer.js";
|
|
9
|
+
export type { VDBFramePassHook } from "./renderer.js";
|
|
26
10
|
export { getFrameMediumProps } from "./medium.js";
|
|
27
11
|
export type { VDBFrameMediumVolumeProps } from "./medium.js";
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export type { FrameVolumeRecord, FroxelArea } from "./view.js";
|
|
31
|
-
export * as vdbFrameChunks from "./chunks.js";
|
|
32
|
-
export { VDBFrameVolumeShadows, VDBFrameVolumeShadowNode, frameMaxShadowMapCascades } from "./volume-shadows.js";
|
|
12
|
+
export { frameAngstromExponents, getFrameAngstromExponent } from "./spectrum.js";
|
|
13
|
+
export { VDBFrameVolumeShadowReceivers, VDBFrameVolumeShadowNode } from "./volume-shadows.js";
|
|
33
14
|
export type { VDBFrameShadowEntry } from "./volume-shadows.js";
|
|
34
|
-
export {
|
|
35
|
-
export { VDBFrameEmissionLight, VDBFrameEmissionLightNode, VDBFrameEmissionDirectionMaterial, VDBFrameEmissionReduceMaterial, VDBFrameEmissionProbeMaterial } from "./emission-light.js";
|
|
15
|
+
export { VDBFrameEmissionLight, VDBFrameEmissionLightNode } from "./emission-light.js";
|
|
36
16
|
export type { VDBFrameEmissionLightProps } from "./emission-light.js";
|
|
37
|
-
export {
|
|
38
|
-
export
|
|
17
|
+
export { VDBFrameCoreIntegrateMaterial } from "./core-integrate-material.js";
|
|
18
|
+
export { VDBCoreTextureBinding, vdbCoreTextureSelfTest, vdbCoreTextureStandIn, VDB_THREE_CORE_TEXTURE_SELF_TEST_LABEL } from "./core-textures.js";
|
|
39
19
|
export { vdbFrameCheckLightReset, VDB_FRAME_THREE_REVISION } from "./three-internals.js";
|
|
@@ -1,35 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* The froxel renderer in `./three` (K6.8): a thin adapter over the core frame renderer (design §6). `VDBFrameVolume`
|
|
3
|
+
* (his FrameVolume) holds the props; `VDBFrameRenderer` runs the core on three's device and composites; the volume
|
|
4
|
+
* shadow receivers and the emission light read the core's maps and probes.
|
|
4
5
|
*/
|
|
5
6
|
export { VDBFrameVolume } from "./volume.js";
|
|
6
|
-
export { VDBFrameRenderer, vdbFrameRenderer
|
|
7
|
-
// K3.3: 'frame' lighting passes
|
|
8
|
-
export { VDBFrameShadowDensityMaterial } from "./shadow-density-material.js";
|
|
9
|
-
export { VDBFrameTransmittanceMaterial, frameShadowLightSlots } from "./transmittance-material.js";
|
|
10
|
-
export { VDBFrameDensityMaterial, createDensityShadowUniforms, frameDensityEnvironment } from "./density-material.js";
|
|
11
|
-
export { VDBFrameLightingMaterial } from "./lighting-material.js";
|
|
12
|
-
export { VDBFrameTemporalMaterial } from "./temporal-material.js";
|
|
13
|
-
export { VDBFrameEnvironmentMaterial, VDBFrameEnvironmentMapMaterial } from "./environment-material.js";
|
|
14
|
-
export { VDBFrameEnvironmentGridMaterial } from "./environment-grid-material.js";
|
|
15
|
-
// K3.4: phase functions and multiple scattering (two-sided, octaves, neural)
|
|
16
|
-
export { VDBFrameGridMipMaterial } from "./grid-mip-material.js";
|
|
17
|
-
export { createNeuralNodes } from "./neural.js";
|
|
18
|
-
export { frameNeuralMipLevels } from "./transmittance-material.js";
|
|
19
|
-
export { VDBFrameInjectMaterial } from "./inject-material.js";
|
|
20
|
-
export { VDBFrameIntegrateMaterial } from "./integrate-material.js";
|
|
21
|
-
export { vdbFrameLights, vdbFrameAllLights } from "./lights.js";
|
|
22
|
-
export { getFramePhase, getFramePhaseSpectrum, getFramePhaseAsymmetry, getFrameMultipleScattering, getFrameScatteringOctaves, getFrameTwoSidedDiffusion, getFrameMieTexels, isFrameDiffusion, } from "./phase.js";
|
|
23
|
-
export { getAtlasLayout, getFroxelSize } from "./layout.js";
|
|
24
|
-
// K3.5: spectral media and presets
|
|
7
|
+
export { VDBFrameRenderer, vdbFrameRenderer } from "./renderer.js";
|
|
25
8
|
export { getFrameMediumProps } from "./medium.js";
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
export {
|
|
31
|
-
export { VDBFrameVolumeShadowMaterial, createShadowRayUniforms, frameShadowDepth, frameMaxCastShadowSteps } from "./volume-shadow-material.js";
|
|
32
|
-
export { VDBFrameEmissionLight, VDBFrameEmissionLightNode, VDBFrameEmissionDirectionMaterial, VDBFrameEmissionReduceMaterial, VDBFrameEmissionProbeMaterial } from "./emission-light.js";
|
|
33
|
-
export { vdbFrameBlackbodyEmission, getFrameBlackbodyMap, frameBlackbodyColor } from "./blackbody.js";
|
|
9
|
+
export { frameAngstromExponents, getFrameAngstromExponent } from "./spectrum.js";
|
|
10
|
+
export { VDBFrameVolumeShadowReceivers, VDBFrameVolumeShadowNode } from "./volume-shadows.js";
|
|
11
|
+
export { VDBFrameEmissionLight, VDBFrameEmissionLightNode } from "./emission-light.js";
|
|
12
|
+
export { VDBFrameCoreIntegrateMaterial } from "./core-integrate-material.js";
|
|
13
|
+
export { VDBCoreTextureBinding, vdbCoreTextureSelfTest, vdbCoreTextureStandIn, VDB_THREE_CORE_TEXTURE_SELF_TEST_LABEL } from "./core-textures.js";
|
|
34
14
|
export { vdbFrameCheckLightReset, VDB_FRAME_THREE_REVISION } from "./three-internals.js";
|
|
35
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/three/frame/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/three/frame/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE9F,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,sCAAsC,EAAE,MAAM,oBAAoB,CAAC;AAClJ,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/**\n * The froxel renderer in `./three` (K6.8): a thin adapter over the core frame renderer (design §6). `VDBFrameVolume`\n * (his FrameVolume) holds the props; `VDBFrameRenderer` runs the core on three's device and composites; the volume\n * shadow receivers and the emission light read the core's maps and probes.\n */\nexport { VDBFrameVolume } from \"./volume.js\";\nexport type { VDBFrameVolumeProps, VDBFramePhaseSettings } from \"./volume.js\";\nexport { VDBFrameRenderer, vdbFrameRenderer } from \"./renderer.js\";\nexport type { VDBFramePassHook } from \"./renderer.js\";\nexport { getFrameMediumProps } from \"./medium.js\";\nexport type { VDBFrameMediumVolumeProps } from \"./medium.js\";\nexport { frameAngstromExponents, getFrameAngstromExponent } from \"./spectrum.js\";\nexport { VDBFrameVolumeShadowReceivers, VDBFrameVolumeShadowNode } from \"./volume-shadows.js\";\nexport type { VDBFrameShadowEntry } from \"./volume-shadows.js\";\nexport { VDBFrameEmissionLight, VDBFrameEmissionLightNode } from \"./emission-light.js\";\nexport type { VDBFrameEmissionLightProps } from \"./emission-light.js\";\nexport { VDBFrameCoreIntegrateMaterial } from \"./core-integrate-material.js\";\nexport { VDBCoreTextureBinding, vdbCoreTextureSelfTest, vdbCoreTextureStandIn, VDB_THREE_CORE_TEXTURE_SELF_TEST_LABEL } from \"./core-textures.js\";\nexport { vdbFrameCheckLightReset, VDB_FRAME_THREE_REVISION } from \"./three-internals.js\";\n"]}
|
|
@@ -6,9 +6,21 @@ export interface VDBFrameMediumVolumeProps {
|
|
|
6
6
|
baseColor: THREE.Color;
|
|
7
7
|
/** (1, 1, 1): extinction depends on the scene scale, so a preset does not set it. */
|
|
8
8
|
extinctionScale: THREE.Vector3;
|
|
9
|
+
/**
|
|
10
|
+
* Angstrom exponent of the extinction spectrum (0 is grey).
|
|
11
|
+
*/
|
|
9
12
|
angstromExponent: number;
|
|
13
|
+
/**
|
|
14
|
+
* Phase function of the medium (the renderer's `settings.phase`).
|
|
15
|
+
*/
|
|
10
16
|
phase: VDBFrameMediumPreset["phase"];
|
|
17
|
+
/**
|
|
18
|
+
* Henyey-Greenstein asymmetry `g` of the phase.
|
|
19
|
+
*/
|
|
11
20
|
phaseG: number;
|
|
21
|
+
/**
|
|
22
|
+
* Wavelength exponent of `g` in spectral rendering (the renderer's `settings.phaseGExponent`).
|
|
23
|
+
*/
|
|
12
24
|
phaseGExponent: number;
|
|
13
25
|
}
|
|
14
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"medium.js","sourceRoot":"","sources":["../../../src/three/frame/medium.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,8EAA8E;AAC9E,4GAA4G;AAC5G,6GAA6G;AAC7G,qBAAqB;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAA6B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"medium.js","sourceRoot":"","sources":["../../../src/three/frame/medium.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,8EAA8E;AAC9E,4GAA4G;AAC5G,6GAA6G;AAC7G,qBAAqB;AAErB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAA6B,MAAM,6BAA6B,CAAC;AA0B7F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAoC,EAAE;IACpF,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,SAAS,EAAE,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,oBAAoB,CAAC;QAChF,eAAe,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC;QAC5D,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,cAAc,EAAE,KAAK,CAAC,cAAc;KACrC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Portions derived from mjurczyk/openvdb (MIT), commit 75e7345 (v0.26.0):\n// src/three-openvdb/frame/core/frameMedium.js L78–90 (getFrameMediumProps).\n// Copyright (c) mjurczyk/openvdb contributors. Licensed under the MIT License (see THIRD_PARTY_NOTICES.md).\n// Changes: TypeScript; the preset table is engine-free in `tools/frame/medium.ts` (`vdbFrameMediumPresets`).\n// Divergences: none.\n\nimport * as THREE from \"three\";\nimport { vdbFrameMediumProps, type VDBFrameMediumPreset } from \"../../tools/frame/medium.js\";\n\n/** {@link getFrameMediumProps} result: `VDBFrameVolume` props of a measured medium. */\nexport interface VDBFrameMediumVolumeProps {\n /** Linear albedo. */\n baseColor: THREE.Color;\n /** (1, 1, 1): extinction depends on the scene scale, so a preset does not set it. */\n extinctionScale: THREE.Vector3;\n /**\n * Angstrom exponent of the extinction spectrum (0 is grey).\n */\n angstromExponent: number;\n /**\n * Phase function of the medium (the renderer's `settings.phase`).\n */\n phase: VDBFrameMediumPreset[\"phase\"];\n /**\n * Henyey-Greenstein asymmetry `g` of the phase.\n */\n phaseG: number;\n /**\n * Wavelength exponent of `g` in spectral rendering (the renderer's `settings.phaseGExponent`).\n */\n phaseGExponent: number;\n}\n\n/**\n * `VDBFrameVolume` props of a measured medium (`'cloud'`, `'fog'`, `'ice'`, `'soot'`, `'white-smoke'`,\n * `'dark-smoke'`, `'haze'`, `'dust'`; `@pmndrs/vdb/tools` `vdbFrameMediumPresets`): base colour, extinction\n * scale, Ångström exponent and phase. Use them as constructor props or assign them to a volume, and turn on\n * the renderer's `settings.spectral` (his examples also set the renderer's 'frame' phase to the preset's).\n * Unknown names give null.\n */\nexport const getFrameMediumProps = (name: string): VDBFrameMediumVolumeProps | null => {\n const props = vdbFrameMediumProps(name);\n\n if (!props) {\n return null;\n }\n\n return {\n baseColor: new THREE.Color().setRGB(...props.albedo, THREE.LinearSRGBColorSpace),\n extinctionScale: new THREE.Vector3(...props.extinctionScale),\n angstromExponent: props.angstromExponent,\n phase: props.phase,\n phaseG: props.phaseG,\n phaseGExponent: props.phaseGExponent,\n };\n};\n"]}
|