@luma.gl/engine 10.0.0-rc.1 → 10.0.0-rc.2
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 +82 -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 +1671 -1105
- 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 +402 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts +101 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.js +410 -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 +117 -30
- package/dist/effects/index.cjs.map +3 -3
- package/dist/effects/index.d.ts +34 -18
- package/dist/effects/index.d.ts.map +1 -1
- package/dist/effects/index.js +31 -18
- package/dist/effects/index.js.map +1 -1
- 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/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-blur-filters/bloom-composite-shader-pass.cjs +200 -13
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +992 -6
- 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 +3 -3
- 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/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 +83 -66
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +470 -2
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +80 -62
- 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 +14 -5
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +125 -17
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.js +11 -3
- package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/dof.cjs +19 -3
- package/dist/effects/passes/screen-space/dof.d.ts +181 -0
- package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/dof.js +17 -3
- package/dist/effects/passes/screen-space/dof.js.map +1 -1
- package/dist/effects/passes/screen-space/gtao.cjs +82 -62
- package/dist/effects/passes/screen-space/gtao.d.ts +608 -3
- package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/gtao.js +83 -60
- 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 +225 -3
- 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 +162 -3
- 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 +70 -61
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +309 -2
- 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 +69 -59
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.cjs +151 -83
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +778 -7
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.js +148 -79
- 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 +647 -2
- 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/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 +161 -2
- 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/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 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- 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 +71 -20
- package/dist/lighting/clustered-light-grid.d.ts +37 -0
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
- package/dist/lighting/clustered-light-grid.js +68 -18
- 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 +274 -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 +11 -6
- 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 +155 -0
- package/dist/passes/effect-renderer.d.ts +158 -0
- package/dist/passes/effect-renderer.d.ts.map +1 -0
- package/dist/passes/effect-renderer.js +143 -0
- package/dist/passes/effect-renderer.js.map +1 -0
- 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/passes/shader-pass-renderer.cjs +94 -68
- package/dist/passes/shader-pass-renderer.d.ts +32 -15
- package/dist/passes/shader-pass-renderer.d.ts.map +1 -1
- package/dist/passes/shader-pass-renderer.js +104 -76
- package/dist/passes/shader-pass-renderer.js.map +1 -1
- 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/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 +3 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.js +10 -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/index.cjs +2 -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/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 +38 -14
- package/src/effects/glfx-effects.ts +227 -0
- package/src/effects/graph/gpu-effect-operation.ts +601 -0
- package/src/effects/graph/temporal-graph-history.ts +46 -0
- package/src/effects/index.ts +81 -19
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +8 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +8 -0
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +219 -19
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +6 -6
- package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +45 -45
- package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +88 -68
- package/src/effects/passes/screen-space/copy-pass.ts +4 -0
- package/src/effects/passes/screen-space/depth-aware-blur.ts +13 -3
- package/src/effects/passes/screen-space/dof.ts +20 -3
- package/src/effects/passes/screen-space/gtao.ts +91 -65
- package/src/effects/passes/screen-space/hdr-auto-exposure.ts +109 -84
- package/src/effects/passes/screen-space/height-fog.ts +18 -3
- package/src/effects/passes/screen-space/motion-blur.ts +8 -7
- package/src/effects/passes/screen-space/outlines.ts +143 -17
- package/src/effects/passes/screen-space/screen-space-global-illumination.ts +75 -64
- package/src/effects/passes/screen-space/screen-space-reflections.ts +158 -95
- package/src/effects/passes/screen-space/selection-outline.ts +11 -0
- package/src/effects/passes/screen-space/ssao.ts +76 -45
- package/src/effects/passes/screen-space/temporal-antialiasing.ts +43 -33
- package/src/effects/passes/screen-space/temporal-frame.ts +33 -0
- package/src/effects/passes/screen-space/volumetric-fog.ts +30 -24
- 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 +25 -0
- package/src/lighting/ambient-occlusion-pass.ts +62 -28
- package/src/lighting/clustered-light-grid.ts +87 -30
- 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 +12 -3
- package/src/lighting/shadow-map-renderer.ts +57 -43
- package/src/model/gpu-vector-model.ts +47 -18
- package/src/passes/effect-renderer.ts +332 -0
- package/src/passes/scene-capture-pass.ts +51 -0
- package/src/passes/shader-pass-renderer.ts +164 -115
- package/src/scenegraph/model-node.ts +5 -0
- 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 +12 -2
- package/src/text/fonts/atlas/lru-cache.ts +6 -1
- package/src/text/fonts/index.ts +1 -0
|
@@ -615,69 +615,87 @@ fn clusteredVolumetricComposite_sampleColor(
|
|
|
615
615
|
},
|
|
616
616
|
passes: [{ sampler: true }]
|
|
617
617
|
};
|
|
618
|
+
/** Use full-resolution evaluation and history textures by default. */
|
|
619
|
+
const clusteredVolumetricLightingOptionDefaults = {
|
|
620
|
+
resolutionScale: 1
|
|
621
|
+
};
|
|
618
622
|
/** Creates clustered participating-media integration, temporal stabilization, and composition. */
|
|
619
|
-
export
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
clusteredVolumeRaw
|
|
625
|
-
clusteredVolumeHistory
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
},
|
|
640
|
-
clusteredVolumeScratch: { scale: [scale, scale], format: 'rgba16float' },
|
|
641
|
-
clusteredVolumeScattering: { scale: [scale, scale], format: 'rgba16float' }
|
|
623
|
+
export const clusteredVolumetricLighting = {
|
|
624
|
+
optionDefaults: clusteredVolumetricLightingOptionDefaults,
|
|
625
|
+
scaleResources: {
|
|
626
|
+
option: 'resolutionScale',
|
|
627
|
+
targets: [
|
|
628
|
+
'clusteredVolumeRaw',
|
|
629
|
+
'clusteredVolumeHistory',
|
|
630
|
+
'clusteredVolumeDepthHistory',
|
|
631
|
+
'clusteredVolumeScratch',
|
|
632
|
+
'clusteredVolumeScattering'
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
name: 'clusteredVolumetricLightingCompositeShaderPass',
|
|
636
|
+
resources: {
|
|
637
|
+
clusteredVolumeRaw: { scale: [1, 1], format: 'rgba16float' },
|
|
638
|
+
clusteredVolumeHistory: {
|
|
639
|
+
scale: [1, 1],
|
|
640
|
+
format: 'rgba16float',
|
|
641
|
+
lifetime: 'history',
|
|
642
|
+
initialize: { clearColor: [0, 0, 0, 1] }
|
|
642
643
|
},
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
{
|
|
670
|
-
shaderPass: depthAwareBlur,
|
|
671
|
-
inputs: { sourceTexture: 'clusteredVolumeScratch' },
|
|
672
|
-
output: 'clusteredVolumeScattering',
|
|
673
|
-
uniforms: { direction: [0, 1], radius: 3, spatialSigma: 2.2, depthSigma: 0.018 }
|
|
644
|
+
clusteredVolumeDepthHistory: {
|
|
645
|
+
scale: [1, 1],
|
|
646
|
+
// Keep the same four-byte footprint as r32float while remaining filterable on core WebGPU.
|
|
647
|
+
// The temporal shader uses textureLoad(), but the inferred texture_2d<f32> binding still
|
|
648
|
+
// requires a filterable sample type when the surrounding pass layout is assembled.
|
|
649
|
+
format: 'rg16float',
|
|
650
|
+
lifetime: 'history',
|
|
651
|
+
initialize: { clearColor: [0, 0, 0, 1] }
|
|
652
|
+
},
|
|
653
|
+
clusteredVolumeScratch: { scale: [1, 1], format: 'rgba16float' },
|
|
654
|
+
clusteredVolumeScattering: { scale: [1, 1], format: 'rgba16float' }
|
|
655
|
+
},
|
|
656
|
+
passes: [
|
|
657
|
+
{
|
|
658
|
+
kind: 'fullscreen',
|
|
659
|
+
shaderPass: clusteredVolumetricTrace,
|
|
660
|
+
inputs: { sourceTexture: 'previous' },
|
|
661
|
+
output: 'clusteredVolumeRaw'
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
kind: 'fullscreen',
|
|
665
|
+
shaderPass: clusteredVolumetricTemporal,
|
|
666
|
+
inputs: {
|
|
667
|
+
sourceTexture: 'clusteredVolumeRaw',
|
|
668
|
+
historyTexture: 'clusteredVolumeHistory',
|
|
669
|
+
previousDepthTexture: 'clusteredVolumeDepthHistory'
|
|
674
670
|
},
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
671
|
+
output: 'clusteredVolumeHistory'
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
kind: 'fullscreen',
|
|
675
|
+
shaderPass: clusteredVolumetricDepthHistoryCopy,
|
|
676
|
+
inputs: { sourceTexture: 'previous' },
|
|
677
|
+
output: 'clusteredVolumeDepthHistory'
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
kind: 'fullscreen',
|
|
681
|
+
shaderPass: depthAwareBlur,
|
|
682
|
+
inputs: { sourceTexture: 'clusteredVolumeHistory' },
|
|
683
|
+
output: 'clusteredVolumeScratch',
|
|
684
|
+
uniforms: { direction: [1, 0], radius: 3, spatialSigma: 2.2, depthSigma: 0.018 }
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
kind: 'fullscreen',
|
|
688
|
+
shaderPass: depthAwareBlur,
|
|
689
|
+
inputs: { sourceTexture: 'clusteredVolumeScratch' },
|
|
690
|
+
output: 'clusteredVolumeScattering',
|
|
691
|
+
uniforms: { direction: [0, 1], radius: 3, spatialSigma: 2.2, depthSigma: 0.018 }
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
kind: 'fullscreen',
|
|
695
|
+
shaderPass: clusteredVolumetricComposite,
|
|
696
|
+
inputs: { sourceTexture: 'previous', scatteringTexture: 'clusteredVolumeScattering' },
|
|
697
|
+
output: 'previous'
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
};
|
|
683
701
|
//# sourceMappingURL=clustered-volumetric-lighting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clustered-volumetric-lighting.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/clustered-volumetric-lighting.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;
|
|
1
|
+
{"version":3,"file":"clustered-volumetric-lighting.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/clustered-volumetric-lighting.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAM5D,OAAO,EAAC,cAAc,EAAC,8BAA2B;AAwElD,MAAM,eAAe,GAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAExF,gGAAgG;AAChG,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAC;SAC/E;QACD;YACE,IAAI,EAAE,YAAqB;YAC3B,UAAU,EAAE,4BAA4B;YACxC,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,2BAA2B,EAAC;YACnF,MAAM,EAAE,UAAU;SACnB;KACF;CAQF,CAAC"}
|
|
@@ -27,6 +27,13 @@ const copyPass = {
|
|
|
27
27
|
`fn advancedCopy_sampleColor(
|
|
28
28
|
sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f
|
|
29
29
|
) -> vec4f { return textureSample(sourceTexture, sourceTextureSampler, texCoord); }`
|
|
30
|
+
),
|
|
31
|
+
fs: (
|
|
32
|
+
/* glsl */
|
|
33
|
+
`
|
|
34
|
+
vec4 advancedCopy_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {
|
|
35
|
+
return texture(sourceTexture, texCoord);
|
|
36
|
+
}`
|
|
30
37
|
),
|
|
31
38
|
passes: [{ sampler: true }]
|
|
32
39
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const copyPass: {
|
|
2
2
|
readonly name: "advancedCopy";
|
|
3
3
|
readonly source: "fn advancedCopy_sampleColor(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f { return textureSample(sourceTexture, sourceTextureSampler, texCoord); }";
|
|
4
|
+
readonly fs: "\nvec4 advancedCopy_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {\n return texture(sourceTexture, texCoord);\n}";
|
|
4
5
|
readonly passes: [{
|
|
5
6
|
readonly sampler: true;
|
|
6
7
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-pass.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/copy-pass.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"copy-pass.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/copy-pass.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ;;;;;;;CAWU,CAAC"}
|
|
@@ -7,6 +7,10 @@ export const copyPass = {
|
|
|
7
7
|
fn advancedCopy_sampleColor(
|
|
8
8
|
sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f
|
|
9
9
|
) -> vec4f { return textureSample(sourceTexture, sourceTextureSampler, texCoord); }`,
|
|
10
|
+
fs: /* glsl */ `
|
|
11
|
+
vec4 advancedCopy_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {
|
|
12
|
+
return texture(sourceTexture, texCoord);
|
|
13
|
+
}`,
|
|
10
14
|
passes: [{ sampler: true }]
|
|
11
15
|
};
|
|
12
16
|
//# sourceMappingURL=copy-pass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-pass.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/copy-pass.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,UAAU,CAAC;;;oFAG+D;IAClF,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;CACI,CAAC"}
|
|
1
|
+
{"version":3,"file":"copy-pass.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/copy-pass.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,UAAU,CAAC;;;oFAG+D;IAClF,EAAE,EAAE,UAAU,CAAC;;;EAGf;IACA,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;CACI,CAAC"}
|
|
@@ -18,7 +18,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
18
18
|
var depth_aware_blur_exports = {};
|
|
19
19
|
__export(depth_aware_blur_exports, {
|
|
20
20
|
depthAwareBlur: () => depthAwareBlur,
|
|
21
|
-
depthAwareBlurCompositeShaderPass: () => depthAwareBlurCompositeShaderPass
|
|
21
|
+
depthAwareBlurCompositeShaderPass: () => depthAwareBlurCompositeShaderPass,
|
|
22
|
+
depthAwareBlurEffect: () => depthAwareBlurEffect
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(depth_aware_blur_exports);
|
|
24
25
|
const depthAwareBlurSource = (
|
|
@@ -84,17 +85,19 @@ const depthAwareBlur = {
|
|
|
84
85
|
},
|
|
85
86
|
passes: [{ sampler: true }]
|
|
86
87
|
};
|
|
87
|
-
const
|
|
88
|
+
const depthAwareBlurEffect = {
|
|
88
89
|
name: "depthAwareBlurCompositeShaderPass",
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
resources: { depthAwareBlurScratch: {} },
|
|
91
|
+
passes: [
|
|
91
92
|
{
|
|
93
|
+
kind: "fullscreen",
|
|
92
94
|
shaderPass: depthAwareBlur,
|
|
93
95
|
inputs: { sourceTexture: "previous" },
|
|
94
96
|
output: "depthAwareBlurScratch",
|
|
95
97
|
uniforms: { direction: [1, 0] }
|
|
96
98
|
},
|
|
97
99
|
{
|
|
100
|
+
kind: "fullscreen",
|
|
98
101
|
shaderPass: depthAwareBlur,
|
|
99
102
|
inputs: { sourceTexture: "depthAwareBlurScratch" },
|
|
100
103
|
output: "previous",
|
|
@@ -102,8 +105,14 @@ const depthAwareBlurCompositeShaderPass = {
|
|
|
102
105
|
}
|
|
103
106
|
]
|
|
104
107
|
};
|
|
108
|
+
const depthAwareBlurCompositeShaderPass = {
|
|
109
|
+
name: depthAwareBlurEffect.name,
|
|
110
|
+
renderTargets: depthAwareBlurEffect.resources,
|
|
111
|
+
steps: depthAwareBlurEffect.passes
|
|
112
|
+
};
|
|
105
113
|
// Annotate the CommonJS export names for ESM import in node:
|
|
106
114
|
0 && (module.exports = {
|
|
107
115
|
depthAwareBlur,
|
|
108
|
-
depthAwareBlurCompositeShaderPass
|
|
116
|
+
depthAwareBlurCompositeShaderPass,
|
|
117
|
+
depthAwareBlurEffect
|
|
109
118
|
});
|
|
@@ -49,13 +49,120 @@ export declare const depthAwareBlur: {
|
|
|
49
49
|
readonly sampler: true;
|
|
50
50
|
}];
|
|
51
51
|
};
|
|
52
|
+
export declare const depthAwareBlurEffect: {
|
|
53
|
+
readonly name: "depthAwareBlurCompositeShaderPass";
|
|
54
|
+
readonly resources: {
|
|
55
|
+
readonly depthAwareBlurScratch: {};
|
|
56
|
+
};
|
|
57
|
+
readonly passes: [{
|
|
58
|
+
readonly kind: "fullscreen";
|
|
59
|
+
readonly shaderPass: {
|
|
60
|
+
readonly name: "depthAwareBlur";
|
|
61
|
+
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
62
|
+
readonly bindingLayout: readonly [{
|
|
63
|
+
readonly name: "depthTexture";
|
|
64
|
+
readonly group: 0;
|
|
65
|
+
}];
|
|
66
|
+
readonly props: DepthAwareBlurProps & DepthAwareBlurBindings;
|
|
67
|
+
readonly uniforms: DepthAwareBlurUniforms;
|
|
68
|
+
readonly bindings: DepthAwareBlurBindings;
|
|
69
|
+
readonly uniformTypes: {
|
|
70
|
+
readonly direction: "vec2<f32>";
|
|
71
|
+
readonly radius: "f32";
|
|
72
|
+
readonly depthSigma: "f32";
|
|
73
|
+
readonly spatialSigma: "f32";
|
|
74
|
+
};
|
|
75
|
+
readonly propTypes: {
|
|
76
|
+
readonly direction: {
|
|
77
|
+
readonly value: readonly [1, 0];
|
|
78
|
+
};
|
|
79
|
+
readonly radius: {
|
|
80
|
+
readonly value: 4;
|
|
81
|
+
readonly min: 1;
|
|
82
|
+
readonly max: 8;
|
|
83
|
+
};
|
|
84
|
+
readonly depthSigma: {
|
|
85
|
+
readonly value: 0.01;
|
|
86
|
+
readonly min: 0.0001;
|
|
87
|
+
readonly softMax: 0.1;
|
|
88
|
+
};
|
|
89
|
+
readonly spatialSigma: {
|
|
90
|
+
readonly value: 3;
|
|
91
|
+
readonly min: 0.1;
|
|
92
|
+
readonly softMax: 8;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly passes: [{
|
|
96
|
+
readonly sampler: true;
|
|
97
|
+
}];
|
|
98
|
+
};
|
|
99
|
+
readonly inputs: {
|
|
100
|
+
readonly sourceTexture: "previous";
|
|
101
|
+
};
|
|
102
|
+
readonly output: "depthAwareBlurScratch";
|
|
103
|
+
readonly uniforms: {
|
|
104
|
+
readonly direction: [1, 0];
|
|
105
|
+
};
|
|
106
|
+
}, {
|
|
107
|
+
readonly kind: "fullscreen";
|
|
108
|
+
readonly shaderPass: {
|
|
109
|
+
readonly name: "depthAwareBlur";
|
|
110
|
+
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
111
|
+
readonly bindingLayout: readonly [{
|
|
112
|
+
readonly name: "depthTexture";
|
|
113
|
+
readonly group: 0;
|
|
114
|
+
}];
|
|
115
|
+
readonly props: DepthAwareBlurProps & DepthAwareBlurBindings;
|
|
116
|
+
readonly uniforms: DepthAwareBlurUniforms;
|
|
117
|
+
readonly bindings: DepthAwareBlurBindings;
|
|
118
|
+
readonly uniformTypes: {
|
|
119
|
+
readonly direction: "vec2<f32>";
|
|
120
|
+
readonly radius: "f32";
|
|
121
|
+
readonly depthSigma: "f32";
|
|
122
|
+
readonly spatialSigma: "f32";
|
|
123
|
+
};
|
|
124
|
+
readonly propTypes: {
|
|
125
|
+
readonly direction: {
|
|
126
|
+
readonly value: readonly [1, 0];
|
|
127
|
+
};
|
|
128
|
+
readonly radius: {
|
|
129
|
+
readonly value: 4;
|
|
130
|
+
readonly min: 1;
|
|
131
|
+
readonly max: 8;
|
|
132
|
+
};
|
|
133
|
+
readonly depthSigma: {
|
|
134
|
+
readonly value: 0.01;
|
|
135
|
+
readonly min: 0.0001;
|
|
136
|
+
readonly softMax: 0.1;
|
|
137
|
+
};
|
|
138
|
+
readonly spatialSigma: {
|
|
139
|
+
readonly value: 3;
|
|
140
|
+
readonly min: 0.1;
|
|
141
|
+
readonly softMax: 8;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly passes: [{
|
|
145
|
+
readonly sampler: true;
|
|
146
|
+
}];
|
|
147
|
+
};
|
|
148
|
+
readonly inputs: {
|
|
149
|
+
readonly sourceTexture: "depthAwareBlurScratch";
|
|
150
|
+
};
|
|
151
|
+
readonly output: "previous";
|
|
152
|
+
readonly uniforms: {
|
|
153
|
+
readonly direction: [0, 1];
|
|
154
|
+
};
|
|
155
|
+
}];
|
|
156
|
+
};
|
|
157
|
+
/** Compatibility view of the separable depth-aware blur effect. */
|
|
52
158
|
export declare const depthAwareBlurCompositeShaderPass: {
|
|
53
|
-
name:
|
|
159
|
+
name: "depthAwareBlurCompositeShaderPass";
|
|
54
160
|
renderTargets: {
|
|
55
|
-
depthAwareBlurScratch: {};
|
|
161
|
+
readonly depthAwareBlurScratch: {};
|
|
56
162
|
};
|
|
57
|
-
steps:
|
|
58
|
-
|
|
163
|
+
steps: [{
|
|
164
|
+
readonly kind: "fullscreen";
|
|
165
|
+
readonly shaderPass: {
|
|
59
166
|
readonly name: "depthAwareBlur";
|
|
60
167
|
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
61
168
|
readonly bindingLayout: readonly [{
|
|
@@ -95,15 +202,16 @@ export declare const depthAwareBlurCompositeShaderPass: {
|
|
|
95
202
|
readonly sampler: true;
|
|
96
203
|
}];
|
|
97
204
|
};
|
|
98
|
-
inputs: {
|
|
99
|
-
sourceTexture: "previous";
|
|
205
|
+
readonly inputs: {
|
|
206
|
+
readonly sourceTexture: "previous";
|
|
100
207
|
};
|
|
101
|
-
output: "depthAwareBlurScratch";
|
|
102
|
-
uniforms: {
|
|
103
|
-
direction: [
|
|
208
|
+
readonly output: "depthAwareBlurScratch";
|
|
209
|
+
readonly uniforms: {
|
|
210
|
+
readonly direction: [1, 0];
|
|
104
211
|
};
|
|
105
|
-
}
|
|
106
|
-
|
|
212
|
+
}, {
|
|
213
|
+
readonly kind: "fullscreen";
|
|
214
|
+
readonly shaderPass: {
|
|
107
215
|
readonly name: "depthAwareBlur";
|
|
108
216
|
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
109
217
|
readonly bindingLayout: readonly [{
|
|
@@ -143,14 +251,14 @@ export declare const depthAwareBlurCompositeShaderPass: {
|
|
|
143
251
|
readonly sampler: true;
|
|
144
252
|
}];
|
|
145
253
|
};
|
|
146
|
-
inputs: {
|
|
147
|
-
sourceTexture: "depthAwareBlurScratch";
|
|
254
|
+
readonly inputs: {
|
|
255
|
+
readonly sourceTexture: "depthAwareBlurScratch";
|
|
148
256
|
};
|
|
149
|
-
output: "previous";
|
|
150
|
-
uniforms: {
|
|
151
|
-
direction: [
|
|
257
|
+
readonly output: "previous";
|
|
258
|
+
readonly uniforms: {
|
|
259
|
+
readonly direction: [0, 1];
|
|
152
260
|
};
|
|
153
|
-
}
|
|
261
|
+
}];
|
|
154
262
|
};
|
|
155
263
|
export {};
|
|
156
264
|
//# sourceMappingURL=depth-aware-blur.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth-aware-blur.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/depth-aware-blur.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"depth-aware-blur.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/depth-aware-blur.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAG3C,MAAM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 'depthAwareBlurCompositeShaderPass',
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
resources: { depthAwareBlurScratch: {} },
|
|
68
|
+
passes: [
|
|
69
69
|
{
|
|
70
|
+
kind: 'fullscreen',
|
|
70
71
|
shaderPass: depthAwareBlur,
|
|
71
72
|
inputs: { sourceTexture: 'previous' },
|
|
72
73
|
output: 'depthAwareBlurScratch',
|
|
73
74
|
uniforms: { direction: [1, 0] }
|
|
74
75
|
},
|
|
75
76
|
{
|
|
77
|
+
kind: 'fullscreen',
|
|
76
78
|
shaderPass: depthAwareBlur,
|
|
77
79
|
inputs: { sourceTexture: 'depthAwareBlurScratch' },
|
|
78
80
|
output: 'previous',
|
|
@@ -80,4 +82,10 @@ export const depthAwareBlurCompositeShaderPass = {
|
|
|
80
82
|
}
|
|
81
83
|
]
|
|
82
84
|
};
|
|
85
|
+
/** Compatibility view of the separable depth-aware blur effect. */
|
|
86
|
+
export const depthAwareBlurCompositeShaderPass = {
|
|
87
|
+
name: depthAwareBlurEffect.name,
|
|
88
|
+
renderTargets: depthAwareBlurEffect.resources,
|
|
89
|
+
steps: depthAwareBlurEffect.passes
|
|
90
|
+
};
|
|
83
91
|
//# sourceMappingURL=depth-aware-blur.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth-aware-blur.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/depth-aware-blur.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;
|
|
1
|
+
{"version":3,"file":"depth-aware-blur.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/depth-aware-blur.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAgB5D,MAAM,oBAAoB,GAAG,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCvC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,g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EAAE,UAAU;YAClB,QAAQ,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;SAC9B;KACF;CAC2D,CAAC;AAE/D,mEAAmE;AACnE,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,IAAI,EAAE,oBAAoB,CAAC,IAAI;IAC/B,aAAa,EAAE,oBAAoB,CAAC,SAAS;IAC7C,KAAK,EAAE,oBAAoB,CAAC,MAAM;CACoB,CAAC"}
|
|
@@ -18,6 +18,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
18
18
|
var dof_exports = {};
|
|
19
19
|
__export(dof_exports, {
|
|
20
20
|
bokehDof: () => bokehDof,
|
|
21
|
+
bokehDofEffect: () => bokehDofEffect,
|
|
22
|
+
depthOfField: () => depthOfField,
|
|
21
23
|
dof: () => dof,
|
|
22
24
|
dofCompositeShaderPass: () => dofCompositeShaderPass
|
|
23
25
|
});
|
|
@@ -217,17 +219,19 @@ const dof = {
|
|
|
217
219
|
},
|
|
218
220
|
passes: [{ sampler: true }]
|
|
219
221
|
};
|
|
220
|
-
const
|
|
222
|
+
const depthOfField = {
|
|
221
223
|
name: "dofCompositeShaderPass",
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
resources: { blurScratch: {} },
|
|
225
|
+
passes: [
|
|
224
226
|
{
|
|
227
|
+
kind: "fullscreen",
|
|
225
228
|
shaderPass: dof,
|
|
226
229
|
inputs: { sourceTexture: "previous" },
|
|
227
230
|
output: "blurScratch",
|
|
228
231
|
uniforms: { texelOffset: [1, 0] }
|
|
229
232
|
},
|
|
230
233
|
{
|
|
234
|
+
kind: "fullscreen",
|
|
231
235
|
shaderPass: dof,
|
|
232
236
|
inputs: { sourceTexture: "blurScratch" },
|
|
233
237
|
output: "previous",
|
|
@@ -235,6 +239,11 @@ const dofCompositeShaderPass = {
|
|
|
235
239
|
}
|
|
236
240
|
]
|
|
237
241
|
};
|
|
242
|
+
const dofCompositeShaderPass = {
|
|
243
|
+
name: depthOfField.name,
|
|
244
|
+
renderTargets: depthOfField.resources,
|
|
245
|
+
steps: depthOfField.passes
|
|
246
|
+
};
|
|
238
247
|
const bokehDof = {
|
|
239
248
|
...dof,
|
|
240
249
|
name: "bokehDof",
|
|
@@ -242,9 +251,16 @@ const bokehDof = {
|
|
|
242
251
|
fs: fs.replaceAll("dof", "bokehDof"),
|
|
243
252
|
propTypes: { ...dof.propTypes, circularAperture: { value: 1, private: true } }
|
|
244
253
|
};
|
|
254
|
+
const bokehDofEffect = {
|
|
255
|
+
name: bokehDof.name,
|
|
256
|
+
resources: {},
|
|
257
|
+
passes: [{ kind: "fullscreen", shaderPass: bokehDof, output: "previous" }]
|
|
258
|
+
};
|
|
245
259
|
// Annotate the CommonJS export names for ESM import in node:
|
|
246
260
|
0 && (module.exports = {
|
|
247
261
|
bokehDof,
|
|
262
|
+
bokehDofEffect,
|
|
263
|
+
depthOfField,
|
|
248
264
|
dof,
|
|
249
265
|
dofCompositeShaderPass
|
|
250
266
|
});
|