@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssao.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/ssao.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssao.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/ssao.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAK3C,MAAM,MAAM,8BAA8B,GAAG;IAC3C,YAAY,CAAC,EAAE,wBAAwB,GAAG,gBAAgB,CAAC;IAC3D,mFAAmF;IACnF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,YAAY,GAAG;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC;AAgDtE,eAAO,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiH7B,CAAC"}
|
|
@@ -76,47 +76,6 @@ export const ssaoEvaluate = {
|
|
|
76
76
|
},
|
|
77
77
|
passes: [{ sampler: true }]
|
|
78
78
|
};
|
|
79
|
-
export function createSSAOCompositeShaderPass(options = {}) {
|
|
80
|
-
const scale = options.resolutionScale ?? 1;
|
|
81
|
-
const useNormalTexture = options.normalSource === 'normal-texture' ? 1 : 0;
|
|
82
|
-
const evaluateInputs = { sourceTexture: 'previous' };
|
|
83
|
-
if (!useNormalTexture) {
|
|
84
|
-
evaluateInputs['normalTexture'] = 'previous';
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
name: 'ssaoCompositeShaderPass',
|
|
88
|
-
renderTargets: {
|
|
89
|
-
ssaoRaw: { scale: [scale, scale], format: 'rgba8unorm' },
|
|
90
|
-
ssaoScratch: { scale: [scale, scale], format: 'rgba8unorm' },
|
|
91
|
-
ssaoBlurred: { scale: [scale, scale], format: 'rgba8unorm' }
|
|
92
|
-
},
|
|
93
|
-
steps: [
|
|
94
|
-
{
|
|
95
|
-
shaderPass: ssaoEvaluate,
|
|
96
|
-
inputs: evaluateInputs,
|
|
97
|
-
output: 'ssaoRaw',
|
|
98
|
-
uniforms: { useNormalTexture }
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
shaderPass: depthAwareBlur,
|
|
102
|
-
inputs: { sourceTexture: 'ssaoRaw' },
|
|
103
|
-
output: 'ssaoScratch',
|
|
104
|
-
uniforms: { direction: [1, 0] }
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
shaderPass: depthAwareBlur,
|
|
108
|
-
inputs: { sourceTexture: 'ssaoScratch' },
|
|
109
|
-
output: 'ssaoBlurred',
|
|
110
|
-
uniforms: { direction: [0, 1] }
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
shaderPass: ssaoComposite,
|
|
114
|
-
inputs: { sourceTexture: 'previous', ambientOcclusionTexture: 'ssaoBlurred' },
|
|
115
|
-
output: 'previous'
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
79
|
export const ssaoComposite = {
|
|
121
80
|
name: 'ssaoComposite',
|
|
122
81
|
source: /* wgsl */ `\
|
|
@@ -141,4 +100,68 @@ fn ssaoComposite_sampleColor(
|
|
|
141
100
|
propTypes: { debugMode: { value: 0, min: 0, max: 1, private: true } },
|
|
142
101
|
passes: [{ sampler: true }]
|
|
143
102
|
};
|
|
103
|
+
/** SSAO with normals reconstructed from the scene depth input. */
|
|
104
|
+
export const ssao = {
|
|
105
|
+
name: 'ssaoCompositeShaderPass',
|
|
106
|
+
resources: {
|
|
107
|
+
ssaoRaw: { scale: [1, 1], format: 'rgba8unorm' },
|
|
108
|
+
ssaoScratch: { scale: [1, 1], format: 'rgba8unorm' },
|
|
109
|
+
ssaoBlurred: { scale: [1, 1], format: 'rgba8unorm' }
|
|
110
|
+
},
|
|
111
|
+
passes: [
|
|
112
|
+
{
|
|
113
|
+
kind: 'fullscreen',
|
|
114
|
+
shaderPass: ssaoEvaluate,
|
|
115
|
+
inputs: { sourceTexture: 'previous', normalTexture: 'previous' },
|
|
116
|
+
output: 'ssaoRaw',
|
|
117
|
+
uniforms: { useNormalTexture: 0 }
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
kind: 'fullscreen',
|
|
121
|
+
shaderPass: depthAwareBlur,
|
|
122
|
+
inputs: { sourceTexture: 'ssaoRaw' },
|
|
123
|
+
output: 'ssaoScratch',
|
|
124
|
+
uniforms: { direction: [1, 0] }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
kind: 'fullscreen',
|
|
128
|
+
shaderPass: depthAwareBlur,
|
|
129
|
+
inputs: { sourceTexture: 'ssaoScratch' },
|
|
130
|
+
output: 'ssaoBlurred',
|
|
131
|
+
uniforms: { direction: [0, 1] }
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
kind: 'fullscreen',
|
|
135
|
+
shaderPass: ssaoComposite,
|
|
136
|
+
inputs: { sourceTexture: 'previous', ambientOcclusionTexture: 'ssaoBlurred' },
|
|
137
|
+
output: 'previous'
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
const ssaoOptionDefaults = {
|
|
142
|
+
normalSource: 'reconstruct-from-depth',
|
|
143
|
+
resolutionScale: 1
|
|
144
|
+
};
|
|
145
|
+
/** Screen-space ambient occlusion with configurable normal input and target size. */
|
|
146
|
+
export const ssaoEffect = {
|
|
147
|
+
...ssao,
|
|
148
|
+
optionDefaults: ssaoOptionDefaults,
|
|
149
|
+
scaleResources: {
|
|
150
|
+
option: 'resolutionScale',
|
|
151
|
+
targets: ['ssaoRaw', 'ssaoScratch', 'ssaoBlurred']
|
|
152
|
+
},
|
|
153
|
+
variants: {
|
|
154
|
+
option: 'normalSource',
|
|
155
|
+
values: {
|
|
156
|
+
'normal-texture': {
|
|
157
|
+
passes: [
|
|
158
|
+
{ ...ssao.passes[0], inputs: { sourceTexture: 'previous' }, uniforms: { useNormalTexture: 1 } },
|
|
159
|
+
ssao.passes[1],
|
|
160
|
+
ssao.passes[2],
|
|
161
|
+
ssao.passes[3]
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
144
167
|
//# sourceMappingURL=ssao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssao.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/ssao.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;
|
|
1
|
+
{"version":3,"file":"ssao.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/ssao.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAS5D,OAAO,EAAC,cAAc,EAAC,8BAA2B;AAClD,OAAO,EAAC,YAAY,EAAC,yCAAsC;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E,CAAC,CAAC,EAAC;SAC9B;QACD;YACE,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,cAAc;YAC1B,MAAM,EAAE,EAAC,aAAa,EAAE,aAAa,EAAC;YACtC,MAAM,EAAE,aAAa;YACrB,QAAQ,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;SAC9B;QACD;YACE,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,aAAa;YACzB,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAE,uBAAuB,EAAE,aAAa,EAAC;YAC3E,MAAM,EAAE,UAAU;SACnB;KACF;CAC6E,CAAC;AAEjF,MAAM,kBAAkB,GAA6C;IACnE,YAAY,EAAE,wBAAwB;IACtC,eAAe,EAAE,CAAC;CACnB,CAAC;AAEF,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,IAAI;IACP,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE;QACd,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,aAAa,CAAC;KACnD;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,cAAc;QACtB,MAAM,EAAE;YACN,gBAAgB,EAAE;gBAChB,MAAM,EAAE;oBACN,EAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAC,EAAE,QAAQ,EAAE,EAAC,gBAAgB,EAAE,CAAC,EAAC,EAAC;oBACzF,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBACd,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBACd,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;iBACf;aACF;SACF;KACF;CAIF,CAAC"}
|
|
@@ -17,17 +17,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var temporal_antialiasing_exports = {};
|
|
19
19
|
__export(temporal_antialiasing_exports, {
|
|
20
|
-
createTAACompositeShaderPass: () => createTAACompositeShaderPass,
|
|
21
20
|
depthHistoryCopy: () => depthHistoryCopy,
|
|
21
|
+
taa: () => taa,
|
|
22
22
|
taaResolve: () => taaResolve
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(temporal_antialiasing_exports);
|
|
25
25
|
var import_copy_pass = require("./copy-pass.cjs");
|
|
26
|
+
var import_temporal_frame = require("./temporal-frame.cjs");
|
|
26
27
|
const taaResolve = {
|
|
27
28
|
name: "taaResolve",
|
|
28
29
|
source: (
|
|
29
30
|
/* wgsl */
|
|
30
|
-
|
|
31
|
+
`${import_temporal_frame.temporalMotionReprojectionWGSL}
|
|
32
|
+
struct taaResolveUniforms {
|
|
31
33
|
historyWeight: f32,
|
|
32
34
|
depthThreshold: f32,
|
|
33
35
|
currentJitter: vec2f,
|
|
@@ -45,14 +47,15 @@ const taaResolve = {
|
|
|
45
47
|
fn taaResolve_sampleColor(
|
|
46
48
|
sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f
|
|
47
49
|
) -> vec4f {
|
|
50
|
+
let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);
|
|
51
|
+
if (taaResolve.historyWeight <= 0.0) { return current; }
|
|
48
52
|
let dimensions = vec2f(textureDimensions(sourceTexture));
|
|
49
53
|
let texel = 1.0 / dimensions;
|
|
50
54
|
let sceneCoord = texCoord;
|
|
51
55
|
let velocity = textureSample(velocityTexture, velocityTextureSampler, sceneCoord).xy;
|
|
52
|
-
let previousUv = texCoord - velocity + taaResolve.previousJitter
|
|
56
|
+
let previousUv = temporal_reprojectMotion(texCoord - taaResolve.currentJitter, velocity) + taaResolve.previousJitter;
|
|
53
57
|
let currentDepth = textureSample(depthTexture, depthTextureSampler, sceneCoord);
|
|
54
58
|
let previousDepth = textureSample(previousDepthTexture, previousDepthTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).r;
|
|
55
|
-
let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);
|
|
56
59
|
var minimumColor = current.rgb;
|
|
57
60
|
var maximumColor = current.rgb;
|
|
58
61
|
for (var y: i32 = -1; y <= 1; y++) {
|
|
@@ -103,35 +106,44 @@ fn depthHistoryCopy_sampleColor(
|
|
|
103
106
|
bindingLayout: [{ name: "depthTexture", group: 0 }],
|
|
104
107
|
passes: [{ sampler: true }]
|
|
105
108
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
output: "taaHistoryColor"
|
|
109
|
+
const taa = {
|
|
110
|
+
name: "taaCompositeShaderPass",
|
|
111
|
+
resources: {
|
|
112
|
+
taaHistoryColor: { lifetime: "history", initialize: "original" },
|
|
113
|
+
taaHistoryDepth: {
|
|
114
|
+
format: "rgba16float",
|
|
115
|
+
lifetime: "history",
|
|
116
|
+
initialize: { clearColor: [1, 0, 0, 1] }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
passes: [
|
|
120
|
+
{
|
|
121
|
+
kind: "fullscreen",
|
|
122
|
+
shaderPass: taaResolve,
|
|
123
|
+
inputs: {
|
|
124
|
+
sourceTexture: "previous",
|
|
125
|
+
historyTexture: "taaHistoryColor",
|
|
126
|
+
previousDepthTexture: "taaHistoryDepth"
|
|
126
127
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
output: "taaHistoryColor"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
kind: "fullscreen",
|
|
132
|
+
shaderPass: import_copy_pass.copyPass,
|
|
133
|
+
inputs: { sourceTexture: "taaHistoryColor" },
|
|
134
|
+
output: "previous"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
kind: "fullscreen",
|
|
138
|
+
shaderPass: depthHistoryCopy,
|
|
139
|
+
inputs: { sourceTexture: "previous" },
|
|
140
|
+
output: "taaHistoryDepth"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
};
|
|
132
144
|
// Annotate the CommonJS export names for ESM import in node:
|
|
133
145
|
0 && (module.exports = {
|
|
134
|
-
createTAACompositeShaderPass,
|
|
135
146
|
depthHistoryCopy,
|
|
147
|
+
taa,
|
|
136
148
|
taaResolve
|
|
137
149
|
});
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type TAAUniforms = {
|
|
1
|
+
import { type TemporalFrameJitter } from "./temporal-frame.js";
|
|
2
|
+
type TAAUniforms = TemporalFrameJitter & {
|
|
3
3
|
historyWeight: number;
|
|
4
4
|
depthThreshold: number;
|
|
5
|
-
currentJitter: [number, number];
|
|
6
|
-
previousJitter: [number, number];
|
|
7
5
|
};
|
|
8
6
|
export declare const taaResolve: {
|
|
9
7
|
readonly name: "taaResolve";
|
|
10
|
-
readonly source: "
|
|
8
|
+
readonly source: "\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n\nstruct taaResolveUniforms {\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n@group(0) @binding(auto) var<uniform> taaResolve: taaResolveUniforms;\n@group(0) @binding(auto) var historyTexture: texture_2d<f32>;\n@group(0) @binding(auto) var historyTextureSampler: sampler;\n@group(0) @binding(auto) var velocityTexture: texture_2d<f32>;\n@group(0) @binding(auto) var velocityTextureSampler: sampler;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n@group(0) @binding(auto) var previousDepthTexture: texture_2d<f32>;\n@group(0) @binding(auto) var previousDepthTextureSampler: sampler;\nfn taaResolve_sampleColor(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n if (taaResolve.historyWeight <= 0.0) { return current; }\n let dimensions = vec2f(textureDimensions(sourceTexture));\n let texel = 1.0 / dimensions;\n let sceneCoord = texCoord;\n let velocity = textureSample(velocityTexture, velocityTextureSampler, sceneCoord).xy;\n let previousUv = temporal_reprojectMotion(texCoord - taaResolve.currentJitter, velocity) + taaResolve.previousJitter;\n let currentDepth = textureSample(depthTexture, depthTextureSampler, sceneCoord);\n let previousDepth = textureSample(previousDepthTexture, previousDepthTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).r;\n var minimumColor = current.rgb;\n var maximumColor = current.rgb;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleColor = textureSample(sourceTexture, sourceTextureSampler, texCoord + vec2f(f32(x), f32(y)) * texel).rgb;\n minimumColor = min(minimumColor, sampleColor);\n maximumColor = max(maximumColor, sampleColor);\n }\n }\n let history = clamp(textureSample(historyTexture, historyTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).rgb, minimumColor, maximumColor);\n let validUv = all(previousUv >= vec2f(0.0)) && all(previousUv <= vec2f(1.0));\n let validDepth = abs(previousDepth - currentDepth) < taaResolve.depthThreshold;\n let weight = select(0.0, taaResolve.historyWeight, validUv && validDepth);\n return vec4f(mix(current.rgb, history, weight), current.a);\n}";
|
|
11
9
|
readonly bindingLayout: readonly [{
|
|
12
10
|
readonly name: "historyTexture";
|
|
13
11
|
readonly group: 0;
|
|
@@ -63,6 +61,109 @@ export declare const depthHistoryCopy: {
|
|
|
63
61
|
readonly sampler: true;
|
|
64
62
|
}];
|
|
65
63
|
};
|
|
66
|
-
|
|
64
|
+
/** Temporal antialiasing with scene velocity and separate color and depth history. */
|
|
65
|
+
export declare const taa: {
|
|
66
|
+
readonly name: "taaCompositeShaderPass";
|
|
67
|
+
readonly resources: {
|
|
68
|
+
readonly taaHistoryColor: {
|
|
69
|
+
readonly lifetime: "history";
|
|
70
|
+
readonly initialize: "original";
|
|
71
|
+
};
|
|
72
|
+
readonly taaHistoryDepth: {
|
|
73
|
+
readonly format: "rgba16float";
|
|
74
|
+
readonly lifetime: "history";
|
|
75
|
+
readonly initialize: {
|
|
76
|
+
readonly clearColor: [1, 0, 0, 1];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly passes: [{
|
|
81
|
+
readonly kind: "fullscreen";
|
|
82
|
+
readonly shaderPass: {
|
|
83
|
+
readonly name: "taaResolve";
|
|
84
|
+
readonly source: "\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n\nstruct taaResolveUniforms {\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n@group(0) @binding(auto) var<uniform> taaResolve: taaResolveUniforms;\n@group(0) @binding(auto) var historyTexture: texture_2d<f32>;\n@group(0) @binding(auto) var historyTextureSampler: sampler;\n@group(0) @binding(auto) var velocityTexture: texture_2d<f32>;\n@group(0) @binding(auto) var velocityTextureSampler: sampler;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n@group(0) @binding(auto) var previousDepthTexture: texture_2d<f32>;\n@group(0) @binding(auto) var previousDepthTextureSampler: sampler;\nfn taaResolve_sampleColor(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n if (taaResolve.historyWeight <= 0.0) { return current; }\n let dimensions = vec2f(textureDimensions(sourceTexture));\n let texel = 1.0 / dimensions;\n let sceneCoord = texCoord;\n let velocity = textureSample(velocityTexture, velocityTextureSampler, sceneCoord).xy;\n let previousUv = temporal_reprojectMotion(texCoord - taaResolve.currentJitter, velocity) + taaResolve.previousJitter;\n let currentDepth = textureSample(depthTexture, depthTextureSampler, sceneCoord);\n let previousDepth = textureSample(previousDepthTexture, previousDepthTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).r;\n var minimumColor = current.rgb;\n var maximumColor = current.rgb;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleColor = textureSample(sourceTexture, sourceTextureSampler, texCoord + vec2f(f32(x), f32(y)) * texel).rgb;\n minimumColor = min(minimumColor, sampleColor);\n maximumColor = max(maximumColor, sampleColor);\n }\n }\n let history = clamp(textureSample(historyTexture, historyTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).rgb, minimumColor, maximumColor);\n let validUv = all(previousUv >= vec2f(0.0)) && all(previousUv <= vec2f(1.0));\n let validDepth = abs(previousDepth - currentDepth) < taaResolve.depthThreshold;\n let weight = select(0.0, taaResolve.historyWeight, validUv && validDepth);\n return vec4f(mix(current.rgb, history, weight), current.a);\n}";
|
|
85
|
+
readonly bindingLayout: readonly [{
|
|
86
|
+
readonly name: "historyTexture";
|
|
87
|
+
readonly group: 0;
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "velocityTexture";
|
|
90
|
+
readonly group: 0;
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "depthTexture";
|
|
93
|
+
readonly group: 0;
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "previousDepthTexture";
|
|
96
|
+
readonly group: 0;
|
|
97
|
+
}];
|
|
98
|
+
readonly uniforms: TAAUniforms;
|
|
99
|
+
readonly uniformTypes: {
|
|
100
|
+
readonly historyWeight: "f32";
|
|
101
|
+
readonly depthThreshold: "f32";
|
|
102
|
+
readonly currentJitter: "vec2<f32>";
|
|
103
|
+
readonly previousJitter: "vec2<f32>";
|
|
104
|
+
};
|
|
105
|
+
readonly propTypes: {
|
|
106
|
+
readonly historyWeight: {
|
|
107
|
+
readonly value: 0.9;
|
|
108
|
+
readonly min: 0;
|
|
109
|
+
readonly max: 0.98;
|
|
110
|
+
};
|
|
111
|
+
readonly depthThreshold: {
|
|
112
|
+
readonly value: 0.01;
|
|
113
|
+
readonly min: 0.0001;
|
|
114
|
+
readonly softMax: 0.1;
|
|
115
|
+
};
|
|
116
|
+
readonly currentJitter: {
|
|
117
|
+
readonly value: readonly [0, 0];
|
|
118
|
+
readonly private: true;
|
|
119
|
+
};
|
|
120
|
+
readonly previousJitter: {
|
|
121
|
+
readonly value: readonly [0, 0];
|
|
122
|
+
readonly private: true;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly passes: [{
|
|
126
|
+
readonly sampler: true;
|
|
127
|
+
}];
|
|
128
|
+
};
|
|
129
|
+
readonly inputs: {
|
|
130
|
+
readonly sourceTexture: "previous";
|
|
131
|
+
readonly historyTexture: "taaHistoryColor";
|
|
132
|
+
readonly previousDepthTexture: "taaHistoryDepth";
|
|
133
|
+
};
|
|
134
|
+
readonly output: "taaHistoryColor";
|
|
135
|
+
}, {
|
|
136
|
+
readonly kind: "fullscreen";
|
|
137
|
+
readonly shaderPass: {
|
|
138
|
+
readonly name: "advancedCopy";
|
|
139
|
+
readonly source: "fn advancedCopy_sampleColor(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f { return textureSample(sourceTexture, sourceTextureSampler, texCoord); }";
|
|
140
|
+
readonly fs: "\nvec4 advancedCopy_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {\n return texture(sourceTexture, texCoord);\n}";
|
|
141
|
+
readonly passes: [{
|
|
142
|
+
readonly sampler: true;
|
|
143
|
+
}];
|
|
144
|
+
};
|
|
145
|
+
readonly inputs: {
|
|
146
|
+
readonly sourceTexture: "taaHistoryColor";
|
|
147
|
+
};
|
|
148
|
+
readonly output: "previous";
|
|
149
|
+
}, {
|
|
150
|
+
readonly kind: "fullscreen";
|
|
151
|
+
readonly shaderPass: {
|
|
152
|
+
readonly name: "depthHistoryCopy";
|
|
153
|
+
readonly source: "@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\nfn depthHistoryCopy_sampleColor(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f { let depth = textureSample(depthTexture, depthTextureSampler, texCoord); return vec4f(depth, 0.0, 0.0, 1.0); }";
|
|
154
|
+
readonly bindingLayout: readonly [{
|
|
155
|
+
readonly name: "depthTexture";
|
|
156
|
+
readonly group: 0;
|
|
157
|
+
}];
|
|
158
|
+
readonly passes: [{
|
|
159
|
+
readonly sampler: true;
|
|
160
|
+
}];
|
|
161
|
+
};
|
|
162
|
+
readonly inputs: {
|
|
163
|
+
readonly sourceTexture: "previous";
|
|
164
|
+
};
|
|
165
|
+
readonly output: "taaHistoryDepth";
|
|
166
|
+
}];
|
|
167
|
+
};
|
|
67
168
|
export {};
|
|
68
169
|
//# sourceMappingURL=temporal-antialiasing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal-antialiasing.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/temporal-antialiasing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"temporal-antialiasing.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/temporal-antialiasing.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiC,KAAK,mBAAmB,EAAC,4BAAyB;AAE1F,KAAK,WAAW,GAAG,mBAAmB,GAAG;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;uBAoDL,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcE,CAAC;AAEhC,eAAO,MAAM,gBAAgB;;;;;;;;;;CAUE,CAAC;AAEhC,sFAAsF;AACtF,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA7BE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D+C,CAAC"}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
import { copyPass } from "./copy-pass.js";
|
|
5
|
+
import { temporalMotionReprojectionWGSL } from "./temporal-frame.js";
|
|
5
6
|
export const taaResolve = {
|
|
6
7
|
name: 'taaResolve',
|
|
7
8
|
source: /* wgsl */ `\
|
|
9
|
+
${temporalMotionReprojectionWGSL}
|
|
8
10
|
struct taaResolveUniforms {
|
|
9
11
|
historyWeight: f32,
|
|
10
12
|
depthThreshold: f32,
|
|
@@ -23,14 +25,15 @@ struct taaResolveUniforms {
|
|
|
23
25
|
fn taaResolve_sampleColor(
|
|
24
26
|
sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f
|
|
25
27
|
) -> vec4f {
|
|
28
|
+
let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);
|
|
29
|
+
if (taaResolve.historyWeight <= 0.0) { return current; }
|
|
26
30
|
let dimensions = vec2f(textureDimensions(sourceTexture));
|
|
27
31
|
let texel = 1.0 / dimensions;
|
|
28
32
|
let sceneCoord = texCoord;
|
|
29
33
|
let velocity = textureSample(velocityTexture, velocityTextureSampler, sceneCoord).xy;
|
|
30
|
-
let previousUv = texCoord - velocity + taaResolve.previousJitter
|
|
34
|
+
let previousUv = temporal_reprojectMotion(texCoord - taaResolve.currentJitter, velocity) + taaResolve.previousJitter;
|
|
31
35
|
let currentDepth = textureSample(depthTexture, depthTextureSampler, sceneCoord);
|
|
32
36
|
let previousDepth = textureSample(previousDepthTexture, previousDepthTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).r;
|
|
33
|
-
let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);
|
|
34
37
|
var minimumColor = current.rgb;
|
|
35
38
|
var maximumColor = current.rgb;
|
|
36
39
|
for (var y: i32 = -1; y <= 1; y++) {
|
|
@@ -78,30 +81,40 @@ fn depthHistoryCopy_sampleColor(
|
|
|
78
81
|
bindingLayout: [{ name: 'depthTexture', group: 0 }],
|
|
79
82
|
passes: [{ sampler: true }]
|
|
80
83
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
output: 'taaHistoryColor'
|
|
84
|
+
/** Temporal antialiasing with scene velocity and separate color and depth history. */
|
|
85
|
+
export const taa = {
|
|
86
|
+
name: 'taaCompositeShaderPass',
|
|
87
|
+
resources: {
|
|
88
|
+
taaHistoryColor: { lifetime: 'history', initialize: 'original' },
|
|
89
|
+
taaHistoryDepth: {
|
|
90
|
+
format: 'rgba16float',
|
|
91
|
+
lifetime: 'history',
|
|
92
|
+
initialize: { clearColor: [1, 0, 0, 1] }
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
passes: [
|
|
96
|
+
{
|
|
97
|
+
kind: 'fullscreen',
|
|
98
|
+
shaderPass: taaResolve,
|
|
99
|
+
inputs: {
|
|
100
|
+
sourceTexture: 'previous',
|
|
101
|
+
historyTexture: 'taaHistoryColor',
|
|
102
|
+
previousDepthTexture: 'taaHistoryDepth'
|
|
101
103
|
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
output: 'taaHistoryColor'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
kind: 'fullscreen',
|
|
108
|
+
shaderPass: copyPass,
|
|
109
|
+
inputs: { sourceTexture: 'taaHistoryColor' },
|
|
110
|
+
output: 'previous'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
kind: 'fullscreen',
|
|
114
|
+
shaderPass: depthHistoryCopy,
|
|
115
|
+
inputs: { sourceTexture: 'previous' },
|
|
116
|
+
output: 'taaHistoryDepth'
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
};
|
|
107
120
|
//# sourceMappingURL=temporal-antialiasing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal-antialiasing.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/temporal-antialiasing.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;
|
|
1
|
+
{"version":3,"file":"temporal-antialiasing.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/temporal-antialiasing.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,OAAO,EAAC,QAAQ,EAAC,uBAAoB;AACrC,OAAO,EAAC,8BAA8B,EAA2B,4BAAyB;AAO1F,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,UAAU,CAAC;EACnB,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0C9B;IACA,aAAa,EAAE;QACb,EAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,EAAC;QAClC,EAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAC;QACnC,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAC;QAChC,EAAC,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC,EAAC;KACzC;IACD,QAAQ,EAAE,EAAiB;IAC3B,YAAY,EAAE;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,YAAY;YAClB,UAAU,EAAE,UAAU;YACtB,MAAM,EAAE;gBACN,aAAa,EAAE,UAAU;gBACzB,cAAc,EAAE,iBAAiB;gBACjC,oBAAoB,EAAE,iBAAiB;aACxC;YACD,MAAM,EAAE,iBAAiB;SAC1B;QACD;YACE,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAC;YAC1C,MAAM,EAAE,UAAU;SACnB;QACD;YACE,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,gBAAgB;YAC5B,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAC;YACnC,MAAM,EAAE,iBAAiB;SAC1B;KACF;CACyE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 temporal_frame_exports = {};
|
|
19
|
+
__export(temporal_frame_exports, {
|
|
20
|
+
temporalMotionReprojectionWGSL: () => temporalMotionReprojectionWGSL
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(temporal_frame_exports);
|
|
23
|
+
const temporalMotionReprojectionWGSL = (
|
|
24
|
+
/* wgsl */
|
|
25
|
+
`
|
|
26
|
+
fn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {
|
|
27
|
+
return currentUv - motion;
|
|
28
|
+
}
|
|
29
|
+
`
|
|
30
|
+
);
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
temporalMotionReprojectionWGSL
|
|
34
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Projection jitter in top-left UV units, relative to the render resolution. */
|
|
2
|
+
export type TemporalJitter = [number, number];
|
|
3
|
+
/** Current and previous projection jitter for same-resolution temporal resolves. */
|
|
4
|
+
export type TemporalFrameJitter = {
|
|
5
|
+
/** Current frame projection offset in top-left UV units at render resolution. */
|
|
6
|
+
currentJitter: TemporalJitter;
|
|
7
|
+
/** Previous frame projection offset in top-left UV units at render resolution. */
|
|
8
|
+
previousJitter: TemporalJitter;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Reprojects a current unjittered UV by subtracting the motion vector.
|
|
12
|
+
* Motion is current unjittered UV minus previous unjittered UV.
|
|
13
|
+
* Remove current projection jitter before calling and apply previous jitter
|
|
14
|
+
* only if the sampled history is jittered.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const temporalMotionReprojectionWGSL = "\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n";
|
|
18
|
+
/** Per-frame jitter and reset controls shared by temporal resolves. */
|
|
19
|
+
export type TemporalFrame = TemporalFrameJitter & {
|
|
20
|
+
/** Ignore retained data for the first frame, a camera cut, or a resize. */
|
|
21
|
+
resetHistory?: boolean;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=temporal-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-frame.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/temporal-frame.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,oFAAoF;AACpF,MAAM,MAAM,mBAAmB,GAAG;IAChC,iFAAiF;IACjF,aAAa,EAAE,cAAc,CAAC;IAC9B,kFAAkF;IAClF,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,iHAI1C,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IAChD,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
/**
|
|
5
|
+
* Reprojects a current unjittered UV by subtracting the motion vector.
|
|
6
|
+
* Motion is current unjittered UV minus previous unjittered UV.
|
|
7
|
+
* Remove current projection jitter before calling and apply previous jitter
|
|
8
|
+
* only if the sampled history is jittered.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export const temporalMotionReprojectionWGSL = /* wgsl */ `
|
|
12
|
+
fn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {
|
|
13
|
+
return currentUv - motion;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
//# sourceMappingURL=temporal-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-frame.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/temporal-frame.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAa5D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAAC;;;;CAIxD,CAAC"}
|