@luma.gl/engine 10.0.0-rc.1 → 10.0.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/THIRD-PARTY-NOTICES.md +89 -0
- package/dist/animation/animation-track.d.ts +7 -0
- package/dist/animation/animation-track.d.ts.map +1 -1
- package/dist/animation/animation-track.js.map +1 -1
- package/dist/animation/node-animation-binding.cjs +1 -0
- package/dist/animation/node-animation-binding.d.ts +2 -1
- package/dist/animation/node-animation-binding.d.ts.map +1 -1
- package/dist/animation/node-animation-binding.js +6 -0
- package/dist/animation/node-animation-binding.js.map +1 -1
- package/dist/animation/scenegraph-gpu-animation-layout.cjs +99 -0
- package/dist/animation/scenegraph-gpu-animation-layout.d.ts +69 -0
- package/dist/animation/scenegraph-gpu-animation-layout.d.ts.map +1 -0
- package/dist/animation/scenegraph-gpu-animation-layout.js +90 -0
- package/dist/animation/scenegraph-gpu-animation-layout.js.map +1 -0
- package/dist/animation/scenegraph-gpu-animation.cjs +281 -0
- package/dist/animation/scenegraph-gpu-animation.d.ts +54 -0
- package/dist/animation/scenegraph-gpu-animation.d.ts.map +1 -0
- package/dist/animation/scenegraph-gpu-animation.js +274 -0
- package/dist/animation/scenegraph-gpu-animation.js.map +1 -0
- package/dist/arrow/arrow-picking.cjs +4 -3
- package/dist/arrow/arrow-picking.d.ts +15 -5
- package/dist/arrow/arrow-picking.d.ts.map +1 -1
- package/dist/arrow/arrow-picking.js +16 -5
- package/dist/arrow/arrow-picking.js.map +1 -1
- package/dist/arrow/index.cjs.map +1 -1
- package/dist/dist.dev.js +1735 -1100
- package/dist/dist.min.js +69 -70
- package/dist/effects/glfx-effects.cjs +261 -0
- package/dist/effects/glfx-effects.d.ts +959 -0
- package/dist/effects/glfx-effects.d.ts.map +1 -0
- package/dist/effects/glfx-effects.js +200 -0
- package/dist/effects/glfx-effects.js.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.cjs +461 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts +127 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.js +474 -0
- package/dist/effects/graph/gpu-effect-operation.js.map +1 -0
- package/dist/effects/graph/temporal-graph-history.cjs +48 -0
- package/dist/effects/graph/temporal-graph-history.d.ts +17 -0
- package/dist/effects/graph/temporal-graph-history.d.ts.map +1 -0
- package/dist/effects/graph/temporal-graph-history.js +30 -0
- package/dist/effects/graph/temporal-graph-history.js.map +1 -0
- package/dist/effects/index.cjs +179 -34
- package/dist/effects/index.cjs.map +3 -3
- package/dist/effects/index.d.ts +64 -27
- package/dist/effects/index.d.ts.map +1 -1
- package/dist/effects/index.js +51 -18
- package/dist/effects/index.js.map +1 -1
- package/dist/effects/passes/postprocessing/detail/detail-blur.cjs +95 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts +126 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js +63 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.cjs +80 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts +183 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js +59 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.cjs +81 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts +163 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js +57 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.cjs +73 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts +43 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js +46 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js.map +1 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.cjs +9 -2
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts +19 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js +6 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
- package/dist/effects/passes/postprocessing/grading/curves.cjs +91 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts +54 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/curves.js +73 -0
- package/dist/effects/passes/postprocessing/grading/curves.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.cjs +71 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts +76 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js +50 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.cjs +160 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts +232 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js +138 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.cjs +84 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.cjs +106 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts +105 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.cjs +327 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts +201 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js +296 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.cjs +85 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js +59 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.cjs +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts +27 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js +45 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.cjs +64 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts +48 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js +42 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.cjs +110 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts +214 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.cjs +62 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts +47 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js +40 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.cjs +9 -2
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts +41 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js +6 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.cjs +200 -13
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +993 -7
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js +199 -10
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts +4 -4
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.cjs +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts +7 -7
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.cjs +79 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts +59 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js +63 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.js.map +1 -1
- package/dist/effects/passes/postprocessing/layer-styles/bevel.cjs +100 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts +73 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js +78 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.cjs +180 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts +152 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js +157 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.cjs +67 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts +181 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js +52 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.cjs +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js +119 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.cjs +104 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts +43 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js +69 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.cjs +64 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts +190 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js +49 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.cjs +279 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts +95 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.js +253 -0
- package/dist/effects/passes/postprocessing/smaa.js.map +1 -0
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.cjs +41 -40
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts +116 -8
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js +38 -37
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.cjs +101 -70
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +496 -5
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +97 -65
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.cjs +7 -0
- package/dist/effects/passes/screen-space/copy-pass.d.ts +1 -0
- package/dist/effects/passes/screen-space/copy-pass.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.js +4 -0
- package/dist/effects/passes/screen-space/copy-pass.js.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.cjs +7 -5
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +21 -19
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.js +5 -3
- package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/dof.cjs +16 -7
- package/dist/effects/passes/screen-space/dof.d.ts +63 -4
- package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/dof.js +12 -4
- package/dist/effects/passes/screen-space/dof.js.map +1 -1
- package/dist/effects/passes/screen-space/gtao.cjs +93 -64
- package/dist/effects/passes/screen-space/gtao.d.ts +642 -6
- package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/gtao.js +94 -62
- package/dist/effects/passes/screen-space/gtao.js.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.cjs +103 -79
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts +226 -4
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js +102 -77
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.cjs +14 -0
- package/dist/effects/passes/screen-space/height-fog.d.ts +71 -0
- package/dist/effects/passes/screen-space/height-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.js +16 -3
- package/dist/effects/passes/screen-space/height-fog.js.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.cjs +7 -8
- package/dist/effects/passes/screen-space/motion-blur.d.ts +41 -2
- package/dist/effects/passes/screen-space/motion-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.js +6 -6
- package/dist/effects/passes/screen-space/motion-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/outlines.cjs +143 -18
- package/dist/effects/passes/screen-space/outlines.d.ts +163 -4
- package/dist/effects/passes/screen-space/outlines.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/outlines.js +137 -15
- package/dist/effects/passes/screen-space/outlines.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.cjs +82 -63
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +333 -5
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js +81 -61
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.cjs +165 -85
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +802 -10
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.js +162 -81
- package/dist/effects/passes/screen-space/screen-space-reflections.js.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.cjs +12 -2
- package/dist/effects/passes/screen-space/selection-outline.d.ts +44 -0
- package/dist/effects/passes/screen-space/selection-outline.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.js +9 -0
- package/dist/effects/passes/screen-space/selection-outline.js.map +1 -1
- package/dist/effects/passes/screen-space/ssao.cjs +66 -43
- package/dist/effects/passes/screen-space/ssao.d.ts +648 -3
- package/dist/effects/passes/screen-space/ssao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssao.js +64 -41
- package/dist/effects/passes/screen-space/ssao.js.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.cjs +42 -30
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts +107 -6
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.js +40 -27
- package/dist/effects/passes/screen-space/temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-frame.cjs +34 -0
- package/dist/effects/passes/screen-space/temporal-frame.d.ts +23 -0
- package/dist/effects/passes/screen-space/temporal-frame.d.ts.map +1 -0
- package/dist/effects/passes/screen-space/temporal-frame.js +16 -0
- package/dist/effects/passes/screen-space/temporal-frame.js.map +1 -0
- package/dist/effects/passes/screen-space/volumetric-fog.cjs +25 -22
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts +162 -3
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.js +27 -21
- package/dist/effects/passes/screen-space/volumetric-fog.js.map +1 -1
- package/dist/effects/scene-effect-attachments.cjs +15 -0
- package/dist/effects/scene-effect-attachments.d.ts +23 -0
- package/dist/effects/scene-effect-attachments.d.ts.map +1 -0
- package/dist/effects/scene-effect-attachments.js +5 -0
- package/dist/effects/scene-effect-attachments.js.map +1 -0
- package/dist/effects/temporal-upscale/index.cjs +40 -0
- package/dist/effects/temporal-upscale/index.d.ts +5 -0
- package/dist/effects/temporal-upscale/index.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/index.js +6 -0
- package/dist/effects/temporal-upscale/index.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-math.cjs +202 -0
- package/dist/effects/temporal-upscale/temporal-math.d.ts +101 -0
- package/dist/effects/temporal-upscale/temporal-math.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-math.js +202 -0
- package/dist/effects/temporal-upscale/temporal-math.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.cjs +353 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts +7 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.js +321 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.cjs +392 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.d.ts +143 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.js +385 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.js.map +1 -0
- package/dist/gltf/gltf/create-gltf-model.cjs +34 -71
- package/dist/gltf/gltf/create-gltf-model.d.ts +3 -0
- package/dist/gltf/gltf/create-gltf-model.d.ts.map +1 -1
- package/dist/gltf/gltf/create-gltf-model.js +40 -74
- package/dist/gltf/gltf/create-gltf-model.js.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.cjs +46 -4
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts +9 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js +54 -4
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js.map +1 -1
- package/dist/gltf/gltf/gltf-animated-crowd.cjs +25 -136
- package/dist/gltf/gltf/gltf-animated-crowd.d.ts +4 -8
- package/dist/gltf/gltf/gltf-animated-crowd.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-animated-crowd.js +27 -139
- package/dist/gltf/gltf/gltf-animated-crowd.js.map +1 -1
- package/dist/gltf/gltf/gltf-animation-nodes.cjs +84 -0
- package/dist/gltf/gltf/gltf-animation-nodes.d.ts +11 -0
- package/dist/gltf/gltf/gltf-animation-nodes.d.ts.map +1 -0
- package/dist/gltf/gltf/gltf-animation-nodes.js +62 -0
- package/dist/gltf/gltf/gltf-animation-nodes.js.map +1 -0
- package/dist/gltf/gltf/gltf-animator.cjs +8 -2
- package/dist/gltf/gltf/gltf-animator.d.ts +6 -1
- package/dist/gltf/gltf/gltf-animator.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-animator.js +10 -2
- package/dist/gltf/gltf/gltf-animator.js.map +1 -1
- package/dist/gltf/gltf/gltf-gpu-animation-controller.cjs +81 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts +9 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts.map +1 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.js +67 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.js.map +1 -0
- package/dist/gltf/gltf/gltf-gpu-animation.cjs +33 -28
- package/dist/gltf/gltf/gltf-gpu-animation.d.ts +7 -26
- package/dist/gltf/gltf/gltf-gpu-animation.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-gpu-animation.js +29 -28
- package/dist/gltf/gltf/gltf-gpu-animation.js.map +1 -1
- package/dist/gltf/index.cjs.map +3 -3
- package/dist/gltf/index.d.ts +2 -2
- package/dist/gltf/index.d.ts.map +1 -1
- package/dist/gltf/index.js.map +1 -1
- package/dist/gltf/parsers/parse-gltf.cjs +4 -2
- package/dist/gltf/parsers/parse-gltf.d.ts +3 -0
- package/dist/gltf/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/parsers/parse-gltf.js +7 -2
- package/dist/gltf/parsers/parse-gltf.js.map +1 -1
- package/dist/graph/models/index.cjs.map +2 -2
- package/dist/graph/physics/index.cjs +5 -0
- package/dist/graph/physics/index.cjs.map +3 -3
- package/dist/graph/physics/index.d.ts +1 -0
- package/dist/graph/physics/index.d.ts.map +1 -1
- package/dist/graph/physics/index.js +1 -0
- package/dist/graph/physics/index.js.map +1 -1
- package/dist/graph/physics/physics-controller-geometry.cjs +21 -0
- package/dist/graph/physics/physics-controller-geometry.d.ts +8 -1
- package/dist/graph/physics/physics-controller-geometry.d.ts.map +1 -1
- package/dist/graph/physics/physics-controller-geometry.js +22 -0
- package/dist/graph/physics/physics-controller-geometry.js.map +1 -1
- package/dist/graph/physics/scenegraph-session.d.ts +1 -1
- package/dist/graph/physics/scenegraph-session.d.ts.map +1 -1
- package/dist/graph/tables/index.cjs.map +2 -2
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/lighting/ambient-occlusion-pass.cjs +47 -28
- package/dist/lighting/ambient-occlusion-pass.d.ts +12 -0
- package/dist/lighting/ambient-occlusion-pass.d.ts.map +1 -1
- package/dist/lighting/ambient-occlusion-pass.js +45 -26
- package/dist/lighting/ambient-occlusion-pass.js.map +1 -1
- package/dist/lighting/clustered-light-grid.cjs +73 -26
- package/dist/lighting/clustered-light-grid.d.ts +38 -5
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
- package/dist/lighting/clustered-light-grid.js +70 -24
- package/dist/lighting/clustered-light-grid.js.map +1 -1
- package/dist/lighting/contact-shadow-composite.cjs +72 -51
- package/dist/lighting/contact-shadow-composite.d.ts +262 -3
- package/dist/lighting/contact-shadow-composite.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-composite.js +72 -50
- package/dist/lighting/contact-shadow-composite.js.map +1 -1
- package/dist/lighting/contact-shadow-pass.cjs +50 -39
- package/dist/lighting/contact-shadow-pass.d.ts +8 -0
- package/dist/lighting/contact-shadow-pass.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-pass.js +47 -37
- package/dist/lighting/contact-shadow-pass.js.map +1 -1
- package/dist/lighting/cortao/cortao-occluder-lookup-table.cjs +96 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts +41 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.js +94 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.js.map +1 -0
- package/dist/lighting/cortao/cortao-parameters.cjs +127 -0
- package/dist/lighting/cortao/cortao-parameters.d.ts +95 -0
- package/dist/lighting/cortao/cortao-parameters.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-parameters.js +122 -0
- package/dist/lighting/cortao/cortao-parameters.js.map +1 -0
- package/dist/lighting/cortao/cortao-pass.cjs +100 -0
- package/dist/lighting/cortao/cortao-pass.d.ts +33 -0
- package/dist/lighting/cortao/cortao-pass.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-pass.js +84 -0
- package/dist/lighting/cortao/cortao-pass.js.map +1 -0
- package/dist/lighting/cortao/cortao-passes.cjs +42 -0
- package/dist/lighting/cortao/cortao-passes.d.ts +38 -0
- package/dist/lighting/cortao/cortao-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-passes.js +19 -0
- package/dist/lighting/cortao/cortao-passes.js.map +1 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.cjs +606 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts +49 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.js +610 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.js.map +1 -0
- package/dist/lighting/cortao/cortao-shaders.cjs +667 -0
- package/dist/lighting/cortao/cortao-shaders.d.ts +118 -0
- package/dist/lighting/cortao/cortao-shaders.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-shaders.js +657 -0
- package/dist/lighting/cortao/cortao-shaders.js.map +1 -0
- package/dist/lighting/cortao/cortao-upsample.cjs +191 -0
- package/dist/lighting/cortao/cortao-upsample.d.ts +16 -0
- package/dist/lighting/cortao/cortao-upsample.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-upsample.js +159 -0
- package/dist/lighting/cortao/cortao-upsample.js.map +1 -0
- package/dist/lighting/cortao/cortao-webgl-passes.cjs +229 -0
- package/dist/lighting/cortao/cortao-webgl-passes.d.ts +28 -0
- package/dist/lighting/cortao/cortao-webgl-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-webgl-passes.js +212 -0
- package/dist/lighting/cortao/cortao-webgl-passes.js.map +1 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.cjs +348 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.d.ts +31 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.js +335 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.js.map +1 -0
- package/dist/lighting/index.cjs +13 -2
- package/dist/lighting/index.cjs.map +3 -3
- package/dist/lighting/index.d.ts +12 -7
- package/dist/lighting/index.d.ts.map +1 -1
- package/dist/lighting/index.js +6 -5
- package/dist/lighting/index.js.map +1 -1
- package/dist/lighting/shadow-map-renderer.cjs +40 -37
- package/dist/lighting/shadow-map-renderer.d.ts +15 -0
- package/dist/lighting/shadow-map-renderer.d.ts.map +1 -1
- package/dist/lighting/shadow-map-renderer.js +37 -35
- package/dist/lighting/shadow-map-renderer.js.map +1 -1
- package/dist/model/gpu-vector-model.cjs +39 -16
- package/dist/model/gpu-vector-model.d.ts +8 -0
- package/dist/model/gpu-vector-model.d.ts.map +1 -1
- package/dist/model/gpu-vector-model.js +46 -18
- package/dist/model/gpu-vector-model.js.map +1 -1
- package/dist/passes/effect-renderer.cjs +190 -0
- package/dist/passes/effect-renderer.d.ts +182 -0
- package/dist/passes/effect-renderer.d.ts.map +1 -0
- package/dist/passes/effect-renderer.js +182 -0
- package/dist/passes/effect-renderer.js.map +1 -0
- package/dist/passes/{shader-pass-renderer.cjs → fullscreen-effect-executor.cjs} +131 -94
- package/dist/passes/fullscreen-effect-executor.d.ts +188 -0
- package/dist/passes/fullscreen-effect-executor.d.ts.map +1 -0
- package/dist/passes/{shader-pass-renderer.js → fullscreen-effect-executor.js} +132 -100
- package/dist/passes/fullscreen-effect-executor.js.map +1 -0
- package/dist/passes/fullscreen-effect-module.cjs +15 -0
- package/dist/passes/fullscreen-effect-module.d.ts +47 -0
- package/dist/passes/fullscreen-effect-module.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-module.js +5 -0
- package/dist/passes/fullscreen-effect-module.js.map +1 -0
- package/dist/passes/fullscreen-effect-plan.cjs +15 -0
- package/dist/passes/fullscreen-effect-plan.d.ts +49 -0
- package/dist/passes/fullscreen-effect-plan.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-plan.js +5 -0
- package/dist/passes/fullscreen-effect-plan.js.map +1 -0
- package/dist/passes/get-fragment-shader.cjs +3 -0
- package/dist/passes/get-fragment-shader.d.ts +2 -2
- package/dist/passes/get-fragment-shader.d.ts.map +1 -1
- package/dist/passes/get-fragment-shader.js +3 -0
- package/dist/passes/get-fragment-shader.js.map +1 -1
- package/dist/passes/scene-capture-pass.cjs +42 -0
- package/dist/passes/scene-capture-pass.d.ts +29 -0
- package/dist/passes/scene-capture-pass.d.ts.map +1 -0
- package/dist/passes/scene-capture-pass.js +21 -0
- package/dist/passes/scene-capture-pass.js.map +1 -0
- package/dist/scenegraph/model-node.cjs +2 -0
- package/dist/scenegraph/model-node.d.ts +4 -0
- package/dist/scenegraph/model-node.d.ts.map +1 -1
- package/dist/scenegraph/model-node.js +2 -0
- package/dist/scenegraph/model-node.js.map +1 -1
- package/dist/shader-inputs.cjs +1 -1
- package/dist/shader-inputs.d.ts +1 -1
- package/dist/shader-inputs.js +1 -1
- package/dist/splats/gpu-paged-splat-renderer.cjs +52 -8
- package/dist/splats/gpu-paged-splat-renderer.d.ts +16 -3
- package/dist/splats/gpu-paged-splat-renderer.d.ts.map +1 -1
- package/dist/splats/gpu-paged-splat-renderer.js +55 -9
- package/dist/splats/gpu-paged-splat-renderer.js.map +1 -1
- package/dist/splats/gpu-paged-splat-shaders.cjs +3 -1
- package/dist/splats/gpu-paged-splat-shaders.d.ts.map +1 -1
- package/dist/splats/gpu-paged-splat-shaders.js +3 -1
- package/dist/splats/gpu-paged-splat-shaders.js.map +1 -1
- package/dist/splats/index.cjs.map +2 -2
- package/dist/text/fonts/atlas/browser-font-atlas.cjs +10 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts +4 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.js +11 -2
- package/dist/text/fonts/atlas/browser-font-atlas.js.map +1 -1
- package/dist/text/fonts/atlas/lru-cache.cjs +4 -0
- package/dist/text/fonts/atlas/lru-cache.d.ts +3 -1
- package/dist/text/fonts/atlas/lru-cache.d.ts.map +1 -1
- package/dist/text/fonts/atlas/lru-cache.js +4 -0
- package/dist/text/fonts/atlas/lru-cache.js.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.cjs +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.js +4 -2
- package/dist/text/fonts/build-sdf-font-atlas.js.map +1 -1
- package/dist/text/fonts/index.cjs +4 -0
- package/dist/text/fonts/index.cjs.map +1 -1
- package/dist/text/fonts/index.d.ts +1 -1
- package/dist/text/fonts/index.d.ts.map +1 -1
- package/dist/text/fonts/index.js +1 -1
- package/dist/text/fonts/index.js.map +1 -1
- package/dist/text/index.cjs.map +1 -1
- package/dist/utils/shader-module-utils.cjs +3 -0
- package/dist/utils/shader-module-utils.d.ts.map +1 -1
- package/dist/utils/shader-module-utils.js +3 -0
- package/dist/utils/shader-module-utils.js.map +1 -1
- package/licenses/smaa.txt +24 -0
- package/package.json +8 -8
- package/src/animation/animation-track.ts +5 -0
- package/src/animation/node-animation-binding.ts +9 -8
- package/src/animation/scenegraph-gpu-animation-layout.ts +195 -0
- package/src/animation/scenegraph-gpu-animation.ts +340 -0
- package/src/arrow/arrow-picking.ts +23 -11
- package/src/effects/README.md +40 -16
- package/src/effects/glfx-effects.ts +227 -0
- package/src/effects/graph/gpu-effect-operation.ts +720 -0
- package/src/effects/graph/temporal-graph-history.ts +46 -0
- package/src/effects/index.ts +161 -28
- package/src/effects/passes/postprocessing/detail/detail-blur.ts +77 -0
- package/src/effects/passes/postprocessing/detail/high-pass.ts +86 -0
- package/src/effects/passes/postprocessing/detail/local-contrast.ts +79 -0
- package/src/effects/passes/postprocessing/detail/unsharp-mask.ts +56 -0
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +10 -2
- package/src/effects/passes/postprocessing/grading/curves.ts +83 -0
- package/src/effects/passes/postprocessing/grading/lift-gamma-gain.ts +68 -0
- package/src/effects/passes/postprocessing/grading/shadows-highlights.ts +169 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.ts +68 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/denoise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/huesaturation.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/levels.ts +111 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.ts +347 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/noise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/output-dithering.ts +69 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.ts +67 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/persistence.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/posterize.ts +52 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/sepia.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/sharpen.ts +112 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/threshold.ts +50 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +10 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vibrance.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vignette.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +233 -29
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +7 -7
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.ts +13 -11
- package/src/effects/passes/postprocessing/image-blur-filters/bloom.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/gaussianblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/tiltshift.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/triangleblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/zoomblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/colorhalftone.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/dotscreen.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/edgework.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/ink.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/magnify.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/bulgepinch.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/displacement-map.ts +74 -0
- package/src/effects/passes/postprocessing/image-warp-filters/swirl.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/warp.ts +2 -2
- package/src/effects/passes/postprocessing/layer-styles/bevel.ts +92 -0
- package/src/effects/passes/postprocessing/layer-styles/drop-shadow.ts +176 -0
- package/src/effects/passes/postprocessing/optical/lens-flare.ts +64 -0
- package/src/effects/passes/postprocessing/optical/light-shafts.ts +139 -0
- package/src/effects/passes/postprocessing/optical/optical-textures.ts +74 -0
- package/src/effects/passes/postprocessing/optical/selective-glow.ts +62 -0
- package/src/effects/passes/postprocessing/smaa.ts +265 -0
- package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +47 -47
- package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +113 -77
- package/src/effects/passes/screen-space/copy-pass.ts +6 -2
- package/src/effects/passes/screen-space/depth-aware-blur.ts +9 -6
- package/src/effects/passes/screen-space/dof.ts +26 -8
- package/src/effects/passes/screen-space/gtao.ts +110 -74
- package/src/effects/passes/screen-space/hdr-auto-exposure.ts +114 -89
- package/src/effects/passes/screen-space/height-fog.ts +21 -6
- package/src/effects/passes/screen-space/motion-blur.ts +9 -8
- package/src/effects/passes/screen-space/outlines.ts +145 -19
- package/src/effects/passes/screen-space/screen-space-global-illumination.ts +95 -73
- package/src/effects/passes/screen-space/screen-space-reflections.ts +179 -104
- package/src/effects/passes/screen-space/selection-outline.ts +13 -2
- package/src/effects/passes/screen-space/ssao.ts +79 -48
- package/src/effects/passes/screen-space/ssr-camera-temporal.ts +4 -4
- package/src/effects/passes/screen-space/temporal-antialiasing.ts +45 -35
- package/src/effects/passes/screen-space/temporal-frame.ts +33 -0
- package/src/effects/passes/screen-space/volumetric-fog.ts +32 -26
- package/src/effects/scene-effect-attachments.ts +26 -0
- package/src/effects/temporal-upscale/index.ts +20 -0
- package/src/effects/temporal-upscale/temporal-math.ts +308 -0
- package/src/effects/temporal-upscale/temporal-upscale-shaders.ts +326 -0
- package/src/effects/temporal-upscale/temporal-upscaler.ts +538 -0
- package/src/gltf/gltf/create-gltf-model.ts +59 -90
- package/src/gltf/gltf/create-scenegraph-from-gltf.ts +71 -5
- package/src/gltf/gltf/gltf-animated-crowd.ts +30 -177
- package/src/gltf/gltf/gltf-animation-nodes.ts +82 -0
- package/src/gltf/gltf/gltf-animator.ts +15 -4
- package/src/gltf/gltf/gltf-gpu-animation-controller.ts +88 -0
- package/src/gltf/gltf/gltf-gpu-animation.ts +53 -60
- package/src/gltf/index.ts +5 -0
- package/src/gltf/parsers/parse-gltf.ts +12 -2
- package/src/graph/physics/index.ts +4 -0
- package/src/graph/physics/physics-controller-geometry.ts +33 -1
- package/src/index.ts +28 -6
- package/src/lighting/ambient-occlusion-pass.ts +62 -28
- package/src/lighting/clustered-light-grid.ts +89 -40
- package/src/lighting/contact-shadow-composite.ts +80 -52
- package/src/lighting/contact-shadow-pass.ts +59 -39
- package/src/lighting/cortao/cortao-occluder-lookup-table.ts +138 -0
- package/src/lighting/cortao/cortao-parameters.ts +218 -0
- package/src/lighting/cortao/cortao-pass.ts +136 -0
- package/src/lighting/cortao/cortao-passes.ts +50 -0
- package/src/lighting/cortao/cortao-shaders-wgsl.ts +633 -0
- package/src/lighting/cortao/cortao-shaders.ts +674 -0
- package/src/lighting/cortao/cortao-upsample.ts +177 -0
- package/src/lighting/cortao/cortao-webgl-passes.ts +284 -0
- package/src/lighting/cortao/cortao-webgpu-passes.ts +430 -0
- package/src/lighting/index.ts +13 -5
- package/src/lighting/shadow-map-renderer.ts +57 -43
- package/src/model/gpu-vector-model.ts +47 -18
- package/src/passes/effect-renderer.ts +404 -0
- package/src/passes/{shader-pass-renderer.ts → fullscreen-effect-executor.ts} +270 -181
- package/src/passes/fullscreen-effect-module.ts +71 -0
- package/src/passes/fullscreen-effect-plan.ts +59 -0
- package/src/passes/get-fragment-shader.ts +7 -2
- package/src/passes/scene-capture-pass.ts +51 -0
- package/src/scenegraph/model-node.ts +5 -0
- package/src/shader-inputs.ts +1 -1
- package/src/splats/gpu-paged-splat-renderer.ts +77 -9
- package/src/splats/gpu-paged-splat-shaders.ts +7 -1
- package/src/text/fonts/atlas/browser-font-atlas.ts +13 -2
- package/src/text/fonts/atlas/lru-cache.ts +6 -1
- package/src/text/fonts/build-sdf-font-atlas.ts +4 -2
- package/src/text/fonts/index.ts +2 -0
- package/src/utils/shader-module-utils.ts +3 -0
- package/dist/passes/shader-pass-renderer.d.ts +0 -160
- package/dist/passes/shader-pass-renderer.d.ts.map +0 -1
- package/dist/passes/shader-pass-renderer.js.map +0 -1
|
@@ -29,6 +29,14 @@ import {gpuAnimation, pbrMaterial, skin} from '@luma.gl/shaders';
|
|
|
29
29
|
import type {NumericArray} from '@math.gl/core/types';
|
|
30
30
|
import {type ParsedPBRMaterial} from '../pbr/pbr-material';
|
|
31
31
|
import type {GLTFCrowdGPUAnimationLayout} from './gltf-gpu-animation';
|
|
32
|
+
import {
|
|
33
|
+
getScenegraphGPUAnimationFrameStride,
|
|
34
|
+
type ScenegraphGPUAnimationModelOptions
|
|
35
|
+
} from '../../animation/scenegraph-gpu-animation-layout';
|
|
36
|
+
import {
|
|
37
|
+
createScenegraphGPUAnimationStorage,
|
|
38
|
+
ScenegraphGPUAnimationResources
|
|
39
|
+
} from '../../animation/scenegraph-gpu-animation';
|
|
32
40
|
|
|
33
41
|
const SHADER = /* WGSL */ `
|
|
34
42
|
struct VertexInputs {
|
|
@@ -499,6 +507,8 @@ export type CreateGLTFModelOptions = {
|
|
|
499
507
|
material?: Material | null;
|
|
500
508
|
/** Additional model props merged into the generated model. */
|
|
501
509
|
modelOptions?: Partial<ModelProps>;
|
|
510
|
+
/** Resolved scenegraph playback requested for an ordinary primitive. */
|
|
511
|
+
scenegraphGPUAnimation?: ScenegraphGPUAnimationModelOptions;
|
|
502
512
|
/** Source primitive bounds before node and optional instance transforms. */
|
|
503
513
|
bounds?: ScenegraphBounds;
|
|
504
514
|
/** Source-authored local transforms for `EXT_mesh_gpu_instancing`. */
|
|
@@ -612,15 +622,19 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
612
622
|
const instanceBufferLayout: BufferLayout[] = [];
|
|
613
623
|
const transformBuffers: Buffer[] = [];
|
|
614
624
|
const transformColumns: Float32Array[] = [];
|
|
615
|
-
const
|
|
616
|
-
|
|
625
|
+
const sceneAnimation = options.scenegraphGPUAnimation;
|
|
626
|
+
const animationLayout = sceneAnimation?.layout || crowd?.gpuAnimation;
|
|
627
|
+
const hasGPUAnimation = Boolean(animationLayout);
|
|
628
|
+
const instanced = Boolean(instanceMatrices || crowd || sceneAnimation);
|
|
629
|
+
if (instanced) {
|
|
617
630
|
for (let columnIndex = 0; columnIndex < 4; columnIndex++) {
|
|
618
|
-
const values = new Float32Array((crowd?.capacity || instanceMatrices?.length ||
|
|
631
|
+
const values = new Float32Array((crowd?.capacity || instanceMatrices?.length || 1) * 4);
|
|
619
632
|
instanceMatrices?.forEach((matrix, instanceIndex) => {
|
|
620
633
|
for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
|
|
621
634
|
values[instanceIndex * 4 + rowIndex] = matrix[columnIndex * 4 + rowIndex];
|
|
622
635
|
}
|
|
623
636
|
});
|
|
637
|
+
if (sceneAnimation) values[columnIndex] = 1;
|
|
624
638
|
const attributeName = `instanceModelMatrixCol${columnIndex}`;
|
|
625
639
|
const buffer = device.createBuffer({
|
|
626
640
|
id: `${id || 'gltf'}-${attributeName}`,
|
|
@@ -635,35 +649,10 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
635
649
|
}
|
|
636
650
|
}
|
|
637
651
|
|
|
638
|
-
let animationParameters: Float32Array | undefined;
|
|
639
|
-
let animationParameterBuffer: Buffer | undefined;
|
|
640
|
-
let animationBlend: Float32Array | undefined;
|
|
641
|
-
let animationBlendBuffer: Buffer | undefined;
|
|
642
|
-
if (crowd && hasGPUAnimation) {
|
|
643
|
-
animationParameters = new Float32Array(crowd.capacity * 4);
|
|
644
|
-
animationBlend = new Float32Array(crowd.capacity * 4);
|
|
645
|
-
for (const [attributeName, values] of [
|
|
646
|
-
['instanceAnimationFrames', animationParameters],
|
|
647
|
-
['instanceAnimationBlend', animationBlend]
|
|
648
|
-
] as const) {
|
|
649
|
-
const buffer = device.createBuffer({
|
|
650
|
-
id: `${id || 'gltf'}-${attributeName}`,
|
|
651
|
-
data: values,
|
|
652
|
-
usage: Buffer.VERTEX | Buffer.COPY_DST
|
|
653
|
-
});
|
|
654
|
-
instanceAttributes[attributeName] = buffer;
|
|
655
|
-
instanceBufferLayout.push({name: attributeName, format: 'float32x4', stepMode: 'instance'});
|
|
656
|
-
managedResources.push(buffer);
|
|
657
|
-
if (attributeName === 'instanceAnimationFrames') {
|
|
658
|
-
animationParameterBuffer = buffer;
|
|
659
|
-
} else {
|
|
660
|
-
animationBlendBuffer = buffer;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
652
|
const hasSkin = Boolean(parsedPPBRMaterial.defines['HAS_SKIN']);
|
|
666
|
-
const hasLargeSkinPalette = Boolean(
|
|
653
|
+
const hasLargeSkinPalette = Boolean(
|
|
654
|
+
usesLargeSkinPalette && hasSkin && !crowd && !hasGPUAnimation
|
|
655
|
+
);
|
|
667
656
|
const hasInstancedSkin = Boolean(crowd && hasSkin && !hasGPUAnimation);
|
|
668
657
|
let skinJointMatrices: Buffer | Texture | undefined;
|
|
669
658
|
let jointMatrices: Float32Array | undefined;
|
|
@@ -713,7 +702,7 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
713
702
|
}
|
|
714
703
|
}
|
|
715
704
|
|
|
716
|
-
morphTargetData =
|
|
705
|
+
morphTargetData = createScenegraphGPUAnimationStorage(
|
|
717
706
|
device,
|
|
718
707
|
`${id || 'gltf'}-crowd-morph-targets`,
|
|
719
708
|
targetValues,
|
|
@@ -726,7 +715,7 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
726
715
|
const packedTargetCount = Math.ceil(morphTargetCount / 4);
|
|
727
716
|
const morphInstanceCount = crowd?.capacity || 1;
|
|
728
717
|
morphWeights = new Float32Array(morphInstanceCount * packedTargetCount * 4);
|
|
729
|
-
morphWeightData =
|
|
718
|
+
morphWeightData = createScenegraphGPUAnimationStorage(
|
|
730
719
|
device,
|
|
731
720
|
`${id || 'gltf'}-crowd-morph-weights`,
|
|
732
721
|
morphWeights,
|
|
@@ -737,22 +726,28 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
737
726
|
}
|
|
738
727
|
}
|
|
739
728
|
|
|
740
|
-
const animationJointCount = hasSkin
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
729
|
+
const animationJointCount = hasSkin
|
|
730
|
+
? sceneAnimation?.jointCount || crowd?.jointsPerInstance || 0
|
|
731
|
+
: 0;
|
|
732
|
+
const animationFrameStride = getScenegraphGPUAnimationFrameStride(
|
|
733
|
+
animationJointCount,
|
|
734
|
+
morphTargetCount
|
|
735
|
+
);
|
|
736
|
+
const animationResources = animationLayout
|
|
737
|
+
? new ScenegraphGPUAnimationResources(
|
|
738
|
+
device,
|
|
739
|
+
animationLayout,
|
|
740
|
+
animationJointCount,
|
|
741
|
+
morphTargetCount,
|
|
742
|
+
crowd?.capacity || 1,
|
|
743
|
+
id
|
|
744
|
+
)
|
|
745
|
+
: undefined;
|
|
746
|
+
const animationFrames = animationResources?.animationFrames;
|
|
747
|
+
if (animationResources) {
|
|
748
|
+
Object.assign(instanceAttributes, animationResources.attributes);
|
|
749
|
+
instanceBufferLayout.push(...animationResources.bufferLayout);
|
|
750
|
+
managedResources.push(animationResources);
|
|
756
751
|
}
|
|
757
752
|
|
|
758
753
|
let source = SHADER;
|
|
@@ -777,16 +772,16 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
777
772
|
modules: [
|
|
778
773
|
pbrMaterial,
|
|
779
774
|
skin,
|
|
780
|
-
...(
|
|
775
|
+
...(animationResources || morphTargetData ? [gpuAnimation] : []),
|
|
781
776
|
...(options.publishedTransforms ? [publishedTransforms] : [])
|
|
782
777
|
],
|
|
783
778
|
...modelOptions,
|
|
784
779
|
|
|
785
|
-
...(
|
|
780
|
+
...(instanced
|
|
786
781
|
? {
|
|
787
782
|
attributes: {...modelOptions.attributes, ...instanceAttributes},
|
|
788
783
|
bufferLayout: [...(modelOptions.bufferLayout || []), ...instanceBufferLayout],
|
|
789
|
-
instanceCount: instanceMatrices?.length || 0,
|
|
784
|
+
instanceCount: sceneAnimation ? 1 : instanceMatrices?.length || 0,
|
|
790
785
|
isInstanced: true
|
|
791
786
|
}
|
|
792
787
|
: {}),
|
|
@@ -794,18 +789,18 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
794
789
|
...parsedPPBRMaterial.defines,
|
|
795
790
|
...(options.publishedTransforms ? {HAS_PUBLISHED_TRANSFORMS: true} : {}),
|
|
796
791
|
...modelOptions.defines,
|
|
797
|
-
...(
|
|
792
|
+
...(instanced ? {HAS_GLTF_INSTANCING: true} : {}),
|
|
798
793
|
...(hasInstancedSkin
|
|
799
794
|
? {HAS_INSTANCED_SKIN: true, CROWD_JOINTS_PER_INSTANCE: crowd!.jointsPerInstance}
|
|
800
795
|
: {}),
|
|
801
796
|
...(hasLargeSkinPalette ? {HAS_LARGE_SKIN: true} : {}),
|
|
802
|
-
...
|
|
803
|
-
? {HAS_GPU_CROWD_ANIMATION: true, CROWD_ANIMATION_FRAME_STRIDE: animationFrameStride}
|
|
804
|
-
: {}),
|
|
797
|
+
...animationResources?.defines,
|
|
805
798
|
...(morphTargetData
|
|
806
799
|
? {HAS_INSTANCED_MORPH: true, CROWD_MORPH_TARGET_COUNT: morphTargetCount}
|
|
807
800
|
: {}),
|
|
808
|
-
...(
|
|
801
|
+
...(animationResources || morphTargetData
|
|
802
|
+
? {CROWD_ANIMATION_JOINT_COUNT: animationJointCount}
|
|
803
|
+
: {})
|
|
809
804
|
},
|
|
810
805
|
parameters: {...parameters, ...parsedPPBRMaterial.parameters, ...modelOptions.parameters}
|
|
811
806
|
};
|
|
@@ -842,13 +837,14 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
842
837
|
if (animationFrames || morphTargetData || morphWeightData) {
|
|
843
838
|
model.shaderInputs.setProps({
|
|
844
839
|
gpuAnimation: {
|
|
845
|
-
...
|
|
840
|
+
...animationResources?.bindings,
|
|
846
841
|
...(morphTargetData ? {gpuMorphTargets: morphTargetData} : {}),
|
|
847
842
|
...(morphWeightData ? {gpuMorphWeights: morphWeightData} : {})
|
|
848
843
|
}
|
|
849
844
|
});
|
|
850
845
|
}
|
|
851
846
|
const modelNode = new ModelNode({
|
|
847
|
+
gpuAnimation: animationResources,
|
|
852
848
|
managedResources,
|
|
853
849
|
model,
|
|
854
850
|
bounds: options.bounds,
|
|
@@ -874,45 +870,18 @@ export function createGLTFModel(device: Device, options: CreateGLTFModelOptions)
|
|
|
874
870
|
morphWeights,
|
|
875
871
|
morphWeightData,
|
|
876
872
|
animationFrames,
|
|
877
|
-
animationFrameValues,
|
|
873
|
+
animationFrameValues: animationResources?.animationFrameValues,
|
|
878
874
|
animationFrameStride,
|
|
879
875
|
animationJointCount,
|
|
880
|
-
animationParameters,
|
|
881
|
-
animationParameterBuffer,
|
|
882
|
-
animationBlend,
|
|
883
|
-
animationBlendBuffer
|
|
876
|
+
animationParameters: animationResources?.animationParameters,
|
|
877
|
+
animationParameterBuffer: animationResources?.animationParameterBuffer,
|
|
878
|
+
animationBlend: animationResources?.animationBlend,
|
|
879
|
+
animationBlendBuffer: animationResources?.animationBlendBuffer
|
|
884
880
|
} satisfies GLTFCrowdModelResources;
|
|
885
881
|
}
|
|
886
882
|
return modelNode;
|
|
887
883
|
}
|
|
888
884
|
|
|
889
|
-
function createGPUAnimationResource(
|
|
890
|
-
device: Device,
|
|
891
|
-
id: string,
|
|
892
|
-
values: Float32Array,
|
|
893
|
-
width: number,
|
|
894
|
-
height: number
|
|
895
|
-
): Buffer | Texture {
|
|
896
|
-
if (device.type === 'webgpu') {
|
|
897
|
-
return device.createBuffer({
|
|
898
|
-
id,
|
|
899
|
-
data: values,
|
|
900
|
-
usage: Buffer.STORAGE | Buffer.COPY_DST
|
|
901
|
-
});
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
const texture = device.createTexture({
|
|
905
|
-
id,
|
|
906
|
-
format: 'rgba32float',
|
|
907
|
-
width,
|
|
908
|
-
height,
|
|
909
|
-
usage: Texture.SAMPLE | Texture.COPY_DST,
|
|
910
|
-
sampler: {minFilter: 'nearest', magFilter: 'nearest', mipmapFilter: 'nearest'}
|
|
911
|
-
});
|
|
912
|
-
texture.writeData(values, {width, height});
|
|
913
|
-
return texture;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
885
|
function isMaterialBindingResource(value: unknown): boolean {
|
|
917
886
|
return (
|
|
918
887
|
value instanceof Buffer ||
|
|
@@ -30,6 +30,15 @@ import {
|
|
|
30
30
|
getGLTFExtensionSupport,
|
|
31
31
|
type GLTFExtensionSupport
|
|
32
32
|
} from './gltf-extension-support';
|
|
33
|
+
import {
|
|
34
|
+
planGLTFCrowdGPUAnimation,
|
|
35
|
+
type GLTFGPUAnimationOptions,
|
|
36
|
+
type GLTFGPUAnimationStats
|
|
37
|
+
} from './gltf-gpu-animation';
|
|
38
|
+
import {
|
|
39
|
+
canUseGLTFSceneGPUAnimation,
|
|
40
|
+
bindGLTFSceneGPUAnimation
|
|
41
|
+
} from './gltf-gpu-animation-controller';
|
|
33
42
|
import {parseGLTFMaterialVariants} from './gltf-material-variants';
|
|
34
43
|
import {parseGLTFBillboards} from './gltf-billboard';
|
|
35
44
|
|
|
@@ -46,6 +55,12 @@ export type GLTFScenegraphBounds = {
|
|
|
46
55
|
recommendedOrbitDistance: number;
|
|
47
56
|
};
|
|
48
57
|
|
|
58
|
+
/** Options for ordinary CPU or baked GPU glTF scene playback. */
|
|
59
|
+
export type CreateGLTFScenegraphsOptions = ParseGLTFOptions & {
|
|
60
|
+
/** Opt-in baked transform, skin, and morph sampling on WebGPU and WebGL 2. */
|
|
61
|
+
gpuAnimation?: GLTFGPUAnimationOptions;
|
|
62
|
+
};
|
|
63
|
+
|
|
49
64
|
/** Scenegraph bundle returned from a parsed glTF asset. */
|
|
50
65
|
export type GLTFScenegraphs = {
|
|
51
66
|
/** Opt-in camera-facing scene traversal using resolved runtime node bindings. */
|
|
@@ -67,6 +82,8 @@ export type GLTFScenegraphs = {
|
|
|
67
82
|
animator: GLTFAnimator;
|
|
68
83
|
/** Parsed source animations, including supported material and texture-transform pointers. */
|
|
69
84
|
animations: GLTFAnimation[];
|
|
85
|
+
/** Actual playback path, baked storage estimate, and optional CPU fallback reason. */
|
|
86
|
+
animationStats: GLTFGPUAnimationStats;
|
|
70
87
|
/** Parsed punctual lights from the asset. */
|
|
71
88
|
lights: Light[];
|
|
72
89
|
/** Updates punctual lights after programmatic transform or visibility changes. */
|
|
@@ -99,7 +116,7 @@ export type GLTFScenegraphs = {
|
|
|
99
116
|
export function createScenegraphsFromGLTF(
|
|
100
117
|
device: Device,
|
|
101
118
|
gltf: GLTFPostprocessed,
|
|
102
|
-
options?:
|
|
119
|
+
options?: CreateGLTFScenegraphsOptions
|
|
103
120
|
): GLTFScenegraphs {
|
|
104
121
|
const metadata = parseGLTFMetadata(gltf);
|
|
105
122
|
if (options?.strictExtensions) {
|
|
@@ -127,6 +144,29 @@ export function createScenegraphsFromGLTF(
|
|
|
127
144
|
);
|
|
128
145
|
validation.destroy();
|
|
129
146
|
}
|
|
147
|
+
const animations = parseGLTFAnimations(gltf);
|
|
148
|
+
const animationPlan = options?.gpuAnimation
|
|
149
|
+
? planGLTFCrowdGPUAnimation(gltf, options.gpuAnimation, device)
|
|
150
|
+
: null;
|
|
151
|
+
if (
|
|
152
|
+
animationPlan?.layout &&
|
|
153
|
+
(!canUseGLTFSceneGPUAnimation(gltf, animations) ||
|
|
154
|
+
animationPlan.layout.clips.length !== animations.length ||
|
|
155
|
+
new Set(animations.map(animation => animation.name)).size !== animations.length)
|
|
156
|
+
) {
|
|
157
|
+
animationPlan.layout = null;
|
|
158
|
+
animationPlan.fallbackReason = 'unsupported-scene';
|
|
159
|
+
}
|
|
160
|
+
const layout = animationPlan?.layout;
|
|
161
|
+
const parseOptions = layout
|
|
162
|
+
? {
|
|
163
|
+
...options,
|
|
164
|
+
scenegraphGPUAnimation: {
|
|
165
|
+
layout,
|
|
166
|
+
jointCount: Math.max(0, ...(gltf.skins || []).map(skin => skin.joints.length))
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
: options;
|
|
130
170
|
|
|
131
171
|
const {
|
|
132
172
|
scenes,
|
|
@@ -136,7 +176,7 @@ export function createScenegraphsFromGLTF(
|
|
|
136
176
|
gltfNodeIndexToNodeMap,
|
|
137
177
|
generatedTextures,
|
|
138
178
|
materialInstances
|
|
139
|
-
} = parseGLTF(device, gltf,
|
|
179
|
+
} = parseGLTF(device, gltf, parseOptions);
|
|
140
180
|
|
|
141
181
|
const billboards = options?.billboards
|
|
142
182
|
? new BillboardController(
|
|
@@ -188,7 +228,6 @@ export function createScenegraphsFromGLTF(
|
|
|
188
228
|
|
|
189
229
|
const jointDeclarations = parseGLTFJointDeclarations(gltf, gltfNodeIndexToNodeMap);
|
|
190
230
|
const joints = new JointController(jointDeclarations.declarations.map(item => item.joint));
|
|
191
|
-
const animations = parseGLTFAnimations(gltf);
|
|
192
231
|
const sourceLights =
|
|
193
232
|
(gltf as GLTFPostprocessed & {lights?: PunctualLightDefinition[]}).lights ||
|
|
194
233
|
(gltf.extensions?.['KHR_lights_punctual']?.['lights'] as
|
|
@@ -223,7 +262,8 @@ export function createScenegraphsFromGLTF(
|
|
|
223
262
|
animations,
|
|
224
263
|
gltfNodeIdToNodeMap,
|
|
225
264
|
materials,
|
|
226
|
-
materialInstances
|
|
265
|
+
materialInstances,
|
|
266
|
+
...(layout ? {autoplay: 'first', evaluateNodeTransforms: false} : {})
|
|
227
267
|
});
|
|
228
268
|
const variants = new MaterialVariants(parseGLTFMaterialVariants(gltf, scenes));
|
|
229
269
|
const extensionSupport = getGLTFExtensionSupport(gltf, device);
|
|
@@ -284,7 +324,15 @@ export function createScenegraphsFromGLTF(
|
|
|
284
324
|
generatedTextures.clear();
|
|
285
325
|
};
|
|
286
326
|
|
|
287
|
-
|
|
327
|
+
const morphModels = new Set<ModelNode>();
|
|
328
|
+
for (const scene of scenes) {
|
|
329
|
+
scene.preorderTraversal(node => {
|
|
330
|
+
if (node instanceof ModelNode && node.userData['morphTargets']) {
|
|
331
|
+
morphModels.add(node);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
const scenegraphs: GLTFScenegraphs = {
|
|
288
336
|
metadata,
|
|
289
337
|
scenes,
|
|
290
338
|
materials,
|
|
@@ -295,6 +343,15 @@ export function createScenegraphsFromGLTF(
|
|
|
295
343
|
cameras,
|
|
296
344
|
animator,
|
|
297
345
|
animations,
|
|
346
|
+
animationStats: {
|
|
347
|
+
mode: layout ? 'gpu' : 'cpu',
|
|
348
|
+
...(layout ? {sampleRate: layout.sampleRate} : {}),
|
|
349
|
+
frameCount: layout?.frameCount || 0,
|
|
350
|
+
clipCount: layout?.clips.length || 0,
|
|
351
|
+
morphGroupCount: morphModels.size,
|
|
352
|
+
estimatedByteLength: animationPlan?.estimatedByteLength || 0,
|
|
353
|
+
...(animationPlan?.fallbackReason ? {fallbackReason: animationPlan.fallbackReason} : {})
|
|
354
|
+
},
|
|
298
355
|
lights,
|
|
299
356
|
punctualLights,
|
|
300
357
|
extensionSupport,
|
|
@@ -307,6 +364,15 @@ export function createScenegraphsFromGLTF(
|
|
|
307
364
|
gltf,
|
|
308
365
|
destroy
|
|
309
366
|
};
|
|
367
|
+
if (layout) {
|
|
368
|
+
try {
|
|
369
|
+
bindGLTFSceneGPUAnimation(scenegraphs, layout);
|
|
370
|
+
} catch (error) {
|
|
371
|
+
destroy();
|
|
372
|
+
throw error;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return scenegraphs;
|
|
310
376
|
}
|
|
311
377
|
|
|
312
378
|
function getScenegraphBounds(bounds: [number[], number[]] | null): GLTFScenegraphBounds {
|
|
@@ -19,15 +19,19 @@ import type {GLTFCrowdModelConfiguration, GLTFCrowdModelResources} from './creat
|
|
|
19
19
|
import {createScenegraphsFromGLTF, type GLTFScenegraphs} from './create-scenegraph-from-gltf';
|
|
20
20
|
import {type GLTFAnimationSelectionOptions, GLTFAnimator} from './gltf-animator';
|
|
21
21
|
import {
|
|
22
|
-
|
|
22
|
+
planGLTFCrowdGPUAnimation,
|
|
23
|
+
type GLTFCrowdGPUAnimationFallbackReason,
|
|
23
24
|
type GLTFCrowdGPUAnimationClip,
|
|
24
25
|
type GLTFCrowdGPUAnimationLayout,
|
|
25
26
|
type GLTFCrowdGPUAnimationOptions,
|
|
27
|
+
type GLTFGPUAnimationStats,
|
|
26
28
|
getGLTFCrowdGPUAnimationFrames
|
|
27
29
|
} from './gltf-gpu-animation';
|
|
28
30
|
import {generateGLTFLODLevels, getGLTFNodeLODs} from './gltf-lod';
|
|
29
31
|
import {SkinController} from '@luma.gl/engine';
|
|
30
32
|
import {parseGLTFSkins} from './gltf-skin';
|
|
33
|
+
import {createGLTFAnimationNodes} from './gltf-animation-nodes';
|
|
34
|
+
import {bakeScenegraphGPUAnimation} from '../../animation/scenegraph-gpu-animation';
|
|
31
35
|
|
|
32
36
|
/** Authored or generated screen-space detail selection for independently animated crowd actors. */
|
|
33
37
|
export type GLTFCrowdLODOptions = {
|
|
@@ -91,13 +95,7 @@ export type GLTFAnimatedCrowdOptions = ParseGLTFOptions & {
|
|
|
91
95
|
};
|
|
92
96
|
|
|
93
97
|
/** Runtime ownership and workload diagnostics for accelerated crowd animation. */
|
|
94
|
-
export type GLTFCrowdAnimationStats =
|
|
95
|
-
mode: 'cpu' | 'gpu';
|
|
96
|
-
sampleRate?: number;
|
|
97
|
-
frameCount: number;
|
|
98
|
-
clipCount: number;
|
|
99
|
-
morphGroupCount: number;
|
|
100
|
-
};
|
|
98
|
+
export type GLTFCrowdAnimationStats = GLTFGPUAnimationStats;
|
|
101
99
|
|
|
102
100
|
/** Initial placement and independent playback controls for one lightweight crowd actor. */
|
|
103
101
|
export type GLTFCrowdActorOptions = {
|
|
@@ -155,13 +153,6 @@ export type GLTFCrowdPrimitiveGroup = {
|
|
|
155
153
|
animationParameters?: Float32Array;
|
|
156
154
|
};
|
|
157
155
|
|
|
158
|
-
type GLTFCrowdActorNodes = {
|
|
159
|
-
root: GroupNode;
|
|
160
|
-
scenes: GroupNode[];
|
|
161
|
-
nodesByIndex: Map<number, GroupNode>;
|
|
162
|
-
nodesById: Map<string, GroupNode>;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
156
|
/** Lightweight independent animation state targeting shared, GPU-instanced glTF primitives. */
|
|
166
157
|
export class GLTFCrowdActor {
|
|
167
158
|
readonly id: string;
|
|
@@ -183,7 +174,7 @@ export class GLTFCrowdActor {
|
|
|
183
174
|
constructor(crowd: GLTFAnimatedCrowd, id: string, options: GLTFCrowdActorOptions = {}) {
|
|
184
175
|
this.crowd = crowd;
|
|
185
176
|
this.id = id;
|
|
186
|
-
const hierarchy =
|
|
177
|
+
const hierarchy = createGLTFAnimationNodes(crowd.scenegraphs, id);
|
|
187
178
|
this.root = hierarchy.root;
|
|
188
179
|
this.nodesByIndex = hierarchy.nodesByIndex;
|
|
189
180
|
this.nodesById = hierarchy.nodesById;
|
|
@@ -411,6 +402,8 @@ export class GLTFAnimatedCrowd {
|
|
|
411
402
|
private readonly lodScreenCoverage: readonly number[];
|
|
412
403
|
private readonly maximumLODLevel: number;
|
|
413
404
|
private readonly lodVertexCounts: readonly number[];
|
|
405
|
+
private readonly gpuAnimationEstimatedByteLength: number;
|
|
406
|
+
private readonly gpuAnimationFallbackReason?: GLTFCrowdGPUAnimationFallbackReason;
|
|
414
407
|
private readonly gpuAnimationLayout: GLTFCrowdGPUAnimationLayout | null;
|
|
415
408
|
private readonly gpuAnimationClips: ReadonlyMap<string, GLTFCrowdGPUAnimationClip>;
|
|
416
409
|
private currentLODView: GLTFCrowdLODView | null = null;
|
|
@@ -453,27 +446,16 @@ export class GLTFAnimatedCrowd {
|
|
|
453
446
|
})
|
|
454
447
|
: gltf;
|
|
455
448
|
this.lodSource = authoredLOD ? 'authored' : this.gltf !== gltf ? 'generated' : 'none';
|
|
456
|
-
const
|
|
457
|
-
?
|
|
449
|
+
const animationPlan = gpuAnimation
|
|
450
|
+
? planGLTFCrowdGPUAnimation(this.gltf, gpuAnimation, device)
|
|
458
451
|
: null;
|
|
459
452
|
const jointsPerInstance = Math.max(
|
|
460
453
|
0,
|
|
461
454
|
...(this.gltf.skins || []).map(skin => skin.joints.length)
|
|
462
455
|
);
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
(node.mesh?.primitives || []).map(primitive => primitive.targets?.length || 0)
|
|
467
|
-
)
|
|
468
|
-
);
|
|
469
|
-
const maximumAnimationFrameStride = 4 + jointsPerInstance * 4 + maximumMorphTargetCount;
|
|
470
|
-
this.gpuAnimationLayout =
|
|
471
|
-
requestedGPUAnimationLayout &&
|
|
472
|
-
(device.type === 'webgpu' ||
|
|
473
|
-
(maximumAnimationFrameStride <= device.limits.maxTextureDimension2D &&
|
|
474
|
-
requestedGPUAnimationLayout.frameCount <= device.limits.maxTextureDimension2D))
|
|
475
|
-
? requestedGPUAnimationLayout
|
|
476
|
-
: null;
|
|
456
|
+
this.gpuAnimationLayout = animationPlan?.layout || null;
|
|
457
|
+
this.gpuAnimationEstimatedByteLength = animationPlan?.estimatedByteLength || 0;
|
|
458
|
+
this.gpuAnimationFallbackReason = animationPlan?.fallbackReason;
|
|
477
459
|
this.gpuAnimationEnabled = Boolean(this.gpuAnimationLayout);
|
|
478
460
|
this.gpuAnimationClips = new Map(
|
|
479
461
|
(this.gpuAnimationLayout?.clips || []).map(clip => [clip.name, clip])
|
|
@@ -555,6 +537,8 @@ export class GLTFAnimatedCrowd {
|
|
|
555
537
|
get animationStats(): GLTFCrowdAnimationStats {
|
|
556
538
|
return {
|
|
557
539
|
mode: this.gpuAnimationEnabled ? 'gpu' : 'cpu',
|
|
540
|
+
estimatedByteLength: this.gpuAnimationEstimatedByteLength,
|
|
541
|
+
...(this.gpuAnimationFallbackReason ? {fallbackReason: this.gpuAnimationFallbackReason} : {}),
|
|
558
542
|
...(this.gpuAnimationLayout ? {sampleRate: this.gpuAnimationLayout.sampleRate} : {}),
|
|
559
543
|
frameCount: this.gpuAnimationLayout?.frameCount || 0,
|
|
560
544
|
clipCount: this.gpuAnimationLayout?.clips.length || 0,
|
|
@@ -858,88 +842,22 @@ export class GLTFAnimatedCrowd {
|
|
|
858
842
|
}
|
|
859
843
|
|
|
860
844
|
private bakeGPUAnimationFrames(): void {
|
|
861
|
-
|
|
862
|
-
if (!layout) {
|
|
845
|
+
if (!this.gpuAnimationLayout) {
|
|
863
846
|
return;
|
|
864
847
|
}
|
|
865
|
-
|
|
866
|
-
this.
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
for (const group of this.primitiveGroups) {
|
|
880
|
-
const modelNode = findCrowdModelNode(
|
|
881
|
-
this.scenegraphs,
|
|
882
|
-
group.sourceNodeIndex,
|
|
883
|
-
group.model
|
|
884
|
-
);
|
|
885
|
-
if (!modelNode) {
|
|
886
|
-
continue;
|
|
887
|
-
}
|
|
888
|
-
const resources = modelNode.userData['gltfAnimatedCrowd'] as GLTFCrowdModelResources;
|
|
889
|
-
const values = resources.animationFrameValues;
|
|
890
|
-
const frameStride = resources.animationFrameStride;
|
|
891
|
-
if (!values || !frameStride) {
|
|
892
|
-
continue;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
const frameOffset = (clip.frameOffset + clipFrame) * frameStride * 4;
|
|
896
|
-
const node = bakingActor.getNode(group.nodeIndex);
|
|
897
|
-
const nodeMatrix = node && worldMatrices.get(node);
|
|
898
|
-
if (nodeMatrix) {
|
|
899
|
-
values.set(nodeMatrix, frameOffset);
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
const jointPalette = bakingActor.skins.getBinding(
|
|
903
|
-
bakingActor.getNode(group.nodeIndex)
|
|
904
|
-
)?.jointMatrices;
|
|
905
|
-
if (jointPalette) {
|
|
906
|
-
values.set(jointPalette, frameOffset + 16);
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
const weights = node?.userData['morphWeights'];
|
|
910
|
-
if (Array.isArray(weights)) {
|
|
911
|
-
for (let targetIndex = 0; targetIndex < resources.morphTargetCount; targetIndex++) {
|
|
912
|
-
const offset =
|
|
913
|
-
frameOffset + (4 + resources.animationJointCount * 4 + targetIndex) * 4;
|
|
914
|
-
values[offset] = Number(weights[targetIndex] || 0);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
} finally {
|
|
921
|
-
bakingActor.destroy();
|
|
922
|
-
this.suspendedRefreshCount--;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
for (const group of this.primitiveGroups) {
|
|
926
|
-
const modelNode = findCrowdModelNode(this.scenegraphs, group.sourceNodeIndex, group.model);
|
|
927
|
-
if (!modelNode) {
|
|
928
|
-
continue;
|
|
929
|
-
}
|
|
930
|
-
const resources = modelNode.userData['gltfAnimatedCrowd'] as GLTFCrowdModelResources;
|
|
931
|
-
if (!resources.animationFrames || !resources.animationFrameValues) {
|
|
932
|
-
continue;
|
|
933
|
-
}
|
|
934
|
-
if (resources.animationFrames instanceof Buffer) {
|
|
935
|
-
resources.animationFrames.write(resources.animationFrameValues);
|
|
936
|
-
} else {
|
|
937
|
-
resources.animationFrames.writeData(resources.animationFrameValues, {
|
|
938
|
-
width: resources.animationFrameStride,
|
|
939
|
-
height: layout.frameCount
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
}
|
|
848
|
+
const scenegraphs = this.scenegraphs;
|
|
849
|
+
const targets = this.primitiveGroups.flatMap(group => {
|
|
850
|
+
const node = scenegraphs.gltfNodeIndexToNodeMap.get(group.nodeIndex);
|
|
851
|
+
const modelNode = findCrowdModelNode(scenegraphs, group.sourceNodeIndex, group.model);
|
|
852
|
+
return node && modelNode?.gpuAnimation ? [{node, resources: modelNode.gpuAnimation}] : [];
|
|
853
|
+
});
|
|
854
|
+
bakeScenegraphGPUAnimation({
|
|
855
|
+
scenes: scenegraphs.scenes,
|
|
856
|
+
clips: scenegraphs.animator.getAnimations().map(animation => animation.sourceClip),
|
|
857
|
+
skins: scenegraphs.skins.bindings,
|
|
858
|
+
layout: this.gpuAnimationLayout,
|
|
859
|
+
targets
|
|
860
|
+
});
|
|
943
861
|
}
|
|
944
862
|
|
|
945
863
|
private writeGPUAnimationParameters(
|
|
@@ -1178,71 +1096,6 @@ export function createGLTFAnimatedCrowd(
|
|
|
1178
1096
|
return new GLTFAnimatedCrowd(device, gltf, options);
|
|
1179
1097
|
}
|
|
1180
1098
|
|
|
1181
|
-
function createActorNodes(scenegraphs: GLTFScenegraphs, id: string): GLTFCrowdActorNodes {
|
|
1182
|
-
const {gltf, gltfNodeIndexToNodeMap} = scenegraphs;
|
|
1183
|
-
const nodesByIndex = new Map<number, GroupNode>();
|
|
1184
|
-
const nodesById = new Map<string, GroupNode>();
|
|
1185
|
-
|
|
1186
|
-
for (let nodeIndex = 0; nodeIndex < gltf.nodes.length; nodeIndex++) {
|
|
1187
|
-
const sourceNode = gltf.nodes[nodeIndex];
|
|
1188
|
-
const sourceRuntimeNode = gltfNodeIndexToNodeMap.get(nodeIndex);
|
|
1189
|
-
if (!sourceRuntimeNode) {
|
|
1190
|
-
continue;
|
|
1191
|
-
}
|
|
1192
|
-
const node = new GroupNode({
|
|
1193
|
-
id: sourceRuntimeNode.id,
|
|
1194
|
-
position: Array.from(sourceRuntimeNode.position),
|
|
1195
|
-
rotation: Array.from(sourceRuntimeNode.rotation),
|
|
1196
|
-
scale: Array.from(sourceRuntimeNode.scale),
|
|
1197
|
-
matrix: Array.from(sourceRuntimeNode.matrix),
|
|
1198
|
-
display: sourceRuntimeNode.display
|
|
1199
|
-
});
|
|
1200
|
-
const morphWeights = sourceRuntimeNode.userData['morphWeights'];
|
|
1201
|
-
if (Array.isArray(morphWeights)) {
|
|
1202
|
-
node.userData['morphWeights'] = [...morphWeights];
|
|
1203
|
-
}
|
|
1204
|
-
nodesByIndex.set(nodeIndex, node);
|
|
1205
|
-
nodesById.set(sourceNode.id, node);
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
for (let nodeIndex = 0; nodeIndex < gltf.nodes.length; nodeIndex++) {
|
|
1209
|
-
const sourceNode = gltf.nodes[nodeIndex];
|
|
1210
|
-
const node = nodesByIndex.get(nodeIndex);
|
|
1211
|
-
if (!node) {
|
|
1212
|
-
continue;
|
|
1213
|
-
}
|
|
1214
|
-
for (const child of sourceNode.children || []) {
|
|
1215
|
-
const childNode = nodesById.get(child.id);
|
|
1216
|
-
if (childNode) {
|
|
1217
|
-
node.add(childNode);
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
if (sourceNode.mesh) {
|
|
1221
|
-
const mesh = new GroupNode({id: sourceNode.mesh.name || sourceNode.mesh.id});
|
|
1222
|
-
node.userData['gltfMesh'] = mesh;
|
|
1223
|
-
node.add(mesh);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
const scenes = gltf.scenes.map(
|
|
1228
|
-
(scene, sceneIndex) =>
|
|
1229
|
-
new GroupNode({
|
|
1230
|
-
id: `${id}-scene-${sceneIndex}`,
|
|
1231
|
-
children: (scene.nodes || []).flatMap(sourceNode => {
|
|
1232
|
-
const node = nodesById.get(sourceNode.id);
|
|
1233
|
-
return node ? [node] : [];
|
|
1234
|
-
})
|
|
1235
|
-
})
|
|
1236
|
-
);
|
|
1237
|
-
|
|
1238
|
-
return {
|
|
1239
|
-
root: new GroupNode({id: `${id}-root`, children: [...scenes]}),
|
|
1240
|
-
scenes,
|
|
1241
|
-
nodesByIndex,
|
|
1242
|
-
nodesById
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
1099
|
function createPrimitiveGroups(
|
|
1247
1100
|
scenegraphs: GLTFScenegraphs,
|
|
1248
1101
|
includeLODLevels: boolean
|