@luma.gl/engine 10.0.0-rc.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +7 -0
- package/dist/dist.dev.js +106 -37
- package/dist/dist.min.js +51 -51
- package/dist/effects/graph/gpu-effect-operation.cjs +79 -20
- package/dist/effects/graph/gpu-effect-operation.d.ts +44 -18
- package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -1
- package/dist/effects/graph/gpu-effect-operation.js +72 -8
- package/dist/effects/graph/gpu-effect-operation.js.map +1 -1
- package/dist/effects/index.cjs +62 -4
- package/dist/effects/index.cjs.map +3 -3
- package/dist/effects/index.d.ts +34 -13
- package/dist/effects/index.d.ts.map +1 -1
- package/dist/effects/index.js +23 -3
- package/dist/effects/index.js.map +1 -1
- package/dist/effects/passes/postprocessing/detail/detail-blur.cjs +95 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts +126 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js +63 -0
- package/dist/effects/passes/postprocessing/detail/detail-blur.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.cjs +80 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts +183 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js +59 -0
- package/dist/effects/passes/postprocessing/detail/high-pass.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.cjs +81 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts +163 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js +57 -0
- package/dist/effects/passes/postprocessing/detail/local-contrast.js.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.cjs +73 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts +43 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js +46 -0
- package/dist/effects/passes/postprocessing/detail/unsharp-mask.js.map +1 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
- package/dist/effects/passes/postprocessing/grading/curves.cjs +91 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts +54 -0
- package/dist/effects/passes/postprocessing/grading/curves.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/curves.js +73 -0
- package/dist/effects/passes/postprocessing/grading/curves.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.cjs +71 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts +76 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js +50 -0
- package/dist/effects/passes/postprocessing/grading/lift-gamma-gain.js.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.cjs +160 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts +232 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js +138 -0
- package/dist/effects/passes/postprocessing/grading/shadows-highlights.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.cjs +84 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.cjs +106 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts +105 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/levels.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.cjs +327 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts +201 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js +296 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.cjs +85 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts +36 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js +59 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/output-dithering.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.cjs +58 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts +27 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js +45 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/persistence.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.cjs +64 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts +48 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js +42 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/posterize.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.cjs +110 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts +214 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js +89 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sharpen.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.cjs +62 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts +47 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js +40 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/threshold.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +6 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts +2 -2
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.cjs +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts +7 -7
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js +8 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/gaussianblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/tiltshift.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/triangleblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/zoomblur.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/colorhalftone.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/dotscreen.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/edgework.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/ink.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-fun-filters/magnify.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/bulgepinch.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.cjs +79 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts +59 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js +63 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/displacement-map.js.map +1 -0
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/swirl.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-warp-filters/warp.js.map +1 -1
- package/dist/effects/passes/postprocessing/layer-styles/bevel.cjs +100 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts +73 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js +78 -0
- package/dist/effects/passes/postprocessing/layer-styles/bevel.js.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.cjs +180 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts +152 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js +157 -0
- package/dist/effects/passes/postprocessing/layer-styles/drop-shadow.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.cjs +67 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts +181 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js +52 -0
- package/dist/effects/passes/postprocessing/optical/lens-flare.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.cjs +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts +138 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js +119 -0
- package/dist/effects/passes/postprocessing/optical/light-shafts.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.cjs +104 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts +43 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js +69 -0
- package/dist/effects/passes/postprocessing/optical/optical-textures.js.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.cjs +64 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts +190 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js +49 -0
- package/dist/effects/passes/postprocessing/optical/selective-glow.js.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.cjs +279 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts +95 -0
- package/dist/effects/passes/postprocessing/smaa.d.ts.map +1 -0
- package/dist/effects/passes/postprocessing/smaa.js +253 -0
- package/dist/effects/passes/postprocessing/smaa.js.map +1 -0
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.cjs +18 -4
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +28 -5
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +17 -3
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.js.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.cjs +0 -7
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +0 -106
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.js +0 -6
- package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/dof.cjs +2 -9
- package/dist/effects/passes/screen-space/dof.d.ts +1 -123
- package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/dof.js +1 -7
- package/dist/effects/passes/screen-space/dof.js.map +1 -1
- package/dist/effects/passes/screen-space/gtao.cjs +11 -2
- package/dist/effects/passes/screen-space/gtao.d.ts +37 -6
- package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/gtao.js +11 -2
- package/dist/effects/passes/screen-space/gtao.js.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts +2 -2
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.js.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/outlines.d.ts +2 -2
- package/dist/effects/passes/screen-space/outlines.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/outlines.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.cjs +12 -2
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +26 -5
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js +12 -2
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.cjs +14 -2
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +26 -5
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.js +14 -2
- package/dist/effects/passes/screen-space/screen-space-reflections.js.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.js.map +1 -1
- package/dist/effects/passes/screen-space/ssao.d.ts +2 -2
- package/dist/effects/passes/screen-space/ssao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssao.js.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssr-camera-temporal.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts +2 -2
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.js.map +1 -1
- package/dist/effects/scene-effect-attachments.cjs +15 -0
- package/dist/effects/scene-effect-attachments.d.ts +23 -0
- package/dist/effects/scene-effect-attachments.d.ts.map +1 -0
- package/dist/effects/scene-effect-attachments.js +5 -0
- package/dist/effects/scene-effect-attachments.js.map +1 -0
- package/dist/graph/models/index.cjs.map +1 -1
- package/dist/graph/physics/index.cjs.map +1 -1
- package/dist/graph/tables/index.cjs.map +1 -1
- package/dist/index.cjs +0 -3
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/lighting/clustered-light-grid.cjs +2 -6
- package/dist/lighting/clustered-light-grid.d.ts +1 -5
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
- package/dist/lighting/clustered-light-grid.js +2 -6
- package/dist/lighting/clustered-light-grid.js.map +1 -1
- package/dist/lighting/contact-shadow-composite.cjs +8 -8
- package/dist/lighting/contact-shadow-composite.d.ts +10 -22
- package/dist/lighting/contact-shadow-composite.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-composite.js +8 -8
- package/dist/lighting/contact-shadow-composite.js.map +1 -1
- package/dist/lighting/contact-shadow-pass.cjs +6 -6
- package/dist/lighting/contact-shadow-pass.js +6 -6
- package/dist/lighting/contact-shadow-pass.js.map +1 -1
- package/dist/lighting/index.cjs.map +3 -3
- package/dist/lighting/index.d.ts +2 -2
- package/dist/lighting/index.d.ts.map +1 -1
- package/dist/lighting/index.js.map +1 -1
- package/dist/passes/effect-renderer.cjs +43 -8
- package/dist/passes/effect-renderer.d.ts +41 -17
- package/dist/passes/effect-renderer.d.ts.map +1 -1
- package/dist/passes/effect-renderer.js +47 -8
- package/dist/passes/effect-renderer.js.map +1 -1
- package/dist/passes/{shader-pass-renderer.cjs → fullscreen-effect-executor.cjs} +39 -28
- package/dist/passes/{shader-pass-renderer.d.ts → fullscreen-effect-executor.d.ts} +48 -37
- package/dist/passes/fullscreen-effect-executor.d.ts.map +1 -0
- package/dist/passes/{shader-pass-renderer.js → fullscreen-effect-executor.js} +30 -26
- package/dist/passes/fullscreen-effect-executor.js.map +1 -0
- package/dist/passes/fullscreen-effect-module.cjs +15 -0
- package/dist/passes/fullscreen-effect-module.d.ts +47 -0
- package/dist/passes/fullscreen-effect-module.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-module.js +5 -0
- package/dist/passes/fullscreen-effect-module.js.map +1 -0
- package/dist/passes/fullscreen-effect-plan.cjs +15 -0
- package/dist/passes/fullscreen-effect-plan.d.ts +49 -0
- package/dist/passes/fullscreen-effect-plan.d.ts.map +1 -0
- package/dist/passes/fullscreen-effect-plan.js +5 -0
- package/dist/passes/fullscreen-effect-plan.js.map +1 -0
- package/dist/passes/get-fragment-shader.cjs +3 -0
- package/dist/passes/get-fragment-shader.d.ts +2 -2
- package/dist/passes/get-fragment-shader.d.ts.map +1 -1
- package/dist/passes/get-fragment-shader.js +3 -0
- package/dist/passes/get-fragment-shader.js.map +1 -1
- package/dist/shader-inputs.cjs +1 -1
- package/dist/shader-inputs.d.ts +1 -1
- package/dist/shader-inputs.js +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts +1 -0
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.js +1 -0
- package/dist/text/fonts/atlas/browser-font-atlas.js.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.cjs +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/build-sdf-font-atlas.js +4 -2
- package/dist/text/fonts/build-sdf-font-atlas.js.map +1 -1
- package/dist/text/fonts/index.cjs +2 -0
- package/dist/text/fonts/index.cjs.map +1 -1
- package/dist/text/fonts/index.d.ts +1 -1
- package/dist/text/fonts/index.d.ts.map +1 -1
- package/dist/text/fonts/index.js +1 -1
- package/dist/text/fonts/index.js.map +1 -1
- package/dist/text/index.cjs.map +1 -1
- package/dist/utils/shader-module-utils.cjs +3 -0
- package/dist/utils/shader-module-utils.d.ts.map +1 -1
- package/dist/utils/shader-module-utils.js +3 -0
- package/dist/utils/shader-module-utils.js.map +1 -1
- package/licenses/smaa.txt +24 -0
- package/package.json +6 -6
- package/src/effects/README.md +2 -2
- package/src/effects/graph/gpu-effect-operation.ts +152 -33
- package/src/effects/index.ts +85 -14
- package/src/effects/passes/postprocessing/detail/detail-blur.ts +77 -0
- package/src/effects/passes/postprocessing/detail/high-pass.ts +86 -0
- package/src/effects/passes/postprocessing/detail/local-contrast.ts +79 -0
- package/src/effects/passes/postprocessing/detail/unsharp-mask.ts +56 -0
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +2 -2
- package/src/effects/passes/postprocessing/grading/curves.ts +83 -0
- package/src/effects/passes/postprocessing/grading/lift-gamma-gain.ts +68 -0
- package/src/effects/passes/postprocessing/grading/shadows-highlights.ts +169 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/chromatic-aberration.ts +68 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/denoise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/huesaturation.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/levels.ts +111 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/lut-color-grading.ts +347 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/noise.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/output-dithering.ts +69 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/pack-color-lut.ts +67 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/persistence.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/posterize.ts +52 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/sepia.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/sharpen.ts +112 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/threshold.ts +50 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vibrance.ts +2 -2
- package/src/effects/passes/postprocessing/image-adjust-filters/vignette.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +21 -17
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-lens-effects.ts +13 -11
- package/src/effects/passes/postprocessing/image-blur-filters/bloom.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/gaussianblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/tiltshift.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/triangleblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-blur-filters/zoomblur.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/colorhalftone.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/dotscreen.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/edgework.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/hexagonalpixelate.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/ink.ts +2 -2
- package/src/effects/passes/postprocessing/image-fun-filters/magnify.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/bulgepinch.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/displacement-map.ts +74 -0
- package/src/effects/passes/postprocessing/image-warp-filters/swirl.ts +2 -2
- package/src/effects/passes/postprocessing/image-warp-filters/warp.ts +2 -2
- package/src/effects/passes/postprocessing/layer-styles/bevel.ts +92 -0
- package/src/effects/passes/postprocessing/layer-styles/drop-shadow.ts +176 -0
- package/src/effects/passes/postprocessing/optical/lens-flare.ts +64 -0
- package/src/effects/passes/postprocessing/optical/light-shafts.ts +139 -0
- package/src/effects/passes/postprocessing/optical/optical-textures.ts +74 -0
- package/src/effects/passes/postprocessing/optical/selective-glow.ts +62 -0
- package/src/effects/passes/postprocessing/smaa.ts +265 -0
- package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +3 -3
- package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +28 -12
- package/src/effects/passes/screen-space/copy-pass.ts +2 -2
- package/src/effects/passes/screen-space/depth-aware-blur.ts +2 -9
- package/src/effects/passes/screen-space/dof.ts +12 -11
- package/src/effects/passes/screen-space/gtao.ts +22 -12
- package/src/effects/passes/screen-space/hdr-auto-exposure.ts +8 -8
- package/src/effects/passes/screen-space/height-fog.ts +3 -3
- package/src/effects/passes/screen-space/motion-blur.ts +2 -2
- package/src/effects/passes/screen-space/outlines.ts +6 -6
- package/src/effects/passes/screen-space/screen-space-global-illumination.ts +23 -12
- package/src/effects/passes/screen-space/screen-space-reflections.ts +24 -12
- package/src/effects/passes/screen-space/selection-outline.ts +2 -2
- package/src/effects/passes/screen-space/ssao.ts +6 -6
- package/src/effects/passes/screen-space/ssr-camera-temporal.ts +4 -4
- package/src/effects/passes/screen-space/temporal-antialiasing.ts +3 -3
- package/src/effects/passes/screen-space/volumetric-fog.ts +5 -5
- package/src/effects/scene-effect-attachments.ts +26 -0
- package/src/index.ts +3 -6
- package/src/lighting/clustered-light-grid.ts +2 -10
- package/src/lighting/contact-shadow-composite.ts +11 -11
- package/src/lighting/contact-shadow-pass.ts +6 -6
- package/src/lighting/index.ts +2 -3
- package/src/passes/effect-renderer.ts +106 -34
- package/src/passes/{shader-pass-renderer.ts → fullscreen-effect-executor.ts} +115 -75
- package/src/passes/fullscreen-effect-module.ts +71 -0
- package/src/passes/fullscreen-effect-plan.ts +59 -0
- package/src/passes/get-fragment-shader.ts +7 -2
- package/src/shader-inputs.ts +1 -1
- package/src/text/fonts/atlas/browser-font-atlas.ts +1 -0
- package/src/text/fonts/build-sdf-font-atlas.ts +4 -2
- package/src/text/fonts/index.ts +1 -0
- package/src/utils/shader-module-utils.ts +3 -0
- package/dist/passes/shader-pass-renderer.d.ts.map +0 -1
- package/dist/passes/shader-pass-renderer.js.map +0 -1
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
type EffectDefinition
|
|
8
8
|
} from '../../../passes/effect-renderer';
|
|
9
9
|
import type {Texture} from '@luma.gl/core';
|
|
10
|
-
import type {
|
|
10
|
+
import type {FullscreenEffectModule} from '../../../passes/fullscreen-effect-module';
|
|
11
11
|
import type {NumberArray16} from '@math.gl/core/types';
|
|
12
|
+
import {temporalMotionReprojectionWGSL, type TemporalFrameJitter} from './temporal-frame';
|
|
12
13
|
import {temporalHelpers} from './screen-space-shader-helpers';
|
|
13
14
|
import {
|
|
14
15
|
ssrCameraTemporal,
|
|
@@ -26,7 +27,7 @@ export const SSR_QUALITY_PRESETS = {
|
|
|
26
27
|
} as const;
|
|
27
28
|
|
|
28
29
|
/** Construction options for temporally stabilized screen-space reflections. */
|
|
29
|
-
export type
|
|
30
|
+
export type SSREffectOptions = {
|
|
30
31
|
/** Fractional ray-tracing, history, and denoising resolution. Defaults to full resolution. */
|
|
31
32
|
resolutionScale?: number;
|
|
32
33
|
/** Optional workload preset. Omission preserves the original pass defaults. */
|
|
@@ -46,7 +47,7 @@ type SSRTraceUniforms = {
|
|
|
46
47
|
frameIndex: number;
|
|
47
48
|
};
|
|
48
49
|
|
|
49
|
-
type SSRTemporalUniforms = {
|
|
50
|
+
type SSRTemporalUniforms = TemporalFrameJitter & {
|
|
50
51
|
inverseProjectionMatrix: Readonly<NumberArray16>;
|
|
51
52
|
historyWeight: number;
|
|
52
53
|
depthThreshold: number;
|
|
@@ -277,7 +278,7 @@ fn ssrTrace_sampleColor(
|
|
|
277
278
|
frameIndex: {value: 0, private: true}
|
|
278
279
|
},
|
|
279
280
|
passes: [{sampler: true}]
|
|
280
|
-
} as const satisfies
|
|
281
|
+
} as const satisfies FullscreenEffectModule<
|
|
281
282
|
Partial<SSRTraceUniforms> & SSRTraceBindings,
|
|
282
283
|
SSRTraceUniforms,
|
|
283
284
|
SSRTraceBindings
|
|
@@ -288,10 +289,13 @@ export const ssrTemporal = {
|
|
|
288
289
|
name: 'ssrTemporal',
|
|
289
290
|
source: /* wgsl */ `\
|
|
290
291
|
${temporalHelpers}
|
|
292
|
+
${temporalMotionReprojectionWGSL}
|
|
291
293
|
struct SSRTemporalUniforms {
|
|
292
294
|
inverseProjectionMatrix: mat4x4f,
|
|
293
295
|
historyWeight: f32,
|
|
294
296
|
depthThreshold: f32,
|
|
297
|
+
currentJitter: vec2f,
|
|
298
|
+
previousJitter: vec2f,
|
|
295
299
|
};
|
|
296
300
|
|
|
297
301
|
@group(0) @binding(auto) var<uniform> ssrTemporal: SSRTemporalUniforms;
|
|
@@ -316,8 +320,12 @@ fn ssrTemporal_sampleColor(
|
|
|
316
320
|
return vec4f(0.0);
|
|
317
321
|
}
|
|
318
322
|
|
|
323
|
+
if (ssrTemporal.historyWeight <= 0.0) { return current; }
|
|
324
|
+
|
|
319
325
|
let velocity = textureSampleLevel(velocityTexture, velocityTextureSampler, texCoord, 0).xy;
|
|
320
|
-
let previousCoord =
|
|
326
|
+
let previousCoord = temporal_reprojectMotion(
|
|
327
|
+
texCoord - ssrTemporal.currentJitter, velocity
|
|
328
|
+
) + ssrTemporal.previousJitter;
|
|
321
329
|
let validCoordinate = all(previousCoord >= vec2f(0.0)) &&
|
|
322
330
|
all(previousCoord <= vec2f(1.0));
|
|
323
331
|
let clampedPreviousCoord = clamp(previousCoord, vec2f(0.0), vec2f(1.0));
|
|
@@ -371,15 +379,19 @@ fn ssrTemporal_sampleColor(
|
|
|
371
379
|
uniformTypes: {
|
|
372
380
|
inverseProjectionMatrix: 'mat4x4<f32>',
|
|
373
381
|
historyWeight: 'f32',
|
|
374
|
-
depthThreshold: 'f32'
|
|
382
|
+
depthThreshold: 'f32',
|
|
383
|
+
currentJitter: 'vec2<f32>',
|
|
384
|
+
previousJitter: 'vec2<f32>'
|
|
375
385
|
},
|
|
376
386
|
propTypes: {
|
|
387
|
+
currentJitter: {value: [0, 0], private: true},
|
|
388
|
+
previousJitter: {value: [0, 0], private: true},
|
|
377
389
|
inverseProjectionMatrix: {value: IDENTITY_MATRIX, private: true},
|
|
378
390
|
historyWeight: {value: 0.86, min: 0, max: 0.97},
|
|
379
391
|
depthThreshold: {value: 0.018, min: 0.0001, softMax: 0.1}
|
|
380
392
|
},
|
|
381
393
|
passes: [{sampler: true}]
|
|
382
|
-
} as const satisfies
|
|
394
|
+
} as const satisfies FullscreenEffectModule<
|
|
383
395
|
Partial<SSRTemporalUniforms> & SSRTemporalBindings,
|
|
384
396
|
SSRTemporalUniforms,
|
|
385
397
|
SSRTemporalBindings
|
|
@@ -403,7 +415,7 @@ fn ssrDepthHistoryCopy_sampleColor(
|
|
|
403
415
|
}`,
|
|
404
416
|
bindingLayout: [{name: 'depthTexture', group: 0}],
|
|
405
417
|
passes: [{sampler: true}]
|
|
406
|
-
} as const satisfies
|
|
418
|
+
} as const satisfies FullscreenEffectModule;
|
|
407
419
|
|
|
408
420
|
/** Applies roughness-adaptive, depth/normal-aware reflection denoising in one direction. */
|
|
409
421
|
export const ssrSpatial = {
|
|
@@ -522,7 +534,7 @@ fn ssrSpatial_sampleColor(
|
|
|
522
534
|
depthSigma: {value: 0.035, min: 0.0001, softMax: 0.2}
|
|
523
535
|
},
|
|
524
536
|
passes: [{sampler: true}]
|
|
525
|
-
} as const satisfies
|
|
537
|
+
} as const satisfies FullscreenEffectModule<
|
|
526
538
|
Partial<SSRSpatialUniforms> & SSRSpatialBindings,
|
|
527
539
|
SSRSpatialUniforms,
|
|
528
540
|
SSRSpatialBindings
|
|
@@ -648,14 +660,14 @@ fn ssrComposite_sampleColor(
|
|
|
648
660
|
depthSigma: {value: 0.04, min: 0.0001, softMax: 0.2}
|
|
649
661
|
},
|
|
650
662
|
passes: [{sampler: true}]
|
|
651
|
-
} as const satisfies
|
|
663
|
+
} as const satisfies FullscreenEffectModule<
|
|
652
664
|
Partial<SSRCompositeUniforms> & SSRCompositeBindings,
|
|
653
665
|
SSRCompositeUniforms,
|
|
654
666
|
SSRCompositeBindings
|
|
655
667
|
>;
|
|
656
668
|
|
|
657
669
|
/** Creates a roughness-aware, temporally stabilized screen-space reflection pipeline. */
|
|
658
|
-
const ssrOptionDefaults:
|
|
670
|
+
const ssrOptionDefaults: SSREffectOptions = {reprojection: 'velocity'};
|
|
659
671
|
/** Targets shared by the reflection passes, with velocity history as the default. */
|
|
660
672
|
const ssrTargets = {
|
|
661
673
|
ssrRaw: {scale: [1, 1], format: 'rgba16float'},
|
|
@@ -814,4 +826,4 @@ export const ssr = {
|
|
|
814
826
|
}
|
|
815
827
|
}
|
|
816
828
|
}
|
|
817
|
-
} as const satisfies ConfigurableEffectDefinition<
|
|
829
|
+
} as const satisfies ConfigurableEffectDefinition<SSREffectOptions>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import type {ConfigurableEffectDefinition} from '../../../passes/effect-renderer';
|
|
6
|
-
import type {
|
|
6
|
+
import type {FullscreenEffectModule} from '../../../passes/fullscreen-effect-module';
|
|
7
7
|
|
|
8
8
|
export type SelectionOutlineProps = {
|
|
9
9
|
color?: [number, number, number, number];
|
|
@@ -66,7 +66,7 @@ vec4 selectionOutline_sampleColor(sampler2D sourceTexture, vec2 sourceSize, vec2
|
|
|
66
66
|
uniformTypes: {color: 'vec4<f32>', thickness: 'f32'},
|
|
67
67
|
defaultUniforms: {color: [0.12, 1, 0.7, 0.9], thickness: 2},
|
|
68
68
|
passes: [{sampler: true}]
|
|
69
|
-
} as const satisfies
|
|
69
|
+
} as const satisfies FullscreenEffectModule<SelectionOutlineProps, SelectionOutlineUniforms>;
|
|
70
70
|
|
|
71
71
|
/** Selection mask outline with optional color and thickness defaults. */
|
|
72
72
|
export const selectionOutlineEffect = {
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
} from '../../../passes/effect-renderer';
|
|
9
9
|
|
|
10
10
|
import type {Texture} from '@luma.gl/core';
|
|
11
|
-
import type {
|
|
11
|
+
import type {FullscreenEffectModule} from '../../../passes/fullscreen-effect-module';
|
|
12
12
|
import {depthAwareBlur} from './depth-aware-blur';
|
|
13
13
|
import {depthHelpers} from './screen-space-shader-helpers';
|
|
14
14
|
|
|
15
|
-
export type
|
|
15
|
+
export type SSAOEffectOptions = {
|
|
16
16
|
normalSource?: 'reconstruct-from-depth' | 'normal-texture';
|
|
17
17
|
/** Fractional intermediate framebuffer resolution. Defaults to full resolution. */
|
|
18
18
|
resolutionScale?: number;
|
|
@@ -102,7 +102,7 @@ export const ssaoEvaluate = {
|
|
|
102
102
|
useNormalTexture: {value: 0, min: 0, max: 1, private: true}
|
|
103
103
|
},
|
|
104
104
|
passes: [{sampler: true}]
|
|
105
|
-
} as const satisfies
|
|
105
|
+
} as const satisfies FullscreenEffectModule;
|
|
106
106
|
|
|
107
107
|
export const ssaoComposite = {
|
|
108
108
|
name: 'ssaoComposite',
|
|
@@ -127,7 +127,7 @@ fn ssaoComposite_sampleColor(
|
|
|
127
127
|
uniformTypes: {debugMode: 'f32'},
|
|
128
128
|
propTypes: {debugMode: {value: 0, min: 0, max: 1, private: true}},
|
|
129
129
|
passes: [{sampler: true}]
|
|
130
|
-
} as const satisfies
|
|
130
|
+
} as const satisfies FullscreenEffectModule;
|
|
131
131
|
|
|
132
132
|
/** SSAO with normals reconstructed from the scene depth input. */
|
|
133
133
|
export const ssao = {
|
|
@@ -168,7 +168,7 @@ export const ssao = {
|
|
|
168
168
|
]
|
|
169
169
|
} as const satisfies EffectDefinition<'ssaoRaw' | 'ssaoScratch' | 'ssaoBlurred'>;
|
|
170
170
|
|
|
171
|
-
const ssaoOptionDefaults: Required<
|
|
171
|
+
const ssaoOptionDefaults: Required<SSAOEffectOptions> = {
|
|
172
172
|
normalSource: 'reconstruct-from-depth',
|
|
173
173
|
resolutionScale: 1
|
|
174
174
|
};
|
|
@@ -195,6 +195,6 @@ export const ssaoEffect = {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
} as const satisfies ConfigurableEffectDefinition<
|
|
198
|
-
|
|
198
|
+
SSAOEffectOptions,
|
|
199
199
|
'ssaoRaw' | 'ssaoScratch' | 'ssaoBlurred'
|
|
200
200
|
>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import type {Texture} from '@luma.gl/core';
|
|
6
|
-
import type {
|
|
6
|
+
import type {FullscreenEffectModule} from '../../../passes/fullscreen-effect-module';
|
|
7
7
|
import type {NumberArray16} from '@math.gl/core/types';
|
|
8
8
|
import {temporalHelpers} from './screen-space-shader-helpers';
|
|
9
9
|
|
|
@@ -129,7 +129,7 @@ fn ssrCameraTemporal_sampleColor(
|
|
|
129
129
|
normalThreshold: {value: 0.96, min: -1, max: 1}
|
|
130
130
|
},
|
|
131
131
|
passes: [{sampler: true}]
|
|
132
|
-
} as const satisfies
|
|
132
|
+
} as const satisfies FullscreenEffectModule<
|
|
133
133
|
Partial<SSRCameraTemporalUniforms> & SSRCameraTemporalBindings,
|
|
134
134
|
SSRCameraTemporalUniforms,
|
|
135
135
|
SSRCameraTemporalBindings
|
|
@@ -150,7 +150,7 @@ fn ssrNormalHistoryCopy_sampleColor(
|
|
|
150
150
|
}`,
|
|
151
151
|
bindingLayout: [{name: 'normalTexture', group: 0}],
|
|
152
152
|
passes: [{sampler: true}]
|
|
153
|
-
} as const satisfies
|
|
153
|
+
} as const satisfies FullscreenEffectModule;
|
|
154
154
|
|
|
155
155
|
/** Preserves 24-bit device depth in a portable rgba8unorm reflection-history texture. */
|
|
156
156
|
export const ssrCameraDepthHistoryCopy = {
|
|
@@ -169,4 +169,4 @@ fn ssrCameraDepthHistoryCopy_sampleColor(
|
|
|
169
169
|
}`,
|
|
170
170
|
bindingLayout: [{name: 'depthTexture', group: 0}],
|
|
171
171
|
passes: [{sampler: true}]
|
|
172
|
-
} as const satisfies
|
|
172
|
+
} as const satisfies FullscreenEffectModule;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {type EffectDefinition} from '../../../passes/effect-renderer';
|
|
6
|
-
import type {
|
|
6
|
+
import type {FullscreenEffectModule} from '../../../passes/fullscreen-effect-module';
|
|
7
7
|
import {copyPass} from './copy-pass';
|
|
8
8
|
import {temporalMotionReprojectionWGSL, type TemporalFrameJitter} from './temporal-frame';
|
|
9
9
|
|
|
@@ -78,7 +78,7 @@ fn taaResolve_sampleColor(
|
|
|
78
78
|
previousJitter: {value: [0, 0], private: true}
|
|
79
79
|
},
|
|
80
80
|
passes: [{sampler: true}]
|
|
81
|
-
} as const satisfies
|
|
81
|
+
} as const satisfies FullscreenEffectModule;
|
|
82
82
|
|
|
83
83
|
export const depthHistoryCopy = {
|
|
84
84
|
name: 'depthHistoryCopy',
|
|
@@ -90,7 +90,7 @@ fn depthHistoryCopy_sampleColor(
|
|
|
90
90
|
) -> vec4f { let depth = textureSample(depthTexture, depthTextureSampler, texCoord); return vec4f(depth, 0.0, 0.0, 1.0); }`,
|
|
91
91
|
bindingLayout: [{name: 'depthTexture', group: 0}],
|
|
92
92
|
passes: [{sampler: true}]
|
|
93
|
-
} as const satisfies
|
|
93
|
+
} as const satisfies FullscreenEffectModule;
|
|
94
94
|
|
|
95
95
|
/** Temporal antialiasing with scene velocity and separate color and depth history. */
|
|
96
96
|
export const taa = {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {type ConfigurableEffectDefinition} from '../../../passes/effect-renderer';
|
|
6
|
-
import type {
|
|
6
|
+
import type {FullscreenEffectModule} from '../../../passes/fullscreen-effect-module';
|
|
7
7
|
import {copyPass} from './copy-pass';
|
|
8
8
|
import {heightFog} from './height-fog';
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type VolumetricFogEffectOptions = {
|
|
11
11
|
/** Existing stylized screen-space fog, or analytic metre-space height fog without history. */
|
|
12
12
|
mode?: 'screen-space' | 'height';
|
|
13
13
|
};
|
|
@@ -78,10 +78,10 @@ fn volumetricFog_sampleColor(
|
|
|
78
78
|
time: {value: 0, private: true}
|
|
79
79
|
},
|
|
80
80
|
passes: [{sampler: true}]
|
|
81
|
-
} as const satisfies
|
|
81
|
+
} as const satisfies FullscreenEffectModule;
|
|
82
82
|
|
|
83
83
|
/** Default to the screen-space fog pass with temporal history. */
|
|
84
|
-
const volumetricFogOptionDefaults: Required<
|
|
84
|
+
const volumetricFogOptionDefaults: Required<VolumetricFogEffectOptions> = {
|
|
85
85
|
mode: 'screen-space'
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -105,4 +105,4 @@ export const volumetricFog = {
|
|
|
105
105
|
output: 'previous'
|
|
106
106
|
}
|
|
107
107
|
]
|
|
108
|
-
} as const satisfies ConfigurableEffectDefinition<
|
|
108
|
+
} as const satisfies ConfigurableEffectDefinition<VolumetricFogEffectOptions>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Named scene textures consumed by fullscreen effects.
|
|
7
|
+
*
|
|
8
|
+
* Use borrowed textures with EffectRenderer or GPUSimpleGraph, graph texture
|
|
9
|
+
* views with GPUCommandGraph, and logical texture names with GPUGraph.
|
|
10
|
+
* Destructure color as the input and pass the remaining properties as bindings.
|
|
11
|
+
* Supply the optional fields required by the selected effect stack.
|
|
12
|
+
*/
|
|
13
|
+
export type SceneEffectAttachments<TextureBinding, ColorBinding = TextureBinding> = {
|
|
14
|
+
/** Scene color in the effect chain's working color space. */
|
|
15
|
+
color: ColorBinding;
|
|
16
|
+
/** Sampleable hardware depth from the projection used to render color. */
|
|
17
|
+
depthTexture?: TextureBinding;
|
|
18
|
+
/** View-space unit normal encoded in RGB as normal * 0.5 + 0.5, with roughness in A. */
|
|
19
|
+
normalTexture?: TextureBinding;
|
|
20
|
+
/** Current-minus-previous unjittered top-left UV motion in RG at render resolution. */
|
|
21
|
+
velocityTexture?: TextureBinding;
|
|
22
|
+
/** Selection coverage in R. Resolve discrete object IDs before constructing this mask. */
|
|
23
|
+
selectionTexture?: TextureBinding;
|
|
24
|
+
/** Sampleable exposure state, in the format required by its consumer. */
|
|
25
|
+
exposureTexture?: TextureBinding;
|
|
26
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -202,12 +202,9 @@ export {DynamicBuffer} from './dynamic-buffer/dynamic-buffer';
|
|
|
202
202
|
|
|
203
203
|
// EXPERIMENTAL
|
|
204
204
|
export type {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
ShaderPassSourceTexture
|
|
209
|
-
} from './passes/shader-pass-renderer';
|
|
210
|
-
export {ShaderPassRenderer} from './passes/shader-pass-renderer';
|
|
205
|
+
EffectInputSource,
|
|
206
|
+
EffectResource
|
|
207
|
+
} from './passes/fullscreen-effect-module';
|
|
211
208
|
export type {
|
|
212
209
|
ConfigurableEffectDefinition,
|
|
213
210
|
EffectDefinition,
|
|
@@ -16,9 +16,6 @@ export const CLUSTERED_POINT_LIGHT_LAYOUT = Object.freeze({
|
|
|
16
16
|
payloadByteOffset: 16
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
/** Compatibility name for the renderer-independent uniform snapshot. */
|
|
20
|
-
export type ClusteredLightGridShaderPassUniforms = ClusteredLightGridUniforms;
|
|
21
|
-
|
|
22
19
|
export const MAX_CLUSTERED_POINT_LIGHTS = 512;
|
|
23
20
|
export const DEFAULT_CLUSTER_DIMENSIONS = [16, 9, 24] as const;
|
|
24
21
|
export const DEFAULT_MAX_LIGHTS_PER_CLUSTER = 64;
|
|
@@ -287,20 +284,15 @@ export class ClusteredLightGrid {
|
|
|
287
284
|
};
|
|
288
285
|
}
|
|
289
286
|
|
|
290
|
-
/** Compatibility accessor for shader-pass consumers. */
|
|
291
|
-
getShaderPassBindings(): ClusteredLightGridBindings {
|
|
292
|
-
return this.getBindings();
|
|
293
|
-
}
|
|
294
|
-
|
|
295
287
|
/** Returns a snapshot matching the latest encode. Encode before requesting uniforms. */
|
|
296
288
|
getUniforms(): ClusteredLightGridUniforms {
|
|
297
289
|
// A grid must be encoded before its camera/depth metadata can be consumed.
|
|
298
290
|
assert(!this.destroyed && this.depthRange);
|
|
299
|
-
return this.
|
|
291
|
+
return this.getUniformsForDepthRange(this.depthRange[0], this.depthRange[1]);
|
|
300
292
|
}
|
|
301
293
|
|
|
302
294
|
/** Returns the scalar uniforms available to lighting consumers. */
|
|
303
|
-
|
|
295
|
+
getUniformsForDepthRange(nearPlane: number, farPlane: number): ClusteredLightGridUniforms {
|
|
304
296
|
assert(!this.destroyed);
|
|
305
297
|
validateDepthRange(nearPlane, farPlane);
|
|
306
298
|
return {
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
import {SHADOW_QUALITY_SETTINGS} from './shadow-quality';
|
|
13
13
|
|
|
14
14
|
/** Builds the quality-scaled trace, bilateral cleanup, and direct-light composite pipeline. */
|
|
15
|
-
export type
|
|
15
|
+
export type ContactShadowEffectOptions = {quality?: 'low' | 'balanced' | 'cinematic'};
|
|
16
16
|
|
|
17
17
|
/** Use the balanced contact shadow preset by default. */
|
|
18
|
-
const contactShadowOptionDefaults: Required<
|
|
18
|
+
const contactShadowOptionDefaults: Required<ContactShadowEffectOptions> = {
|
|
19
19
|
quality: 'balanced'
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -60,28 +60,28 @@ export const contactShadows = {
|
|
|
60
60
|
},
|
|
61
61
|
passes: [
|
|
62
62
|
{
|
|
63
|
-
kind: '
|
|
64
|
-
|
|
63
|
+
kind: 'sample' as const,
|
|
64
|
+
module: contactShadowTrace,
|
|
65
65
|
inputs: {sourceTexture: 'previous'},
|
|
66
66
|
output: 'contactShadowRaw'
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
kind: '
|
|
70
|
-
|
|
69
|
+
kind: 'sample' as const,
|
|
70
|
+
module: contactShadowBilateralBlur,
|
|
71
71
|
inputs: {sourceTexture: 'contactShadowRaw'},
|
|
72
72
|
output: 'contactShadowScratch',
|
|
73
73
|
uniforms: {direction: [1, 0]}
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
kind: '
|
|
77
|
-
|
|
76
|
+
kind: 'sample' as const,
|
|
77
|
+
module: contactShadowBilateralBlur,
|
|
78
78
|
inputs: {sourceTexture: 'contactShadowScratch'},
|
|
79
79
|
output: 'contactShadowFiltered',
|
|
80
80
|
uniforms: {direction: [0, 1]}
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
|
-
kind: '
|
|
84
|
-
|
|
83
|
+
kind: 'sample' as const,
|
|
84
|
+
module: contactShadowComposite,
|
|
85
85
|
inputs: {
|
|
86
86
|
sourceTexture: 'previous',
|
|
87
87
|
contactShadowTexture: 'contactShadowFiltered'
|
|
@@ -90,6 +90,6 @@ export const contactShadows = {
|
|
|
90
90
|
}
|
|
91
91
|
]
|
|
92
92
|
} as const satisfies ConfigurableEffectDefinition<
|
|
93
|
-
|
|
93
|
+
ContactShadowEffectOptions,
|
|
94
94
|
'contactShadowRaw' | 'contactShadowScratch' | 'contactShadowFiltered'
|
|
95
95
|
>;
|
|
@@ -53,22 +53,22 @@ function configureContactShadowVisibility(
|
|
|
53
53
|
},
|
|
54
54
|
passes: [
|
|
55
55
|
{
|
|
56
|
-
kind: '
|
|
57
|
-
|
|
56
|
+
kind: 'sample',
|
|
57
|
+
module: contactShadowTrace,
|
|
58
58
|
inputs: {sourceTexture: 'original'},
|
|
59
59
|
output: 'contactShadowRaw',
|
|
60
60
|
uniforms: {stepCount: settings.contactStepCount}
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
kind: '
|
|
64
|
-
|
|
63
|
+
kind: 'sample',
|
|
64
|
+
module: contactShadowBilateralBlur,
|
|
65
65
|
inputs: {sourceTexture: 'contactShadowRaw'},
|
|
66
66
|
output: 'contactShadowScratch',
|
|
67
67
|
uniforms: {direction: [1, 0]}
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
kind: '
|
|
71
|
-
|
|
70
|
+
kind: 'sample',
|
|
71
|
+
module: contactShadowBilateralBlur,
|
|
72
72
|
inputs: {sourceTexture: 'contactShadowScratch'},
|
|
73
73
|
output: 'previous',
|
|
74
74
|
uniforms: {direction: [0, 1]}
|
package/src/lighting/index.ts
CHANGED
|
@@ -62,7 +62,7 @@ export type {
|
|
|
62
62
|
PBRSurfaceRenderView
|
|
63
63
|
} from './pbr-surface-pass';
|
|
64
64
|
|
|
65
|
-
export type {
|
|
65
|
+
export type {ContactShadowEffectOptions} from './contact-shadow-composite';
|
|
66
66
|
export {contactShadows} from './contact-shadow-composite';
|
|
67
67
|
|
|
68
68
|
export {ContactShadowPass, contactShadowVisibilityEffect} from './contact-shadow-pass';
|
|
@@ -80,8 +80,7 @@ export type {
|
|
|
80
80
|
ClusteredLightGridProps,
|
|
81
81
|
ClusteredLightGridEncodeOptions,
|
|
82
82
|
ClusteredLightGridBindings,
|
|
83
|
-
ClusteredLightGridUniforms
|
|
84
|
-
ClusteredLightGridShaderPassUniforms
|
|
83
|
+
ClusteredLightGridUniforms
|
|
85
84
|
} from './clustered-light-grid';
|
|
86
85
|
export {AmbientOcclusionPass, ambientOcclusionVisibilityEffect} from './ambient-occlusion-pass';
|
|
87
86
|
export type {
|