@luma.gl/engine 10.0.0-rc.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +7 -0
- package/dist/dist.dev.js +106 -37
- package/dist/dist.min.js +51 -51
- package/dist/effects/graph/gpu-effect-operation.cjs +79 -20
- package/dist/effects/graph/gpu-effect-operation.d.ts +44 -18
- package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -1
- package/dist/effects/graph/gpu-effect-operation.js +72 -8
- package/dist/effects/graph/gpu-effect-operation.js.map +1 -1
- package/dist/effects/index.cjs +62 -4
- package/dist/effects/index.cjs.map +3 -3
- package/dist/effects/index.d.ts +34 -13
- package/dist/effects/index.d.ts.map +1 -1
- package/dist/effects/index.js +23 -3
- package/dist/effects/index.js.map +1 -1
- package/dist/effects/passes/postprocessing/detail/detail-blur.cjs +95 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts +126 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js +63 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.cjs +80 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts +183 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js +59 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.cjs +81 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts +163 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js +57 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.cjs +73 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts +43 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js +46 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js.map +1 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
- package/dist/effects/passes/postprocessing/grading/curves.cjs +91 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts +54 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/curves.js +73 -0
- package/dist/effects/passes/postprocessing/grading/curves.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.cjs +71 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts +76 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js +50 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.cjs +160 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts +232 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js +138 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.cjs +84 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.cjs +106 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts +105 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.cjs +327 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts +201 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js +296 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.cjs +85 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js +59 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.cjs +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts +27 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js +45 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.cjs +64 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts +48 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js +42 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.cjs +110 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts +214 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.cjs +62 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts +47 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js +40 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +6 -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.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts +2 -2
- 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-lens-effects.cjs +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts +7 -7
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.cjs +79 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts +59 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js +63 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.js.map +1 -1
- package/dist/effects/passes/postprocessing/layer-styles/bevel.cjs +100 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts +73 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js +78 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.cjs +180 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts +152 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js +157 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.cjs +67 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts +181 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js +52 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.cjs +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js +119 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.cjs +104 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts +43 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js +69 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.cjs +64 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts +190 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js +49 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.cjs +279 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts +95 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.js +253 -0
- package/dist/effects/passes/postprocessing/smaa.js.map +1 -0
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.cjs +18 -4
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +28 -5
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +17 -3
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.js.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.cjs +0 -7
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +0 -106
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.js +0 -6
- package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/dof.cjs +2 -9
- package/dist/effects/passes/screen-space/dof.d.ts +1 -123
- package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/dof.js +1 -7
- package/dist/effects/passes/screen-space/dof.js.map +1 -1
- package/dist/effects/passes/screen-space/gtao.cjs +11 -2
- package/dist/effects/passes/screen-space/gtao.d.ts +37 -6
- package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/gtao.js +11 -2
- package/dist/effects/passes/screen-space/gtao.js.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts +2 -2
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.js.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/outlines.d.ts +2 -2
- package/dist/effects/passes/screen-space/outlines.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/outlines.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.cjs +12 -2
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +26 -5
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js +12 -2
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.cjs +14 -2
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +26 -5
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.js +14 -2
- package/dist/effects/passes/screen-space/screen-space-reflections.js.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.js.map +1 -1
- package/dist/effects/passes/screen-space/ssao.d.ts +2 -2
- package/dist/effects/passes/screen-space/ssao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssao.js.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts +2 -2
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.js.map +1 -1
- package/dist/effects/scene-effect-attachments.cjs +15 -0
- package/dist/effects/scene-effect-attachments.d.ts +23 -0
- package/dist/effects/scene-effect-attachments.d.ts.map +1 -0
- package/dist/effects/scene-effect-attachments.js +5 -0
- package/dist/effects/scene-effect-attachments.js.map +1 -0
- package/dist/graph/models/index.cjs.map +1 -1
- package/dist/graph/physics/index.cjs.map +1 -1
- package/dist/graph/tables/index.cjs.map +1 -1
- package/dist/index.cjs +0 -3
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/lighting/clustered-light-grid.cjs +2 -6
- package/dist/lighting/clustered-light-grid.d.ts +1 -5
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
- package/dist/lighting/clustered-light-grid.js +2 -6
- package/dist/lighting/clustered-light-grid.js.map +1 -1
- package/dist/lighting/contact-shadow-composite.cjs +8 -8
- package/dist/lighting/contact-shadow-composite.d.ts +10 -22
- package/dist/lighting/contact-shadow-composite.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-composite.js +8 -8
- package/dist/lighting/contact-shadow-composite.js.map +1 -1
- package/dist/lighting/contact-shadow-pass.cjs +6 -6
- package/dist/lighting/contact-shadow-pass.js +6 -6
- package/dist/lighting/contact-shadow-pass.js.map +1 -1
- package/dist/lighting/index.cjs.map +3 -3
- package/dist/lighting/index.d.ts +2 -2
- package/dist/lighting/index.d.ts.map +1 -1
- package/dist/lighting/index.js.map +1 -1
- package/dist/passes/effect-renderer.cjs +43 -8
- package/dist/passes/effect-renderer.d.ts +41 -17
- package/dist/passes/effect-renderer.d.ts.map +1 -1
- package/dist/passes/effect-renderer.js +47 -8
- package/dist/passes/effect-renderer.js.map +1 -1
- package/dist/passes/{shader-pass-renderer.cjs → fullscreen-effect-executor.cjs} +39 -28
- package/dist/passes/{shader-pass-renderer.d.ts → fullscreen-effect-executor.d.ts} +48 -37
- package/dist/passes/fullscreen-effect-executor.d.ts.map +1 -0
- package/dist/passes/{shader-pass-renderer.js → fullscreen-effect-executor.js} +30 -26
- package/dist/passes/fullscreen-effect-executor.js.map +1 -0
- package/dist/passes/fullscreen-effect-module.cjs +15 -0
- package/dist/passes/fullscreen-effect-module.d.ts +47 -0
- package/dist/passes/fullscreen-effect-module.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-module.js +5 -0
- package/dist/passes/fullscreen-effect-module.js.map +1 -0
- package/dist/passes/fullscreen-effect-plan.cjs +15 -0
- package/dist/passes/fullscreen-effect-plan.d.ts +49 -0
- package/dist/passes/fullscreen-effect-plan.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-plan.js +5 -0
- package/dist/passes/fullscreen-effect-plan.js.map +1 -0
- package/dist/passes/get-fragment-shader.cjs +3 -0
- package/dist/passes/get-fragment-shader.d.ts +2 -2
- package/dist/passes/get-fragment-shader.d.ts.map +1 -1
- package/dist/passes/get-fragment-shader.js +3 -0
- package/dist/passes/get-fragment-shader.js.map +1 -1
- package/dist/shader-inputs.cjs +1 -1
- package/dist/shader-inputs.d.ts +1 -1
- package/dist/shader-inputs.js +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts +1 -0
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.js +1 -0
- package/dist/text/fonts/atlas/browser-font-atlas.js.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.cjs +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.js +4 -2
- package/dist/text/fonts/build-sdf-font-atlas.js.map +1 -1
- package/dist/text/fonts/index.cjs +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/dist/utils/shader-module-utils.cjs +3 -0
- package/dist/utils/shader-module-utils.d.ts.map +1 -1
- package/dist/utils/shader-module-utils.js +3 -0
- package/dist/utils/shader-module-utils.js.map +1 -1
- package/licenses/smaa.txt +24 -0
- package/package.json +6 -6
- package/src/effects/README.md +2 -2
- package/src/effects/graph/gpu-effect-operation.ts +152 -33
- package/src/effects/index.ts +85 -14
- package/src/effects/passes/postprocessing/detail/detail-blur.ts +77 -0
- package/src/effects/passes/postprocessing/detail/high-pass.ts +86 -0
- package/src/effects/passes/postprocessing/detail/local-contrast.ts +79 -0
- package/src/effects/passes/postprocessing/detail/unsharp-mask.ts +56 -0
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +2 -2
- package/src/effects/passes/postprocessing/grading/curves.ts +83 -0
- package/src/effects/passes/postprocessing/grading/lift-gamma-gain.ts +68 -0
- package/src/effects/passes/postprocessing/grading/shadows-highlights.ts +169 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.ts +68 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/denoise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/huesaturation.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/levels.ts +111 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.ts +347 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/noise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/output-dithering.ts +69 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.ts +67 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/persistence.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/posterize.ts +52 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/sepia.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/sharpen.ts +112 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/threshold.ts +50 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vibrance.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vignette.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +21 -17
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.ts +13 -11
- package/src/effects/passes/postprocessing/image-blur-filters/bloom.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/gaussianblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/tiltshift.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/triangleblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/zoomblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/colorhalftone.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/dotscreen.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/edgework.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/ink.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/magnify.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/bulgepinch.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/displacement-map.ts +74 -0
- package/src/effects/passes/postprocessing/image-warp-filters/swirl.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/warp.ts +2 -2
- package/src/effects/passes/postprocessing/layer-styles/bevel.ts +92 -0
- package/src/effects/passes/postprocessing/layer-styles/drop-shadow.ts +176 -0
- package/src/effects/passes/postprocessing/optical/lens-flare.ts +64 -0
- package/src/effects/passes/postprocessing/optical/light-shafts.ts +139 -0
- package/src/effects/passes/postprocessing/optical/optical-textures.ts +74 -0
- package/src/effects/passes/postprocessing/optical/selective-glow.ts +62 -0
- package/src/effects/passes/postprocessing/smaa.ts +265 -0
- package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +3 -3
- package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +28 -12
- package/src/effects/passes/screen-space/copy-pass.ts +2 -2
- package/src/effects/passes/screen-space/depth-aware-blur.ts +2 -9
- package/src/effects/passes/screen-space/dof.ts +12 -11
- package/src/effects/passes/screen-space/gtao.ts +22 -12
- package/src/effects/passes/screen-space/hdr-auto-exposure.ts +8 -8
- package/src/effects/passes/screen-space/height-fog.ts +3 -3
- package/src/effects/passes/screen-space/motion-blur.ts +2 -2
- package/src/effects/passes/screen-space/outlines.ts +6 -6
- package/src/effects/passes/screen-space/screen-space-global-illumination.ts +23 -12
- package/src/effects/passes/screen-space/screen-space-reflections.ts +24 -12
- package/src/effects/passes/screen-space/selection-outline.ts +2 -2
- package/src/effects/passes/screen-space/ssao.ts +6 -6
- package/src/effects/passes/screen-space/ssr-camera-temporal.ts +4 -4
- package/src/effects/passes/screen-space/temporal-antialiasing.ts +3 -3
- package/src/effects/passes/screen-space/volumetric-fog.ts +5 -5
- package/src/effects/scene-effect-attachments.ts +26 -0
- package/src/index.ts +3 -6
- package/src/lighting/clustered-light-grid.ts +2 -10
- package/src/lighting/contact-shadow-composite.ts +11 -11
- package/src/lighting/contact-shadow-pass.ts +6 -6
- package/src/lighting/index.ts +2 -3
- package/src/passes/effect-renderer.ts +106 -34
- package/src/passes/{shader-pass-renderer.ts → fullscreen-effect-executor.ts} +115 -75
- package/src/passes/fullscreen-effect-module.ts +71 -0
- package/src/passes/fullscreen-effect-plan.ts +59 -0
- package/src/passes/get-fragment-shader.ts +7 -2
- package/src/shader-inputs.ts +1 -1
- package/src/text/fonts/atlas/browser-font-atlas.ts +1 -0
- package/src/text/fonts/build-sdf-font-atlas.ts +4 -2
- package/src/text/fonts/index.ts +1 -0
- package/src/utils/shader-module-utils.ts +3 -0
- package/dist/passes/shader-pass-renderer.d.ts.map +0 -1
- package/dist/passes/shader-pass-renderer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outlines.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/outlines.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,OAAO,EAAC,YAAY,EAAC,yCAAsC;AAiB3D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,oBAAoB;IAC1B,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;EAcnB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BZ;IACA,EAAE,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCf;IACA,aAAa,EAAE;QACb,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAC;QAChC,EAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,EAAC;KAClC;IACD,QAAQ,EAAE,EAAqB;IAC/B,YAAY,EAAE;QACZ,KAAK,EAAE,WAAW;QAClB,SAAS,EAAE,KAAK;QAChB,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,KAAK;QACtB,gBAAgB,EAAE,KAAK;QACvB,kBAAkB,EAAE,KAAK;KAC1B;IACD,SAAS,EAAE;QACT,KAAK,EAAE,EAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAC;QACxC,SAAS,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAC;QAC7C,cAAc,EAAE,EAAC,K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UAAU;qBACnB;iBACF;aACF;SACF;KACF;IACD,MAAM,EAAE;QACN,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAC,EAAE,MAAM,EAAE,UAAU,EAAC;KAC/F;CACoE,CAAC"}
|
|
@@ -25,6 +25,7 @@ __export(screen_space_global_illumination_exports, {
|
|
|
25
25
|
ssgiTrace: () => ssgiTrace
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(screen_space_global_illumination_exports);
|
|
28
|
+
var import_temporal_frame = require("./temporal-frame.cjs");
|
|
28
29
|
const IDENTITY_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
29
30
|
const ssgiTrace = {
|
|
30
31
|
name: "ssgiTrace",
|
|
@@ -220,6 +221,8 @@ const ssgiTemporal = {
|
|
|
220
221
|
inverseProjectionMatrix: mat4x4f,
|
|
221
222
|
historyWeight: f32,
|
|
222
223
|
depthThreshold: f32,
|
|
224
|
+
currentJitter: vec2f,
|
|
225
|
+
previousJitter: vec2f,
|
|
223
226
|
};
|
|
224
227
|
|
|
225
228
|
@group(0) @binding(auto) var<uniform> ssgiTemporal: SSGITemporalUniforms;
|
|
@@ -232,6 +235,7 @@ const ssgiTemporal = {
|
|
|
232
235
|
@group(0) @binding(auto) var previousDepthTexture: texture_2d<f32>;
|
|
233
236
|
@group(0) @binding(auto) var previousDepthTextureSampler: sampler;
|
|
234
237
|
|
|
238
|
+
${import_temporal_frame.temporalMotionReprojectionWGSL}
|
|
235
239
|
fn ssgiTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {
|
|
236
240
|
let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);
|
|
237
241
|
let viewPosition = ssgiTemporal.inverseProjectionMatrix * clip;
|
|
@@ -250,8 +254,10 @@ fn ssgiTemporal_sampleColor(
|
|
|
250
254
|
return vec4f(0.0);
|
|
251
255
|
}
|
|
252
256
|
|
|
257
|
+
if (ssgiTemporal.historyWeight <= 0.0) { return current; }
|
|
258
|
+
|
|
253
259
|
let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;
|
|
254
|
-
let previousCoord = texCoord - velocity;
|
|
260
|
+
let previousCoord = temporal_reprojectMotion(texCoord - ssgiTemporal.currentJitter, velocity) + ssgiTemporal.previousJitter;
|
|
255
261
|
let validCoordinate = all(previousCoord >= vec2f(0.0)) &&
|
|
256
262
|
all(previousCoord <= vec2f(1.0));
|
|
257
263
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
@@ -313,9 +319,13 @@ fn ssgiTemporal_sampleColor(
|
|
|
313
319
|
uniformTypes: {
|
|
314
320
|
inverseProjectionMatrix: "mat4x4<f32>",
|
|
315
321
|
historyWeight: "f32",
|
|
316
|
-
depthThreshold: "f32"
|
|
322
|
+
depthThreshold: "f32",
|
|
323
|
+
currentJitter: "vec2<f32>",
|
|
324
|
+
previousJitter: "vec2<f32>"
|
|
317
325
|
},
|
|
318
326
|
propTypes: {
|
|
327
|
+
currentJitter: { value: [0, 0], private: true },
|
|
328
|
+
previousJitter: { value: [0, 0], private: true },
|
|
319
329
|
inverseProjectionMatrix: { value: IDENTITY_MATRIX, private: true },
|
|
320
330
|
historyWeight: { value: 0.89, min: 0, max: 0.97 },
|
|
321
331
|
depthThreshold: { value: 0.022, min: 1e-4, softMax: 0.1 }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Texture } from '@luma.gl/core';
|
|
2
2
|
import type { NumberArray16 } from '@math.gl/core/types';
|
|
3
|
+
import { type TemporalFrameJitter } from "./temporal-frame.js";
|
|
3
4
|
/** Construction options for temporally stabilized diffuse screen-space global illumination. */
|
|
4
|
-
export type
|
|
5
|
+
export type SSGIEffectOptions = {
|
|
5
6
|
/** Fractional tracing, history, and denoising resolution. Defaults to full resolution. */
|
|
6
7
|
resolutionScale?: number;
|
|
7
8
|
};
|
|
@@ -15,7 +16,7 @@ type SSGITraceUniforms = {
|
|
|
15
16
|
stepCount: number;
|
|
16
17
|
frameIndex: number;
|
|
17
18
|
};
|
|
18
|
-
type SSGITemporalUniforms = {
|
|
19
|
+
type SSGITemporalUniforms = TemporalFrameJitter & {
|
|
19
20
|
inverseProjectionMatrix: Readonly<NumberArray16>;
|
|
20
21
|
historyWeight: number;
|
|
21
22
|
depthThreshold: number;
|
|
@@ -113,7 +114,7 @@ export declare const ssgiTrace: {
|
|
|
113
114
|
/** Reprojects diffuse bounce history with velocity and relative linear-depth rejection. */
|
|
114
115
|
export declare const ssgiTemporal: {
|
|
115
116
|
readonly name: "ssgiTemporal";
|
|
116
|
-
readonly source: "struct SSGITemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> ssgiTemporal: SSGITemporalUniforms;\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;\n\nfn ssgiTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {\n let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);\n let viewPosition = ssgiTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn ssgiTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = texCoord - velocity;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = ssgiTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = ssgiTemporal_reconstructViewDepth(clampedPreviousCoord, previousDepth);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssgiTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumRadiance = current;\n var maximumRadiance = current;\n for (var sampleY: i32 = -1; sampleY <= 1; sampleY++) {\n for (var sampleX: i32 = -1; sampleX <= 1; sampleX++) {\n let sampleCoord = clamp(\n texCoord + vec2f(f32(sampleX), f32(sampleY)) * texel,\n vec2f(0.0),\n vec2f(1.0)\n );\n let neighborhoodRadiance = textureSampleLevel(\n sourceTexture,\n sourceTextureSampler,\n sampleCoord,\n 0\n );\n minimumRadiance = min(minimumRadiance, neighborhoodRadiance);\n maximumRadiance = max(maximumRadiance, neighborhoodRadiance);\n }\n }\n\n let historyRadiance = clamp(\n textureSampleLevel(historyTexture, historyTextureSampler, clampedPreviousCoord, 0),\n minimumRadiance,\n maximumRadiance\n );\n let historyWeight = select(\n 0.0,\n ssgiTemporal.historyWeight,\n validCoordinate && validDepth\n );\n return mix(current, historyRadiance, historyWeight);\n}";
|
|
117
|
+
readonly source: "struct SSGITemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> ssgiTemporal: SSGITemporalUniforms;\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;\n\n\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n\nfn ssgiTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {\n let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);\n let viewPosition = ssgiTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn ssgiTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n if (ssgiTemporal.historyWeight <= 0.0) { return current; }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = temporal_reprojectMotion(texCoord - ssgiTemporal.currentJitter, velocity) + ssgiTemporal.previousJitter;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = ssgiTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = ssgiTemporal_reconstructViewDepth(clampedPreviousCoord, previousDepth);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssgiTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumRadiance = current;\n var maximumRadiance = current;\n for (var sampleY: i32 = -1; sampleY <= 1; sampleY++) {\n for (var sampleX: i32 = -1; sampleX <= 1; sampleX++) {\n let sampleCoord = clamp(\n texCoord + vec2f(f32(sampleX), f32(sampleY)) * texel,\n vec2f(0.0),\n vec2f(1.0)\n );\n let neighborhoodRadiance = textureSampleLevel(\n sourceTexture,\n sourceTextureSampler,\n sampleCoord,\n 0\n );\n minimumRadiance = min(minimumRadiance, neighborhoodRadiance);\n maximumRadiance = max(maximumRadiance, neighborhoodRadiance);\n }\n }\n\n let historyRadiance = clamp(\n textureSampleLevel(historyTexture, historyTextureSampler, clampedPreviousCoord, 0),\n minimumRadiance,\n maximumRadiance\n );\n let historyWeight = select(\n 0.0,\n ssgiTemporal.historyWeight,\n validCoordinate && validDepth\n );\n return mix(current, historyRadiance, historyWeight);\n}";
|
|
117
118
|
readonly bindingLayout: readonly [{
|
|
118
119
|
readonly name: "historyTexture";
|
|
119
120
|
readonly group: 0;
|
|
@@ -134,8 +135,18 @@ export declare const ssgiTemporal: {
|
|
|
134
135
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
135
136
|
readonly historyWeight: "f32";
|
|
136
137
|
readonly depthThreshold: "f32";
|
|
138
|
+
readonly currentJitter: "vec2<f32>";
|
|
139
|
+
readonly previousJitter: "vec2<f32>";
|
|
137
140
|
};
|
|
138
141
|
readonly propTypes: {
|
|
142
|
+
readonly currentJitter: {
|
|
143
|
+
readonly value: readonly [0, 0];
|
|
144
|
+
readonly private: true;
|
|
145
|
+
};
|
|
146
|
+
readonly previousJitter: {
|
|
147
|
+
readonly value: readonly [0, 0];
|
|
148
|
+
readonly private: true;
|
|
149
|
+
};
|
|
139
150
|
readonly inverseProjectionMatrix: {
|
|
140
151
|
readonly value: NumberArray16;
|
|
141
152
|
readonly private: true;
|
|
@@ -238,7 +249,7 @@ export declare const ssgiComposite: {
|
|
|
238
249
|
};
|
|
239
250
|
/** Creates a hemisphere-traced, temporally stabilized screen-space diffuse GI pipeline. */
|
|
240
251
|
export declare const ssgi: {
|
|
241
|
-
readonly optionDefaults: Required<
|
|
252
|
+
readonly optionDefaults: Required<SSGIEffectOptions>;
|
|
242
253
|
readonly scaleResources: {
|
|
243
254
|
readonly option: "resolutionScale";
|
|
244
255
|
readonly targets: readonly ["ssgiRaw", "ssgiHistory", "ssgiHistoryDepth", "ssgiScratch", "ssgiIndirect"];
|
|
@@ -350,7 +361,7 @@ export declare const ssgi: {
|
|
|
350
361
|
readonly kind: "fullscreen";
|
|
351
362
|
readonly shaderPass: {
|
|
352
363
|
readonly name: "ssgiTemporal";
|
|
353
|
-
readonly source: "struct SSGITemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> ssgiTemporal: SSGITemporalUniforms;\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;\n\nfn ssgiTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {\n let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);\n let viewPosition = ssgiTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn ssgiTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = texCoord - velocity;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = ssgiTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = ssgiTemporal_reconstructViewDepth(clampedPreviousCoord, previousDepth);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssgiTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumRadiance = current;\n var maximumRadiance = current;\n for (var sampleY: i32 = -1; sampleY <= 1; sampleY++) {\n for (var sampleX: i32 = -1; sampleX <= 1; sampleX++) {\n let sampleCoord = clamp(\n texCoord + vec2f(f32(sampleX), f32(sampleY)) * texel,\n vec2f(0.0),\n vec2f(1.0)\n );\n let neighborhoodRadiance = textureSampleLevel(\n sourceTexture,\n sourceTextureSampler,\n sampleCoord,\n 0\n );\n minimumRadiance = min(minimumRadiance, neighborhoodRadiance);\n maximumRadiance = max(maximumRadiance, neighborhoodRadiance);\n }\n }\n\n let historyRadiance = clamp(\n textureSampleLevel(historyTexture, historyTextureSampler, clampedPreviousCoord, 0),\n minimumRadiance,\n maximumRadiance\n );\n let historyWeight = select(\n 0.0,\n ssgiTemporal.historyWeight,\n validCoordinate && validDepth\n );\n return mix(current, historyRadiance, historyWeight);\n}";
|
|
364
|
+
readonly source: "struct SSGITemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> ssgiTemporal: SSGITemporalUniforms;\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;\n\n\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n\nfn ssgiTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {\n let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);\n let viewPosition = ssgiTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn ssgiTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n if (ssgiTemporal.historyWeight <= 0.0) { return current; }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = temporal_reprojectMotion(texCoord - ssgiTemporal.currentJitter, velocity) + ssgiTemporal.previousJitter;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = ssgiTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = ssgiTemporal_reconstructViewDepth(clampedPreviousCoord, previousDepth);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssgiTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumRadiance = current;\n var maximumRadiance = current;\n for (var sampleY: i32 = -1; sampleY <= 1; sampleY++) {\n for (var sampleX: i32 = -1; sampleX <= 1; sampleX++) {\n let sampleCoord = clamp(\n texCoord + vec2f(f32(sampleX), f32(sampleY)) * texel,\n vec2f(0.0),\n vec2f(1.0)\n );\n let neighborhoodRadiance = textureSampleLevel(\n sourceTexture,\n sourceTextureSampler,\n sampleCoord,\n 0\n );\n minimumRadiance = min(minimumRadiance, neighborhoodRadiance);\n maximumRadiance = max(maximumRadiance, neighborhoodRadiance);\n }\n }\n\n let historyRadiance = clamp(\n textureSampleLevel(historyTexture, historyTextureSampler, clampedPreviousCoord, 0),\n minimumRadiance,\n maximumRadiance\n );\n let historyWeight = select(\n 0.0,\n ssgiTemporal.historyWeight,\n validCoordinate && validDepth\n );\n return mix(current, historyRadiance, historyWeight);\n}";
|
|
354
365
|
readonly bindingLayout: readonly [{
|
|
355
366
|
readonly name: "historyTexture";
|
|
356
367
|
readonly group: 0;
|
|
@@ -371,8 +382,18 @@ export declare const ssgi: {
|
|
|
371
382
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
372
383
|
readonly historyWeight: "f32";
|
|
373
384
|
readonly depthThreshold: "f32";
|
|
385
|
+
readonly currentJitter: "vec2<f32>";
|
|
386
|
+
readonly previousJitter: "vec2<f32>";
|
|
374
387
|
};
|
|
375
388
|
readonly propTypes: {
|
|
389
|
+
readonly currentJitter: {
|
|
390
|
+
readonly value: readonly [0, 0];
|
|
391
|
+
readonly private: true;
|
|
392
|
+
};
|
|
393
|
+
readonly previousJitter: {
|
|
394
|
+
readonly value: readonly [0, 0];
|
|
395
|
+
readonly private: true;
|
|
396
|
+
};
|
|
376
397
|
readonly inverseProjectionMatrix: {
|
|
377
398
|
readonly value: NumberArray16;
|
|
378
399
|
readonly private: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-space-global-illumination.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-global-illumination.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAEvD,+FAA+F;AAC/F,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"screen-space-global-illumination.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-global-illumination.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAiC,KAAK,mBAAmB,EAAC,4BAAyB;AAE1F,+FAA+F;AAC/F,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1C,uBAAuB,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IACj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;;;;;;;;;;;;;;;;;;;;;;;;;4BAyDtB,OAAO,CAAC,qBAAqB,CAAC;+BAC3B,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFtC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { temporalMotionReprojectionWGSL } from "./temporal-frame.js";
|
|
4
5
|
const IDENTITY_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
5
6
|
/** Traces cosine-weighted hemisphere rays through lit scene color and G-buffer depth. */
|
|
6
7
|
export const ssgiTrace = {
|
|
@@ -195,6 +196,8 @@ struct SSGITemporalUniforms {
|
|
|
195
196
|
inverseProjectionMatrix: mat4x4f,
|
|
196
197
|
historyWeight: f32,
|
|
197
198
|
depthThreshold: f32,
|
|
199
|
+
currentJitter: vec2f,
|
|
200
|
+
previousJitter: vec2f,
|
|
198
201
|
};
|
|
199
202
|
|
|
200
203
|
@group(0) @binding(auto) var<uniform> ssgiTemporal: SSGITemporalUniforms;
|
|
@@ -207,6 +210,7 @@ struct SSGITemporalUniforms {
|
|
|
207
210
|
@group(0) @binding(auto) var previousDepthTexture: texture_2d<f32>;
|
|
208
211
|
@group(0) @binding(auto) var previousDepthTextureSampler: sampler;
|
|
209
212
|
|
|
213
|
+
${temporalMotionReprojectionWGSL}
|
|
210
214
|
fn ssgiTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {
|
|
211
215
|
let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);
|
|
212
216
|
let viewPosition = ssgiTemporal.inverseProjectionMatrix * clip;
|
|
@@ -225,8 +229,10 @@ fn ssgiTemporal_sampleColor(
|
|
|
225
229
|
return vec4f(0.0);
|
|
226
230
|
}
|
|
227
231
|
|
|
232
|
+
if (ssgiTemporal.historyWeight <= 0.0) { return current; }
|
|
233
|
+
|
|
228
234
|
let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;
|
|
229
|
-
let previousCoord = texCoord - velocity;
|
|
235
|
+
let previousCoord = temporal_reprojectMotion(texCoord - ssgiTemporal.currentJitter, velocity) + ssgiTemporal.previousJitter;
|
|
230
236
|
let validCoordinate = all(previousCoord >= vec2f(0.0)) &&
|
|
231
237
|
all(previousCoord <= vec2f(1.0));
|
|
232
238
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
@@ -287,9 +293,13 @@ fn ssgiTemporal_sampleColor(
|
|
|
287
293
|
uniformTypes: {
|
|
288
294
|
inverseProjectionMatrix: 'mat4x4<f32>',
|
|
289
295
|
historyWeight: 'f32',
|
|
290
|
-
depthThreshold: 'f32'
|
|
296
|
+
depthThreshold: 'f32',
|
|
297
|
+
currentJitter: 'vec2<f32>',
|
|
298
|
+
previousJitter: 'vec2<f32>'
|
|
291
299
|
},
|
|
292
300
|
propTypes: {
|
|
301
|
+
currentJitter: { value: [0, 0], private: true },
|
|
302
|
+
previousJitter: { value: [0, 0], private: true },
|
|
293
303
|
inverseProjectionMatrix: { value: IDENTITY_MATRIX, private: true },
|
|
294
304
|
historyWeight: { value: 0.89, min: 0, max: 0.97 },
|
|
295
305
|
depthThreshold: { value: 0.022, min: 0.0001, softMax: 0.1 }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-space-global-illumination.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-global-illumination.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;
|
|
1
|
+
{"version":3,"file":"screen-space-global-illumination.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-global-illumination.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAO5D,OAAO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AAqB;YAC3B,UAAU,EAAE,YAAY;YACxB,MAAM,EAAE;gBACN,aAAa,EAAE,SAAS;gBACxB,cAAc,EAAE,aAAa;gBAC7B,oBAAoB,EAAE,kBAAkB;aACzC;YACD,MAAM,EAAE,aAAa;SACtB;QACD;YACE,IAAI,EAAE,YAAqB;YAC3B,UAAU,EAAE,oBAAoB;YAChC,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAC;YACnC,MAAM,EAAE,kBAAkB;SAC3B;QACD;YACE,IAAI,EAAE,YAAqB;YAC3B,UAAU,EAAE,WAAW;YACvB,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,YAAqB;YAC3B,UAAU,EAAE,WAAW;YACvB,MAAM,EAAE,EAAC,aAAa,EAAE,aAAa,EAAC;YACtC,MAAM,EAAE,cAAc;YACtB,QAAQ,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;SAC9B;QACD;YACE,IAAI,EAAE,YAAqB;YAC3B,UAAU,EAAE,aAAa;YACzB,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAE,uBAAuB,EAAE,cAAc,EAAC;YAC5E,MAAM,EAAE,UAAU;SACnB;KACF;CAIF,CAAC"}
|
|
@@ -26,6 +26,7 @@ __export(screen_space_reflections_exports, {
|
|
|
26
26
|
ssrTrace: () => ssrTrace
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(screen_space_reflections_exports);
|
|
29
|
+
var import_temporal_frame = require("./temporal-frame.cjs");
|
|
29
30
|
var import_screen_space_shader_helpers = require("./screen-space-shader-helpers.cjs");
|
|
30
31
|
var import_ssr_camera_temporal = require("./ssr-camera-temporal.cjs");
|
|
31
32
|
const SSR_QUALITY_PRESETS = {
|
|
@@ -227,10 +228,13 @@ const ssrTemporal = {
|
|
|
227
228
|
source: (
|
|
228
229
|
/* wgsl */
|
|
229
230
|
`${import_screen_space_shader_helpers.temporalHelpers}
|
|
231
|
+
${import_temporal_frame.temporalMotionReprojectionWGSL}
|
|
230
232
|
struct SSRTemporalUniforms {
|
|
231
233
|
inverseProjectionMatrix: mat4x4f,
|
|
232
234
|
historyWeight: f32,
|
|
233
235
|
depthThreshold: f32,
|
|
236
|
+
currentJitter: vec2f,
|
|
237
|
+
previousJitter: vec2f,
|
|
234
238
|
};
|
|
235
239
|
|
|
236
240
|
@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;
|
|
@@ -255,8 +259,12 @@ fn ssrTemporal_sampleColor(
|
|
|
255
259
|
return vec4f(0.0);
|
|
256
260
|
}
|
|
257
261
|
|
|
262
|
+
if (ssrTemporal.historyWeight <= 0.0) { return current; }
|
|
263
|
+
|
|
258
264
|
let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;
|
|
259
|
-
let previousCoord =
|
|
265
|
+
let previousCoord = temporal_reprojectMotion(
|
|
266
|
+
texCoord - ssrTemporal.currentJitter, velocity
|
|
267
|
+
) + ssrTemporal.previousJitter;
|
|
260
268
|
let validCoordinate = all(previousCoord >= vec2f(0.0)) &&
|
|
261
269
|
all(previousCoord <= vec2f(1.0));
|
|
262
270
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
@@ -311,9 +319,13 @@ fn ssrTemporal_sampleColor(
|
|
|
311
319
|
uniformTypes: {
|
|
312
320
|
inverseProjectionMatrix: "mat4x4<f32>",
|
|
313
321
|
historyWeight: "f32",
|
|
314
|
-
depthThreshold: "f32"
|
|
322
|
+
depthThreshold: "f32",
|
|
323
|
+
currentJitter: "vec2<f32>",
|
|
324
|
+
previousJitter: "vec2<f32>"
|
|
315
325
|
},
|
|
316
326
|
propTypes: {
|
|
327
|
+
currentJitter: { value: [0, 0], private: true },
|
|
328
|
+
previousJitter: { value: [0, 0], private: true },
|
|
317
329
|
inverseProjectionMatrix: { value: IDENTITY_MATRIX, private: true },
|
|
318
330
|
historyWeight: { value: 0.86, min: 0, max: 0.97 },
|
|
319
331
|
depthThreshold: { value: 0.018, min: 1e-4, softMax: 0.1 }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Texture } from '@luma.gl/core';
|
|
2
2
|
import type { NumberArray16 } from '@math.gl/core/types';
|
|
3
|
+
import { type TemporalFrameJitter } from "./temporal-frame.js";
|
|
3
4
|
export type SSRQuality = 'fast' | 'balanced' | 'detailed';
|
|
4
5
|
/** Relative workload presets. Actual frame cost depends on scene, viewport, and device. */
|
|
5
6
|
export declare const SSR_QUALITY_PRESETS: {
|
|
@@ -23,7 +24,7 @@ export declare const SSR_QUALITY_PRESETS: {
|
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
/** Construction options for temporally stabilized screen-space reflections. */
|
|
26
|
-
export type
|
|
27
|
+
export type SSREffectOptions = {
|
|
27
28
|
/** Fractional ray-tracing, history, and denoising resolution. Defaults to full resolution. */
|
|
28
29
|
resolutionScale?: number;
|
|
29
30
|
/** Optional workload preset. Omission preserves the original pass defaults. */
|
|
@@ -41,7 +42,7 @@ type SSRTraceUniforms = {
|
|
|
41
42
|
maxRoughness: number;
|
|
42
43
|
frameIndex: number;
|
|
43
44
|
};
|
|
44
|
-
type SSRTemporalUniforms = {
|
|
45
|
+
type SSRTemporalUniforms = TemporalFrameJitter & {
|
|
45
46
|
inverseProjectionMatrix: Readonly<NumberArray16>;
|
|
46
47
|
historyWeight: number;
|
|
47
48
|
depthThreshold: number;
|
|
@@ -147,7 +148,7 @@ export declare const ssrTrace: {
|
|
|
147
148
|
/** Reprojects previous-frame reflection radiance with velocity and rejects disocclusions. */
|
|
148
149
|
export declare const ssrTemporal: {
|
|
149
150
|
readonly name: "ssrTemporal";
|
|
150
|
-
readonly source: "\nfn temporal_getTexelCoordinate(coordinate: vec2f, dimensions: vec2u) -> vec2i {\n return clamp(vec2i(coordinate * vec2f(dimensions)), vec2i(0), vec2i(dimensions) - vec2i(1));\n}\n\nfn temporal_getClipPosition(coordinate: vec2f, depth: f32) -> vec4f {\n return vec4f(coordinate * vec2f(2.0, -2.0) + vec2f(-1.0, 1.0), depth, 1.0);\n}\n\n// Returns previous UV, device depth, and validity. Matrices use WebGPU clip depth.\nfn temporal_getPreviousFrame(previousClip: vec4f, jitter: vec2f, epsilon: f32) -> vec4f {\n if (previousClip.w <= epsilon) { return vec4f(0.0); }\n let position = previousClip.xyz / previousClip.w;\n let coordinate = position.xy * vec2f(0.5, -0.5) + vec2f(0.5) + jitter;\n let valid = all(coordinate >= vec2f(0.0)) && all(coordinate <= vec2f(1.0)) &&\n position.z >= 0.0 && position.z <= 1.0;\n return vec4f(coordinate, position.z, select(0.0, 1.0, valid));\n}\n\nfn temporal_getViewDepth(\n coordinate: vec2f, depth: f32, inverseProjection: mat4x4f, epsilon: f32\n) -> f32 {\n let position = inverseProjection * temporal_getClipPosition(coordinate, depth);\n return abs(position.z / max(abs(position.w), epsilon));\n}\n\nstruct TemporalColorBounds { minimum: vec4f, maximum: vec4f };\nfn temporal_getColorBounds(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler,\n coordinate: vec2f, current: vec4f\n) -> TemporalColorBounds {\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimum = current;\n var maximum = current;\n for (var vertical = -1; vertical <= 1; vertical++) {\n for (var horizontal = -1; horizontal <= 1; horizontal++) {\n let sampleCoordinate = clamp(coordinate + vec2f(f32(horizontal), f32(vertical)) * texel,\n vec2f(0.0), vec2f(1.0));\n let sample = textureSampleLevel(sourceTexture, sourceTextureSampler, sampleCoordinate, 0);\n minimum = min(minimum, sample);\n maximum = max(maximum, sample);\n }\n }\n return TemporalColorBounds(minimum, maximum);\n}\n\nstruct TemporalHistoryFootprint { base: vec2i, fraction: vec2f, dimensions: vec2u };\nstruct TemporalHistoryTap { coordinate: vec2i, normalizedCoordinate: vec2f, weight: f32 };\nfn temporal_getHistoryFootprint(coordinate: vec2f, dimensions: vec2u) -> TemporalHistoryFootprint {\n let position = coordinate * vec2f(dimensions) - vec2f(0.5);\n return TemporalHistoryFootprint(vec2i(floor(position)), fract(position), dimensions);\n}\nfn temporal_getHistoryTap(footprint: TemporalHistoryFootprint, offset: vec2i) -> TemporalHistoryTap {\n let coordinate = clamp(footprint.base + offset, vec2i(0), vec2i(footprint.dimensions) - vec2i(1));\n let horizontalWeight = select(1.0 - footprint.fraction.x, footprint.fraction.x, offset.x == 1);\n let verticalWeight = select(1.0 - footprint.fraction.y, footprint.fraction.y, offset.y == 1);\n return TemporalHistoryTap(coordinate,\n (vec2f(coordinate) + vec2f(0.5)) / vec2f(footprint.dimensions), horizontalWeight * verticalWeight);\n}\n\nstruct SSRTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;\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;\n\nfn ssrTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = texCoord - velocity;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = temporal_getViewDepth(texCoord, currentDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let previousViewDepth = temporal_getViewDepth(clampedPreviousCoord, previousDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssrTemporal.depthThreshold;\n\n let bounds = temporal_getColorBounds(sourceTexture, sourceTextureSampler, texCoord, current);\n let minimumReflection = bounds.minimum;\n let maximumReflection = bounds.maximum;\n\n let historyReflection = textureSampleLevel(\n historyTexture,\n historyTextureSampler,\n clampedPreviousCoord,\n 0\n );\n let validHistory = validCoordinate && validDepth && historyReflection.a > 0.001;\n if (!validHistory) {\n return current;\n }\n\n let hasCurrentSupport = maximumReflection.a > 0.001;\n if (!hasCurrentSupport) {\n return vec4f(\n historyReflection.rgb,\n historyReflection.a * ssrTemporal.historyWeight\n );\n }\n\n let clampedHistory = clamp(historyReflection, minimumReflection, maximumReflection);\n return mix(current, clampedHistory, ssrTemporal.historyWeight);\n}";
|
|
151
|
+
readonly source: "\nfn temporal_getTexelCoordinate(coordinate: vec2f, dimensions: vec2u) -> vec2i {\n return clamp(vec2i(coordinate * vec2f(dimensions)), vec2i(0), vec2i(dimensions) - vec2i(1));\n}\n\nfn temporal_getClipPosition(coordinate: vec2f, depth: f32) -> vec4f {\n return vec4f(coordinate * vec2f(2.0, -2.0) + vec2f(-1.0, 1.0), depth, 1.0);\n}\n\n// Returns previous UV, device depth, and validity. Matrices use WebGPU clip depth.\nfn temporal_getPreviousFrame(previousClip: vec4f, jitter: vec2f, epsilon: f32) -> vec4f {\n if (previousClip.w <= epsilon) { return vec4f(0.0); }\n let position = previousClip.xyz / previousClip.w;\n let coordinate = position.xy * vec2f(0.5, -0.5) + vec2f(0.5) + jitter;\n let valid = all(coordinate >= vec2f(0.0)) && all(coordinate <= vec2f(1.0)) &&\n position.z >= 0.0 && position.z <= 1.0;\n return vec4f(coordinate, position.z, select(0.0, 1.0, valid));\n}\n\nfn temporal_getViewDepth(\n coordinate: vec2f, depth: f32, inverseProjection: mat4x4f, epsilon: f32\n) -> f32 {\n let position = inverseProjection * temporal_getClipPosition(coordinate, depth);\n return abs(position.z / max(abs(position.w), epsilon));\n}\n\nstruct TemporalColorBounds { minimum: vec4f, maximum: vec4f };\nfn temporal_getColorBounds(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler,\n coordinate: vec2f, current: vec4f\n) -> TemporalColorBounds {\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimum = current;\n var maximum = current;\n for (var vertical = -1; vertical <= 1; vertical++) {\n for (var horizontal = -1; horizontal <= 1; horizontal++) {\n let sampleCoordinate = clamp(coordinate + vec2f(f32(horizontal), f32(vertical)) * texel,\n vec2f(0.0), vec2f(1.0));\n let sample = textureSampleLevel(sourceTexture, sourceTextureSampler, sampleCoordinate, 0);\n minimum = min(minimum, sample);\n maximum = max(maximum, sample);\n }\n }\n return TemporalColorBounds(minimum, maximum);\n}\n\nstruct TemporalHistoryFootprint { base: vec2i, fraction: vec2f, dimensions: vec2u };\nstruct TemporalHistoryTap { coordinate: vec2i, normalizedCoordinate: vec2f, weight: f32 };\nfn temporal_getHistoryFootprint(coordinate: vec2f, dimensions: vec2u) -> TemporalHistoryFootprint {\n let position = coordinate * vec2f(dimensions) - vec2f(0.5);\n return TemporalHistoryFootprint(vec2i(floor(position)), fract(position), dimensions);\n}\nfn temporal_getHistoryTap(footprint: TemporalHistoryFootprint, offset: vec2i) -> TemporalHistoryTap {\n let coordinate = clamp(footprint.base + offset, vec2i(0), vec2i(footprint.dimensions) - vec2i(1));\n let horizontalWeight = select(1.0 - footprint.fraction.x, footprint.fraction.x, offset.x == 1);\n let verticalWeight = select(1.0 - footprint.fraction.y, footprint.fraction.y, offset.y == 1);\n return TemporalHistoryTap(coordinate,\n (vec2f(coordinate) + vec2f(0.5)) / vec2f(footprint.dimensions), horizontalWeight * verticalWeight);\n}\n\n\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n\nstruct SSRTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;\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;\n\nfn ssrTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n if (ssrTemporal.historyWeight <= 0.0) { return current; }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = temporal_reprojectMotion(\n texCoord - ssrTemporal.currentJitter, velocity\n ) + ssrTemporal.previousJitter;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = temporal_getViewDepth(texCoord, currentDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let previousViewDepth = temporal_getViewDepth(clampedPreviousCoord, previousDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssrTemporal.depthThreshold;\n\n let bounds = temporal_getColorBounds(sourceTexture, sourceTextureSampler, texCoord, current);\n let minimumReflection = bounds.minimum;\n let maximumReflection = bounds.maximum;\n\n let historyReflection = textureSampleLevel(\n historyTexture,\n historyTextureSampler,\n clampedPreviousCoord,\n 0\n );\n let validHistory = validCoordinate && validDepth && historyReflection.a > 0.001;\n if (!validHistory) {\n return current;\n }\n\n let hasCurrentSupport = maximumReflection.a > 0.001;\n if (!hasCurrentSupport) {\n return vec4f(\n historyReflection.rgb,\n historyReflection.a * ssrTemporal.historyWeight\n );\n }\n\n let clampedHistory = clamp(historyReflection, minimumReflection, maximumReflection);\n return mix(current, clampedHistory, ssrTemporal.historyWeight);\n}";
|
|
151
152
|
readonly bindingLayout: readonly [{
|
|
152
153
|
readonly name: "historyTexture";
|
|
153
154
|
readonly group: 0;
|
|
@@ -168,8 +169,18 @@ export declare const ssrTemporal: {
|
|
|
168
169
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
169
170
|
readonly historyWeight: "f32";
|
|
170
171
|
readonly depthThreshold: "f32";
|
|
172
|
+
readonly currentJitter: "vec2<f32>";
|
|
173
|
+
readonly previousJitter: "vec2<f32>";
|
|
171
174
|
};
|
|
172
175
|
readonly propTypes: {
|
|
176
|
+
readonly currentJitter: {
|
|
177
|
+
readonly value: readonly [0, 0];
|
|
178
|
+
readonly private: true;
|
|
179
|
+
};
|
|
180
|
+
readonly previousJitter: {
|
|
181
|
+
readonly value: readonly [0, 0];
|
|
182
|
+
readonly private: true;
|
|
183
|
+
};
|
|
173
184
|
readonly inverseProjectionMatrix: {
|
|
174
185
|
readonly value: NumberArray16;
|
|
175
186
|
readonly private: true;
|
|
@@ -296,7 +307,7 @@ export declare const ssrComposite: {
|
|
|
296
307
|
/** Screen-space reflections with velocity or camera reprojection. */
|
|
297
308
|
export declare const ssr: {
|
|
298
309
|
readonly name: "ssrCompositeShaderPass";
|
|
299
|
-
readonly optionDefaults:
|
|
310
|
+
readonly optionDefaults: SSREffectOptions;
|
|
300
311
|
readonly scaleResources: {
|
|
301
312
|
readonly option: "resolutionScale";
|
|
302
313
|
readonly targets: readonly ["ssrRaw", "ssrHistory", "ssrHistoryDepth", "ssrScratch", "ssrReflection"];
|
|
@@ -458,7 +469,7 @@ export declare const ssr: {
|
|
|
458
469
|
readonly kind: "sample";
|
|
459
470
|
readonly module: {
|
|
460
471
|
readonly name: "ssrTemporal";
|
|
461
|
-
readonly source: "\nfn temporal_getTexelCoordinate(coordinate: vec2f, dimensions: vec2u) -> vec2i {\n return clamp(vec2i(coordinate * vec2f(dimensions)), vec2i(0), vec2i(dimensions) - vec2i(1));\n}\n\nfn temporal_getClipPosition(coordinate: vec2f, depth: f32) -> vec4f {\n return vec4f(coordinate * vec2f(2.0, -2.0) + vec2f(-1.0, 1.0), depth, 1.0);\n}\n\n// Returns previous UV, device depth, and validity. Matrices use WebGPU clip depth.\nfn temporal_getPreviousFrame(previousClip: vec4f, jitter: vec2f, epsilon: f32) -> vec4f {\n if (previousClip.w <= epsilon) { return vec4f(0.0); }\n let position = previousClip.xyz / previousClip.w;\n let coordinate = position.xy * vec2f(0.5, -0.5) + vec2f(0.5) + jitter;\n let valid = all(coordinate >= vec2f(0.0)) && all(coordinate <= vec2f(1.0)) &&\n position.z >= 0.0 && position.z <= 1.0;\n return vec4f(coordinate, position.z, select(0.0, 1.0, valid));\n}\n\nfn temporal_getViewDepth(\n coordinate: vec2f, depth: f32, inverseProjection: mat4x4f, epsilon: f32\n) -> f32 {\n let position = inverseProjection * temporal_getClipPosition(coordinate, depth);\n return abs(position.z / max(abs(position.w), epsilon));\n}\n\nstruct TemporalColorBounds { minimum: vec4f, maximum: vec4f };\nfn temporal_getColorBounds(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler,\n coordinate: vec2f, current: vec4f\n) -> TemporalColorBounds {\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimum = current;\n var maximum = current;\n for (var vertical = -1; vertical <= 1; vertical++) {\n for (var horizontal = -1; horizontal <= 1; horizontal++) {\n let sampleCoordinate = clamp(coordinate + vec2f(f32(horizontal), f32(vertical)) * texel,\n vec2f(0.0), vec2f(1.0));\n let sample = textureSampleLevel(sourceTexture, sourceTextureSampler, sampleCoordinate, 0);\n minimum = min(minimum, sample);\n maximum = max(maximum, sample);\n }\n }\n return TemporalColorBounds(minimum, maximum);\n}\n\nstruct TemporalHistoryFootprint { base: vec2i, fraction: vec2f, dimensions: vec2u };\nstruct TemporalHistoryTap { coordinate: vec2i, normalizedCoordinate: vec2f, weight: f32 };\nfn temporal_getHistoryFootprint(coordinate: vec2f, dimensions: vec2u) -> TemporalHistoryFootprint {\n let position = coordinate * vec2f(dimensions) - vec2f(0.5);\n return TemporalHistoryFootprint(vec2i(floor(position)), fract(position), dimensions);\n}\nfn temporal_getHistoryTap(footprint: TemporalHistoryFootprint, offset: vec2i) -> TemporalHistoryTap {\n let coordinate = clamp(footprint.base + offset, vec2i(0), vec2i(footprint.dimensions) - vec2i(1));\n let horizontalWeight = select(1.0 - footprint.fraction.x, footprint.fraction.x, offset.x == 1);\n let verticalWeight = select(1.0 - footprint.fraction.y, footprint.fraction.y, offset.y == 1);\n return TemporalHistoryTap(coordinate,\n (vec2f(coordinate) + vec2f(0.5)) / vec2f(footprint.dimensions), horizontalWeight * verticalWeight);\n}\n\nstruct SSRTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;\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;\n\nfn ssrTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = texCoord - velocity;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = temporal_getViewDepth(texCoord, currentDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let previousViewDepth = temporal_getViewDepth(clampedPreviousCoord, previousDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssrTemporal.depthThreshold;\n\n let bounds = temporal_getColorBounds(sourceTexture, sourceTextureSampler, texCoord, current);\n let minimumReflection = bounds.minimum;\n let maximumReflection = bounds.maximum;\n\n let historyReflection = textureSampleLevel(\n historyTexture,\n historyTextureSampler,\n clampedPreviousCoord,\n 0\n );\n let validHistory = validCoordinate && validDepth && historyReflection.a > 0.001;\n if (!validHistory) {\n return current;\n }\n\n let hasCurrentSupport = maximumReflection.a > 0.001;\n if (!hasCurrentSupport) {\n return vec4f(\n historyReflection.rgb,\n historyReflection.a * ssrTemporal.historyWeight\n );\n }\n\n let clampedHistory = clamp(historyReflection, minimumReflection, maximumReflection);\n return mix(current, clampedHistory, ssrTemporal.historyWeight);\n}";
|
|
472
|
+
readonly source: "\nfn temporal_getTexelCoordinate(coordinate: vec2f, dimensions: vec2u) -> vec2i {\n return clamp(vec2i(coordinate * vec2f(dimensions)), vec2i(0), vec2i(dimensions) - vec2i(1));\n}\n\nfn temporal_getClipPosition(coordinate: vec2f, depth: f32) -> vec4f {\n return vec4f(coordinate * vec2f(2.0, -2.0) + vec2f(-1.0, 1.0), depth, 1.0);\n}\n\n// Returns previous UV, device depth, and validity. Matrices use WebGPU clip depth.\nfn temporal_getPreviousFrame(previousClip: vec4f, jitter: vec2f, epsilon: f32) -> vec4f {\n if (previousClip.w <= epsilon) { return vec4f(0.0); }\n let position = previousClip.xyz / previousClip.w;\n let coordinate = position.xy * vec2f(0.5, -0.5) + vec2f(0.5) + jitter;\n let valid = all(coordinate >= vec2f(0.0)) && all(coordinate <= vec2f(1.0)) &&\n position.z >= 0.0 && position.z <= 1.0;\n return vec4f(coordinate, position.z, select(0.0, 1.0, valid));\n}\n\nfn temporal_getViewDepth(\n coordinate: vec2f, depth: f32, inverseProjection: mat4x4f, epsilon: f32\n) -> f32 {\n let position = inverseProjection * temporal_getClipPosition(coordinate, depth);\n return abs(position.z / max(abs(position.w), epsilon));\n}\n\nstruct TemporalColorBounds { minimum: vec4f, maximum: vec4f };\nfn temporal_getColorBounds(\n sourceTexture: texture_2d<f32>, sourceTextureSampler: sampler,\n coordinate: vec2f, current: vec4f\n) -> TemporalColorBounds {\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimum = current;\n var maximum = current;\n for (var vertical = -1; vertical <= 1; vertical++) {\n for (var horizontal = -1; horizontal <= 1; horizontal++) {\n let sampleCoordinate = clamp(coordinate + vec2f(f32(horizontal), f32(vertical)) * texel,\n vec2f(0.0), vec2f(1.0));\n let sample = textureSampleLevel(sourceTexture, sourceTextureSampler, sampleCoordinate, 0);\n minimum = min(minimum, sample);\n maximum = max(maximum, sample);\n }\n }\n return TemporalColorBounds(minimum, maximum);\n}\n\nstruct TemporalHistoryFootprint { base: vec2i, fraction: vec2f, dimensions: vec2u };\nstruct TemporalHistoryTap { coordinate: vec2i, normalizedCoordinate: vec2f, weight: f32 };\nfn temporal_getHistoryFootprint(coordinate: vec2f, dimensions: vec2u) -> TemporalHistoryFootprint {\n let position = coordinate * vec2f(dimensions) - vec2f(0.5);\n return TemporalHistoryFootprint(vec2i(floor(position)), fract(position), dimensions);\n}\nfn temporal_getHistoryTap(footprint: TemporalHistoryFootprint, offset: vec2i) -> TemporalHistoryTap {\n let coordinate = clamp(footprint.base + offset, vec2i(0), vec2i(footprint.dimensions) - vec2i(1));\n let horizontalWeight = select(1.0 - footprint.fraction.x, footprint.fraction.x, offset.x == 1);\n let verticalWeight = select(1.0 - footprint.fraction.y, footprint.fraction.y, offset.y == 1);\n return TemporalHistoryTap(coordinate,\n (vec2f(coordinate) + vec2f(0.5)) / vec2f(footprint.dimensions), horizontalWeight * verticalWeight);\n}\n\n\nfn temporal_reprojectMotion(currentUv: vec2f, motion: vec2f) -> vec2f {\n return currentUv - motion;\n}\n\nstruct SSRTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;\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;\n\nfn ssrTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSampleLevel(sourceTexture, sourceTextureSampler, texCoord, 0);\n let currentDepth = textureSampleLevel(depthTexture, depthTextureSampler, texCoord, 0);\n if (currentDepth >= 0.99999) {\n return vec4f(0.0);\n }\n\n if (ssrTemporal.historyWeight <= 0.0) { return current; }\n\n let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;\n let previousCoord = temporal_reprojectMotion(\n texCoord - ssrTemporal.currentJitter, velocity\n ) + ssrTemporal.previousJitter;\n let validCoordinate = all(previousCoord >= vec2f(0.0)) &&\n all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let previousDepth = textureSampleLevel(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord,\n 0\n ).r;\n let currentViewDepth = temporal_getViewDepth(texCoord, currentDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let previousViewDepth = temporal_getViewDepth(clampedPreviousCoord, previousDepth, ssrTemporal.inverseProjectionMatrix, 0.00001);\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < ssrTemporal.depthThreshold;\n\n let bounds = temporal_getColorBounds(sourceTexture, sourceTextureSampler, texCoord, current);\n let minimumReflection = bounds.minimum;\n let maximumReflection = bounds.maximum;\n\n let historyReflection = textureSampleLevel(\n historyTexture,\n historyTextureSampler,\n clampedPreviousCoord,\n 0\n );\n let validHistory = validCoordinate && validDepth && historyReflection.a > 0.001;\n if (!validHistory) {\n return current;\n }\n\n let hasCurrentSupport = maximumReflection.a > 0.001;\n if (!hasCurrentSupport) {\n return vec4f(\n historyReflection.rgb,\n historyReflection.a * ssrTemporal.historyWeight\n );\n }\n\n let clampedHistory = clamp(historyReflection, minimumReflection, maximumReflection);\n return mix(current, clampedHistory, ssrTemporal.historyWeight);\n}";
|
|
462
473
|
readonly bindingLayout: readonly [{
|
|
463
474
|
readonly name: "historyTexture";
|
|
464
475
|
readonly group: 0;
|
|
@@ -479,8 +490,18 @@ export declare const ssr: {
|
|
|
479
490
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
480
491
|
readonly historyWeight: "f32";
|
|
481
492
|
readonly depthThreshold: "f32";
|
|
493
|
+
readonly currentJitter: "vec2<f32>";
|
|
494
|
+
readonly previousJitter: "vec2<f32>";
|
|
482
495
|
};
|
|
483
496
|
readonly propTypes: {
|
|
497
|
+
readonly currentJitter: {
|
|
498
|
+
readonly value: readonly [0, 0];
|
|
499
|
+
readonly private: true;
|
|
500
|
+
};
|
|
501
|
+
readonly previousJitter: {
|
|
502
|
+
readonly value: readonly [0, 0];
|
|
503
|
+
readonly private: true;
|
|
504
|
+
};
|
|
484
505
|
readonly inverseProjectionMatrix: {
|
|
485
506
|
readonly value: NumberArray16;
|
|
486
507
|
readonly private: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-space-reflections.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-reflections.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"screen-space-reflections.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-reflections.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,E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;;;;;;;wCAxYvB,OAAO,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;2CACzC,gBAAgB;2CAChB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAsQnB,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;2CAC7C,kBAAkB;2CAClB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAFrB,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;2CAC7C,kBAAkB;2CAClB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4HrB,OAAO,CAAC,oBAAoB,CAAC,GAAG,oBAAoB;2CACjD,oBAAoB;2CACpB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoL6B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { temporalMotionReprojectionWGSL } from "./temporal-frame.js";
|
|
4
5
|
import { temporalHelpers } from "./screen-space-shader-helpers.js";
|
|
5
6
|
import { ssrCameraTemporal, ssrCameraDepthHistoryCopy, ssrNormalHistoryCopy } from "./ssr-camera-temporal.js";
|
|
6
7
|
/** Relative workload presets. Actual frame cost depends on scene, viewport, and device. */
|
|
@@ -202,10 +203,13 @@ export const ssrTemporal = {
|
|
|
202
203
|
name: 'ssrTemporal',
|
|
203
204
|
source: /* wgsl */ `\
|
|
204
205
|
${temporalHelpers}
|
|
206
|
+
${temporalMotionReprojectionWGSL}
|
|
205
207
|
struct SSRTemporalUniforms {
|
|
206
208
|
inverseProjectionMatrix: mat4x4f,
|
|
207
209
|
historyWeight: f32,
|
|
208
210
|
depthThreshold: f32,
|
|
211
|
+
currentJitter: vec2f,
|
|
212
|
+
previousJitter: vec2f,
|
|
209
213
|
};
|
|
210
214
|
|
|
211
215
|
@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;
|
|
@@ -230,8 +234,12 @@ fn ssrTemporal_sampleColor(
|
|
|
230
234
|
return vec4f(0.0);
|
|
231
235
|
}
|
|
232
236
|
|
|
237
|
+
if (ssrTemporal.historyWeight <= 0.0) { return current; }
|
|
238
|
+
|
|
233
239
|
let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;
|
|
234
|
-
let previousCoord =
|
|
240
|
+
let previousCoord = temporal_reprojectMotion(
|
|
241
|
+
texCoord - ssrTemporal.currentJitter, velocity
|
|
242
|
+
) + ssrTemporal.previousJitter;
|
|
235
243
|
let validCoordinate = all(previousCoord >= vec2f(0.0)) &&
|
|
236
244
|
all(previousCoord <= vec2f(1.0));
|
|
237
245
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
@@ -285,9 +293,13 @@ fn ssrTemporal_sampleColor(
|
|
|
285
293
|
uniformTypes: {
|
|
286
294
|
inverseProjectionMatrix: 'mat4x4<f32>',
|
|
287
295
|
historyWeight: 'f32',
|
|
288
|
-
depthThreshold: 'f32'
|
|
296
|
+
depthThreshold: 'f32',
|
|
297
|
+
currentJitter: 'vec2<f32>',
|
|
298
|
+
previousJitter: 'vec2<f32>'
|
|
289
299
|
},
|
|
290
300
|
propTypes: {
|
|
301
|
+
currentJitter: { value: [0, 0], private: true },
|
|
302
|
+
previousJitter: { value: [0, 0], private: true },
|
|
291
303
|
inverseProjectionMatrix: { value: IDENTITY_MATRIX, private: true },
|
|
292
304
|
historyWeight: { value: 0.86, min: 0, max: 0.97 },
|
|
293
305
|
depthThreshold: { value: 0.018, min: 0.0001, softMax: 0.1 }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-space-reflections.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-reflections.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAS5D,OAAO,EAAC,eAAe,EAAC,yCAAsC;AAC9D,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACrB,iCAA8B;AAI/B,2FAA2F;AAC3F,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,EAAC,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAC;IAChF,QAAQ,EAAE,EAAC,eAAe,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAC;IACnF,QAAQ,EAAE,EAAC,eAAe,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAC;CACzE,CAAC;AAkEX,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,oFAAoF;AACpF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;IACD,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;CAK1B,CAAC;AAEF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,UAAU,CAAC;EACnB,eAAe
|
|
1
|
+
{"version":3,"file":"screen-space-reflections.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/screen-space-reflections.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAS5D,OAAO,EAAC,8BAA8B,EAA2B,4BAAyB;AAC1F,OAAO,EAAC,eAAe,EAAC,yCAAsC;AAC9D,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACrB,iCAA8B;AAI/B,2FAA2F;AAC3F,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,EAAC,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAC;IAChF,QAAQ,EAAE,EAAC,eAAe,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAC;IACnF,QAAQ,EAAE,EAAC,eAAe,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAC;CACzE,CAAC;AAkEX,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,oFAAoF;AACpF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,UAAU;IAChB,M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aAAa,EAAE,UAAU,EAAC;YACnC,MAAM,EAAE,iBAAiB;SAC1B;QACD,GAAG,sBAAsB;KAC1B;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,cAAc;QACtB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,SAAS,EAAE;oBACT,GAAG,UAAU;oBACb,eAAe,EAAE;wBACf,MAAM,EAAE,YAAY;wBACpB,QAAQ,EAAE,SAAS;wBACnB,UAAU,EAAE,EAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC;qBACvC;oBACD,gBAAgB,EAAE;wBAChB,MAAM,EAAE,YAAY;wBACpB,QAAQ,EAAE,SAAS;wBACnB,UAAU,EAAE,EAAC,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC;qBAC3C;iBACF;gBACD,MAAM,EAAE;oBACN,YAAY;oBACZ;wBACE,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,iBAAiB;wBACzB,MAAM,EAAE,EAAC,GAAG,iBAAiB,EAAE,qBAAqB,EAAE,kBAAkB,EAAC;wBACzE,MAAM,EAAE,YAAY;qBACrB;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,yBAAyB;wBACjC,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAC;wBACnC,MAAM,EAAE,iBAAiB;qBAC1B;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,oBAAoB;wBAC5B,MAAM,EAAE,EAAC,aAAa,EAAE,UAAU,EAAC;wBACnC,MAAM,EAAE,kBAAkB;qBAC3B;oBACD,GAAG,sBAAsB;iBAC1B;aACF;SACF;KACF;CACgE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-outline.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/selection-outline.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAEvE,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;;;;;;;;oBAgDd,qBAAqB;uBAClB,wBAAwB;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"selection-outline.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/selection-outline.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAEvE,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;;;;;;;;oBAgDd,qBAAqB;uBAClB,wBAAwB;;;;;;;;;;;;CAIkD,CAAC;AAE7F,yEAAyE;AACzE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;4BARpB,qBAAqB;+BAClB,wBAAwB;;;;;;;;;;;;;;;CAcqC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-outline.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/selection-outline.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAY5D,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAuBpB;IACC,EAAE,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;CAoBhB;IACC,aAAa,EAAE,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC;IACrD,KAAK,EAAE,EAA2B;IAClC,QAAQ,EAAE,EAA8B;IACxC,YAAY,EAAE,EAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAC;IACpD,eAAe,EAAE,EAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,EAAC;IAC3D,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"selection-outline.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/selection-outline.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAY5D,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAuBpB;IACC,EAAE,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;CAoBhB;IACC,aAAa,EAAE,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC;IACrD,KAAK,EAAE,EAA2B;IAClC,QAAQ,EAAE,EAA8B;IACxC,YAAY,EAAE,EAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAC;IACpD,eAAe,EAAE,EAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,EAAC;IAC3D,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;CACiE,CAAC;AAE7F,yEAAyE;AACzE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,kBAAkB;IACxB,cAAc,EAAE,gBAAgB,CAAC,eAAe;IAChD,cAAc,EAAE;QACd,gBAAgB,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,OAAO,EAAC,EAAE,SAAS,EAAE,EAAC,MAAM,EAAE,WAAW,EAAC,EAAC;KAC/E;IACD,MAAM,EAAE,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAC,CAAC;CACK,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Texture } from '@luma.gl/core';
|
|
2
|
-
export type
|
|
2
|
+
export type SSAOEffectOptions = {
|
|
3
3
|
normalSource?: 'reconstruct-from-depth' | 'normal-texture';
|
|
4
4
|
/** Fractional intermediate framebuffer resolution. Defaults to full resolution. */
|
|
5
5
|
resolutionScale?: number;
|
|
@@ -312,7 +312,7 @@ export declare const ssao: {
|
|
|
312
312
|
};
|
|
313
313
|
/** Screen-space ambient occlusion with configurable normal input and target size. */
|
|
314
314
|
export declare const ssaoEffect: {
|
|
315
|
-
readonly optionDefaults: Required<
|
|
315
|
+
readonly optionDefaults: Required<SSAOEffectOptions>;
|
|
316
316
|
readonly scaleResources: {
|
|
317
317
|
readonly option: "resolutionScale";
|
|
318
318
|
readonly targets: readonly ["ssaoRaw", "ssaoScratch", "ssaoBlurred"];
|