@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cortao-occluder-lookup-table.js","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-occluder-lookup-table.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,6DAA6D;AAC7D,4DAA4D;AAC5D,6CAA6C;AA2B7C,mFAAmF;AACnF,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CA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EAAqE;AACrE,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS;IAC3C,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,OAAO,CAAC,QAAQ,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,8CAA8C;AAC9C,SAAS,GAAG,CAAC,CAAoB,EAAE,CAAoB;IACrD,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cortao_parameters_exports = {};
|
|
19
|
+
__export(cortao_parameters_exports, {
|
|
20
|
+
CORTAO_MAX_MIP_COUNT: () => CORTAO_MAX_MIP_COUNT,
|
|
21
|
+
getCORTAOFilterPassUniforms: () => getCORTAOFilterPassUniforms,
|
|
22
|
+
getCORTAOMainPassUniforms: () => getCORTAOMainPassUniforms,
|
|
23
|
+
getCORTAOMipAtlasSize: () => getCORTAOMipAtlasSize,
|
|
24
|
+
getCORTAOMipCount: () => getCORTAOMipCount,
|
|
25
|
+
getCORTAOMipmapUniforms: () => getCORTAOMipmapUniforms,
|
|
26
|
+
getCORTAOPrepassUniforms: () => getCORTAOPrepassUniforms,
|
|
27
|
+
isSupportedProjection: () => isSupportedProjection
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(cortao_parameters_exports);
|
|
30
|
+
const CORTAO_MAX_MIP_COUNT = 8;
|
|
31
|
+
const MAX_FLOAT32 = 34028234663852886e22;
|
|
32
|
+
function isSupportedProjection(matrix) {
|
|
33
|
+
const zeroIndices = [1, 2, 3, 4, 6, 7, 12, 13, 15];
|
|
34
|
+
const epsilon = 1e-6;
|
|
35
|
+
return zeroIndices.every((index) => Math.abs(matrix[index]) < epsilon) && Math.abs(matrix[11] + 1) < epsilon && matrix[0] !== 0 && matrix[5] !== 0 && matrix[14] !== 0;
|
|
36
|
+
}
|
|
37
|
+
function getCORTAOMipCount(width, height) {
|
|
38
|
+
const shortSide = Math.max(1, Math.min(width, height));
|
|
39
|
+
return Math.min(CORTAO_MAX_MIP_COUNT, Math.floor(Math.log2(shortSide)) + 1);
|
|
40
|
+
}
|
|
41
|
+
function getCORTAOMipAtlasSize(width, height) {
|
|
42
|
+
return [width + Math.max(width >> 1, 1), height];
|
|
43
|
+
}
|
|
44
|
+
function getCORTAOPrepassUniforms(camera, configuration) {
|
|
45
|
+
const { nearPlane, farPlane } = camera;
|
|
46
|
+
let depthScale;
|
|
47
|
+
let depthOffset;
|
|
48
|
+
if (!Number.isFinite(nearPlane)) {
|
|
49
|
+
depthScale = 1 / farPlane;
|
|
50
|
+
depthOffset = 0;
|
|
51
|
+
} else if (!Number.isFinite(farPlane)) {
|
|
52
|
+
depthScale = -1 / nearPlane;
|
|
53
|
+
depthOffset = 1 / nearPlane;
|
|
54
|
+
} else {
|
|
55
|
+
depthScale = (nearPlane - farPlane) / (nearPlane * farPlane);
|
|
56
|
+
depthOffset = 1 / nearPlane;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
unprojectParams: getUnprojectParams(camera.projectionMatrix),
|
|
60
|
+
resolution: [configuration.width, configuration.height],
|
|
61
|
+
depthScale,
|
|
62
|
+
depthOffset,
|
|
63
|
+
randomSeed: configuration.randomSeed >>> 0
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function getCORTAOMipmapUniforms(configuration) {
|
|
67
|
+
return {
|
|
68
|
+
resolution: [configuration.width, configuration.height],
|
|
69
|
+
mipCount: getCORTAOMipCount(configuration.width, configuration.height),
|
|
70
|
+
randomSeed: configuration.randomSeed >>> 0
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function getCORTAOMainPassUniforms(camera, configuration) {
|
|
74
|
+
const matrix = camera.projectionMatrix;
|
|
75
|
+
const projectionX = matrix[0];
|
|
76
|
+
const projectionY = matrix[5];
|
|
77
|
+
const projectionOffsetX = matrix[8];
|
|
78
|
+
const projectionOffsetY = matrix[9];
|
|
79
|
+
const inverseY = 1 / projectionY;
|
|
80
|
+
const maxApparentCircleRadius = inverseY * configuration.maxScreenSpaceRadius * 2;
|
|
81
|
+
return {
|
|
82
|
+
unprojectParams: getUnprojectParams(matrix),
|
|
83
|
+
// WebGL textures and clip space both have +Y up, so CORTAO's flipY is false.
|
|
84
|
+
projectionParams: [
|
|
85
|
+
0.5 * projectionX,
|
|
86
|
+
0.5 * projectionY,
|
|
87
|
+
-0.5 + 0.5 * projectionOffsetX,
|
|
88
|
+
-0.5 + 0.5 * projectionOffsetY
|
|
89
|
+
],
|
|
90
|
+
resolution: [configuration.width, configuration.height],
|
|
91
|
+
normalBias: 1 / projectionX / configuration.width * Math.SQRT2,
|
|
92
|
+
radius: Math.min(configuration.radius, MAX_FLOAT32),
|
|
93
|
+
maxApparentCircleRadiusCoefficient: maxApparentCircleRadius / Math.sqrt(maxApparentCircleRadius * maxApparentCircleRadius + 1),
|
|
94
|
+
mipBias: Math.log2(projectionY * configuration.height * 0.5) + configuration.mipBias,
|
|
95
|
+
inverseMaxSlopeCompensation: 1 / configuration.maxSlopeCompensation,
|
|
96
|
+
backfaceThreshold: configuration.backfaceThreshold,
|
|
97
|
+
backfaceBoost: configuration.backfaceBoost,
|
|
98
|
+
intensity: configuration.intensity,
|
|
99
|
+
mipCount: getCORTAOMipCount(configuration.width, configuration.height),
|
|
100
|
+
randomSeed: configuration.randomSeed >>> 0
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function getCORTAOFilterPassUniforms(configuration) {
|
|
104
|
+
return {
|
|
105
|
+
resolution: [configuration.width, configuration.height],
|
|
106
|
+
depthSensitivity: configuration.filterDepthSensitivity,
|
|
107
|
+
normalSensitivity: configuration.filterNormalSensitivity
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function getUnprojectParams(matrix) {
|
|
111
|
+
const inverseX = 1 / matrix[0];
|
|
112
|
+
const inverseY = 1 / matrix[5];
|
|
113
|
+
const inverseOffsetX = matrix[8] / matrix[0];
|
|
114
|
+
const inverseOffsetY = matrix[9] / matrix[5];
|
|
115
|
+
return [2 * inverseX, 2 * inverseY, -inverseX + inverseOffsetX, -inverseY + inverseOffsetY];
|
|
116
|
+
}
|
|
117
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
118
|
+
0 && (module.exports = {
|
|
119
|
+
CORTAO_MAX_MIP_COUNT,
|
|
120
|
+
getCORTAOFilterPassUniforms,
|
|
121
|
+
getCORTAOMainPassUniforms,
|
|
122
|
+
getCORTAOMipAtlasSize,
|
|
123
|
+
getCORTAOMipCount,
|
|
124
|
+
getCORTAOMipmapUniforms,
|
|
125
|
+
getCORTAOPrepassUniforms,
|
|
126
|
+
isSupportedProjection
|
|
127
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/** The maximum number of mip levels in the packed data buffer. */
|
|
2
|
+
export declare const CORTAO_MAX_MIP_COUNT = 8;
|
|
3
|
+
/** The camera values that CORTAO needs. All distances are in view-space units. */
|
|
4
|
+
export type CORTAOCamera = {
|
|
5
|
+
/** Column-major perspective projection from view space to clip space. */
|
|
6
|
+
projectionMatrix: readonly number[];
|
|
7
|
+
/** The distance to the near plane, in view-space units. */
|
|
8
|
+
nearPlane: number;
|
|
9
|
+
/** The distance to the far plane, in view-space units. */
|
|
10
|
+
farPlane: number;
|
|
11
|
+
};
|
|
12
|
+
/** The user configuration that the per-pass uniforms derive from. */
|
|
13
|
+
export type CORTAOConfiguration = {
|
|
14
|
+
/** Drawing buffer width, in pixels. */
|
|
15
|
+
width: number;
|
|
16
|
+
/** Drawing buffer height, in pixels. */
|
|
17
|
+
height: number;
|
|
18
|
+
/** Seed for the per-pixel noise. A constant seed prevents flicker without temporal filtering. */
|
|
19
|
+
randomSeed: number;
|
|
20
|
+
/** Maximum world-space radius, in view-space units. */
|
|
21
|
+
radius: number;
|
|
22
|
+
/** Maximum screen-space radius, as a fraction of the drawing buffer height. */
|
|
23
|
+
maxScreenSpaceRadius: number;
|
|
24
|
+
/** Mip level bias for the packed data reads in the main pass. */
|
|
25
|
+
mipBias: number;
|
|
26
|
+
/** Maximum enlargement of occluders that are seen at a grazing angle. */
|
|
27
|
+
maxSlopeCompensation: number;
|
|
28
|
+
/** Threshold that classifies an occluder as a back face. */
|
|
29
|
+
backfaceThreshold: number;
|
|
30
|
+
/** Extra enlargement of back-face occluders, from 0 to 1. */
|
|
31
|
+
backfaceBoost: number;
|
|
32
|
+
/** Exponent applied to the occlusion. 1 is the physically based result. */
|
|
33
|
+
intensity: number;
|
|
34
|
+
/** Depth sensitivity of the bilateral filter. */
|
|
35
|
+
filterDepthSensitivity: number;
|
|
36
|
+
/** Normal sensitivity of the bilateral filter. */
|
|
37
|
+
filterNormalSensitivity: number;
|
|
38
|
+
};
|
|
39
|
+
/** Uniforms of the prepass. */
|
|
40
|
+
export type CORTAOPrepassUniforms = {
|
|
41
|
+
unprojectParams: [number, number, number, number];
|
|
42
|
+
resolution: [number, number];
|
|
43
|
+
depthScale: number;
|
|
44
|
+
depthOffset: number;
|
|
45
|
+
randomSeed: number;
|
|
46
|
+
};
|
|
47
|
+
/** Uniforms of the mip atlas pass. */
|
|
48
|
+
export type CORTAOMipmapUniforms = {
|
|
49
|
+
resolution: [number, number];
|
|
50
|
+
mipCount: number;
|
|
51
|
+
randomSeed: number;
|
|
52
|
+
};
|
|
53
|
+
/** Uniforms of the main pass. */
|
|
54
|
+
export type CORTAOMainPassUniforms = {
|
|
55
|
+
unprojectParams: [number, number, number, number];
|
|
56
|
+
projectionParams: [number, number, number, number];
|
|
57
|
+
resolution: [number, number];
|
|
58
|
+
normalBias: number;
|
|
59
|
+
radius: number;
|
|
60
|
+
maxApparentCircleRadiusCoefficient: number;
|
|
61
|
+
mipBias: number;
|
|
62
|
+
inverseMaxSlopeCompensation: number;
|
|
63
|
+
backfaceThreshold: number;
|
|
64
|
+
backfaceBoost: number;
|
|
65
|
+
intensity: number;
|
|
66
|
+
mipCount: number;
|
|
67
|
+
randomSeed: number;
|
|
68
|
+
};
|
|
69
|
+
/** Uniforms of the filter pass. */
|
|
70
|
+
export type CORTAOFilterPassUniforms = {
|
|
71
|
+
resolution: [number, number];
|
|
72
|
+
depthSensitivity: number;
|
|
73
|
+
normalSensitivity: number;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Tests whether a column-major matrix is a perspective projection with only a field of view and
|
|
77
|
+
* an optional off-center offset. CORTAO supports no other projection.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isSupportedProjection(matrix: readonly number[]): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Gets the number of packed data mip levels. The smallest level keeps at least one pixel on the
|
|
82
|
+
* short side, so that the levels of the mip atlas do not overlap.
|
|
83
|
+
*/
|
|
84
|
+
export declare function getCORTAOMipCount(width: number, height: number): number;
|
|
85
|
+
/** Gets the size of the packed data mip atlas. Level 0 is on the left, levels 1 and up on the right. */
|
|
86
|
+
export declare function getCORTAOMipAtlasSize(width: number, height: number): [number, number];
|
|
87
|
+
/** Gets the prepass uniforms. Port of `populatePrepassParameters()`. */
|
|
88
|
+
export declare function getCORTAOPrepassUniforms(camera: CORTAOCamera, configuration: CORTAOConfiguration): CORTAOPrepassUniforms;
|
|
89
|
+
/** Gets the mip atlas uniforms. */
|
|
90
|
+
export declare function getCORTAOMipmapUniforms(configuration: CORTAOConfiguration): CORTAOMipmapUniforms;
|
|
91
|
+
/** Gets the main pass uniforms. Port of `populateMainPassParameters()`, without the Y flip. */
|
|
92
|
+
export declare function getCORTAOMainPassUniforms(camera: CORTAOCamera, configuration: CORTAOConfiguration): CORTAOMainPassUniforms;
|
|
93
|
+
/** Gets the filter pass uniforms. Port of `populateFilterPassParameters()`. */
|
|
94
|
+
export declare function getCORTAOFilterPassUniforms(configuration: CORTAOConfiguration): CORTAOFilterPassUniforms;
|
|
95
|
+
//# sourceMappingURL=cortao-parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cortao-parameters.d.ts","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-parameters.ts"],"names":[],"mappings":"AAOA,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG;IACzB,yEAAyE;IACzE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BAAmB,GAAG,oBAAoB,CAMhG;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,mBAAmB,GACjC,sBAAsB,CA8BxB;AAED,+EAA+E;AAC/E,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,mBAAmB,GACjC,wBAAwB,CAM1B"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// Portions adapted from src/CORTAOParameters.h of the CORTAO reference implementation.
|
|
5
|
+
// SPDX-FileCopyrightText: Copyright (c) 2026 Daniel Isheden
|
|
6
|
+
// See THIRD-PARTY-NOTICES.md in this module.
|
|
7
|
+
/** The maximum number of mip levels in the packed data buffer. */
|
|
8
|
+
export const CORTAO_MAX_MIP_COUNT = 8;
|
|
9
|
+
/** The largest finite 32-bit float. It stands in for an unlimited world-space radius. */
|
|
10
|
+
const MAX_FLOAT32 = 3.4028234663852886e38;
|
|
11
|
+
/**
|
|
12
|
+
* Tests whether a column-major matrix is a perspective projection with only a field of view and
|
|
13
|
+
* an optional off-center offset. CORTAO supports no other projection.
|
|
14
|
+
*/
|
|
15
|
+
export function isSupportedProjection(matrix) {
|
|
16
|
+
const zeroIndices = [1, 2, 3, 4, 6, 7, 12, 13, 15];
|
|
17
|
+
const epsilon = 1e-6;
|
|
18
|
+
return (zeroIndices.every(index => Math.abs(matrix[index]) < epsilon) &&
|
|
19
|
+
Math.abs(matrix[11] + 1) < epsilon &&
|
|
20
|
+
matrix[0] !== 0 &&
|
|
21
|
+
matrix[5] !== 0 &&
|
|
22
|
+
matrix[14] !== 0);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Gets the number of packed data mip levels. The smallest level keeps at least one pixel on the
|
|
26
|
+
* short side, so that the levels of the mip atlas do not overlap.
|
|
27
|
+
*/
|
|
28
|
+
export function getCORTAOMipCount(width, height) {
|
|
29
|
+
const shortSide = Math.max(1, Math.min(width, height));
|
|
30
|
+
return Math.min(CORTAO_MAX_MIP_COUNT, Math.floor(Math.log2(shortSide)) + 1);
|
|
31
|
+
}
|
|
32
|
+
/** Gets the size of the packed data mip atlas. Level 0 is on the left, levels 1 and up on the right. */
|
|
33
|
+
export function getCORTAOMipAtlasSize(width, height) {
|
|
34
|
+
return [width + Math.max(width >> 1, 1), height];
|
|
35
|
+
}
|
|
36
|
+
/** Gets the prepass uniforms. Port of `populatePrepassParameters()`. */
|
|
37
|
+
export function getCORTAOPrepassUniforms(camera, configuration) {
|
|
38
|
+
const { nearPlane, farPlane } = camera;
|
|
39
|
+
let depthScale;
|
|
40
|
+
let depthOffset;
|
|
41
|
+
if (!Number.isFinite(nearPlane)) {
|
|
42
|
+
// Infinite near plane (reverse depth).
|
|
43
|
+
depthScale = 1 / farPlane;
|
|
44
|
+
depthOffset = 0;
|
|
45
|
+
}
|
|
46
|
+
else if (!Number.isFinite(farPlane)) {
|
|
47
|
+
// Infinite far plane.
|
|
48
|
+
depthScale = -1 / nearPlane;
|
|
49
|
+
depthOffset = 1 / nearPlane;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
// Finite near and far planes. Reverse depth gives a positive scale.
|
|
53
|
+
depthScale = (nearPlane - farPlane) / (nearPlane * farPlane);
|
|
54
|
+
depthOffset = 1 / nearPlane;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
unprojectParams: getUnprojectParams(camera.projectionMatrix),
|
|
58
|
+
resolution: [configuration.width, configuration.height],
|
|
59
|
+
depthScale,
|
|
60
|
+
depthOffset,
|
|
61
|
+
randomSeed: configuration.randomSeed >>> 0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** Gets the mip atlas uniforms. */
|
|
65
|
+
export function getCORTAOMipmapUniforms(configuration) {
|
|
66
|
+
return {
|
|
67
|
+
resolution: [configuration.width, configuration.height],
|
|
68
|
+
mipCount: getCORTAOMipCount(configuration.width, configuration.height),
|
|
69
|
+
randomSeed: configuration.randomSeed >>> 0
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/** Gets the main pass uniforms. Port of `populateMainPassParameters()`, without the Y flip. */
|
|
73
|
+
export function getCORTAOMainPassUniforms(camera, configuration) {
|
|
74
|
+
const matrix = camera.projectionMatrix;
|
|
75
|
+
const projectionX = matrix[0];
|
|
76
|
+
const projectionY = matrix[5];
|
|
77
|
+
const projectionOffsetX = matrix[8];
|
|
78
|
+
const projectionOffsetY = matrix[9];
|
|
79
|
+
const inverseY = 1 / projectionY;
|
|
80
|
+
const maxApparentCircleRadius = inverseY * configuration.maxScreenSpaceRadius * 2;
|
|
81
|
+
return {
|
|
82
|
+
unprojectParams: getUnprojectParams(matrix),
|
|
83
|
+
// WebGL textures and clip space both have +Y up, so CORTAO's flipY is false.
|
|
84
|
+
projectionParams: [
|
|
85
|
+
0.5 * projectionX,
|
|
86
|
+
0.5 * projectionY,
|
|
87
|
+
-0.5 + 0.5 * projectionOffsetX,
|
|
88
|
+
-0.5 + 0.5 * projectionOffsetY
|
|
89
|
+
],
|
|
90
|
+
resolution: [configuration.width, configuration.height],
|
|
91
|
+
normalBias: (1 / projectionX / configuration.width) * Math.SQRT2,
|
|
92
|
+
radius: Math.min(configuration.radius, MAX_FLOAT32),
|
|
93
|
+
maxApparentCircleRadiusCoefficient: maxApparentCircleRadius / Math.sqrt(maxApparentCircleRadius * maxApparentCircleRadius + 1),
|
|
94
|
+
mipBias: Math.log2(projectionY * configuration.height * 0.5) + configuration.mipBias,
|
|
95
|
+
inverseMaxSlopeCompensation: 1 / configuration.maxSlopeCompensation,
|
|
96
|
+
backfaceThreshold: configuration.backfaceThreshold,
|
|
97
|
+
backfaceBoost: configuration.backfaceBoost,
|
|
98
|
+
intensity: configuration.intensity,
|
|
99
|
+
mipCount: getCORTAOMipCount(configuration.width, configuration.height),
|
|
100
|
+
randomSeed: configuration.randomSeed >>> 0
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Gets the filter pass uniforms. Port of `populateFilterPassParameters()`. */
|
|
104
|
+
export function getCORTAOFilterPassUniforms(configuration) {
|
|
105
|
+
return {
|
|
106
|
+
resolution: [configuration.width, configuration.height],
|
|
107
|
+
depthSensitivity: configuration.filterDepthSensitivity,
|
|
108
|
+
normalSensitivity: configuration.filterNormalSensitivity
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Gets the parameters that map a texture coordinate to a view-space direction at depth 1.
|
|
113
|
+
* The inverse of the projection form that CORTAO supports has these entries in closed form.
|
|
114
|
+
*/
|
|
115
|
+
function getUnprojectParams(matrix) {
|
|
116
|
+
const inverseX = 1 / matrix[0];
|
|
117
|
+
const inverseY = 1 / matrix[5];
|
|
118
|
+
const inverseOffsetX = matrix[8] / matrix[0];
|
|
119
|
+
const inverseOffsetY = matrix[9] / matrix[5];
|
|
120
|
+
return [2 * inverseX, 2 * inverseY, -inverseX + inverseOffsetX, -inverseY + inverseOffsetY];
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=cortao-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cortao-parameters.js","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-parameters.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,uFAAuF;AACvF,4DAA4D;AAC5D,6CAA6C;AAE7C,kEAAkE;AAClE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAgFtC,yFAAyF;AACzF,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAyB;IAC7D,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EA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E,MAAM,UAAU,2BAA2B,CACzC,aAAkC;IAElC,OAAO;QACL,UAAU,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC;QACvD,gBAAgB,EAAE,aAAa,CAAC,sBAAsB;QACtD,iBAAiB,EAAE,aAAa,CAAC,uBAAuB;KACzD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CAAC,MAAyB;IACnD,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,QAAQ,GAAG,cAAc,EAAE,CAAC,QAAQ,GAAG,cAAc,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cortao_pass_exports = {};
|
|
19
|
+
__export(cortao_pass_exports, {
|
|
20
|
+
CORTAOPass: () => CORTAOPass
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(cortao_pass_exports);
|
|
23
|
+
var import_core = require("@luma.gl/core");
|
|
24
|
+
var import_cortao_parameters = require("./cortao-parameters.cjs");
|
|
25
|
+
var import_cortao_upsample = require("./cortao-upsample.cjs");
|
|
26
|
+
var import_cortao_webgl_passes = require("./cortao-webgl-passes.cjs");
|
|
27
|
+
var import_cortao_webgpu_passes = require("./cortao-webgpu-passes.cjs");
|
|
28
|
+
class CORTAOPass {
|
|
29
|
+
device;
|
|
30
|
+
passes;
|
|
31
|
+
resolutionScale;
|
|
32
|
+
upsample;
|
|
33
|
+
depthOnlyView = null;
|
|
34
|
+
destroyed = false;
|
|
35
|
+
constructor(device, props = {}) {
|
|
36
|
+
this.device = device;
|
|
37
|
+
const { id = "cortao", resolutionScale = 1, sampleCount = 16, rayCount = 16, largeFilter = true, filterSymmetry = true } = props;
|
|
38
|
+
(0, import_core.assert)(Number.isInteger(sampleCount) && sampleCount > 0);
|
|
39
|
+
(0, import_core.assert)(device.type === "webgl" || device.type === "webgpu");
|
|
40
|
+
const Passes = device.type === "webgpu" ? import_cortao_webgpu_passes.CORTAOWebGPUPasses : import_cortao_webgl_passes.CORTAOWebGLPasses;
|
|
41
|
+
this.passes = new Passes(device, id, { sampleCount, rayCount, largeFilter, filterSymmetry }, resolutionScale !== 1);
|
|
42
|
+
this.resolutionScale = resolutionScale;
|
|
43
|
+
this.upsample = resolutionScale === 1 ? null : new import_cortao_upsample.CORTAOUpsample(device, `${id}-upsample`);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Borrows single-sample hardware depth and returns a pass-owned, full-resolution visibility mask.
|
|
47
|
+
* On WebGPU, submit each render before recording another render with this instance.
|
|
48
|
+
*/
|
|
49
|
+
render({ camera, depthTexture, filter = true, radius = Infinity, maxScreenSpaceRadius = 0.2, intensity = 1, mipBias = -4, maxSlopeCompensation = 4, backfaceThreshold = 0.5, backfaceBoost = 0.5, filterDepthSensitivity = 512, filterNormalSensitivity = 16, randomSeed = 0 }) {
|
|
50
|
+
(0, import_core.assert)(!this.destroyed && depthTexture.device === this.device);
|
|
51
|
+
(0, import_core.assert)((0, import_cortao_parameters.isSupportedProjection)(camera.projectionMatrix));
|
|
52
|
+
const configuration = {
|
|
53
|
+
width: Math.max(1, Math.round(depthTexture.width * this.resolutionScale)),
|
|
54
|
+
height: Math.max(1, Math.round(depthTexture.height * this.resolutionScale)),
|
|
55
|
+
radius,
|
|
56
|
+
maxScreenSpaceRadius,
|
|
57
|
+
intensity,
|
|
58
|
+
mipBias,
|
|
59
|
+
maxSlopeCompensation,
|
|
60
|
+
backfaceThreshold,
|
|
61
|
+
backfaceBoost,
|
|
62
|
+
filterDepthSensitivity,
|
|
63
|
+
filterNormalSensitivity,
|
|
64
|
+
randomSeed
|
|
65
|
+
};
|
|
66
|
+
const depthView = this.getDepthView(depthTexture);
|
|
67
|
+
const visibility = this.passes.renderOcclusion({ camera, depthView, filter, configuration });
|
|
68
|
+
if (!this.upsample) {
|
|
69
|
+
return visibility;
|
|
70
|
+
}
|
|
71
|
+
const { depthScale, depthOffset } = (0, import_cortao_parameters.getCORTAOPrepassUniforms)(camera, configuration);
|
|
72
|
+
return this.upsample.render(depthView, visibility, { depthScale, depthOffset });
|
|
73
|
+
}
|
|
74
|
+
destroy() {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
if (!this.destroyed) {
|
|
77
|
+
this.destroyed = true;
|
|
78
|
+
this.passes.destroy();
|
|
79
|
+
(_a = this.upsample) == null ? void 0 : _a.destroy();
|
|
80
|
+
(_b = this.depthOnlyView) == null ? void 0 : _b.destroy();
|
|
81
|
+
this.depthOnlyView = null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
getDepthView(depthTexture) {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
if (this.device.type !== "webgpu") {
|
|
87
|
+
return depthTexture.view;
|
|
88
|
+
}
|
|
89
|
+
if (((_a = this.depthOnlyView) == null ? void 0 : _a.texture) === depthTexture) {
|
|
90
|
+
return this.depthOnlyView;
|
|
91
|
+
}
|
|
92
|
+
(_b = this.depthOnlyView) == null ? void 0 : _b.destroy();
|
|
93
|
+
this.depthOnlyView = this.device.getTextureFormatInfo(depthTexture.format).attachment === "depth-stencil" ? depthTexture.createView({ aspect: "depth-only", mipLevelCount: 1, arrayLayerCount: 1 }) : null;
|
|
94
|
+
return this.depthOnlyView ?? depthTexture.view;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
+
0 && (module.exports = {
|
|
99
|
+
CORTAOPass
|
|
100
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Device, type Texture } from '@luma.gl/core';
|
|
2
|
+
import { type CORTAOCamera, type CORTAOConfiguration } from "./cortao-parameters.js";
|
|
3
|
+
import type { CORTAOShaderOptions } from "./cortao-passes.js";
|
|
4
|
+
/** Pipeline specialization options. */
|
|
5
|
+
export type CORTAOPassProps = Partial<CORTAOShaderOptions> & {
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Evaluation scale per axis. The returned visibility is always full size. Default 1. */
|
|
8
|
+
resolutionScale?: 1 | 0.5 | 0.25;
|
|
9
|
+
};
|
|
10
|
+
/** Per-frame inputs. Camera distances and radius use the same view-space units. */
|
|
11
|
+
export type CORTAORenderOptions = Partial<Omit<CORTAOConfiguration, 'width' | 'height'>> & {
|
|
12
|
+
camera: CORTAOCamera;
|
|
13
|
+
depthTexture: Texture;
|
|
14
|
+
filter?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** @experimental Depth-only ambient visibility using Circular Occluder Ray-Traced Ambient Occlusion. */
|
|
17
|
+
export declare class CORTAOPass {
|
|
18
|
+
readonly device: Device;
|
|
19
|
+
private readonly passes;
|
|
20
|
+
readonly resolutionScale: 1 | 0.5 | 0.25;
|
|
21
|
+
private readonly upsample;
|
|
22
|
+
private depthOnlyView;
|
|
23
|
+
private destroyed;
|
|
24
|
+
constructor(device: Device, props?: CORTAOPassProps);
|
|
25
|
+
/**
|
|
26
|
+
* Borrows single-sample hardware depth and returns a pass-owned, full-resolution visibility mask.
|
|
27
|
+
* On WebGPU, submit each render before recording another render with this instance.
|
|
28
|
+
*/
|
|
29
|
+
render({ camera, depthTexture, filter, radius, maxScreenSpaceRadius, intensity, mipBias, maxSlopeCompensation, backfaceThreshold, backfaceBoost, filterDepthSensitivity, filterNormalSensitivity, randomSeed }: CORTAORenderOptions): Texture;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
private getDepthView;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=cortao-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cortao-pass.d.ts","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-pass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,KAAK,MAAM,EAAE,KAAK,OAAO,EAAmB,MAAM,eAAe,CAAC;AAClF,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACzB,+BAA4B;AAC7B,OAAO,KAAK,EAAe,mBAAmB,EAAC,2BAAwB;AAKvE,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG;IAC3D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,eAAe,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC,GAAG;IACzF,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wGAAwG;AACxG,qBAAa,UAAU;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,QAAQ,CAAC,eAAe,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,eAAoB;IAyBvD;;;OAGG;IACH,MAAM,CAAC,EACL,MAAM,EACN,YAAY,EACZ,MAAa,EACb,MAAiB,EACjB,oBAA0B,EAC1B,SAAa,EACb,OAAY,EACZ,oBAAwB,EACxB,iBAAuB,EACvB,aAAmB,EACnB,sBAA4B,EAC5B,uBAA4B,EAC5B,UAAc,EACf,EAAE,mBAAmB,GAAG,OAAO;IA2BhC,OAAO,IAAI,IAAI;IAUf,OAAO,CAAC,YAAY;CAgBrB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { assert } from '@luma.gl/core';
|
|
5
|
+
import { getCORTAOPrepassUniforms, isSupportedProjection } from "./cortao-parameters.js";
|
|
6
|
+
import { CORTAOUpsample } from "./cortao-upsample.js";
|
|
7
|
+
import { CORTAOWebGLPasses } from "./cortao-webgl-passes.js";
|
|
8
|
+
import { CORTAOWebGPUPasses } from "./cortao-webgpu-passes.js";
|
|
9
|
+
/** @experimental Depth-only ambient visibility using Circular Occluder Ray-Traced Ambient Occlusion. */
|
|
10
|
+
export class CORTAOPass {
|
|
11
|
+
device;
|
|
12
|
+
passes;
|
|
13
|
+
resolutionScale;
|
|
14
|
+
upsample;
|
|
15
|
+
depthOnlyView = null;
|
|
16
|
+
destroyed = false;
|
|
17
|
+
constructor(device, props = {}) {
|
|
18
|
+
this.device = device;
|
|
19
|
+
const { id = 'cortao', resolutionScale = 1, sampleCount = 16, rayCount = 16, largeFilter = true, filterSymmetry = true } = props;
|
|
20
|
+
// The sample count is injected into the GLSL and WGSL as an integer constant.
|
|
21
|
+
assert(Number.isInteger(sampleCount) && sampleCount > 0);
|
|
22
|
+
// Only WebGL 2 and WebGPU implement the required integer texture operations.
|
|
23
|
+
assert(device.type === 'webgl' || device.type === 'webgpu');
|
|
24
|
+
const Passes = device.type === 'webgpu' ? CORTAOWebGPUPasses : CORTAOWebGLPasses;
|
|
25
|
+
this.passes = new Passes(device, id, { sampleCount, rayCount, largeFilter, filterSymmetry }, resolutionScale !== 1);
|
|
26
|
+
this.resolutionScale = resolutionScale;
|
|
27
|
+
this.upsample = resolutionScale === 1 ? null : new CORTAOUpsample(device, `${id}-upsample`);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Borrows single-sample hardware depth and returns a pass-owned, full-resolution visibility mask.
|
|
31
|
+
* On WebGPU, submit each render before recording another render with this instance.
|
|
32
|
+
*/
|
|
33
|
+
render({ camera, depthTexture, filter = true, radius = Infinity, maxScreenSpaceRadius = 0.2, intensity = 1, mipBias = -4, maxSlopeCompensation = 4, backfaceThreshold = 0.5, backfaceBoost = 0.5, filterDepthSensitivity = 512, filterNormalSensitivity = 16, randomSeed = 0 }) {
|
|
34
|
+
// The depth texture must come from the same device and the supplied perspective camera.
|
|
35
|
+
assert(!this.destroyed && depthTexture.device === this.device);
|
|
36
|
+
assert(isSupportedProjection(camera.projectionMatrix));
|
|
37
|
+
const configuration = {
|
|
38
|
+
width: Math.max(1, Math.round(depthTexture.width * this.resolutionScale)),
|
|
39
|
+
height: Math.max(1, Math.round(depthTexture.height * this.resolutionScale)),
|
|
40
|
+
radius,
|
|
41
|
+
maxScreenSpaceRadius,
|
|
42
|
+
intensity,
|
|
43
|
+
mipBias,
|
|
44
|
+
maxSlopeCompensation,
|
|
45
|
+
backfaceThreshold,
|
|
46
|
+
backfaceBoost,
|
|
47
|
+
filterDepthSensitivity,
|
|
48
|
+
filterNormalSensitivity,
|
|
49
|
+
randomSeed
|
|
50
|
+
};
|
|
51
|
+
const depthView = this.getDepthView(depthTexture);
|
|
52
|
+
const visibility = this.passes.renderOcclusion({ camera, depthView, filter, configuration });
|
|
53
|
+
if (!this.upsample) {
|
|
54
|
+
return visibility;
|
|
55
|
+
}
|
|
56
|
+
const { depthScale, depthOffset } = getCORTAOPrepassUniforms(camera, configuration);
|
|
57
|
+
return this.upsample.render(depthView, visibility, { depthScale, depthOffset });
|
|
58
|
+
}
|
|
59
|
+
destroy() {
|
|
60
|
+
if (!this.destroyed) {
|
|
61
|
+
this.destroyed = true;
|
|
62
|
+
this.passes.destroy();
|
|
63
|
+
this.upsample?.destroy();
|
|
64
|
+
this.depthOnlyView?.destroy();
|
|
65
|
+
this.depthOnlyView = null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
getDepthView(depthTexture) {
|
|
69
|
+
if (this.device.type !== 'webgpu') {
|
|
70
|
+
return depthTexture.view;
|
|
71
|
+
}
|
|
72
|
+
if (this.depthOnlyView?.texture === depthTexture) {
|
|
73
|
+
return this.depthOnlyView;
|
|
74
|
+
}
|
|
75
|
+
this.depthOnlyView?.destroy();
|
|
76
|
+
// A depth binding cannot use the all-aspects view of a combined depth-stencil texture.
|
|
77
|
+
this.depthOnlyView =
|
|
78
|
+
this.device.getTextureFormatInfo(depthTexture.format).attachment === 'depth-stencil'
|
|
79
|
+
? depthTexture.createView({ aspect: 'depth-only', mipLevelCount: 1, arrayLayerCount: 1 })
|
|
80
|
+
: null;
|
|
81
|
+
return this.depthOnlyView ?? depthTexture.view;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=cortao-pass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cortao-pass.js","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-pass.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,MAAM,EAA8C,MAAM,eAAe,CAAC;AAClF,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EAGtB,+BAA4B;AAE7B,OAAO,EAAC,cAAc,EAAC,6BAA0B;AACjD,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAgB1D,wGAAwG;AACxG,MAAM,OAAO,UAAU;IACZ,MAAM,CAAS;IACP,MAAM,CAAe;IAC7B,eAAe,CAAiB;IACxB,QAAQ,CAAwB;IACzC,aAAa,GAAuB,IAAI,CAAC;IACzC,SAAS,GAAG,KAAK,CAAC;IAE1B,YAAY,MAAc,EAAE,QAAyB,EAAE;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,EACJ,EAAE,GAAG,QAAQ,EACb,eAAe,GAAG,CAAC,EACnB,WAAW,GAAG,EAAE,EAChB,QAAQ,GAAG,EAAE,EACb,WAAW,GAAG,IAAI,EAClB,cAAc,GAAG,IAAI,EACtB,GAAG,KAAK,CAAC;QACV,8EAA8E;QAC9E,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC;QACzD,6EAA6E;QAC7E,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,iBAAiB,CAAC;QACjF,IAAI,CAAC,MAAM,GAAG,IAA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AAM,CAAC,oBAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,UAAU,KAAK,eAAe;gBAClF,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,EAAC,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAC,CAAC;gBACvF,CAAC,CAAC,IAAI,CAAC;QACX,OAAO,IAAI,CAAC,aAAa,IAAI,YAAY,CAAC,IAAI,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cortao_passes_exports = {};
|
|
19
|
+
__export(cortao_passes_exports, {
|
|
20
|
+
LOOKUP_TABLE_SIZE: () => LOOKUP_TABLE_SIZE,
|
|
21
|
+
NEAREST_SAMPLER: () => NEAREST_SAMPLER,
|
|
22
|
+
PASS_PARAMETERS: () => PASS_PARAMETERS
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(cortao_passes_exports);
|
|
25
|
+
const PASS_PARAMETERS = {
|
|
26
|
+
depthWriteEnabled: false,
|
|
27
|
+
depthCompare: "always"
|
|
28
|
+
};
|
|
29
|
+
const NEAREST_SAMPLER = {
|
|
30
|
+
minFilter: "nearest",
|
|
31
|
+
magFilter: "nearest"
|
|
32
|
+
};
|
|
33
|
+
const LOOKUP_TABLE_SIZE = {
|
|
34
|
+
directionResolution: 24,
|
|
35
|
+
radiusResolution: 16
|
|
36
|
+
};
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
LOOKUP_TABLE_SIZE,
|
|
40
|
+
NEAREST_SAMPLER,
|
|
41
|
+
PASS_PARAMETERS
|
|
42
|
+
});
|