@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
|
@@ -38,7 +38,7 @@ export type DofUniforms = DofProps;
|
|
|
38
38
|
*
|
|
39
39
|
* This pass samples scene color from `sourceTexture` and scene depth from `depthTexture`, then
|
|
40
40
|
* computes a blur radius from reconstructed linear depth. It is designed to be driven by
|
|
41
|
-
* {@link
|
|
41
|
+
* {@link depthOfField}, which runs the pass twice with different internal
|
|
42
42
|
* `texelOffset` values for horizontal and vertical blur.
|
|
43
43
|
*
|
|
44
44
|
* Callers are expected to provide:
|
|
@@ -216,128 +216,6 @@ export declare const depthOfField: {
|
|
|
216
216
|
};
|
|
217
217
|
}];
|
|
218
218
|
};
|
|
219
|
-
/** Compatibility view of the separable depth-of-field effect. */
|
|
220
|
-
export declare const dofCompositeShaderPass: {
|
|
221
|
-
readonly name: "dofCompositeShaderPass";
|
|
222
|
-
readonly renderTargets: {
|
|
223
|
-
readonly blurScratch: {};
|
|
224
|
-
};
|
|
225
|
-
readonly steps: [{
|
|
226
|
-
readonly kind: "fullscreen";
|
|
227
|
-
readonly shaderPass: {
|
|
228
|
-
readonly name: "dof";
|
|
229
|
-
readonly source: "const DEPTH_OF_FIELD_MAX_BLUR: i32 = 20;\n\nstruct dofUniforms {\n depthRange: vec2<f32>,\n focusDistance: f32,\n blurCoefficient: f32,\n pixelsPerMillimeter: f32,\n texelOffset: vec2<f32>,\n circularAperture: f32,\n};\n\n@group(0) @binding(auto) var<uniform> dof: dofUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn dof_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let resolution = vec2<i32>(textureDimensions(sourceTexture, 0));\n let maxCoordinate = resolution - vec2<i32>(1, 1);\n let fragmentCoordinate = min(vec2<i32>(vec2<f32>(resolution) * texCoord), maxCoordinate);\n\n let depthSample = textureSample(depthTexture, depthTextureSampler, texCoord);\n let linearDepth =\n (dof.depthRange.x * dof.depthRange.y) /\n (dof.depthRange.y -\n depthSample * (dof.depthRange.y - dof.depthRange.x));\n\n let deltaDepth = abs(dof.focusDistance - linearDepth);\n let foregroundCompensation = select(\n abs(dof.focusDistance + deltaDepth),\n abs(dof.focusDistance - deltaDepth),\n linearDepth < dof.focusDistance\n );\n let blurRadius = min(\n floor(\n dof.blurCoefficient *\n (deltaDepth / max(foregroundCompensation, 0.0001)) *\n dof.pixelsPerMillimeter\n ),\n f32(DEPTH_OF_FIELD_MAX_BLUR)\n );\n\n var color = vec4f(0.0);\n\n if (blurRadius > 1.0 && dof.circularAperture > 0.5) {\n // Equal-area golden-angle samples cover a circular lens aperture in one pass.\n // Normalize the gather so constant HDR radiance is preserved.\n for (var sampleIndex = 0; sampleIndex < 48; sampleIndex++) {\n let sampleRadius = sqrt((f32(sampleIndex) + 0.5) / 48.0) * blurRadius * 0.5;\n let sampleAngle = f32(sampleIndex) * 2.39996323;\n let sampleCoordinate = clamp(fragmentCoordinate + vec2i(round(\n vec2f(cos(sampleAngle), sin(sampleAngle)) * sampleRadius)), vec2i(0), maxCoordinate);\n color += textureLoad(sourceTexture, sampleCoordinate, 0);\n }\n color /= 48.0;\n } else if (blurRadius > 1.0) {\n let halfBlur = blurRadius * 0.5;\n var sampleCount = 0.0;\n\n for (var sampleIndex: i32 = 0; sampleIndex <= DEPTH_OF_FIELD_MAX_BLUR; sampleIndex++) {\n if (f32(sampleIndex) > blurRadius) {\n break;\n }\n\n let sampleOffset = round((f32(sampleIndex) - halfBlur) * dof.texelOffset);\n let sampleCoordinate = clamp(\n fragmentCoordinate + vec2<i32>(sampleOffset),\n vec2<i32>(0, 0),\n maxCoordinate\n );\n color += textureLoad(sourceTexture, sampleCoordinate, 0);\n sampleCount += 1.0;\n }\n\n color /= sampleCount;\n } else {\n color = textureLoad(sourceTexture, fragmentCoordinate, 0);\n }\n\n return color;\n}\n";
|
|
230
|
-
readonly fs: "#define DEPTH_OF_FIELD_MAX_BLUR 20.0\n\nuniform sampler2D depthTexture;\n\nlayout(std140) uniform dofUniforms {\n vec2 depthRange;\n float focusDistance;\n float blurCoefficient;\n float pixelsPerMillimeter;\n vec2 texelOffset;\n float circularAperture;\n} dof;\n\nvec4 dof_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {\n ivec2 resolution = textureSize(sourceTexture, 0);\n ivec2 maxCoordinate = resolution - 1;\n ivec2 fragmentCoordinate = min(ivec2(texCoord * vec2(resolution)), maxCoordinate);\n\n float depthSample = texelFetch(depthTexture, fragmentCoordinate, 0).r;\n float ndcDepth = depthSample * 2.0 - 1.0;\n float linearDepth = -(2.0 * dof.depthRange.y * dof.depthRange.x) /\n (ndcDepth * (dof.depthRange.y - dof.depthRange.x) -\n dof.depthRange.y -\n dof.depthRange.x);\n\n float deltaDepth = abs(dof.focusDistance - linearDepth);\n float foregroundCompensation =\n linearDepth < dof.focusDistance\n ? abs(dof.focusDistance - deltaDepth)\n : abs(dof.focusDistance + deltaDepth);\n float blurRadius = min(\n floor(\n dof.blurCoefficient *\n (deltaDepth / max(foregroundCompensation, 0.0001)) *\n dof.pixelsPerMillimeter\n ),\n DEPTH_OF_FIELD_MAX_BLUR\n );\n\n vec4 color = vec4(0.0);\n\n if (blurRadius > 1.0 && dof.circularAperture > 0.5) {\n for (int sampleIndex = 0; sampleIndex < 48; sampleIndex++) {\n float sampleRadius = sqrt((float(sampleIndex) + 0.5) / 48.0) * blurRadius * 0.5;\n float sampleAngle = float(sampleIndex) * 2.39996323;\n ivec2 sampleCoordinate = clamp(fragmentCoordinate + ivec2(round(\n vec2(cos(sampleAngle), sin(sampleAngle)) * sampleRadius)), ivec2(0), maxCoordinate);\n color += texelFetch(sourceTexture, sampleCoordinate, 0);\n }\n color /= 48.0;\n } else if (blurRadius > 1.0) {\n float halfBlur = blurRadius * 0.5;\n float sampleCount = 0.0;\n\n for (float sampleIndex = 0.0; sampleIndex <= DEPTH_OF_FIELD_MAX_BLUR; sampleIndex++) {\n if (sampleIndex > blurRadius) {\n break;\n }\n\n ivec2 sampleCoordinate = clamp(\n fragmentCoordinate + ivec2((sampleIndex - halfBlur) * dof.texelOffset),\n ivec2(0),\n maxCoordinate\n );\n color += texelFetch(sourceTexture, sampleCoordinate, 0);\n sampleCount += 1.0;\n }\n\n color /= sampleCount;\n } else {\n color = texelFetch(sourceTexture, fragmentCoordinate, 0);\n }\n\n return color;\n}\n";
|
|
231
|
-
readonly bindingLayout: readonly [{
|
|
232
|
-
readonly name: "depthTexture";
|
|
233
|
-
readonly group: 0;
|
|
234
|
-
}];
|
|
235
|
-
readonly props: DofProps & DofBindings;
|
|
236
|
-
readonly uniforms: InternalDofUniforms;
|
|
237
|
-
readonly bindings: DofBindings;
|
|
238
|
-
readonly uniformTypes: {
|
|
239
|
-
readonly depthRange: "vec2<f32>";
|
|
240
|
-
readonly focusDistance: "f32";
|
|
241
|
-
readonly blurCoefficient: "f32";
|
|
242
|
-
readonly pixelsPerMillimeter: "f32";
|
|
243
|
-
readonly texelOffset: "vec2<f32>";
|
|
244
|
-
readonly circularAperture: "f32";
|
|
245
|
-
};
|
|
246
|
-
readonly propTypes: {
|
|
247
|
-
readonly depthRange: {
|
|
248
|
-
readonly value: readonly [0.1, 100];
|
|
249
|
-
};
|
|
250
|
-
readonly focusDistance: {
|
|
251
|
-
readonly value: 1;
|
|
252
|
-
readonly min: 0.0001;
|
|
253
|
-
};
|
|
254
|
-
readonly blurCoefficient: {
|
|
255
|
-
readonly value: 1;
|
|
256
|
-
readonly min: 0;
|
|
257
|
-
};
|
|
258
|
-
readonly pixelsPerMillimeter: {
|
|
259
|
-
readonly value: 1;
|
|
260
|
-
readonly min: 0;
|
|
261
|
-
};
|
|
262
|
-
readonly texelOffset: {
|
|
263
|
-
readonly value: readonly [1, 0];
|
|
264
|
-
readonly private: true;
|
|
265
|
-
};
|
|
266
|
-
readonly circularAperture: {
|
|
267
|
-
readonly value: 0;
|
|
268
|
-
readonly private: true;
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
readonly passes: [{
|
|
272
|
-
readonly sampler: true;
|
|
273
|
-
}];
|
|
274
|
-
};
|
|
275
|
-
readonly inputs: {
|
|
276
|
-
readonly sourceTexture: "previous";
|
|
277
|
-
};
|
|
278
|
-
readonly output: "blurScratch";
|
|
279
|
-
readonly uniforms: {
|
|
280
|
-
readonly texelOffset: [1, 0];
|
|
281
|
-
};
|
|
282
|
-
}, {
|
|
283
|
-
readonly kind: "fullscreen";
|
|
284
|
-
readonly shaderPass: {
|
|
285
|
-
readonly name: "dof";
|
|
286
|
-
readonly source: "const DEPTH_OF_FIELD_MAX_BLUR: i32 = 20;\n\nstruct dofUniforms {\n depthRange: vec2<f32>,\n focusDistance: f32,\n blurCoefficient: f32,\n pixelsPerMillimeter: f32,\n texelOffset: vec2<f32>,\n circularAperture: f32,\n};\n\n@group(0) @binding(auto) var<uniform> dof: dofUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn dof_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let resolution = vec2<i32>(textureDimensions(sourceTexture, 0));\n let maxCoordinate = resolution - vec2<i32>(1, 1);\n let fragmentCoordinate = min(vec2<i32>(vec2<f32>(resolution) * texCoord), maxCoordinate);\n\n let depthSample = textureSample(depthTexture, depthTextureSampler, texCoord);\n let linearDepth =\n (dof.depthRange.x * dof.depthRange.y) /\n (dof.depthRange.y -\n depthSample * (dof.depthRange.y - dof.depthRange.x));\n\n let deltaDepth = abs(dof.focusDistance - linearDepth);\n let foregroundCompensation = select(\n abs(dof.focusDistance + deltaDepth),\n abs(dof.focusDistance - deltaDepth),\n linearDepth < dof.focusDistance\n );\n let blurRadius = min(\n floor(\n dof.blurCoefficient *\n (deltaDepth / max(foregroundCompensation, 0.0001)) *\n dof.pixelsPerMillimeter\n ),\n f32(DEPTH_OF_FIELD_MAX_BLUR)\n );\n\n var color = vec4f(0.0);\n\n if (blurRadius > 1.0 && dof.circularAperture > 0.5) {\n // Equal-area golden-angle samples cover a circular lens aperture in one pass.\n // Normalize the gather so constant HDR radiance is preserved.\n for (var sampleIndex = 0; sampleIndex < 48; sampleIndex++) {\n let sampleRadius = sqrt((f32(sampleIndex) + 0.5) / 48.0) * blurRadius * 0.5;\n let sampleAngle = f32(sampleIndex) * 2.39996323;\n let sampleCoordinate = clamp(fragmentCoordinate + vec2i(round(\n vec2f(cos(sampleAngle), sin(sampleAngle)) * sampleRadius)), vec2i(0), maxCoordinate);\n color += textureLoad(sourceTexture, sampleCoordinate, 0);\n }\n color /= 48.0;\n } else if (blurRadius > 1.0) {\n let halfBlur = blurRadius * 0.5;\n var sampleCount = 0.0;\n\n for (var sampleIndex: i32 = 0; sampleIndex <= DEPTH_OF_FIELD_MAX_BLUR; sampleIndex++) {\n if (f32(sampleIndex) > blurRadius) {\n break;\n }\n\n let sampleOffset = round((f32(sampleIndex) - halfBlur) * dof.texelOffset);\n let sampleCoordinate = clamp(\n fragmentCoordinate + vec2<i32>(sampleOffset),\n vec2<i32>(0, 0),\n maxCoordinate\n );\n color += textureLoad(sourceTexture, sampleCoordinate, 0);\n sampleCount += 1.0;\n }\n\n color /= sampleCount;\n } else {\n color = textureLoad(sourceTexture, fragmentCoordinate, 0);\n }\n\n return color;\n}\n";
|
|
287
|
-
readonly fs: "#define DEPTH_OF_FIELD_MAX_BLUR 20.0\n\nuniform sampler2D depthTexture;\n\nlayout(std140) uniform dofUniforms {\n vec2 depthRange;\n float focusDistance;\n float blurCoefficient;\n float pixelsPerMillimeter;\n vec2 texelOffset;\n float circularAperture;\n} dof;\n\nvec4 dof_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {\n ivec2 resolution = textureSize(sourceTexture, 0);\n ivec2 maxCoordinate = resolution - 1;\n ivec2 fragmentCoordinate = min(ivec2(texCoord * vec2(resolution)), maxCoordinate);\n\n float depthSample = texelFetch(depthTexture, fragmentCoordinate, 0).r;\n float ndcDepth = depthSample * 2.0 - 1.0;\n float linearDepth = -(2.0 * dof.depthRange.y * dof.depthRange.x) /\n (ndcDepth * (dof.depthRange.y - dof.depthRange.x) -\n dof.depthRange.y -\n dof.depthRange.x);\n\n float deltaDepth = abs(dof.focusDistance - linearDepth);\n float foregroundCompensation =\n linearDepth < dof.focusDistance\n ? abs(dof.focusDistance - deltaDepth)\n : abs(dof.focusDistance + deltaDepth);\n float blurRadius = min(\n floor(\n dof.blurCoefficient *\n (deltaDepth / max(foregroundCompensation, 0.0001)) *\n dof.pixelsPerMillimeter\n ),\n DEPTH_OF_FIELD_MAX_BLUR\n );\n\n vec4 color = vec4(0.0);\n\n if (blurRadius > 1.0 && dof.circularAperture > 0.5) {\n for (int sampleIndex = 0; sampleIndex < 48; sampleIndex++) {\n float sampleRadius = sqrt((float(sampleIndex) + 0.5) / 48.0) * blurRadius * 0.5;\n float sampleAngle = float(sampleIndex) * 2.39996323;\n ivec2 sampleCoordinate = clamp(fragmentCoordinate + ivec2(round(\n vec2(cos(sampleAngle), sin(sampleAngle)) * sampleRadius)), ivec2(0), maxCoordinate);\n color += texelFetch(sourceTexture, sampleCoordinate, 0);\n }\n color /= 48.0;\n } else if (blurRadius > 1.0) {\n float halfBlur = blurRadius * 0.5;\n float sampleCount = 0.0;\n\n for (float sampleIndex = 0.0; sampleIndex <= DEPTH_OF_FIELD_MAX_BLUR; sampleIndex++) {\n if (sampleIndex > blurRadius) {\n break;\n }\n\n ivec2 sampleCoordinate = clamp(\n fragmentCoordinate + ivec2((sampleIndex - halfBlur) * dof.texelOffset),\n ivec2(0),\n maxCoordinate\n );\n color += texelFetch(sourceTexture, sampleCoordinate, 0);\n sampleCount += 1.0;\n }\n\n color /= sampleCount;\n } else {\n color = texelFetch(sourceTexture, fragmentCoordinate, 0);\n }\n\n return color;\n}\n";
|
|
288
|
-
readonly bindingLayout: readonly [{
|
|
289
|
-
readonly name: "depthTexture";
|
|
290
|
-
readonly group: 0;
|
|
291
|
-
}];
|
|
292
|
-
readonly props: DofProps & DofBindings;
|
|
293
|
-
readonly uniforms: InternalDofUniforms;
|
|
294
|
-
readonly bindings: DofBindings;
|
|
295
|
-
readonly uniformTypes: {
|
|
296
|
-
readonly depthRange: "vec2<f32>";
|
|
297
|
-
readonly focusDistance: "f32";
|
|
298
|
-
readonly blurCoefficient: "f32";
|
|
299
|
-
readonly pixelsPerMillimeter: "f32";
|
|
300
|
-
readonly texelOffset: "vec2<f32>";
|
|
301
|
-
readonly circularAperture: "f32";
|
|
302
|
-
};
|
|
303
|
-
readonly propTypes: {
|
|
304
|
-
readonly depthRange: {
|
|
305
|
-
readonly value: readonly [0.1, 100];
|
|
306
|
-
};
|
|
307
|
-
readonly focusDistance: {
|
|
308
|
-
readonly value: 1;
|
|
309
|
-
readonly min: 0.0001;
|
|
310
|
-
};
|
|
311
|
-
readonly blurCoefficient: {
|
|
312
|
-
readonly value: 1;
|
|
313
|
-
readonly min: 0;
|
|
314
|
-
};
|
|
315
|
-
readonly pixelsPerMillimeter: {
|
|
316
|
-
readonly value: 1;
|
|
317
|
-
readonly min: 0;
|
|
318
|
-
};
|
|
319
|
-
readonly texelOffset: {
|
|
320
|
-
readonly value: readonly [1, 0];
|
|
321
|
-
readonly private: true;
|
|
322
|
-
};
|
|
323
|
-
readonly circularAperture: {
|
|
324
|
-
readonly value: 0;
|
|
325
|
-
readonly private: true;
|
|
326
|
-
};
|
|
327
|
-
};
|
|
328
|
-
readonly passes: [{
|
|
329
|
-
readonly sampler: true;
|
|
330
|
-
}];
|
|
331
|
-
};
|
|
332
|
-
readonly inputs: {
|
|
333
|
-
readonly sourceTexture: "blurScratch";
|
|
334
|
-
};
|
|
335
|
-
readonly output: "previous";
|
|
336
|
-
readonly uniforms: {
|
|
337
|
-
readonly texelOffset: [0, 1];
|
|
338
|
-
};
|
|
339
|
-
}];
|
|
340
|
-
};
|
|
341
219
|
/**
|
|
342
220
|
* Single-pass circular-aperture DOF. Uses the same camera/lens props as `dof`.
|
|
343
221
|
* The 48-tap normalized disk gather preserves HDR radiance and avoids square bokeh.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dof.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/dof.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAK3C,wCAAwC;AACxC,KAAK,WAAW,GAAG;IACjB,uEAAuE;IACvE,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,+DAA+D;AAC/D,KAAK,mBAAmB,GAAG;IACzB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,oEAAoE;IACpE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,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;;;;;;;;;;;;;;;;;CAsB5B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;4BA3BV,QAAQ,GAAG,WAAW;+BACnB,mBAAmB;+BACnB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAFd,QAAQ,GAAG,WAAW;+BACnB,mBAAmB;+BACnB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CuB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBArDN,QAAQ,GAAG,WAAW;uBACnB,mBAAmB;uBACnB,WAAW;;;;;;;;;;;;CA6D5B,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAlEZ,QAAQ,GAAG,WAAW;+BACnB,mBAAmB;+BACnB,WAAW;;;;;;;;;;;;;;;CAoEe,CAAC"}
|
|
@@ -171,7 +171,7 @@ vec4 dof_sampleColor(sampler2D sourceTexture, vec2 texSize, vec2 texCoord) {
|
|
|
171
171
|
*
|
|
172
172
|
* This pass samples scene color from `sourceTexture` and scene depth from `depthTexture`, then
|
|
173
173
|
* computes a blur radius from reconstructed linear depth. It is designed to be driven by
|
|
174
|
-
* {@link
|
|
174
|
+
* {@link depthOfField}, which runs the pass twice with different internal
|
|
175
175
|
* `texelOffset` values for horizontal and vertical blur.
|
|
176
176
|
*
|
|
177
177
|
* Callers are expected to provide:
|
|
@@ -226,12 +226,6 @@ export const depthOfField = {
|
|
|
226
226
|
}
|
|
227
227
|
]
|
|
228
228
|
};
|
|
229
|
-
/** Compatibility view of the separable depth-of-field effect. */
|
|
230
|
-
export const dofCompositeShaderPass = {
|
|
231
|
-
name: depthOfField.name,
|
|
232
|
-
renderTargets: depthOfField.resources,
|
|
233
|
-
steps: depthOfField.passes
|
|
234
|
-
};
|
|
235
229
|
/**
|
|
236
230
|
* Single-pass circular-aperture DOF. Uses the same camera/lens props as `dof`.
|
|
237
231
|
* The 48-tap normalized disk gather preserves HDR radiance and avoids square bokeh.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dof.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/dof.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAM5D,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAwC7B,MAAM,MAAM,GAAG,UAAU,CAAC;uCACa,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFvD,CAAC;AAEF,MAAM,EAAE,GAAG,UAAU,CAAC;kCACY,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ElD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,IAAI,EAAE,KAAK;IACX,MAAM;IACN,EAAE;IACF,aAAa,EAAE,CAAC,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC;IACjD,KAAK,EAAE,EAA4B;IACnC,QAAQ,EAAE,EAAyB;IACnC,QAAQ,EAAE,EAAiB;IAC3B,YAAY,EAAE;QACZ,UAAU,EAAE,WAAW;QACvB,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,KAAK;QAC1B,WAAW,EAAE,WAAW;QACxB,gBAAgB,EAAE,KAAK;KACxB;IACD,SAAS,EAAE;QACT,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAC;QAC/B,aAAa,EAAE,EAAC,KAAK,EAAE,CAAC,EA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ACiD,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,GAAG;IACN,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC;IAC5C,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC;IACpC,SAAS,EAAE,EAAC,GAAG,GAAG,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAC,EAAC;CAK3E,CAAC;AAEF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC,IAAI;IACnB,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,CAAC,EAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -27,6 +27,7 @@ __export(gtao_exports, {
|
|
|
27
27
|
module.exports = __toCommonJS(gtao_exports);
|
|
28
28
|
var import_matrix = require("@math.gl/core/matrix");
|
|
29
29
|
var import_depth_aware_blur = require("./depth-aware-blur.cjs");
|
|
30
|
+
var import_temporal_frame = require("./temporal-frame.cjs");
|
|
30
31
|
const gtaoEvaluate = {
|
|
31
32
|
name: "gtaoEvaluate",
|
|
32
33
|
source: (
|
|
@@ -256,6 +257,8 @@ const gtaoTemporal = {
|
|
|
256
257
|
inverseProjectionMatrix: mat4x4f,
|
|
257
258
|
historyWeight: f32,
|
|
258
259
|
depthThreshold: f32,
|
|
260
|
+
currentJitter: vec2f,
|
|
261
|
+
previousJitter: vec2f,
|
|
259
262
|
};
|
|
260
263
|
|
|
261
264
|
@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;
|
|
@@ -268,6 +271,7 @@ const gtaoTemporal = {
|
|
|
268
271
|
@group(0) @binding(auto) var previousDepthTexture: texture_2d<f32>;
|
|
269
272
|
@group(0) @binding(auto) var previousDepthTextureSampler: sampler;
|
|
270
273
|
|
|
274
|
+
${import_temporal_frame.temporalMotionReprojectionWGSL}
|
|
271
275
|
fn gtaoTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {
|
|
272
276
|
let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);
|
|
273
277
|
let viewPosition = gtaoTemporal.inverseProjectionMatrix * clip;
|
|
@@ -281,8 +285,9 @@ fn gtaoTemporal_sampleColor(
|
|
|
281
285
|
texCoord: vec2f
|
|
282
286
|
) -> vec4f {
|
|
283
287
|
let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);
|
|
288
|
+
if (gtaoTemporal.historyWeight <= 0.0) { return current; }
|
|
284
289
|
let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;
|
|
285
|
-
let previousCoord = texCoord - velocity;
|
|
290
|
+
let previousCoord = temporal_reprojectMotion(texCoord - gtaoTemporal.currentJitter, velocity) + gtaoTemporal.previousJitter;
|
|
286
291
|
let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));
|
|
287
292
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
288
293
|
let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);
|
|
@@ -336,9 +341,13 @@ fn gtaoTemporal_sampleColor(
|
|
|
336
341
|
uniformTypes: {
|
|
337
342
|
inverseProjectionMatrix: "mat4x4<f32>",
|
|
338
343
|
historyWeight: "f32",
|
|
339
|
-
depthThreshold: "f32"
|
|
344
|
+
depthThreshold: "f32",
|
|
345
|
+
currentJitter: "vec2<f32>",
|
|
346
|
+
previousJitter: "vec2<f32>"
|
|
340
347
|
},
|
|
341
348
|
propTypes: {
|
|
349
|
+
currentJitter: { value: [0, 0], private: true },
|
|
350
|
+
previousJitter: { value: [0, 0], private: true },
|
|
342
351
|
inverseProjectionMatrix: { value: new import_matrix.Matrix4(), private: true },
|
|
343
352
|
historyWeight: { value: 0.88, min: 0, max: 0.97 },
|
|
344
353
|
depthThreshold: { value: 0.015, min: 1e-4, softMax: 0.1 }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Texture } from '@luma.gl/core';
|
|
2
2
|
import { Matrix4 } from '@math.gl/core/matrix';
|
|
3
|
+
import { type TemporalFrameJitter } from "./temporal-frame.js";
|
|
3
4
|
/** Construction options for the horizon-based GTAO pipeline. */
|
|
4
|
-
export type
|
|
5
|
+
export type GTAOEffectOptions = {
|
|
5
6
|
/** Fractional AO evaluation, history, and denoising resolution. Defaults to full resolution. */
|
|
6
7
|
resolutionScale?: number;
|
|
7
8
|
/** Apply visibility to the full image or only to a separately supplied ambient-light texture. */
|
|
@@ -15,7 +16,7 @@ type GTAOEvaluateUniforms = {
|
|
|
15
16
|
intensity: number;
|
|
16
17
|
frameIndex: number;
|
|
17
18
|
};
|
|
18
|
-
type GTAOTemporalUniforms = {
|
|
19
|
+
type GTAOTemporalUniforms = TemporalFrameJitter & {
|
|
19
20
|
inverseProjectionMatrix: Matrix4;
|
|
20
21
|
historyWeight: number;
|
|
21
22
|
depthThreshold: number;
|
|
@@ -95,7 +96,7 @@ export declare const gtaoEvaluate: {
|
|
|
95
96
|
/** Reprojects the previous AO result with G-buffer velocity and rejects disocclusions by depth. */
|
|
96
97
|
export declare const gtaoTemporal: {
|
|
97
98
|
readonly name: "gtaoTemporal";
|
|
98
|
-
readonly source: "struct GTAOTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;\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 gtaoTemporal_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 = gtaoTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn gtaoTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;\n let previousCoord = texCoord - velocity;\n let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let previousDepth = textureSample(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord\n ).r;\n let currentViewDepth = gtaoTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = gtaoTemporal_reconstructViewDepth(\n clampedPreviousCoord,\n previousDepth\n );\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < gtaoTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumVisibility = current.r;\n var maximumVisibility = current.r;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleVisibility = textureSample(\n sourceTexture,\n sourceTextureSampler,\n texCoord + vec2f(f32(x), f32(y)) * texel\n ).r;\n minimumVisibility = min(minimumVisibility, sampleVisibility);\n maximumVisibility = max(maximumVisibility, sampleVisibility);\n }\n }\n let historyVisibility = clamp(\n textureSample(historyTexture, historyTextureSampler, clampedPreviousCoord).r,\n minimumVisibility,\n maximumVisibility\n );\n let historyWeight = select(0.0, gtaoTemporal.historyWeight, validCoord && validDepth);\n let visibility = mix(current.r, historyVisibility, historyWeight);\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
99
|
+
readonly source: "struct GTAOTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;\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 gtaoTemporal_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 = gtaoTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn gtaoTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n if (gtaoTemporal.historyWeight <= 0.0) { return current; }\n let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;\n let previousCoord = temporal_reprojectMotion(texCoord - gtaoTemporal.currentJitter, velocity) + gtaoTemporal.previousJitter;\n let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let previousDepth = textureSample(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord\n ).r;\n let currentViewDepth = gtaoTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = gtaoTemporal_reconstructViewDepth(\n clampedPreviousCoord,\n previousDepth\n );\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < gtaoTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumVisibility = current.r;\n var maximumVisibility = current.r;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleVisibility = textureSample(\n sourceTexture,\n sourceTextureSampler,\n texCoord + vec2f(f32(x), f32(y)) * texel\n ).r;\n minimumVisibility = min(minimumVisibility, sampleVisibility);\n maximumVisibility = max(maximumVisibility, sampleVisibility);\n }\n }\n let historyVisibility = clamp(\n textureSample(historyTexture, historyTextureSampler, clampedPreviousCoord).r,\n minimumVisibility,\n maximumVisibility\n );\n let historyWeight = select(0.0, gtaoTemporal.historyWeight, validCoord && validDepth);\n let visibility = mix(current.r, historyVisibility, historyWeight);\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
99
100
|
readonly bindingLayout: readonly [{
|
|
100
101
|
readonly name: "historyTexture";
|
|
101
102
|
readonly group: 0;
|
|
@@ -116,8 +117,18 @@ export declare const gtaoTemporal: {
|
|
|
116
117
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
117
118
|
readonly historyWeight: "f32";
|
|
118
119
|
readonly depthThreshold: "f32";
|
|
120
|
+
readonly currentJitter: "vec2<f32>";
|
|
121
|
+
readonly previousJitter: "vec2<f32>";
|
|
119
122
|
};
|
|
120
123
|
readonly propTypes: {
|
|
124
|
+
readonly currentJitter: {
|
|
125
|
+
readonly value: readonly [0, 0];
|
|
126
|
+
readonly private: true;
|
|
127
|
+
};
|
|
128
|
+
readonly previousJitter: {
|
|
129
|
+
readonly value: readonly [0, 0];
|
|
130
|
+
readonly private: true;
|
|
131
|
+
};
|
|
121
132
|
readonly inverseProjectionMatrix: {
|
|
122
133
|
readonly value: Matrix4;
|
|
123
134
|
readonly private: true;
|
|
@@ -217,7 +228,7 @@ export declare const gtaoAmbientComposite: {
|
|
|
217
228
|
};
|
|
218
229
|
/** GTAO with full-color and ambient-only composition modes. */
|
|
219
230
|
export declare const gtao: {
|
|
220
|
-
readonly optionDefaults: Required<
|
|
231
|
+
readonly optionDefaults: Required<GTAOEffectOptions>;
|
|
221
232
|
readonly scaleResources: {
|
|
222
233
|
readonly option: "resolutionScale";
|
|
223
234
|
readonly targets: readonly ["gtaoRaw", "gtaoHistory", "gtaoHistoryDepth", "gtaoScratch", "gtaoBlurred"];
|
|
@@ -290,7 +301,7 @@ export declare const gtao: {
|
|
|
290
301
|
readonly kind: "fullscreen";
|
|
291
302
|
readonly shaderPass: {
|
|
292
303
|
readonly name: "gtaoTemporal";
|
|
293
|
-
readonly source: "struct GTAOTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;\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 gtaoTemporal_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 = gtaoTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn gtaoTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;\n let previousCoord = texCoord - velocity;\n let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let previousDepth = textureSample(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord\n ).r;\n let currentViewDepth = gtaoTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = gtaoTemporal_reconstructViewDepth(\n clampedPreviousCoord,\n previousDepth\n );\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < gtaoTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumVisibility = current.r;\n var maximumVisibility = current.r;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleVisibility = textureSample(\n sourceTexture,\n sourceTextureSampler,\n texCoord + vec2f(f32(x), f32(y)) * texel\n ).r;\n minimumVisibility = min(minimumVisibility, sampleVisibility);\n maximumVisibility = max(maximumVisibility, sampleVisibility);\n }\n }\n let historyVisibility = clamp(\n textureSample(historyTexture, historyTextureSampler, clampedPreviousCoord).r,\n minimumVisibility,\n maximumVisibility\n );\n let historyWeight = select(0.0, gtaoTemporal.historyWeight, validCoord && validDepth);\n let visibility = mix(current.r, historyVisibility, historyWeight);\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
304
|
+
readonly source: "struct GTAOTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;\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 gtaoTemporal_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 = gtaoTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn gtaoTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n if (gtaoTemporal.historyWeight <= 0.0) { return current; }\n let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;\n let previousCoord = temporal_reprojectMotion(texCoord - gtaoTemporal.currentJitter, velocity) + gtaoTemporal.previousJitter;\n let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let previousDepth = textureSample(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord\n ).r;\n let currentViewDepth = gtaoTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = gtaoTemporal_reconstructViewDepth(\n clampedPreviousCoord,\n previousDepth\n );\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < gtaoTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumVisibility = current.r;\n var maximumVisibility = current.r;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleVisibility = textureSample(\n sourceTexture,\n sourceTextureSampler,\n texCoord + vec2f(f32(x), f32(y)) * texel\n ).r;\n minimumVisibility = min(minimumVisibility, sampleVisibility);\n maximumVisibility = max(maximumVisibility, sampleVisibility);\n }\n }\n let historyVisibility = clamp(\n textureSample(historyTexture, historyTextureSampler, clampedPreviousCoord).r,\n minimumVisibility,\n maximumVisibility\n );\n let historyWeight = select(0.0, gtaoTemporal.historyWeight, validCoord && validDepth);\n let visibility = mix(current.r, historyVisibility, historyWeight);\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
294
305
|
readonly bindingLayout: readonly [{
|
|
295
306
|
readonly name: "historyTexture";
|
|
296
307
|
readonly group: 0;
|
|
@@ -311,8 +322,18 @@ export declare const gtao: {
|
|
|
311
322
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
312
323
|
readonly historyWeight: "f32";
|
|
313
324
|
readonly depthThreshold: "f32";
|
|
325
|
+
readonly currentJitter: "vec2<f32>";
|
|
326
|
+
readonly previousJitter: "vec2<f32>";
|
|
314
327
|
};
|
|
315
328
|
readonly propTypes: {
|
|
329
|
+
readonly currentJitter: {
|
|
330
|
+
readonly value: readonly [0, 0];
|
|
331
|
+
readonly private: true;
|
|
332
|
+
};
|
|
333
|
+
readonly previousJitter: {
|
|
334
|
+
readonly value: readonly [0, 0];
|
|
335
|
+
readonly private: true;
|
|
336
|
+
};
|
|
316
337
|
readonly inverseProjectionMatrix: {
|
|
317
338
|
readonly value: Matrix4;
|
|
318
339
|
readonly private: true;
|
|
@@ -607,7 +628,7 @@ export declare const gtao: {
|
|
|
607
628
|
readonly kind: "fullscreen";
|
|
608
629
|
readonly shaderPass: {
|
|
609
630
|
readonly name: "gtaoTemporal";
|
|
610
|
-
readonly source: "struct GTAOTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;\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 gtaoTemporal_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 = gtaoTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn gtaoTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;\n let previousCoord = texCoord - velocity;\n let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let previousDepth = textureSample(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord\n ).r;\n let currentViewDepth = gtaoTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = gtaoTemporal_reconstructViewDepth(\n clampedPreviousCoord,\n previousDepth\n );\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < gtaoTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumVisibility = current.r;\n var maximumVisibility = current.r;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleVisibility = textureSample(\n sourceTexture,\n sourceTextureSampler,\n texCoord + vec2f(f32(x), f32(y)) * texel\n ).r;\n minimumVisibility = min(minimumVisibility, sampleVisibility);\n maximumVisibility = max(maximumVisibility, sampleVisibility);\n }\n }\n let historyVisibility = clamp(\n textureSample(historyTexture, historyTextureSampler, clampedPreviousCoord).r,\n minimumVisibility,\n maximumVisibility\n );\n let historyWeight = select(0.0, gtaoTemporal.historyWeight, validCoord && validDepth);\n let visibility = mix(current.r, historyVisibility, historyWeight);\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
631
|
+
readonly source: "struct GTAOTemporalUniforms {\n inverseProjectionMatrix: mat4x4f,\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;\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 gtaoTemporal_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 = gtaoTemporal.inverseProjectionMatrix * clip;\n return abs(viewPosition.z / max(abs(viewPosition.w), 0.00001));\n}\n\nfn gtaoTemporal_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n if (gtaoTemporal.historyWeight <= 0.0) { return current; }\n let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;\n let previousCoord = temporal_reprojectMotion(texCoord - gtaoTemporal.currentJitter, velocity) + gtaoTemporal.previousJitter;\n let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));\n let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));\n let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let previousDepth = textureSample(\n previousDepthTexture,\n previousDepthTextureSampler,\n clampedPreviousCoord\n ).r;\n let currentViewDepth = gtaoTemporal_reconstructViewDepth(texCoord, currentDepth);\n let previousViewDepth = gtaoTemporal_reconstructViewDepth(\n clampedPreviousCoord,\n previousDepth\n );\n let relativeDepthDifference = abs(previousViewDepth - currentViewDepth) /\n max(currentViewDepth, 0.0001);\n let validDepth = relativeDepthDifference < gtaoTemporal.depthThreshold;\n\n let texel = 1.0 / vec2f(textureDimensions(sourceTexture));\n var minimumVisibility = current.r;\n var maximumVisibility = current.r;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleVisibility = textureSample(\n sourceTexture,\n sourceTextureSampler,\n texCoord + vec2f(f32(x), f32(y)) * texel\n ).r;\n minimumVisibility = min(minimumVisibility, sampleVisibility);\n maximumVisibility = max(maximumVisibility, sampleVisibility);\n }\n }\n let historyVisibility = clamp(\n textureSample(historyTexture, historyTextureSampler, clampedPreviousCoord).r,\n minimumVisibility,\n maximumVisibility\n );\n let historyWeight = select(0.0, gtaoTemporal.historyWeight, validCoord && validDepth);\n let visibility = mix(current.r, historyVisibility, historyWeight);\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
611
632
|
readonly bindingLayout: readonly [{
|
|
612
633
|
readonly name: "historyTexture";
|
|
613
634
|
readonly group: 0;
|
|
@@ -628,8 +649,18 @@ export declare const gtao: {
|
|
|
628
649
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
629
650
|
readonly historyWeight: "f32";
|
|
630
651
|
readonly depthThreshold: "f32";
|
|
652
|
+
readonly currentJitter: "vec2<f32>";
|
|
653
|
+
readonly previousJitter: "vec2<f32>";
|
|
631
654
|
};
|
|
632
655
|
readonly propTypes: {
|
|
656
|
+
readonly currentJitter: {
|
|
657
|
+
readonly value: readonly [0, 0];
|
|
658
|
+
readonly private: true;
|
|
659
|
+
};
|
|
660
|
+
readonly previousJitter: {
|
|
661
|
+
readonly value: readonly [0, 0];
|
|
662
|
+
readonly private: true;
|
|
663
|
+
};
|
|
633
664
|
readonly inverseProjectionMatrix: {
|
|
634
665
|
readonly value: Matrix4;
|
|
635
666
|
readonly private: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtao.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/gtao.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAG7C,gEAAgE;AAChE,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAqIvB,OAAO,CAAC,qBAAqB,CAAC,GAAG,4BAA4B;2CAC1D,qBAAqB;2CACrB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAxP/B,OAAO,CAAC,oBAAoB,CAAC,GAAG,YAAY;+BACzC,oBAAoB;+BACpB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6Gf,OAAO,CAAC,oBAAoB,CAAC,GAAG,oBAAoB;+BACjD,oBAAoB;+BACpB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA0EvB,OAAO,CAAC,qBAAqB,CAAC;+BAC3B,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuKtC,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
import { Matrix4 } from '@math.gl/core/matrix';
|
|
5
5
|
import { depthAwareBlur } from "./depth-aware-blur.js";
|
|
6
|
+
import { temporalMotionReprojectionWGSL } from "./temporal-frame.js";
|
|
6
7
|
/** Configurable-resolution horizon search over G-buffer depth and view normals. */
|
|
7
8
|
export const gtaoEvaluate = {
|
|
8
9
|
name: 'gtaoEvaluate',
|
|
@@ -231,6 +232,8 @@ struct GTAOTemporalUniforms {
|
|
|
231
232
|
inverseProjectionMatrix: mat4x4f,
|
|
232
233
|
historyWeight: f32,
|
|
233
234
|
depthThreshold: f32,
|
|
235
|
+
currentJitter: vec2f,
|
|
236
|
+
previousJitter: vec2f,
|
|
234
237
|
};
|
|
235
238
|
|
|
236
239
|
@group(0) @binding(auto) var<uniform> gtaoTemporal: GTAOTemporalUniforms;
|
|
@@ -243,6 +246,7 @@ struct GTAOTemporalUniforms {
|
|
|
243
246
|
@group(0) @binding(auto) var previousDepthTexture: texture_2d<f32>;
|
|
244
247
|
@group(0) @binding(auto) var previousDepthTextureSampler: sampler;
|
|
245
248
|
|
|
249
|
+
${temporalMotionReprojectionWGSL}
|
|
246
250
|
fn gtaoTemporal_reconstructViewDepth(texCoord: vec2f, depth: f32) -> f32 {
|
|
247
251
|
let clip = vec4f(texCoord.x * 2.0 - 1.0, 1.0 - texCoord.y * 2.0, depth, 1.0);
|
|
248
252
|
let viewPosition = gtaoTemporal.inverseProjectionMatrix * clip;
|
|
@@ -256,8 +260,9 @@ fn gtaoTemporal_sampleColor(
|
|
|
256
260
|
texCoord: vec2f
|
|
257
261
|
) -> vec4f {
|
|
258
262
|
let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);
|
|
263
|
+
if (gtaoTemporal.historyWeight <= 0.0) { return current; }
|
|
259
264
|
let velocity = textureSample(velocityTexture, velocityTextureSampler, texCoord).xy;
|
|
260
|
-
let previousCoord = texCoord - velocity;
|
|
265
|
+
let previousCoord = temporal_reprojectMotion(texCoord - gtaoTemporal.currentJitter, velocity) + gtaoTemporal.previousJitter;
|
|
261
266
|
let validCoord = all(previousCoord >= vec2f(0.0)) && all(previousCoord <= vec2f(1.0));
|
|
262
267
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
263
268
|
let currentDepth = textureSample(depthTexture, depthTextureSampler, texCoord);
|
|
@@ -310,9 +315,13 @@ fn gtaoTemporal_sampleColor(
|
|
|
310
315
|
uniformTypes: {
|
|
311
316
|
inverseProjectionMatrix: 'mat4x4<f32>',
|
|
312
317
|
historyWeight: 'f32',
|
|
313
|
-
depthThreshold: 'f32'
|
|
318
|
+
depthThreshold: 'f32',
|
|
319
|
+
currentJitter: 'vec2<f32>',
|
|
320
|
+
previousJitter: 'vec2<f32>'
|
|
314
321
|
},
|
|
315
322
|
propTypes: {
|
|
323
|
+
currentJitter: { value: [0, 0], private: true },
|
|
324
|
+
previousJitter: { value: [0, 0], private: true },
|
|
316
325
|
inverseProjectionMatrix: { value: new Matrix4(), private: true },
|
|
317
326
|
historyWeight: { value: 0.88, min: 0, max: 0.97 },
|
|
318
327
|
depthThreshold: { value: 0.015, min: 0.0001, softMax: 0.1 }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtao.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/gtao.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAK5D,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAC,8BAA2B;
|
|
1
|
+
{"version":3,"file":"gtao.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/gtao.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAK5D,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAC,8BAA2B;AAElD,OAAO,EAAC,8BAA8B,EAA2B,4BAAyB;AA8C1F,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+LnB;IACA,a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AC,CAAC,EAAC;SACvC;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACb,MAAM,EAAE,aAAa;YACrB,QAAQ,EAAE,SAAS;YACnB,UAAU,EAAE,EAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC;SACvC;QACD,WAAW,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAC;QAClD,WAAW,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAC;KACnD;IACD,MAAM,EAAE,CAAC,GAAG,qBAAqB,EAAE,iBAAiB,CAAC;CAItD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Texture } from '@luma.gl/core';
|
|
2
2
|
/** Construction options for GPU-resident HDR luminance metering and adaptation. */
|
|
3
|
-
export type
|
|
3
|
+
export type HDRAutoExposureEffectOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* Initial luminance-metering resolution. Defaults to one quarter of the drawing buffer.
|
|
6
6
|
* Values below 0.25 are clamped to 0.25 so the fixed 4x4 extraction footprint covers the
|
|
@@ -144,7 +144,7 @@ export declare const hdrAutoExposureApply: {
|
|
|
144
144
|
};
|
|
145
145
|
/** Meters HDR luminance and accumulates exposure in a history texture. */
|
|
146
146
|
export declare const hdrAutoExposure: {
|
|
147
|
-
readonly optionDefaults: Required<
|
|
147
|
+
readonly optionDefaults: Required<HDRAutoExposureEffectOptions>;
|
|
148
148
|
readonly scaleResources: {
|
|
149
149
|
readonly option: "meteringScale";
|
|
150
150
|
readonly minimum: 0.25;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hdr-auto-exposure.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/hdr-auto-exposure.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAG3C,mFAAmF;AACnF,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"hdr-auto-exposure.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/hdr-auto-exposure.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAG3C,mFAAmF;AACnF,MAAM,MAAM,4BAA4B,GAAG;IACzC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB;;;;;;CA6BW,CAAC;AAE5C,oFAAoF;AACpF,eAAO,MAAM,kBAAkB;;;;;;CAuBY,CAAC;AAE5C,gFAAgF;AAChF,eAAO,MAAM,oBAAoB;;;;;;;oBAqElB,OAAO,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;uBACjE,4BAA4B;uBAC5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB7C,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB;;;;;;;oBAyClB,OAAO,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;uBACjE,4BAA4B;uBAC5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;CAW7C,CAAC;AAQF,0EAA0E;AAC1E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA5Fb,OAAO,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;+BACjE,4BAA4B;+BAC5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAoE/B,OAAO,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;+BACjE,4BAA4B;+BAC5B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8H7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hdr-auto-exposure.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/hdr-auto-exposure.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AA4C5D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;EAyBnB;IACA,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"hdr-auto-exposure.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/hdr-auto-exposure.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AA4C5D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAA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;SACnB;KACF;CASF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"height-fog.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/height-fog.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAGL,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"height-fog.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/height-fog.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAG1B,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACtD,2BAA2B,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IACrD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,qDAAqD;IACrD,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,kGAAkG;IAClG,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,GAAG;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC;AAE3F,+FAA+F;AAC/F,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHzB,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"height-fog.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/height-fog.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAK5D,OAAO,EACL,SAAS,IAAI,eAAe,EAC5B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"height-fog.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/height-fog.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAK5D,OAAO,EACL,SAAS,IAAI,eAAe,EAC5B,kBAAkB,EAEnB,MAAM,kBAAkB,CAAC;AAkB1B,+FAA+F;AAC/F,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,YAAY,EAAE,CAAC,kBAAkB,CAAC;IAClC,aAAa,EAAE;QACb,EAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,EAAC;QACjC,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAC;KACjC;IACD,YAAY,EAAE;QACZ,GAAG,eAAe,CAAC,YAAY;QAC/B,2BAA2B,EAAE,aAAa;QAC1C,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,KAAK;QACzB,WAAW,EAAE,WAAW;QACxB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,WAAW;KAC5B;IACD,eAAe,EAAE;QACf,GAAG,eAAe,CAAC,eAAe;QAClC,2BAA2B,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,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C,kBAAkB,CAAC,GAAG,kBAAkB;uBAC7C,kBAAkB;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"motion-blur.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/motion-blur.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAG3C,KAAK,kBAAkB,GAAG;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,CAAC;AAClE,KAAK,kBAAkB,GAAG;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC;AAE9E,eAAO,MAAM,cAAc;;;;;;;;;;oBAmCZ,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;uBAC7C,kBAAkB;;;;;;;;;;;;;;;;;;;;CAOO,CAAC;AAE5C,gFAAgF;AAChF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;4BAXR,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;+BAC7C,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAcQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-blur.js","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/motion-blur.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAS5D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BnB;IACA,aAAa,EAAE;QACb,EAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAC;QACnC,EAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAC;KACjC;IACD,KAAK,EAAE,EAAsD;IAC7D,QAAQ,EAAE,EAAwB;IAClC,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AAI,EAAE,+BAA+B;IACrC,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,CAAC,EAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAC,CAAC;CACpC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type OutlineEffectOptions = {
|
|
2
2
|
mode?: 'depth-normal' | 'image';
|
|
3
3
|
normalSource?: 'reconstruct-from-depth' | 'normal-texture';
|
|
4
4
|
quality?: 'fast' | 'high';
|
|
@@ -70,7 +70,7 @@ export declare const outlinePass: {
|
|
|
70
70
|
/** Selects depth-normal or image-based outlines with declarative quality options. */
|
|
71
71
|
export declare const outlines: {
|
|
72
72
|
readonly name: "outlineCompositeShaderPass";
|
|
73
|
-
readonly optionDefaults: Required<
|
|
73
|
+
readonly optionDefaults: Required<OutlineEffectOptions>;
|
|
74
74
|
readonly optionUniforms: {
|
|
75
75
|
readonly screenSpaceOutline: {
|
|
76
76
|
readonly useNormalTexture: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outlines.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/outlines.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"outlines.d.ts","sourceRoot":"","sources":["../../../../src/effects/passes/screen-space/outlines.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,wBAAwB,GAAG,gBAAgB,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;uBAqFN,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBU,CAAC;AA0D5C,qFAAqF;AACrF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CApBH,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,WAAW,GAAG,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAzDnE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHsC,CAAC"}
|