@luma.gl/engine 10.0.0-rc.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +89 -0
- package/dist/animation/animation-track.d.ts +7 -0
- package/dist/animation/animation-track.d.ts.map +1 -1
- package/dist/animation/animation-track.js.map +1 -1
- package/dist/animation/node-animation-binding.cjs +1 -0
- package/dist/animation/node-animation-binding.d.ts +2 -1
- package/dist/animation/node-animation-binding.d.ts.map +1 -1
- package/dist/animation/node-animation-binding.js +6 -0
- package/dist/animation/node-animation-binding.js.map +1 -1
- package/dist/animation/scenegraph-gpu-animation-layout.cjs +99 -0
- package/dist/animation/scenegraph-gpu-animation-layout.d.ts +69 -0
- package/dist/animation/scenegraph-gpu-animation-layout.d.ts.map +1 -0
- package/dist/animation/scenegraph-gpu-animation-layout.js +90 -0
- package/dist/animation/scenegraph-gpu-animation-layout.js.map +1 -0
- package/dist/animation/scenegraph-gpu-animation.cjs +281 -0
- package/dist/animation/scenegraph-gpu-animation.d.ts +54 -0
- package/dist/animation/scenegraph-gpu-animation.d.ts.map +1 -0
- package/dist/animation/scenegraph-gpu-animation.js +274 -0
- package/dist/animation/scenegraph-gpu-animation.js.map +1 -0
- package/dist/arrow/arrow-picking.cjs +4 -3
- package/dist/arrow/arrow-picking.d.ts +15 -5
- package/dist/arrow/arrow-picking.d.ts.map +1 -1
- package/dist/arrow/arrow-picking.js +16 -5
- package/dist/arrow/arrow-picking.js.map +1 -1
- package/dist/arrow/index.cjs.map +1 -1
- package/dist/dist.dev.js +1735 -1100
- package/dist/dist.min.js +69 -70
- package/dist/effects/glfx-effects.cjs +261 -0
- package/dist/effects/glfx-effects.d.ts +959 -0
- package/dist/effects/glfx-effects.d.ts.map +1 -0
- package/dist/effects/glfx-effects.js +200 -0
- package/dist/effects/glfx-effects.js.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.cjs +461 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts +127 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.js +474 -0
- package/dist/effects/graph/gpu-effect-operation.js.map +1 -0
- package/dist/effects/graph/temporal-graph-history.cjs +48 -0
- package/dist/effects/graph/temporal-graph-history.d.ts +17 -0
- package/dist/effects/graph/temporal-graph-history.d.ts.map +1 -0
- package/dist/effects/graph/temporal-graph-history.js +30 -0
- package/dist/effects/graph/temporal-graph-history.js.map +1 -0
- package/dist/effects/index.cjs +179 -34
- package/dist/effects/index.cjs.map +3 -3
- package/dist/effects/index.d.ts +64 -27
- package/dist/effects/index.d.ts.map +1 -1
- package/dist/effects/index.js +51 -18
- package/dist/effects/index.js.map +1 -1
- package/dist/effects/passes/postprocessing/detail/detail-blur.cjs +95 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts +126 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js +63 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.cjs +80 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts +183 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js +59 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.cjs +81 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts +163 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js +57 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.cjs +73 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts +43 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js +46 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js.map +1 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.cjs +9 -2
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts +19 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js +6 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
- package/dist/effects/passes/postprocessing/grading/curves.cjs +91 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts +54 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/curves.js +73 -0
- package/dist/effects/passes/postprocessing/grading/curves.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.cjs +71 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts +76 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js +50 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.cjs +160 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts +232 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js +138 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.cjs +84 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.cjs +106 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts +105 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.cjs +327 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts +201 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js +296 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.cjs +85 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js +59 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.cjs +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts +27 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js +45 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.cjs +64 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts +48 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js +42 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.cjs +110 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts +214 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.cjs +62 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts +47 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js +40 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.cjs +9 -2
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts +41 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js +6 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.cjs +200 -13
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +993 -7
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js +199 -10
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts +4 -4
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.cjs +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts +7 -7
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.cjs +79 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts +59 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js +63 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.js.map +1 -1
- package/dist/effects/passes/postprocessing/layer-styles/bevel.cjs +100 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts +73 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js +78 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.cjs +180 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts +152 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js +157 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.cjs +67 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts +181 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js +52 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.cjs +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js +119 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.cjs +104 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts +43 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js +69 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.cjs +64 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts +190 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js +49 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.cjs +279 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts +95 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.js +253 -0
- package/dist/effects/passes/postprocessing/smaa.js.map +1 -0
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.cjs +41 -40
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts +116 -8
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js +38 -37
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.cjs +101 -70
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +496 -5
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +97 -65
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.cjs +7 -0
- package/dist/effects/passes/screen-space/copy-pass.d.ts +1 -0
- package/dist/effects/passes/screen-space/copy-pass.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.js +4 -0
- package/dist/effects/passes/screen-space/copy-pass.js.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.cjs +7 -5
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +21 -19
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.js +5 -3
- package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/dof.cjs +16 -7
- package/dist/effects/passes/screen-space/dof.d.ts +63 -4
- package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/dof.js +12 -4
- package/dist/effects/passes/screen-space/dof.js.map +1 -1
- package/dist/effects/passes/screen-space/gtao.cjs +93 -64
- package/dist/effects/passes/screen-space/gtao.d.ts +642 -6
- package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/gtao.js +94 -62
- package/dist/effects/passes/screen-space/gtao.js.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.cjs +103 -79
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts +226 -4
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js +102 -77
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.cjs +14 -0
- package/dist/effects/passes/screen-space/height-fog.d.ts +71 -0
- package/dist/effects/passes/screen-space/height-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.js +16 -3
- package/dist/effects/passes/screen-space/height-fog.js.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.cjs +7 -8
- package/dist/effects/passes/screen-space/motion-blur.d.ts +41 -2
- package/dist/effects/passes/screen-space/motion-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.js +6 -6
- package/dist/effects/passes/screen-space/motion-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/outlines.cjs +143 -18
- package/dist/effects/passes/screen-space/outlines.d.ts +163 -4
- package/dist/effects/passes/screen-space/outlines.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/outlines.js +137 -15
- package/dist/effects/passes/screen-space/outlines.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.cjs +82 -63
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +333 -5
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js +81 -61
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.cjs +165 -85
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +802 -10
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.js +162 -81
- package/dist/effects/passes/screen-space/screen-space-reflections.js.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.cjs +12 -2
- package/dist/effects/passes/screen-space/selection-outline.d.ts +44 -0
- package/dist/effects/passes/screen-space/selection-outline.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.js +9 -0
- package/dist/effects/passes/screen-space/selection-outline.js.map +1 -1
- package/dist/effects/passes/screen-space/ssao.cjs +66 -43
- package/dist/effects/passes/screen-space/ssao.d.ts +648 -3
- package/dist/effects/passes/screen-space/ssao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssao.js +64 -41
- package/dist/effects/passes/screen-space/ssao.js.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.cjs +42 -30
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts +107 -6
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.js +40 -27
- package/dist/effects/passes/screen-space/temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-frame.cjs +34 -0
- package/dist/effects/passes/screen-space/temporal-frame.d.ts +23 -0
- package/dist/effects/passes/screen-space/temporal-frame.d.ts.map +1 -0
- package/dist/effects/passes/screen-space/temporal-frame.js +16 -0
- package/dist/effects/passes/screen-space/temporal-frame.js.map +1 -0
- package/dist/effects/passes/screen-space/volumetric-fog.cjs +25 -22
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts +162 -3
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.js +27 -21
- package/dist/effects/passes/screen-space/volumetric-fog.js.map +1 -1
- package/dist/effects/scene-effect-attachments.cjs +15 -0
- package/dist/effects/scene-effect-attachments.d.ts +23 -0
- package/dist/effects/scene-effect-attachments.d.ts.map +1 -0
- package/dist/effects/scene-effect-attachments.js +5 -0
- package/dist/effects/scene-effect-attachments.js.map +1 -0
- package/dist/effects/temporal-upscale/index.cjs +40 -0
- package/dist/effects/temporal-upscale/index.d.ts +5 -0
- package/dist/effects/temporal-upscale/index.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/index.js +6 -0
- package/dist/effects/temporal-upscale/index.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-math.cjs +202 -0
- package/dist/effects/temporal-upscale/temporal-math.d.ts +101 -0
- package/dist/effects/temporal-upscale/temporal-math.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-math.js +202 -0
- package/dist/effects/temporal-upscale/temporal-math.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.cjs +353 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts +7 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.js +321 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.cjs +392 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.d.ts +143 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.js +385 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.js.map +1 -0
- package/dist/gltf/gltf/create-gltf-model.cjs +34 -71
- package/dist/gltf/gltf/create-gltf-model.d.ts +3 -0
- package/dist/gltf/gltf/create-gltf-model.d.ts.map +1 -1
- package/dist/gltf/gltf/create-gltf-model.js +40 -74
- package/dist/gltf/gltf/create-gltf-model.js.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.cjs +46 -4
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts +9 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js +54 -4
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js.map +1 -1
- package/dist/gltf/gltf/gltf-animated-crowd.cjs +25 -136
- package/dist/gltf/gltf/gltf-animated-crowd.d.ts +4 -8
- package/dist/gltf/gltf/gltf-animated-crowd.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-animated-crowd.js +27 -139
- package/dist/gltf/gltf/gltf-animated-crowd.js.map +1 -1
- package/dist/gltf/gltf/gltf-animation-nodes.cjs +84 -0
- package/dist/gltf/gltf/gltf-animation-nodes.d.ts +11 -0
- package/dist/gltf/gltf/gltf-animation-nodes.d.ts.map +1 -0
- package/dist/gltf/gltf/gltf-animation-nodes.js +62 -0
- package/dist/gltf/gltf/gltf-animation-nodes.js.map +1 -0
- package/dist/gltf/gltf/gltf-animator.cjs +8 -2
- package/dist/gltf/gltf/gltf-animator.d.ts +6 -1
- package/dist/gltf/gltf/gltf-animator.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-animator.js +10 -2
- package/dist/gltf/gltf/gltf-animator.js.map +1 -1
- package/dist/gltf/gltf/gltf-gpu-animation-controller.cjs +81 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts +9 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts.map +1 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.js +67 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.js.map +1 -0
- package/dist/gltf/gltf/gltf-gpu-animation.cjs +33 -28
- package/dist/gltf/gltf/gltf-gpu-animation.d.ts +7 -26
- package/dist/gltf/gltf/gltf-gpu-animation.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-gpu-animation.js +29 -28
- package/dist/gltf/gltf/gltf-gpu-animation.js.map +1 -1
- package/dist/gltf/index.cjs.map +3 -3
- package/dist/gltf/index.d.ts +2 -2
- package/dist/gltf/index.d.ts.map +1 -1
- package/dist/gltf/index.js.map +1 -1
- package/dist/gltf/parsers/parse-gltf.cjs +4 -2
- package/dist/gltf/parsers/parse-gltf.d.ts +3 -0
- package/dist/gltf/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/parsers/parse-gltf.js +7 -2
- package/dist/gltf/parsers/parse-gltf.js.map +1 -1
- package/dist/graph/models/index.cjs.map +2 -2
- package/dist/graph/physics/index.cjs +5 -0
- package/dist/graph/physics/index.cjs.map +3 -3
- package/dist/graph/physics/index.d.ts +1 -0
- package/dist/graph/physics/index.d.ts.map +1 -1
- package/dist/graph/physics/index.js +1 -0
- package/dist/graph/physics/index.js.map +1 -1
- package/dist/graph/physics/physics-controller-geometry.cjs +21 -0
- package/dist/graph/physics/physics-controller-geometry.d.ts +8 -1
- package/dist/graph/physics/physics-controller-geometry.d.ts.map +1 -1
- package/dist/graph/physics/physics-controller-geometry.js +22 -0
- package/dist/graph/physics/physics-controller-geometry.js.map +1 -1
- package/dist/graph/physics/scenegraph-session.d.ts +1 -1
- package/dist/graph/physics/scenegraph-session.d.ts.map +1 -1
- package/dist/graph/tables/index.cjs.map +2 -2
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/lighting/ambient-occlusion-pass.cjs +47 -28
- package/dist/lighting/ambient-occlusion-pass.d.ts +12 -0
- package/dist/lighting/ambient-occlusion-pass.d.ts.map +1 -1
- package/dist/lighting/ambient-occlusion-pass.js +45 -26
- package/dist/lighting/ambient-occlusion-pass.js.map +1 -1
- package/dist/lighting/clustered-light-grid.cjs +73 -26
- package/dist/lighting/clustered-light-grid.d.ts +38 -5
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
- package/dist/lighting/clustered-light-grid.js +70 -24
- package/dist/lighting/clustered-light-grid.js.map +1 -1
- package/dist/lighting/contact-shadow-composite.cjs +72 -51
- package/dist/lighting/contact-shadow-composite.d.ts +262 -3
- package/dist/lighting/contact-shadow-composite.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-composite.js +72 -50
- package/dist/lighting/contact-shadow-composite.js.map +1 -1
- package/dist/lighting/contact-shadow-pass.cjs +50 -39
- package/dist/lighting/contact-shadow-pass.d.ts +8 -0
- package/dist/lighting/contact-shadow-pass.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-pass.js +47 -37
- package/dist/lighting/contact-shadow-pass.js.map +1 -1
- package/dist/lighting/cortao/cortao-occluder-lookup-table.cjs +96 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts +41 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.js +94 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.js.map +1 -0
- package/dist/lighting/cortao/cortao-parameters.cjs +127 -0
- package/dist/lighting/cortao/cortao-parameters.d.ts +95 -0
- package/dist/lighting/cortao/cortao-parameters.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-parameters.js +122 -0
- package/dist/lighting/cortao/cortao-parameters.js.map +1 -0
- package/dist/lighting/cortao/cortao-pass.cjs +100 -0
- package/dist/lighting/cortao/cortao-pass.d.ts +33 -0
- package/dist/lighting/cortao/cortao-pass.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-pass.js +84 -0
- package/dist/lighting/cortao/cortao-pass.js.map +1 -0
- package/dist/lighting/cortao/cortao-passes.cjs +42 -0
- package/dist/lighting/cortao/cortao-passes.d.ts +38 -0
- package/dist/lighting/cortao/cortao-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-passes.js +19 -0
- package/dist/lighting/cortao/cortao-passes.js.map +1 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.cjs +606 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts +49 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.js +610 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.js.map +1 -0
- package/dist/lighting/cortao/cortao-shaders.cjs +667 -0
- package/dist/lighting/cortao/cortao-shaders.d.ts +118 -0
- package/dist/lighting/cortao/cortao-shaders.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-shaders.js +657 -0
- package/dist/lighting/cortao/cortao-shaders.js.map +1 -0
- package/dist/lighting/cortao/cortao-upsample.cjs +191 -0
- package/dist/lighting/cortao/cortao-upsample.d.ts +16 -0
- package/dist/lighting/cortao/cortao-upsample.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-upsample.js +159 -0
- package/dist/lighting/cortao/cortao-upsample.js.map +1 -0
- package/dist/lighting/cortao/cortao-webgl-passes.cjs +229 -0
- package/dist/lighting/cortao/cortao-webgl-passes.d.ts +28 -0
- package/dist/lighting/cortao/cortao-webgl-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-webgl-passes.js +212 -0
- package/dist/lighting/cortao/cortao-webgl-passes.js.map +1 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.cjs +348 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.d.ts +31 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.js +335 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.js.map +1 -0
- package/dist/lighting/index.cjs +13 -2
- package/dist/lighting/index.cjs.map +3 -3
- package/dist/lighting/index.d.ts +12 -7
- package/dist/lighting/index.d.ts.map +1 -1
- package/dist/lighting/index.js +6 -5
- package/dist/lighting/index.js.map +1 -1
- package/dist/lighting/shadow-map-renderer.cjs +40 -37
- package/dist/lighting/shadow-map-renderer.d.ts +15 -0
- package/dist/lighting/shadow-map-renderer.d.ts.map +1 -1
- package/dist/lighting/shadow-map-renderer.js +37 -35
- package/dist/lighting/shadow-map-renderer.js.map +1 -1
- package/dist/model/gpu-vector-model.cjs +39 -16
- package/dist/model/gpu-vector-model.d.ts +8 -0
- package/dist/model/gpu-vector-model.d.ts.map +1 -1
- package/dist/model/gpu-vector-model.js +46 -18
- package/dist/model/gpu-vector-model.js.map +1 -1
- package/dist/passes/effect-renderer.cjs +190 -0
- package/dist/passes/effect-renderer.d.ts +182 -0
- package/dist/passes/effect-renderer.d.ts.map +1 -0
- package/dist/passes/effect-renderer.js +182 -0
- package/dist/passes/effect-renderer.js.map +1 -0
- package/dist/passes/{shader-pass-renderer.cjs → fullscreen-effect-executor.cjs} +131 -94
- package/dist/passes/fullscreen-effect-executor.d.ts +188 -0
- package/dist/passes/fullscreen-effect-executor.d.ts.map +1 -0
- package/dist/passes/{shader-pass-renderer.js → fullscreen-effect-executor.js} +132 -100
- package/dist/passes/fullscreen-effect-executor.js.map +1 -0
- package/dist/passes/fullscreen-effect-module.cjs +15 -0
- package/dist/passes/fullscreen-effect-module.d.ts +47 -0
- package/dist/passes/fullscreen-effect-module.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-module.js +5 -0
- package/dist/passes/fullscreen-effect-module.js.map +1 -0
- package/dist/passes/fullscreen-effect-plan.cjs +15 -0
- package/dist/passes/fullscreen-effect-plan.d.ts +49 -0
- package/dist/passes/fullscreen-effect-plan.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-plan.js +5 -0
- package/dist/passes/fullscreen-effect-plan.js.map +1 -0
- package/dist/passes/get-fragment-shader.cjs +3 -0
- package/dist/passes/get-fragment-shader.d.ts +2 -2
- package/dist/passes/get-fragment-shader.d.ts.map +1 -1
- package/dist/passes/get-fragment-shader.js +3 -0
- package/dist/passes/get-fragment-shader.js.map +1 -1
- package/dist/passes/scene-capture-pass.cjs +42 -0
- package/dist/passes/scene-capture-pass.d.ts +29 -0
- package/dist/passes/scene-capture-pass.d.ts.map +1 -0
- package/dist/passes/scene-capture-pass.js +21 -0
- package/dist/passes/scene-capture-pass.js.map +1 -0
- package/dist/scenegraph/model-node.cjs +2 -0
- package/dist/scenegraph/model-node.d.ts +4 -0
- package/dist/scenegraph/model-node.d.ts.map +1 -1
- package/dist/scenegraph/model-node.js +2 -0
- package/dist/scenegraph/model-node.js.map +1 -1
- package/dist/shader-inputs.cjs +1 -1
- package/dist/shader-inputs.d.ts +1 -1
- package/dist/shader-inputs.js +1 -1
- package/dist/splats/gpu-paged-splat-renderer.cjs +52 -8
- package/dist/splats/gpu-paged-splat-renderer.d.ts +16 -3
- package/dist/splats/gpu-paged-splat-renderer.d.ts.map +1 -1
- package/dist/splats/gpu-paged-splat-renderer.js +55 -9
- package/dist/splats/gpu-paged-splat-renderer.js.map +1 -1
- package/dist/splats/gpu-paged-splat-shaders.cjs +3 -1
- package/dist/splats/gpu-paged-splat-shaders.d.ts.map +1 -1
- package/dist/splats/gpu-paged-splat-shaders.js +3 -1
- package/dist/splats/gpu-paged-splat-shaders.js.map +1 -1
- package/dist/splats/index.cjs.map +2 -2
- package/dist/text/fonts/atlas/browser-font-atlas.cjs +10 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts +4 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.js +11 -2
- package/dist/text/fonts/atlas/browser-font-atlas.js.map +1 -1
- package/dist/text/fonts/atlas/lru-cache.cjs +4 -0
- package/dist/text/fonts/atlas/lru-cache.d.ts +3 -1
- package/dist/text/fonts/atlas/lru-cache.d.ts.map +1 -1
- package/dist/text/fonts/atlas/lru-cache.js +4 -0
- package/dist/text/fonts/atlas/lru-cache.js.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.cjs +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.js +4 -2
- package/dist/text/fonts/build-sdf-font-atlas.js.map +1 -1
- package/dist/text/fonts/index.cjs +4 -0
- package/dist/text/fonts/index.cjs.map +1 -1
- package/dist/text/fonts/index.d.ts +1 -1
- package/dist/text/fonts/index.d.ts.map +1 -1
- package/dist/text/fonts/index.js +1 -1
- package/dist/text/fonts/index.js.map +1 -1
- package/dist/text/index.cjs.map +1 -1
- package/dist/utils/shader-module-utils.cjs +3 -0
- package/dist/utils/shader-module-utils.d.ts.map +1 -1
- package/dist/utils/shader-module-utils.js +3 -0
- package/dist/utils/shader-module-utils.js.map +1 -1
- package/licenses/smaa.txt +24 -0
- package/package.json +8 -8
- package/src/animation/animation-track.ts +5 -0
- package/src/animation/node-animation-binding.ts +9 -8
- package/src/animation/scenegraph-gpu-animation-layout.ts +195 -0
- package/src/animation/scenegraph-gpu-animation.ts +340 -0
- package/src/arrow/arrow-picking.ts +23 -11
- package/src/effects/README.md +40 -16
- package/src/effects/glfx-effects.ts +227 -0
- package/src/effects/graph/gpu-effect-operation.ts +720 -0
- package/src/effects/graph/temporal-graph-history.ts +46 -0
- package/src/effects/index.ts +161 -28
- package/src/effects/passes/postprocessing/detail/detail-blur.ts +77 -0
- package/src/effects/passes/postprocessing/detail/high-pass.ts +86 -0
- package/src/effects/passes/postprocessing/detail/local-contrast.ts +79 -0
- package/src/effects/passes/postprocessing/detail/unsharp-mask.ts +56 -0
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +10 -2
- package/src/effects/passes/postprocessing/grading/curves.ts +83 -0
- package/src/effects/passes/postprocessing/grading/lift-gamma-gain.ts +68 -0
- package/src/effects/passes/postprocessing/grading/shadows-highlights.ts +169 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.ts +68 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/denoise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/huesaturation.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/levels.ts +111 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.ts +347 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/noise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/output-dithering.ts +69 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.ts +67 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/persistence.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/posterize.ts +52 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/sepia.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/sharpen.ts +112 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/threshold.ts +50 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +10 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vibrance.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vignette.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +233 -29
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +7 -7
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.ts +13 -11
- package/src/effects/passes/postprocessing/image-blur-filters/bloom.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/gaussianblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/tiltshift.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/triangleblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/zoomblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/colorhalftone.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/dotscreen.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/edgework.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/ink.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/magnify.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/bulgepinch.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/displacement-map.ts +74 -0
- package/src/effects/passes/postprocessing/image-warp-filters/swirl.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/warp.ts +2 -2
- package/src/effects/passes/postprocessing/layer-styles/bevel.ts +92 -0
- package/src/effects/passes/postprocessing/layer-styles/drop-shadow.ts +176 -0
- package/src/effects/passes/postprocessing/optical/lens-flare.ts +64 -0
- package/src/effects/passes/postprocessing/optical/light-shafts.ts +139 -0
- package/src/effects/passes/postprocessing/optical/optical-textures.ts +74 -0
- package/src/effects/passes/postprocessing/optical/selective-glow.ts +62 -0
- package/src/effects/passes/postprocessing/smaa.ts +265 -0
- package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +47 -47
- package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +113 -77
- package/src/effects/passes/screen-space/copy-pass.ts +6 -2
- package/src/effects/passes/screen-space/depth-aware-blur.ts +9 -6
- package/src/effects/passes/screen-space/dof.ts +26 -8
- package/src/effects/passes/screen-space/gtao.ts +110 -74
- package/src/effects/passes/screen-space/hdr-auto-exposure.ts +114 -89
- package/src/effects/passes/screen-space/height-fog.ts +21 -6
- package/src/effects/passes/screen-space/motion-blur.ts +9 -8
- package/src/effects/passes/screen-space/outlines.ts +145 -19
- package/src/effects/passes/screen-space/screen-space-global-illumination.ts +95 -73
- package/src/effects/passes/screen-space/screen-space-reflections.ts +179 -104
- package/src/effects/passes/screen-space/selection-outline.ts +13 -2
- package/src/effects/passes/screen-space/ssao.ts +79 -48
- package/src/effects/passes/screen-space/ssr-camera-temporal.ts +4 -4
- package/src/effects/passes/screen-space/temporal-antialiasing.ts +45 -35
- package/src/effects/passes/screen-space/temporal-frame.ts +33 -0
- package/src/effects/passes/screen-space/volumetric-fog.ts +32 -26
- package/src/effects/scene-effect-attachments.ts +26 -0
- package/src/effects/temporal-upscale/index.ts +20 -0
- package/src/effects/temporal-upscale/temporal-math.ts +308 -0
- package/src/effects/temporal-upscale/temporal-upscale-shaders.ts +326 -0
- package/src/effects/temporal-upscale/temporal-upscaler.ts +538 -0
- package/src/gltf/gltf/create-gltf-model.ts +59 -90
- package/src/gltf/gltf/create-scenegraph-from-gltf.ts +71 -5
- package/src/gltf/gltf/gltf-animated-crowd.ts +30 -177
- package/src/gltf/gltf/gltf-animation-nodes.ts +82 -0
- package/src/gltf/gltf/gltf-animator.ts +15 -4
- package/src/gltf/gltf/gltf-gpu-animation-controller.ts +88 -0
- package/src/gltf/gltf/gltf-gpu-animation.ts +53 -60
- package/src/gltf/index.ts +5 -0
- package/src/gltf/parsers/parse-gltf.ts +12 -2
- package/src/graph/physics/index.ts +4 -0
- package/src/graph/physics/physics-controller-geometry.ts +33 -1
- package/src/index.ts +28 -6
- package/src/lighting/ambient-occlusion-pass.ts +62 -28
- package/src/lighting/clustered-light-grid.ts +89 -40
- package/src/lighting/contact-shadow-composite.ts +80 -52
- package/src/lighting/contact-shadow-pass.ts +59 -39
- package/src/lighting/cortao/cortao-occluder-lookup-table.ts +138 -0
- package/src/lighting/cortao/cortao-parameters.ts +218 -0
- package/src/lighting/cortao/cortao-pass.ts +136 -0
- package/src/lighting/cortao/cortao-passes.ts +50 -0
- package/src/lighting/cortao/cortao-shaders-wgsl.ts +633 -0
- package/src/lighting/cortao/cortao-shaders.ts +674 -0
- package/src/lighting/cortao/cortao-upsample.ts +177 -0
- package/src/lighting/cortao/cortao-webgl-passes.ts +284 -0
- package/src/lighting/cortao/cortao-webgpu-passes.ts +430 -0
- package/src/lighting/index.ts +13 -5
- package/src/lighting/shadow-map-renderer.ts +57 -43
- package/src/model/gpu-vector-model.ts +47 -18
- package/src/passes/effect-renderer.ts +404 -0
- package/src/passes/{shader-pass-renderer.ts → fullscreen-effect-executor.ts} +270 -181
- package/src/passes/fullscreen-effect-module.ts +71 -0
- package/src/passes/fullscreen-effect-plan.ts +59 -0
- package/src/passes/get-fragment-shader.ts +7 -2
- package/src/passes/scene-capture-pass.ts +51 -0
- package/src/scenegraph/model-node.ts +5 -0
- package/src/shader-inputs.ts +1 -1
- package/src/splats/gpu-paged-splat-renderer.ts +77 -9
- package/src/splats/gpu-paged-splat-shaders.ts +7 -1
- package/src/text/fonts/atlas/browser-font-atlas.ts +13 -2
- package/src/text/fonts/atlas/lru-cache.ts +6 -1
- package/src/text/fonts/build-sdf-font-atlas.ts +4 -2
- package/src/text/fonts/index.ts +2 -0
- package/src/utils/shader-module-utils.ts +3 -0
- package/dist/passes/shader-pass-renderer.d.ts +0 -160
- package/dist/passes/shader-pass-renderer.d.ts.map +0 -1
- package/dist/passes/shader-pass-renderer.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Texture } from '@luma.gl/core';
|
|
2
|
-
import type { CompositeShaderPass } from '@luma.gl/shaders';
|
|
3
2
|
import { Matrix4 } from '@math.gl/core/matrix';
|
|
3
|
+
import { type TemporalFrameJitter } from "./temporal-frame.js";
|
|
4
4
|
/** Construction options for the horizon-based GTAO pipeline. */
|
|
5
|
-
export type
|
|
5
|
+
export type GTAOEffectOptions = {
|
|
6
6
|
/** Fractional AO evaluation, history, and denoising resolution. Defaults to full resolution. */
|
|
7
7
|
resolutionScale?: number;
|
|
8
8
|
/** Apply visibility to the full image or only to a separately supplied ambient-light texture. */
|
|
@@ -16,7 +16,7 @@ type GTAOEvaluateUniforms = {
|
|
|
16
16
|
intensity: number;
|
|
17
17
|
frameIndex: number;
|
|
18
18
|
};
|
|
19
|
-
type GTAOTemporalUniforms = {
|
|
19
|
+
type GTAOTemporalUniforms = TemporalFrameJitter & {
|
|
20
20
|
inverseProjectionMatrix: Matrix4;
|
|
21
21
|
historyWeight: number;
|
|
22
22
|
depthThreshold: number;
|
|
@@ -96,7 +96,7 @@ export declare const gtaoEvaluate: {
|
|
|
96
96
|
/** Reprojects the previous AO result with G-buffer velocity and rejects disocclusions by depth. */
|
|
97
97
|
export declare const gtaoTemporal: {
|
|
98
98
|
readonly name: "gtaoTemporal";
|
|
99
|
-
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}";
|
|
100
100
|
readonly bindingLayout: readonly [{
|
|
101
101
|
readonly name: "historyTexture";
|
|
102
102
|
readonly group: 0;
|
|
@@ -117,8 +117,18 @@ export declare const gtaoTemporal: {
|
|
|
117
117
|
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
118
118
|
readonly historyWeight: "f32";
|
|
119
119
|
readonly depthThreshold: "f32";
|
|
120
|
+
readonly currentJitter: "vec2<f32>";
|
|
121
|
+
readonly previousJitter: "vec2<f32>";
|
|
120
122
|
};
|
|
121
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
|
+
};
|
|
122
132
|
readonly inverseProjectionMatrix: {
|
|
123
133
|
readonly value: Matrix4;
|
|
124
134
|
readonly private: true;
|
|
@@ -216,7 +226,633 @@ export declare const gtaoAmbientComposite: {
|
|
|
216
226
|
readonly sampler: true;
|
|
217
227
|
}];
|
|
218
228
|
};
|
|
219
|
-
/**
|
|
220
|
-
export declare
|
|
229
|
+
/** GTAO with full-color and ambient-only composition modes. */
|
|
230
|
+
export declare const gtao: {
|
|
231
|
+
readonly optionDefaults: Required<GTAOEffectOptions>;
|
|
232
|
+
readonly scaleResources: {
|
|
233
|
+
readonly option: "resolutionScale";
|
|
234
|
+
readonly targets: readonly ["gtaoRaw", "gtaoHistory", "gtaoHistoryDepth", "gtaoScratch", "gtaoBlurred"];
|
|
235
|
+
};
|
|
236
|
+
readonly variants: {
|
|
237
|
+
readonly option: "composition";
|
|
238
|
+
readonly values: {
|
|
239
|
+
readonly 'ambient-only': {
|
|
240
|
+
readonly passes: [{
|
|
241
|
+
readonly kind: "fullscreen";
|
|
242
|
+
readonly shaderPass: {
|
|
243
|
+
readonly name: "gtaoEvaluate";
|
|
244
|
+
readonly source: "const GTAO_PI: f32 = 3.141592653589793;\nconst GTAO_SLICE_COUNT: i32 = 4;\nconst GTAO_STEPS_PER_SIDE: i32 = 6;\n\nstruct GTAOEvaluateUniforms {\n projectionMatrix: mat4x4f,\n inverseProjectionMatrix: mat4x4f,\n radius: f32,\n bias: f32,\n intensity: f32,\n frameIndex: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoEvaluate: GTAOEvaluateUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n@group(0) @binding(auto) var normalTexture: texture_2d<f32>;\n@group(0) @binding(auto) var normalTextureSampler: sampler;\n\nfn gtaoEvaluate_reconstructViewPosition(uv: vec2f, depth: f32) -> vec3f {\n let clip = vec4f(uv.x * 2.0 - 1.0, 1.0 - uv.y * 2.0, depth, 1.0);\n let viewPosition = gtaoEvaluate.inverseProjectionMatrix * clip;\n return viewPosition.xyz / max(viewPosition.w, 0.00001);\n}\n\nfn gtaoEvaluate_hash(value: vec2f) -> f32 {\n return fract(sin(dot(value, vec2f(12.9898, 78.233))) * 43758.5453);\n}\n\nfn gtaoEvaluate_sampleHorizon(\n centerPosition: vec3f,\n viewDirection: vec3f,\n sliceDirection: vec3f,\n sceneCoord: vec2f,\n direction: vec2f,\n side: f32,\n radiusPixels: f32,\n depthDimensions: vec2f,\n radialJitter: f32\n) -> f32 {\n let hemisphereEdge = side * GTAO_PI * 0.5;\n var horizon = hemisphereEdge;\n for (var stepIndex: i32 = 1; stepIndex <= GTAO_STEPS_PER_SIDE; stepIndex++) {\n let fraction = f32(stepIndex) / f32(GTAO_STEPS_PER_SIDE);\n let jitteredFraction =\n (f32(stepIndex) - 1.0 + radialJitter) / f32(GTAO_STEPS_PER_SIDE);\n let sampleOffset = direction * side * radiusPixels * jitteredFraction / depthDimensions;\n let sampleCoord = sceneCoord + sampleOffset;\n if (any(sampleCoord < vec2f(0.0)) || any(sampleCoord > vec2f(1.0))) {\n continue;\n }\n let sampleDepth = textureSampleLevel(depthTexture, depthTextureSampler, sampleCoord, 0);\n if (sampleDepth >= 0.99999) {\n continue;\n }\n let samplePosition = gtaoEvaluate_reconstructViewPosition(sampleCoord, sampleDepth);\n let delta = samplePosition - centerPosition;\n let distanceToSample = length(delta);\n if (distanceToSample <= 0.0001 || distanceToSample >= gtaoEvaluate.radius) {\n continue;\n }\n let sampleDirection = delta / distanceToSample;\n let sliceProjection = dot(sampleDirection, sliceDirection);\n if (sliceProjection * side <= 0.0) {\n continue;\n }\n let sampleAngle = atan2(sliceProjection, dot(sampleDirection, viewDirection));\n let biasedAngle = sampleAngle + side * gtaoEvaluate.bias;\n let boundedAngle = select(\n clamp(biasedAngle, -GTAO_PI * 0.5, 0.0),\n clamp(biasedAngle, 0.0, GTAO_PI * 0.5),\n side > 0.0\n );\n let distanceFalloff = 1.0 - smoothstep(gtaoEvaluate.radius * 0.35, gtaoEvaluate.radius, distanceToSample);\n let stepFalloff = 1.0 - fraction * 0.15;\n let weightedAngle = mix(hemisphereEdge, boundedAngle, distanceFalloff * stepFalloff);\n horizon = select(max(horizon, weightedAngle), min(horizon, weightedAngle), side > 0.0);\n }\n return horizon;\n}\n\nfn gtaoEvaluate_integrateSlice(\n negativeHorizon: f32,\n positiveHorizon: f32,\n normalAngle: f32\n) -> f32 {\n let lowerHemisphere = normalAngle - GTAO_PI * 0.5;\n let upperHemisphere = normalAngle + GTAO_PI * 0.5;\n let visibleLower = clamp(negativeHorizon, lowerHemisphere, upperHemisphere);\n let visibleUpper = clamp(positiveHorizon, lowerHemisphere, upperHemisphere);\n let unoccludedLower = clamp(-GTAO_PI * 0.5, lowerHemisphere, upperHemisphere);\n let unoccludedUpper = clamp(GTAO_PI * 0.5, lowerHemisphere, upperHemisphere);\n let visibilityIntegral = max(\n sin(visibleUpper - normalAngle) - sin(visibleLower - normalAngle),\n 0.0\n );\n let hemisphereIntegral = max(\n sin(unoccludedUpper - normalAngle) - sin(unoccludedLower - normalAngle),\n 0.0001\n );\n return clamp(visibilityIntegral / hemisphereIntegral, 0.0, 1.0);\n}\n\nfn gtaoEvaluate_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sceneCoord = texCoord;\n let depth = textureSampleLevel(depthTexture, depthTextureSampler, sceneCoord, 0);\n if (depth >= 0.99999) {\n return vec4f(1.0);\n }\n\n let centerPosition = gtaoEvaluate_reconstructViewPosition(sceneCoord, depth);\n let normalSample = textureSampleLevel(normalTexture, normalTextureSampler, sceneCoord, 0);\n let normal = normalize(normalSample.xyz * 2.0 - 1.0);\n let depthDimensions = vec2f(textureDimensions(depthTexture));\n let focalLength = abs(gtaoEvaluate.projectionMatrix[1][1]);\n let projectedRadius = gtaoEvaluate.radius * focalLength /\n max(-centerPosition.z, 0.0001) * depthDimensions.y * 0.5;\n let radiusPixels = clamp(projectedRadius, 2.0, 72.0);\n let pixelCoordinate = sceneCoord * depthDimensions;\n let frameOffset = vec2f(gtaoEvaluate.frameIndex * 0.754877666, gtaoEvaluate.frameIndex * 0.569840291);\n let rotation = gtaoEvaluate_hash(floor(pixelCoordinate) + frameOffset) * GTAO_PI;\n let radialJitter = 0.25 + gtaoEvaluate_hash(floor(pixelCoordinate) + frameOffset.yx + 17.0) * 0.75;\n let viewDirection = normalize(-centerPosition);\n\n var accumulatedVisibility = 0.0;\n var accumulatedWeight = 0.0;\n for (var sliceIndex: i32 = 0; sliceIndex < GTAO_SLICE_COUNT; sliceIndex++) {\n let angle = rotation + f32(sliceIndex) * GTAO_PI / f32(GTAO_SLICE_COUNT);\n let direction = vec2f(cos(angle), sin(angle));\n let sliceSampleCoord = clamp(sceneCoord + direction / depthDimensions, vec2f(0.0), vec2f(1.0));\n let slicePosition = gtaoEvaluate_reconstructViewPosition(sliceSampleCoord, depth);\n let sliceDelta = slicePosition - centerPosition;\n if (length(sliceDelta) <= 0.00001) {\n continue;\n }\n let slicePlaneNormal = normalize(cross(sliceDelta, viewDirection));\n let sliceDirection = normalize(cross(viewDirection, slicePlaneNormal));\n let projectedNormal = normal - slicePlaneNormal * dot(normal, slicePlaneNormal);\n let projectedNormalLength = length(projectedNormal);\n if (projectedNormalLength <= 0.00001) {\n continue;\n }\n let normalizedProjectedNormal = projectedNormal / projectedNormalLength;\n let normalAngle = atan2(\n dot(normalizedProjectedNormal, sliceDirection),\n dot(normalizedProjectedNormal, viewDirection)\n );\n let positiveHorizon = gtaoEvaluate_sampleHorizon(\n centerPosition,\n viewDirection,\n sliceDirection,\n sceneCoord,\n direction,\n 1.0,\n radiusPixels,\n depthDimensions,\n radialJitter\n );\n let negativeHorizon = gtaoEvaluate_sampleHorizon(\n centerPosition,\n viewDirection,\n sliceDirection,\n sceneCoord,\n direction,\n -1.0,\n radiusPixels,\n depthDimensions,\n radialJitter\n );\n let sliceVisibility = gtaoEvaluate_integrateSlice(\n negativeHorizon,\n positiveHorizon,\n normalAngle\n );\n accumulatedVisibility += sliceVisibility * projectedNormalLength;\n accumulatedWeight += projectedNormalLength;\n }\n\n let integratedVisibility = accumulatedVisibility / max(accumulatedWeight, 0.0001);\n let visibility = clamp(\n 1.0 - (1.0 - integratedVisibility) * gtaoEvaluate.intensity,\n 0.0,\n 1.0\n );\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
245
|
+
readonly bindingLayout: readonly [{
|
|
246
|
+
readonly name: "depthTexture";
|
|
247
|
+
readonly group: 0;
|
|
248
|
+
}, {
|
|
249
|
+
readonly name: "normalTexture";
|
|
250
|
+
readonly group: 0;
|
|
251
|
+
}];
|
|
252
|
+
readonly props: Partial<GTAOEvaluateUniforms> & GTAOBindings;
|
|
253
|
+
readonly uniforms: GTAOEvaluateUniforms;
|
|
254
|
+
readonly bindings: GTAOBindings;
|
|
255
|
+
readonly uniformTypes: {
|
|
256
|
+
readonly projectionMatrix: "mat4x4<f32>";
|
|
257
|
+
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
258
|
+
readonly radius: "f32";
|
|
259
|
+
readonly bias: "f32";
|
|
260
|
+
readonly intensity: "f32";
|
|
261
|
+
readonly frameIndex: "f32";
|
|
262
|
+
};
|
|
263
|
+
readonly propTypes: {
|
|
264
|
+
readonly projectionMatrix: {
|
|
265
|
+
readonly value: Matrix4;
|
|
266
|
+
readonly private: true;
|
|
267
|
+
};
|
|
268
|
+
readonly inverseProjectionMatrix: {
|
|
269
|
+
readonly value: Matrix4;
|
|
270
|
+
readonly private: true;
|
|
271
|
+
};
|
|
272
|
+
readonly radius: {
|
|
273
|
+
readonly value: 2.2;
|
|
274
|
+
readonly min: 0.1;
|
|
275
|
+
readonly softMax: 8;
|
|
276
|
+
};
|
|
277
|
+
readonly bias: {
|
|
278
|
+
readonly value: 0.04;
|
|
279
|
+
readonly min: 0;
|
|
280
|
+
readonly softMax: 0.25;
|
|
281
|
+
};
|
|
282
|
+
readonly intensity: {
|
|
283
|
+
readonly value: 3.2;
|
|
284
|
+
readonly min: 0;
|
|
285
|
+
readonly softMax: 8;
|
|
286
|
+
};
|
|
287
|
+
readonly frameIndex: {
|
|
288
|
+
readonly value: 0;
|
|
289
|
+
readonly private: true;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
readonly passes: [{
|
|
293
|
+
readonly sampler: true;
|
|
294
|
+
}];
|
|
295
|
+
};
|
|
296
|
+
readonly inputs: {
|
|
297
|
+
readonly sourceTexture: "previous";
|
|
298
|
+
};
|
|
299
|
+
readonly output: "gtaoRaw";
|
|
300
|
+
}, {
|
|
301
|
+
readonly kind: "fullscreen";
|
|
302
|
+
readonly shaderPass: {
|
|
303
|
+
readonly name: "gtaoTemporal";
|
|
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}";
|
|
305
|
+
readonly bindingLayout: readonly [{
|
|
306
|
+
readonly name: "historyTexture";
|
|
307
|
+
readonly group: 0;
|
|
308
|
+
}, {
|
|
309
|
+
readonly name: "velocityTexture";
|
|
310
|
+
readonly group: 0;
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "depthTexture";
|
|
313
|
+
readonly group: 0;
|
|
314
|
+
}, {
|
|
315
|
+
readonly name: "previousDepthTexture";
|
|
316
|
+
readonly group: 0;
|
|
317
|
+
}];
|
|
318
|
+
readonly props: Partial<GTAOTemporalUniforms> & GTAOTemporalBindings;
|
|
319
|
+
readonly uniforms: GTAOTemporalUniforms;
|
|
320
|
+
readonly bindings: GTAOTemporalBindings;
|
|
321
|
+
readonly uniformTypes: {
|
|
322
|
+
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
323
|
+
readonly historyWeight: "f32";
|
|
324
|
+
readonly depthThreshold: "f32";
|
|
325
|
+
readonly currentJitter: "vec2<f32>";
|
|
326
|
+
readonly previousJitter: "vec2<f32>";
|
|
327
|
+
};
|
|
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
|
+
};
|
|
337
|
+
readonly inverseProjectionMatrix: {
|
|
338
|
+
readonly value: Matrix4;
|
|
339
|
+
readonly private: true;
|
|
340
|
+
};
|
|
341
|
+
readonly historyWeight: {
|
|
342
|
+
readonly value: 0.88;
|
|
343
|
+
readonly min: 0;
|
|
344
|
+
readonly max: 0.97;
|
|
345
|
+
};
|
|
346
|
+
readonly depthThreshold: {
|
|
347
|
+
readonly value: 0.015;
|
|
348
|
+
readonly min: 0.0001;
|
|
349
|
+
readonly softMax: 0.1;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
readonly passes: [{
|
|
353
|
+
readonly sampler: true;
|
|
354
|
+
}];
|
|
355
|
+
};
|
|
356
|
+
readonly inputs: {
|
|
357
|
+
readonly sourceTexture: "gtaoRaw";
|
|
358
|
+
readonly historyTexture: "gtaoHistory";
|
|
359
|
+
readonly previousDepthTexture: "gtaoHistoryDepth";
|
|
360
|
+
};
|
|
361
|
+
readonly output: "gtaoHistory";
|
|
362
|
+
}, {
|
|
363
|
+
readonly kind: "fullscreen";
|
|
364
|
+
readonly shaderPass: {
|
|
365
|
+
readonly name: "gtaoDepthHistoryCopy";
|
|
366
|
+
readonly source: "@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn gtaoDepthHistoryCopy_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let depth = textureSample(depthTexture, depthTextureSampler, texCoord);\n return vec4f(depth, 0.0, 0.0, 1.0);\n}";
|
|
367
|
+
readonly bindingLayout: readonly [{
|
|
368
|
+
readonly name: "depthTexture";
|
|
369
|
+
readonly group: 0;
|
|
370
|
+
}];
|
|
371
|
+
readonly passes: [{
|
|
372
|
+
readonly sampler: true;
|
|
373
|
+
}];
|
|
374
|
+
};
|
|
375
|
+
readonly inputs: {
|
|
376
|
+
readonly sourceTexture: "previous";
|
|
377
|
+
};
|
|
378
|
+
readonly output: "gtaoHistoryDepth";
|
|
379
|
+
}, {
|
|
380
|
+
readonly kind: "fullscreen";
|
|
381
|
+
readonly shaderPass: {
|
|
382
|
+
readonly name: "depthAwareBlur";
|
|
383
|
+
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
384
|
+
readonly bindingLayout: readonly [{
|
|
385
|
+
readonly name: "depthTexture";
|
|
386
|
+
readonly group: 0;
|
|
387
|
+
}];
|
|
388
|
+
readonly props: import("./depth-aware-blur").DepthAwareBlurProps & {
|
|
389
|
+
depthTexture?: Texture;
|
|
390
|
+
};
|
|
391
|
+
readonly uniforms: Required<import("./depth-aware-blur").DepthAwareBlurProps>;
|
|
392
|
+
readonly bindings: {
|
|
393
|
+
depthTexture?: Texture;
|
|
394
|
+
};
|
|
395
|
+
readonly uniformTypes: {
|
|
396
|
+
readonly direction: "vec2<f32>";
|
|
397
|
+
readonly radius: "f32";
|
|
398
|
+
readonly depthSigma: "f32";
|
|
399
|
+
readonly spatialSigma: "f32";
|
|
400
|
+
};
|
|
401
|
+
readonly propTypes: {
|
|
402
|
+
readonly direction: {
|
|
403
|
+
readonly value: readonly [1, 0];
|
|
404
|
+
};
|
|
405
|
+
readonly radius: {
|
|
406
|
+
readonly value: 4;
|
|
407
|
+
readonly min: 1;
|
|
408
|
+
readonly max: 8;
|
|
409
|
+
};
|
|
410
|
+
readonly depthSigma: {
|
|
411
|
+
readonly value: 0.01;
|
|
412
|
+
readonly min: 0.0001;
|
|
413
|
+
readonly softMax: 0.1;
|
|
414
|
+
};
|
|
415
|
+
readonly spatialSigma: {
|
|
416
|
+
readonly value: 3;
|
|
417
|
+
readonly min: 0.1;
|
|
418
|
+
readonly softMax: 8;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
readonly passes: [{
|
|
422
|
+
readonly sampler: true;
|
|
423
|
+
}];
|
|
424
|
+
};
|
|
425
|
+
readonly inputs: {
|
|
426
|
+
readonly sourceTexture: "gtaoHistory";
|
|
427
|
+
};
|
|
428
|
+
readonly output: "gtaoScratch";
|
|
429
|
+
readonly uniforms: {
|
|
430
|
+
readonly direction: readonly [1, 0];
|
|
431
|
+
readonly radius: 3;
|
|
432
|
+
readonly spatialSigma: 2.5;
|
|
433
|
+
readonly depthSigma: 0.008;
|
|
434
|
+
};
|
|
435
|
+
}, {
|
|
436
|
+
readonly kind: "fullscreen";
|
|
437
|
+
readonly shaderPass: {
|
|
438
|
+
readonly name: "depthAwareBlur";
|
|
439
|
+
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
440
|
+
readonly bindingLayout: readonly [{
|
|
441
|
+
readonly name: "depthTexture";
|
|
442
|
+
readonly group: 0;
|
|
443
|
+
}];
|
|
444
|
+
readonly props: import("./depth-aware-blur").DepthAwareBlurProps & {
|
|
445
|
+
depthTexture?: Texture;
|
|
446
|
+
};
|
|
447
|
+
readonly uniforms: Required<import("./depth-aware-blur").DepthAwareBlurProps>;
|
|
448
|
+
readonly bindings: {
|
|
449
|
+
depthTexture?: Texture;
|
|
450
|
+
};
|
|
451
|
+
readonly uniformTypes: {
|
|
452
|
+
readonly direction: "vec2<f32>";
|
|
453
|
+
readonly radius: "f32";
|
|
454
|
+
readonly depthSigma: "f32";
|
|
455
|
+
readonly spatialSigma: "f32";
|
|
456
|
+
};
|
|
457
|
+
readonly propTypes: {
|
|
458
|
+
readonly direction: {
|
|
459
|
+
readonly value: readonly [1, 0];
|
|
460
|
+
};
|
|
461
|
+
readonly radius: {
|
|
462
|
+
readonly value: 4;
|
|
463
|
+
readonly min: 1;
|
|
464
|
+
readonly max: 8;
|
|
465
|
+
};
|
|
466
|
+
readonly depthSigma: {
|
|
467
|
+
readonly value: 0.01;
|
|
468
|
+
readonly min: 0.0001;
|
|
469
|
+
readonly softMax: 0.1;
|
|
470
|
+
};
|
|
471
|
+
readonly spatialSigma: {
|
|
472
|
+
readonly value: 3;
|
|
473
|
+
readonly min: 0.1;
|
|
474
|
+
readonly softMax: 8;
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
readonly passes: [{
|
|
478
|
+
readonly sampler: true;
|
|
479
|
+
}];
|
|
480
|
+
};
|
|
481
|
+
readonly inputs: {
|
|
482
|
+
readonly sourceTexture: "gtaoScratch";
|
|
483
|
+
};
|
|
484
|
+
readonly output: "gtaoBlurred";
|
|
485
|
+
readonly uniforms: {
|
|
486
|
+
readonly direction: readonly [0, 1];
|
|
487
|
+
readonly radius: 3;
|
|
488
|
+
readonly spatialSigma: 2.5;
|
|
489
|
+
readonly depthSigma: 0.008;
|
|
490
|
+
};
|
|
491
|
+
}, {
|
|
492
|
+
readonly shaderPass: {
|
|
493
|
+
readonly name: "gtaoAmbientComposite";
|
|
494
|
+
readonly source: "struct GTAOAmbientCompositeUniforms {\n strength: f32,\n debugMode: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoAmbientComposite: GTAOAmbientCompositeUniforms;\n@group(0) @binding(auto) var ambientOcclusionTexture: texture_2d<f32>;\n@group(0) @binding(auto) var ambientOcclusionTextureSampler: sampler;\n@group(0) @binding(auto) var ambientLightingTexture: texture_2d<f32>;\n@group(0) @binding(auto) var ambientLightingTextureSampler: sampler;\n\nfn gtaoAmbientComposite_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n let visibility = textureSample(\n ambientOcclusionTexture,\n ambientOcclusionTextureSampler,\n texCoord\n ).r;\n if (gtaoAmbientComposite.debugMode > 0.5) {\n return vec4f(vec3f(visibility), 1.0);\n }\n let ambientLighting = textureSample(\n ambientLightingTexture,\n ambientLightingTextureSampler,\n texCoord\n ).rgb;\n let ambientVisibility = mix(\n 1.0,\n visibility,\n clamp(gtaoAmbientComposite.strength, 0.0, 1.0)\n );\n return vec4f(color.rgb + ambientLighting * (ambientVisibility - 1.0), color.a);\n}";
|
|
495
|
+
readonly bindingLayout: readonly [{
|
|
496
|
+
readonly name: "ambientOcclusionTexture";
|
|
497
|
+
readonly group: 0;
|
|
498
|
+
}, {
|
|
499
|
+
readonly name: "ambientLightingTexture";
|
|
500
|
+
readonly group: 0;
|
|
501
|
+
}];
|
|
502
|
+
readonly props: Partial<GTAOCompositeUniforms> & GTAOAmbientCompositeBindings;
|
|
503
|
+
readonly uniforms: GTAOCompositeUniforms;
|
|
504
|
+
readonly bindings: GTAOAmbientCompositeBindings;
|
|
505
|
+
readonly uniformTypes: {
|
|
506
|
+
readonly strength: "f32";
|
|
507
|
+
readonly debugMode: "f32";
|
|
508
|
+
};
|
|
509
|
+
readonly propTypes: {
|
|
510
|
+
readonly strength: {
|
|
511
|
+
readonly value: 0.68;
|
|
512
|
+
readonly min: 0;
|
|
513
|
+
readonly max: 1;
|
|
514
|
+
};
|
|
515
|
+
readonly debugMode: {
|
|
516
|
+
readonly value: 0;
|
|
517
|
+
readonly min: 0;
|
|
518
|
+
readonly max: 1;
|
|
519
|
+
readonly private: true;
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
readonly passes: [{
|
|
523
|
+
readonly sampler: true;
|
|
524
|
+
}];
|
|
525
|
+
};
|
|
526
|
+
readonly kind: "fullscreen";
|
|
527
|
+
readonly inputs: {
|
|
528
|
+
readonly sourceTexture: "previous";
|
|
529
|
+
readonly ambientOcclusionTexture: "gtaoBlurred";
|
|
530
|
+
};
|
|
531
|
+
readonly output: "previous";
|
|
532
|
+
}];
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
readonly name: "gtaoCompositeShaderPass";
|
|
537
|
+
readonly resources: {
|
|
538
|
+
readonly gtaoRaw: {
|
|
539
|
+
readonly scale: [1, 1];
|
|
540
|
+
readonly format: "rgba8unorm";
|
|
541
|
+
};
|
|
542
|
+
readonly gtaoHistory: {
|
|
543
|
+
readonly scale: [1, 1];
|
|
544
|
+
readonly format: "rgba8unorm";
|
|
545
|
+
readonly lifetime: "history";
|
|
546
|
+
readonly initialize: {
|
|
547
|
+
readonly clearColor: [1, 1, 1, 1];
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
readonly gtaoHistoryDepth: {
|
|
551
|
+
readonly scale: [1, 1];
|
|
552
|
+
readonly format: "rgba16float";
|
|
553
|
+
readonly lifetime: "history";
|
|
554
|
+
readonly initialize: {
|
|
555
|
+
readonly clearColor: [1, 0, 0, 1];
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
readonly gtaoScratch: {
|
|
559
|
+
readonly scale: [1, 1];
|
|
560
|
+
readonly format: "rgba8unorm";
|
|
561
|
+
};
|
|
562
|
+
readonly gtaoBlurred: {
|
|
563
|
+
readonly scale: [1, 1];
|
|
564
|
+
readonly format: "rgba8unorm";
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
readonly passes: [{
|
|
568
|
+
readonly kind: "fullscreen";
|
|
569
|
+
readonly shaderPass: {
|
|
570
|
+
readonly name: "gtaoEvaluate";
|
|
571
|
+
readonly source: "const GTAO_PI: f32 = 3.141592653589793;\nconst GTAO_SLICE_COUNT: i32 = 4;\nconst GTAO_STEPS_PER_SIDE: i32 = 6;\n\nstruct GTAOEvaluateUniforms {\n projectionMatrix: mat4x4f,\n inverseProjectionMatrix: mat4x4f,\n radius: f32,\n bias: f32,\n intensity: f32,\n frameIndex: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoEvaluate: GTAOEvaluateUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n@group(0) @binding(auto) var normalTexture: texture_2d<f32>;\n@group(0) @binding(auto) var normalTextureSampler: sampler;\n\nfn gtaoEvaluate_reconstructViewPosition(uv: vec2f, depth: f32) -> vec3f {\n let clip = vec4f(uv.x * 2.0 - 1.0, 1.0 - uv.y * 2.0, depth, 1.0);\n let viewPosition = gtaoEvaluate.inverseProjectionMatrix * clip;\n return viewPosition.xyz / max(viewPosition.w, 0.00001);\n}\n\nfn gtaoEvaluate_hash(value: vec2f) -> f32 {\n return fract(sin(dot(value, vec2f(12.9898, 78.233))) * 43758.5453);\n}\n\nfn gtaoEvaluate_sampleHorizon(\n centerPosition: vec3f,\n viewDirection: vec3f,\n sliceDirection: vec3f,\n sceneCoord: vec2f,\n direction: vec2f,\n side: f32,\n radiusPixels: f32,\n depthDimensions: vec2f,\n radialJitter: f32\n) -> f32 {\n let hemisphereEdge = side * GTAO_PI * 0.5;\n var horizon = hemisphereEdge;\n for (var stepIndex: i32 = 1; stepIndex <= GTAO_STEPS_PER_SIDE; stepIndex++) {\n let fraction = f32(stepIndex) / f32(GTAO_STEPS_PER_SIDE);\n let jitteredFraction =\n (f32(stepIndex) - 1.0 + radialJitter) / f32(GTAO_STEPS_PER_SIDE);\n let sampleOffset = direction * side * radiusPixels * jitteredFraction / depthDimensions;\n let sampleCoord = sceneCoord + sampleOffset;\n if (any(sampleCoord < vec2f(0.0)) || any(sampleCoord > vec2f(1.0))) {\n continue;\n }\n let sampleDepth = textureSampleLevel(depthTexture, depthTextureSampler, sampleCoord, 0);\n if (sampleDepth >= 0.99999) {\n continue;\n }\n let samplePosition = gtaoEvaluate_reconstructViewPosition(sampleCoord, sampleDepth);\n let delta = samplePosition - centerPosition;\n let distanceToSample = length(delta);\n if (distanceToSample <= 0.0001 || distanceToSample >= gtaoEvaluate.radius) {\n continue;\n }\n let sampleDirection = delta / distanceToSample;\n let sliceProjection = dot(sampleDirection, sliceDirection);\n if (sliceProjection * side <= 0.0) {\n continue;\n }\n let sampleAngle = atan2(sliceProjection, dot(sampleDirection, viewDirection));\n let biasedAngle = sampleAngle + side * gtaoEvaluate.bias;\n let boundedAngle = select(\n clamp(biasedAngle, -GTAO_PI * 0.5, 0.0),\n clamp(biasedAngle, 0.0, GTAO_PI * 0.5),\n side > 0.0\n );\n let distanceFalloff = 1.0 - smoothstep(gtaoEvaluate.radius * 0.35, gtaoEvaluate.radius, distanceToSample);\n let stepFalloff = 1.0 - fraction * 0.15;\n let weightedAngle = mix(hemisphereEdge, boundedAngle, distanceFalloff * stepFalloff);\n horizon = select(max(horizon, weightedAngle), min(horizon, weightedAngle), side > 0.0);\n }\n return horizon;\n}\n\nfn gtaoEvaluate_integrateSlice(\n negativeHorizon: f32,\n positiveHorizon: f32,\n normalAngle: f32\n) -> f32 {\n let lowerHemisphere = normalAngle - GTAO_PI * 0.5;\n let upperHemisphere = normalAngle + GTAO_PI * 0.5;\n let visibleLower = clamp(negativeHorizon, lowerHemisphere, upperHemisphere);\n let visibleUpper = clamp(positiveHorizon, lowerHemisphere, upperHemisphere);\n let unoccludedLower = clamp(-GTAO_PI * 0.5, lowerHemisphere, upperHemisphere);\n let unoccludedUpper = clamp(GTAO_PI * 0.5, lowerHemisphere, upperHemisphere);\n let visibilityIntegral = max(\n sin(visibleUpper - normalAngle) - sin(visibleLower - normalAngle),\n 0.0\n );\n let hemisphereIntegral = max(\n sin(unoccludedUpper - normalAngle) - sin(unoccludedLower - normalAngle),\n 0.0001\n );\n return clamp(visibilityIntegral / hemisphereIntegral, 0.0, 1.0);\n}\n\nfn gtaoEvaluate_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sceneCoord = texCoord;\n let depth = textureSampleLevel(depthTexture, depthTextureSampler, sceneCoord, 0);\n if (depth >= 0.99999) {\n return vec4f(1.0);\n }\n\n let centerPosition = gtaoEvaluate_reconstructViewPosition(sceneCoord, depth);\n let normalSample = textureSampleLevel(normalTexture, normalTextureSampler, sceneCoord, 0);\n let normal = normalize(normalSample.xyz * 2.0 - 1.0);\n let depthDimensions = vec2f(textureDimensions(depthTexture));\n let focalLength = abs(gtaoEvaluate.projectionMatrix[1][1]);\n let projectedRadius = gtaoEvaluate.radius * focalLength /\n max(-centerPosition.z, 0.0001) * depthDimensions.y * 0.5;\n let radiusPixels = clamp(projectedRadius, 2.0, 72.0);\n let pixelCoordinate = sceneCoord * depthDimensions;\n let frameOffset = vec2f(gtaoEvaluate.frameIndex * 0.754877666, gtaoEvaluate.frameIndex * 0.569840291);\n let rotation = gtaoEvaluate_hash(floor(pixelCoordinate) + frameOffset) * GTAO_PI;\n let radialJitter = 0.25 + gtaoEvaluate_hash(floor(pixelCoordinate) + frameOffset.yx + 17.0) * 0.75;\n let viewDirection = normalize(-centerPosition);\n\n var accumulatedVisibility = 0.0;\n var accumulatedWeight = 0.0;\n for (var sliceIndex: i32 = 0; sliceIndex < GTAO_SLICE_COUNT; sliceIndex++) {\n let angle = rotation + f32(sliceIndex) * GTAO_PI / f32(GTAO_SLICE_COUNT);\n let direction = vec2f(cos(angle), sin(angle));\n let sliceSampleCoord = clamp(sceneCoord + direction / depthDimensions, vec2f(0.0), vec2f(1.0));\n let slicePosition = gtaoEvaluate_reconstructViewPosition(sliceSampleCoord, depth);\n let sliceDelta = slicePosition - centerPosition;\n if (length(sliceDelta) <= 0.00001) {\n continue;\n }\n let slicePlaneNormal = normalize(cross(sliceDelta, viewDirection));\n let sliceDirection = normalize(cross(viewDirection, slicePlaneNormal));\n let projectedNormal = normal - slicePlaneNormal * dot(normal, slicePlaneNormal);\n let projectedNormalLength = length(projectedNormal);\n if (projectedNormalLength <= 0.00001) {\n continue;\n }\n let normalizedProjectedNormal = projectedNormal / projectedNormalLength;\n let normalAngle = atan2(\n dot(normalizedProjectedNormal, sliceDirection),\n dot(normalizedProjectedNormal, viewDirection)\n );\n let positiveHorizon = gtaoEvaluate_sampleHorizon(\n centerPosition,\n viewDirection,\n sliceDirection,\n sceneCoord,\n direction,\n 1.0,\n radiusPixels,\n depthDimensions,\n radialJitter\n );\n let negativeHorizon = gtaoEvaluate_sampleHorizon(\n centerPosition,\n viewDirection,\n sliceDirection,\n sceneCoord,\n direction,\n -1.0,\n radiusPixels,\n depthDimensions,\n radialJitter\n );\n let sliceVisibility = gtaoEvaluate_integrateSlice(\n negativeHorizon,\n positiveHorizon,\n normalAngle\n );\n accumulatedVisibility += sliceVisibility * projectedNormalLength;\n accumulatedWeight += projectedNormalLength;\n }\n\n let integratedVisibility = accumulatedVisibility / max(accumulatedWeight, 0.0001);\n let visibility = clamp(\n 1.0 - (1.0 - integratedVisibility) * gtaoEvaluate.intensity,\n 0.0,\n 1.0\n );\n return vec4f(vec3f(visibility), 1.0);\n}";
|
|
572
|
+
readonly bindingLayout: readonly [{
|
|
573
|
+
readonly name: "depthTexture";
|
|
574
|
+
readonly group: 0;
|
|
575
|
+
}, {
|
|
576
|
+
readonly name: "normalTexture";
|
|
577
|
+
readonly group: 0;
|
|
578
|
+
}];
|
|
579
|
+
readonly props: Partial<GTAOEvaluateUniforms> & GTAOBindings;
|
|
580
|
+
readonly uniforms: GTAOEvaluateUniforms;
|
|
581
|
+
readonly bindings: GTAOBindings;
|
|
582
|
+
readonly uniformTypes: {
|
|
583
|
+
readonly projectionMatrix: "mat4x4<f32>";
|
|
584
|
+
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
585
|
+
readonly radius: "f32";
|
|
586
|
+
readonly bias: "f32";
|
|
587
|
+
readonly intensity: "f32";
|
|
588
|
+
readonly frameIndex: "f32";
|
|
589
|
+
};
|
|
590
|
+
readonly propTypes: {
|
|
591
|
+
readonly projectionMatrix: {
|
|
592
|
+
readonly value: Matrix4;
|
|
593
|
+
readonly private: true;
|
|
594
|
+
};
|
|
595
|
+
readonly inverseProjectionMatrix: {
|
|
596
|
+
readonly value: Matrix4;
|
|
597
|
+
readonly private: true;
|
|
598
|
+
};
|
|
599
|
+
readonly radius: {
|
|
600
|
+
readonly value: 2.2;
|
|
601
|
+
readonly min: 0.1;
|
|
602
|
+
readonly softMax: 8;
|
|
603
|
+
};
|
|
604
|
+
readonly bias: {
|
|
605
|
+
readonly value: 0.04;
|
|
606
|
+
readonly min: 0;
|
|
607
|
+
readonly softMax: 0.25;
|
|
608
|
+
};
|
|
609
|
+
readonly intensity: {
|
|
610
|
+
readonly value: 3.2;
|
|
611
|
+
readonly min: 0;
|
|
612
|
+
readonly softMax: 8;
|
|
613
|
+
};
|
|
614
|
+
readonly frameIndex: {
|
|
615
|
+
readonly value: 0;
|
|
616
|
+
readonly private: true;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
readonly passes: [{
|
|
620
|
+
readonly sampler: true;
|
|
621
|
+
}];
|
|
622
|
+
};
|
|
623
|
+
readonly inputs: {
|
|
624
|
+
readonly sourceTexture: "previous";
|
|
625
|
+
};
|
|
626
|
+
readonly output: "gtaoRaw";
|
|
627
|
+
}, {
|
|
628
|
+
readonly kind: "fullscreen";
|
|
629
|
+
readonly shaderPass: {
|
|
630
|
+
readonly name: "gtaoTemporal";
|
|
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}";
|
|
632
|
+
readonly bindingLayout: readonly [{
|
|
633
|
+
readonly name: "historyTexture";
|
|
634
|
+
readonly group: 0;
|
|
635
|
+
}, {
|
|
636
|
+
readonly name: "velocityTexture";
|
|
637
|
+
readonly group: 0;
|
|
638
|
+
}, {
|
|
639
|
+
readonly name: "depthTexture";
|
|
640
|
+
readonly group: 0;
|
|
641
|
+
}, {
|
|
642
|
+
readonly name: "previousDepthTexture";
|
|
643
|
+
readonly group: 0;
|
|
644
|
+
}];
|
|
645
|
+
readonly props: Partial<GTAOTemporalUniforms> & GTAOTemporalBindings;
|
|
646
|
+
readonly uniforms: GTAOTemporalUniforms;
|
|
647
|
+
readonly bindings: GTAOTemporalBindings;
|
|
648
|
+
readonly uniformTypes: {
|
|
649
|
+
readonly inverseProjectionMatrix: "mat4x4<f32>";
|
|
650
|
+
readonly historyWeight: "f32";
|
|
651
|
+
readonly depthThreshold: "f32";
|
|
652
|
+
readonly currentJitter: "vec2<f32>";
|
|
653
|
+
readonly previousJitter: "vec2<f32>";
|
|
654
|
+
};
|
|
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
|
+
};
|
|
664
|
+
readonly inverseProjectionMatrix: {
|
|
665
|
+
readonly value: Matrix4;
|
|
666
|
+
readonly private: true;
|
|
667
|
+
};
|
|
668
|
+
readonly historyWeight: {
|
|
669
|
+
readonly value: 0.88;
|
|
670
|
+
readonly min: 0;
|
|
671
|
+
readonly max: 0.97;
|
|
672
|
+
};
|
|
673
|
+
readonly depthThreshold: {
|
|
674
|
+
readonly value: 0.015;
|
|
675
|
+
readonly min: 0.0001;
|
|
676
|
+
readonly softMax: 0.1;
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
readonly passes: [{
|
|
680
|
+
readonly sampler: true;
|
|
681
|
+
}];
|
|
682
|
+
};
|
|
683
|
+
readonly inputs: {
|
|
684
|
+
readonly sourceTexture: "gtaoRaw";
|
|
685
|
+
readonly historyTexture: "gtaoHistory";
|
|
686
|
+
readonly previousDepthTexture: "gtaoHistoryDepth";
|
|
687
|
+
};
|
|
688
|
+
readonly output: "gtaoHistory";
|
|
689
|
+
}, {
|
|
690
|
+
readonly kind: "fullscreen";
|
|
691
|
+
readonly shaderPass: {
|
|
692
|
+
readonly name: "gtaoDepthHistoryCopy";
|
|
693
|
+
readonly source: "@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn gtaoDepthHistoryCopy_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let depth = textureSample(depthTexture, depthTextureSampler, texCoord);\n return vec4f(depth, 0.0, 0.0, 1.0);\n}";
|
|
694
|
+
readonly bindingLayout: readonly [{
|
|
695
|
+
readonly name: "depthTexture";
|
|
696
|
+
readonly group: 0;
|
|
697
|
+
}];
|
|
698
|
+
readonly passes: [{
|
|
699
|
+
readonly sampler: true;
|
|
700
|
+
}];
|
|
701
|
+
};
|
|
702
|
+
readonly inputs: {
|
|
703
|
+
readonly sourceTexture: "previous";
|
|
704
|
+
};
|
|
705
|
+
readonly output: "gtaoHistoryDepth";
|
|
706
|
+
}, {
|
|
707
|
+
readonly kind: "fullscreen";
|
|
708
|
+
readonly shaderPass: {
|
|
709
|
+
readonly name: "depthAwareBlur";
|
|
710
|
+
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
711
|
+
readonly bindingLayout: readonly [{
|
|
712
|
+
readonly name: "depthTexture";
|
|
713
|
+
readonly group: 0;
|
|
714
|
+
}];
|
|
715
|
+
readonly props: import("./depth-aware-blur").DepthAwareBlurProps & {
|
|
716
|
+
depthTexture?: Texture;
|
|
717
|
+
};
|
|
718
|
+
readonly uniforms: Required<import("./depth-aware-blur").DepthAwareBlurProps>;
|
|
719
|
+
readonly bindings: {
|
|
720
|
+
depthTexture?: Texture;
|
|
721
|
+
};
|
|
722
|
+
readonly uniformTypes: {
|
|
723
|
+
readonly direction: "vec2<f32>";
|
|
724
|
+
readonly radius: "f32";
|
|
725
|
+
readonly depthSigma: "f32";
|
|
726
|
+
readonly spatialSigma: "f32";
|
|
727
|
+
};
|
|
728
|
+
readonly propTypes: {
|
|
729
|
+
readonly direction: {
|
|
730
|
+
readonly value: readonly [1, 0];
|
|
731
|
+
};
|
|
732
|
+
readonly radius: {
|
|
733
|
+
readonly value: 4;
|
|
734
|
+
readonly min: 1;
|
|
735
|
+
readonly max: 8;
|
|
736
|
+
};
|
|
737
|
+
readonly depthSigma: {
|
|
738
|
+
readonly value: 0.01;
|
|
739
|
+
readonly min: 0.0001;
|
|
740
|
+
readonly softMax: 0.1;
|
|
741
|
+
};
|
|
742
|
+
readonly spatialSigma: {
|
|
743
|
+
readonly value: 3;
|
|
744
|
+
readonly min: 0.1;
|
|
745
|
+
readonly softMax: 8;
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
readonly passes: [{
|
|
749
|
+
readonly sampler: true;
|
|
750
|
+
}];
|
|
751
|
+
};
|
|
752
|
+
readonly inputs: {
|
|
753
|
+
readonly sourceTexture: "gtaoHistory";
|
|
754
|
+
};
|
|
755
|
+
readonly output: "gtaoScratch";
|
|
756
|
+
readonly uniforms: {
|
|
757
|
+
readonly direction: readonly [1, 0];
|
|
758
|
+
readonly radius: 3;
|
|
759
|
+
readonly spatialSigma: 2.5;
|
|
760
|
+
readonly depthSigma: 0.008;
|
|
761
|
+
};
|
|
762
|
+
}, {
|
|
763
|
+
readonly kind: "fullscreen";
|
|
764
|
+
readonly shaderPass: {
|
|
765
|
+
readonly name: "depthAwareBlur";
|
|
766
|
+
readonly source: "struct depthAwareBlurUniforms {\n direction: vec2f,\n radius: f32,\n depthSigma: f32,\n spatialSigma: f32,\n};\n\n@group(0) @binding(auto) var<uniform> depthAwareBlur: depthAwareBlurUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n\nfn depthAwareBlur_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let sourceDimensions = vec2f(textureDimensions(sourceTexture));\n let texel = depthAwareBlur.direction / sourceDimensions;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, texCoord);\n var color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var totalWeight = 1.0;\n for (var index: i32 = 1; index <= 8; index++) {\n if (f32(index) > depthAwareBlur.radius) { break; }\n let offset = texel * f32(index);\n for (var side: i32 = -1; side <= 1; side += 2) {\n let sampleUv = clamp(texCoord + offset * f32(side), vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let spatialWeight = exp(-f32(index * index) / max(2.0 * depthAwareBlur.spatialSigma * depthAwareBlur.spatialSigma, 0.0001));\n let depthDelta = abs(sampleDepth - centerDepth);\n let depthWeight = exp(-(depthDelta * depthDelta) / max(2.0 * depthAwareBlur.depthSigma * depthAwareBlur.depthSigma, 0.000001));\n let weight = spatialWeight * depthWeight;\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n }\n return color / totalWeight;\n}\n";
|
|
767
|
+
readonly bindingLayout: readonly [{
|
|
768
|
+
readonly name: "depthTexture";
|
|
769
|
+
readonly group: 0;
|
|
770
|
+
}];
|
|
771
|
+
readonly props: import("./depth-aware-blur").DepthAwareBlurProps & {
|
|
772
|
+
depthTexture?: Texture;
|
|
773
|
+
};
|
|
774
|
+
readonly uniforms: Required<import("./depth-aware-blur").DepthAwareBlurProps>;
|
|
775
|
+
readonly bindings: {
|
|
776
|
+
depthTexture?: Texture;
|
|
777
|
+
};
|
|
778
|
+
readonly uniformTypes: {
|
|
779
|
+
readonly direction: "vec2<f32>";
|
|
780
|
+
readonly radius: "f32";
|
|
781
|
+
readonly depthSigma: "f32";
|
|
782
|
+
readonly spatialSigma: "f32";
|
|
783
|
+
};
|
|
784
|
+
readonly propTypes: {
|
|
785
|
+
readonly direction: {
|
|
786
|
+
readonly value: readonly [1, 0];
|
|
787
|
+
};
|
|
788
|
+
readonly radius: {
|
|
789
|
+
readonly value: 4;
|
|
790
|
+
readonly min: 1;
|
|
791
|
+
readonly max: 8;
|
|
792
|
+
};
|
|
793
|
+
readonly depthSigma: {
|
|
794
|
+
readonly value: 0.01;
|
|
795
|
+
readonly min: 0.0001;
|
|
796
|
+
readonly softMax: 0.1;
|
|
797
|
+
};
|
|
798
|
+
readonly spatialSigma: {
|
|
799
|
+
readonly value: 3;
|
|
800
|
+
readonly min: 0.1;
|
|
801
|
+
readonly softMax: 8;
|
|
802
|
+
};
|
|
803
|
+
};
|
|
804
|
+
readonly passes: [{
|
|
805
|
+
readonly sampler: true;
|
|
806
|
+
}];
|
|
807
|
+
};
|
|
808
|
+
readonly inputs: {
|
|
809
|
+
readonly sourceTexture: "gtaoScratch";
|
|
810
|
+
};
|
|
811
|
+
readonly output: "gtaoBlurred";
|
|
812
|
+
readonly uniforms: {
|
|
813
|
+
readonly direction: readonly [0, 1];
|
|
814
|
+
readonly radius: 3;
|
|
815
|
+
readonly spatialSigma: 2.5;
|
|
816
|
+
readonly depthSigma: 0.008;
|
|
817
|
+
};
|
|
818
|
+
}, {
|
|
819
|
+
readonly kind: "fullscreen";
|
|
820
|
+
readonly shaderPass: {
|
|
821
|
+
readonly name: "gtaoComposite";
|
|
822
|
+
readonly source: "struct GTAOCompositeUniforms {\n strength: f32,\n debugMode: f32,\n};\n\n@group(0) @binding(auto) var<uniform> gtaoComposite: GTAOCompositeUniforms;\n@group(0) @binding(auto) var ambientOcclusionTexture: texture_2d<f32>;\n@group(0) @binding(auto) var ambientOcclusionTextureSampler: sampler;\n\nfn gtaoComposite_sampleColor(\n sourceTexture: texture_2d<f32>,\n sourceTextureSampler: sampler,\n texSize: vec2f,\n texCoord: vec2f\n) -> vec4f {\n let color = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n let visibility = textureSample(\n ambientOcclusionTexture,\n ambientOcclusionTextureSampler,\n texCoord\n ).r;\n if (gtaoComposite.debugMode > 0.5) {\n return vec4f(vec3f(visibility), 1.0);\n }\n let ambientVisibility = mix(1.0, visibility, clamp(gtaoComposite.strength, 0.0, 1.0));\n return vec4f(color.rgb * ambientVisibility, color.a);\n}";
|
|
823
|
+
readonly bindingLayout: readonly [{
|
|
824
|
+
readonly name: "ambientOcclusionTexture";
|
|
825
|
+
readonly group: 0;
|
|
826
|
+
}];
|
|
827
|
+
readonly props: Partial<GTAOCompositeUniforms>;
|
|
828
|
+
readonly uniforms: GTAOCompositeUniforms;
|
|
829
|
+
readonly uniformTypes: {
|
|
830
|
+
readonly strength: "f32";
|
|
831
|
+
readonly debugMode: "f32";
|
|
832
|
+
};
|
|
833
|
+
readonly propTypes: {
|
|
834
|
+
readonly strength: {
|
|
835
|
+
readonly value: 0.68;
|
|
836
|
+
readonly min: 0;
|
|
837
|
+
readonly max: 1;
|
|
838
|
+
};
|
|
839
|
+
readonly debugMode: {
|
|
840
|
+
readonly value: 0;
|
|
841
|
+
readonly min: 0;
|
|
842
|
+
readonly max: 1;
|
|
843
|
+
readonly private: true;
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
readonly passes: [{
|
|
847
|
+
readonly sampler: true;
|
|
848
|
+
}];
|
|
849
|
+
};
|
|
850
|
+
readonly inputs: {
|
|
851
|
+
readonly sourceTexture: "previous";
|
|
852
|
+
readonly ambientOcclusionTexture: "gtaoBlurred";
|
|
853
|
+
};
|
|
854
|
+
readonly output: "previous";
|
|
855
|
+
}];
|
|
856
|
+
};
|
|
221
857
|
export {};
|
|
222
858
|
//# sourceMappingURL=gtao.d.ts.map
|