@forgeax/engine-render 0.1.32 → 0.1.34
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/README.md +1374 -142
- package/dist/assembly/analytic-fog-registration.d.ts +3 -0
- package/dist/assembly/analytic-fog-registration.d.ts.map +1 -0
- package/dist/assembly/backend-contract.d.ts +2 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -1
- package/dist/assembly/barrel-distortion-inspection.d.ts +3 -0
- package/dist/assembly/barrel-distortion-inspection.d.ts.map +1 -0
- package/dist/assembly/canvas-draw-guard.d.ts +3 -0
- package/dist/assembly/canvas-draw-guard.d.ts.map +1 -0
- package/dist/assembly/cloud-shadow-entry.d.ts +4 -0
- package/dist/assembly/cloud-shadow-entry.d.ts.map +1 -0
- package/dist/assembly/dynamic-geometry-host.d.ts +4 -1
- package/dist/assembly/dynamic-geometry-host.d.ts.map +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts.map +1 -1
- package/dist/assembly/factory.d.ts +1 -1
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/fxaa-registration.d.ts +4 -0
- package/dist/assembly/fxaa-registration.d.ts.map +1 -0
- package/dist/assembly/host-contract.d.ts +3 -3
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/lod-observation.d.ts +4 -0
- package/dist/assembly/lod-observation.d.ts.map +1 -0
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/pipeline-helpers.d.ts +5 -0
- package/dist/assembly/material/pipeline-helpers.d.ts.map +1 -1
- package/dist/assembly/material-shader-policy.d.ts +16 -2
- package/dist/assembly/material-shader-policy.d.ts.map +1 -1
- package/dist/assembly/material-shader-prewarm.d.ts.map +1 -1
- package/dist/assembly/motion-blur-registration.d.ts +3 -0
- package/dist/assembly/motion-blur-registration.d.ts.map +1 -0
- package/dist/assembly/recovery/device-loss-fanout.d.ts.map +1 -1
- package/dist/assembly/recovery/renderer-recover.d.ts +2 -0
- package/dist/assembly/recovery/renderer-recover.d.ts.map +1 -1
- package/dist/assembly/render-feature-post-processes.d.ts +6 -0
- package/dist/assembly/render-feature-post-processes.d.ts.map +1 -0
- package/dist/assembly/renderer-facade.d.ts.map +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts.map +1 -1
- package/dist/assembly/renderer-frame-transaction.d.ts +12 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -1
- package/dist/assembly/renderer-inspection.d.ts +11 -0
- package/dist/assembly/renderer-inspection.d.ts.map +1 -1
- package/dist/assembly/temporal-post-process-prewarm.d.ts +13 -0
- package/dist/assembly/temporal-post-process-prewarm.d.ts.map +1 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts +1 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-ready-contract.d.ts +4 -3
- package/dist/assembly/webgpu-ready-contract.d.ts.map +1 -1
- package/dist/assembly/webgpu-ready-per-pass.d.ts +39 -0
- package/dist/assembly/webgpu-ready-per-pass.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready.d.ts +2 -2
- package/dist/assembly/webgpu-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-bootstrap.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-observation-owner.d.ts +35 -0
- package/dist/assembly/webgpu-renderer-observation-owner.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer.d.ts +1 -1
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
- package/dist/authoring.mjs +1 -1
- package/dist/barrel-distortion.d.ts +47 -0
- package/dist/barrel-distortion.d.ts.map +1 -0
- package/dist/bloom-admission.d.ts +13 -0
- package/dist/bloom-admission.d.ts.map +1 -0
- package/dist/{chunk-PA5DRJNI.mjs → chunk-ELJFJ2BU.mjs} +2 -2
- package/dist/chunk-ELJFJ2BU.mjs.map +1 -0
- package/dist/{chunk-JCIRYQ4V.mjs → chunk-HEB564WF.mjs} +10 -4
- package/dist/chunk-HEB564WF.mjs.map +1 -0
- package/dist/{chunk-JRIPCMYC.mjs → chunk-MKDIT2EM.mjs} +1584 -375
- package/dist/chunk-MKDIT2EM.mjs.map +1 -0
- package/dist/{chunk-S665NJNF.mjs → chunk-OCDLEI6I.mjs} +3 -3
- package/dist/{chunk-S665NJNF.mjs.map → chunk-OCDLEI6I.mjs.map} +1 -1
- package/dist/chunk-ODZWR6JQ.mjs +4927 -0
- package/dist/chunk-ODZWR6JQ.mjs.map +1 -0
- package/dist/{chunk-DRR7D3KX.mjs → chunk-SHFUFJ5N.mjs} +192 -18
- package/dist/chunk-SHFUFJ5N.mjs.map +1 -0
- package/dist/{chunk-4NNZQCL3.mjs → chunk-UI5SFODX.mjs} +223 -277
- package/dist/chunk-UI5SFODX.mjs.map +1 -0
- package/dist/{chunk-GWCEMDVR.mjs → chunk-UINHLCZA.mjs} +787 -80
- package/dist/chunk-UINHLCZA.mjs.map +1 -0
- package/dist/{chunk-6TFBXLRJ.mjs → chunk-WEX45HKH.mjs} +222 -337
- package/dist/chunk-WEX45HKH.mjs.map +1 -0
- package/dist/cloud/density.d.ts +55 -0
- package/dist/cloud/density.d.ts.map +1 -0
- package/dist/cloud/extract.d.ts +25 -0
- package/dist/cloud/extract.d.ts.map +1 -0
- package/dist/cloud/feature.d.ts +57 -0
- package/dist/cloud/feature.d.ts.map +1 -0
- package/dist/cloud/frame-context.d.ts +8 -0
- package/dist/cloud/frame-context.d.ts.map +1 -0
- package/dist/cloud/inspection.d.ts +59 -0
- package/dist/cloud/inspection.d.ts.map +1 -0
- package/dist/cloud/optics.d.ts +56 -0
- package/dist/cloud/optics.d.ts.map +1 -0
- package/dist/cloud/parameters.d.ts +73 -0
- package/dist/cloud/parameters.d.ts.map +1 -0
- package/dist/cloud/resources.d.ts +60 -0
- package/dist/cloud/resources.d.ts.map +1 -0
- package/dist/cloud/shadow.d.ts +42 -0
- package/dist/cloud/shadow.d.ts.map +1 -0
- package/dist/cloud/temporal.d.ts +74 -0
- package/dist/cloud/temporal.d.ts.map +1 -0
- package/dist/components/atmosphere.d.ts +2 -0
- package/dist/components/atmosphere.d.ts.map +1 -1
- package/dist/components/barrel-distortion.d.ts +13 -0
- package/dist/components/barrel-distortion.d.ts.map +1 -0
- package/dist/components/camera.d.ts +20 -4
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/cloud-layer.d.ts +29 -0
- package/dist/components/cloud-layer.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/instances.d.ts +20 -6
- package/dist/components/instances.d.ts.map +1 -1
- package/dist/components/mesh-filter.d.ts +6 -5
- package/dist/components/mesh-filter.d.ts.map +1 -1
- package/dist/components/motion-blur.d.ts +1 -0
- package/dist/components/motion-blur.d.ts.map +1 -1
- package/dist/construct-renderer.d.ts +1 -1
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +9751 -3528
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/gpu-residency.d.ts +6 -0
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/dynamic-geometry.d.ts +5 -1
- package/dist/dynamic-geometry.d.ts.map +1 -1
- package/dist/environment/analytic-fog.d.ts +6 -0
- package/dist/environment/analytic-fog.d.ts.map +1 -0
- package/dist/errors/cloud.d.ts +59 -0
- package/dist/errors/cloud.d.ts.map +1 -0
- package/dist/errors/render.d.ts +23 -5
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/examples/single-layer-medium-surface.d.ts +47 -0
- package/dist/examples/single-layer-medium-surface.d.ts.map +1 -0
- package/dist/extract/camera.d.ts.map +1 -1
- package/dist/extract/contracts.d.ts +12 -1
- package/dist/extract/contracts.d.ts.map +1 -1
- package/dist/extract/environment.d.ts +2 -0
- package/dist/extract/environment.d.ts.map +1 -1
- package/dist/features/barrel-distortion.d.ts +29 -0
- package/dist/features/barrel-distortion.d.ts.map +1 -0
- package/dist/features/error-reporting.d.ts +17 -0
- package/dist/features/error-reporting.d.ts.map +1 -0
- package/dist/features/host.d.ts +15 -0
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-feature.d.ts +20 -2
- package/dist/features/motion-blur/motion-blur-feature.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-params.d.ts +21 -0
- package/dist/features/motion-blur/motion-blur-params.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-runtime.d.ts +54 -0
- package/dist/features/motion-blur/motion-blur-runtime.d.ts.map +1 -0
- package/dist/features/plan.d.ts +15 -4
- package/dist/features/plan.d.ts.map +1 -1
- package/dist/features/prepared-gpu-work.d.ts +9 -5
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/render-graph-compute.d.ts.map +1 -1
- package/dist/features/render-graph-contribution.d.ts +5 -0
- package/dist/features/render-graph-contribution.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +1 -0
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/targets.d.ts +2 -0
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +44 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +15 -7
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/gpu-dirty-ranges.d.ts +11 -0
- package/dist/gpu-dirty-ranges.d.ts.map +1 -0
- package/dist/gpu-driven/batch-topology.d.ts +17 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
- package/dist/gpu-driven/material-artifacts.d.ts +6 -0
- package/dist/gpu-driven/material-artifacts.d.ts.map +1 -1
- package/dist/gpu-driven/prepared-draw.d.ts +7 -0
- package/dist/gpu-driven/prepared-draw.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster-material.d.ts +178 -0
- package/dist/gpu-driven/production-raster-material.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +50 -4
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-driven/resource-allocation.d.ts +31 -0
- package/dist/gpu-driven/resource-allocation.d.ts.map +1 -0
- package/dist/gpu-driven/shadow-ownership.d.ts +14 -0
- package/dist/gpu-driven/shadow-ownership.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +35 -2
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +11 -1
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +2 -2
- package/dist/hdrp-buffers.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +10 -1
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +31 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +258 -8
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +178 -3
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/instance-buffer-cache.d.ts +4 -4
- package/dist/instance-buffer-cache.d.ts.map +1 -1
- package/dist/instances.d.ts +49 -94
- package/dist/instances.d.ts.map +1 -1
- package/dist/internal.mjs +7 -7
- package/dist/pbr-pipeline.d.ts +19 -1
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/single-layer-medium-passes.d.ts +73 -0
- package/dist/pipeline/single-layer-medium-passes.d.ts.map +1 -0
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-output/graph.d.ts.map +1 -1
- package/dist/pipeline/standard-output/types.d.ts +4 -2
- package/dist/pipeline/standard-output/types.d.ts.map +1 -1
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts +28 -19
- package/dist/pipeline/standard-post.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +1 -1
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/prepare/prepared-graphics-resolver.d.ts +2 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -1
- package/dist/record/barrel-distortion-frame.d.ts +15 -0
- package/dist/record/barrel-distortion-frame.d.ts.map +1 -0
- package/dist/record/dynamic-geometry-consumption.d.ts +10 -2
- package/dist/record/dynamic-geometry-consumption.d.ts.map +1 -1
- package/dist/record/fold-buckets.d.ts +95 -0
- package/dist/record/fold-buckets.d.ts.map +1 -0
- package/dist/record/fold-instance-buffer.d.ts +6 -0
- package/dist/record/fold-instance-buffer.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +1 -0
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +40 -3
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame-targets.d.ts.map +1 -1
- package/dist/record/frame.d.ts +14 -62
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/gpu-draw-receipts.d.ts +11 -0
- package/dist/record/gpu-draw-receipts.d.ts.map +1 -0
- package/dist/record/gpu-timing.d.ts +8 -0
- package/dist/record/gpu-timing.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +21 -5
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +7 -1
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +13 -2
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts +6 -5
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/motion-blur-receipt.d.ts +11 -0
- package/dist/record/motion-blur-receipt.d.ts.map +1 -0
- package/dist/record/probe-blend-buffer.d.ts +16 -0
- package/dist/record/probe-blend-buffer.d.ts.map +1 -0
- package/dist/record/recovery-pipeline.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +34 -31
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts +2 -0
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/skybox-post-pass.d.ts +6 -4
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +22 -2
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +11 -3
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/record/volume-params.d.ts +9 -0
- package/dist/record/volume-params.d.ts.map +1 -0
- package/dist/recovery/render-system-candidate.d.ts +10 -0
- package/dist/recovery/render-system-candidate.d.ts.map +1 -1
- package/dist/reflection/record-owner.d.ts.map +1 -1
- package/dist/render-contract.d.ts +66 -8
- package/dist/render-contract.d.ts.map +1 -1
- package/dist/render-graph-primitives.d.ts.map +1 -1
- package/dist/render-pipeline.d.ts +106 -3
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +3 -2
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +24 -10
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system-presentation.d.ts +23 -0
- package/dist/render-system-presentation.d.ts.map +1 -0
- package/dist/render-system-producer-roots.d.ts +10 -0
- package/dist/render-system-producer-roots.d.ts.map +1 -0
- package/dist/render-system-residency.d.ts +12 -0
- package/dist/render-system-residency.d.ts.map +1 -0
- package/dist/render-system.d.ts +26 -15
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/probe-blend.d.ts +27 -0
- package/dist/scene/probe-blend.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +14 -5
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/ssao-buffers.d.ts +9 -0
- package/dist/ssao-buffers.d.ts.map +1 -1
- package/dist/surface/dynamic-input.d.ts +133 -0
- package/dist/surface/dynamic-input.d.ts.map +1 -0
- package/dist/surface/gpu-driven.d.ts +41 -0
- package/dist/surface/gpu-driven.d.ts.map +1 -0
- package/dist/surface/submission-observation.d.ts +136 -0
- package/dist/surface/submission-observation.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -1
- package/dist/temporal/frame-coordinator.d.ts.map +1 -1
- package/dist/temporal/frame.d.ts +7 -0
- package/dist/temporal/frame.d.ts.map +1 -1
- package/dist/temporal/gpu.d.ts +13 -1
- package/dist/temporal/gpu.d.ts.map +1 -1
- package/dist/temporal/index.mjs +5 -5
- package/dist/temporal/inspection.d.ts.map +1 -1
- package/dist/temporal/standard-scene-data.d.ts.map +1 -1
- package/dist/temporal/target-coverage-attachment.d.ts.map +1 -1
- package/dist/temporal/view.d.ts +6 -1
- package/dist/temporal/view.d.ts.map +1 -1
- package/dist/transmission/single-layer-medium.d.ts +89 -0
- package/dist/transmission/single-layer-medium.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +24 -9
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/volume/component.d.ts +9 -5
- package/dist/volume/component.d.ts.map +1 -1
- package/dist/volume/extract.d.ts +1 -1
- package/dist/volume/extract.d.ts.map +1 -1
- package/dist/volume/inspection.d.ts +2 -0
- package/dist/volume/inspection.d.ts.map +1 -1
- package/dist/volume/passes.d.ts +4 -1
- package/dist/volume/passes.d.ts.map +1 -1
- package/dist/volume/resources.d.ts.map +1 -1
- package/dist/volume/temporal.d.ts +3 -1
- package/dist/volume/temporal.d.ts.map +1 -1
- package/package.json +22 -21
- package/src/__tests__/analytic-fog-graph.unit.test.ts +199 -0
- package/src/__tests__/analytic-fog-optics.unit.test.ts +38 -0
- package/src/__tests__/atmosphere-daylight.dawn.test.ts +72 -0
- package/src/__tests__/barrel-distortion-lkg.integration.test.ts +353 -0
- package/src/__tests__/barrel-distortion.dawn.test.ts +41 -0
- package/src/__tests__/barrel-distortion.unit.test.ts +364 -0
- package/src/__tests__/bloom-exact-zero.unit.test.ts +112 -18
- package/src/__tests__/bloom-lifecycle.integration.test.ts +17 -4
- package/src/__tests__/construct-renderer-identity.unit.test.ts +49 -0
- package/src/__tests__/detached-recovery-graph.unit.test.ts +277 -0
- package/src/__tests__/device-loss-fanout.unit.test.ts +36 -1
- package/src/__tests__/docs-gate-green.unit.test.ts +112 -1
- package/src/__tests__/dynamic-resolution-plugin.integration.test.ts +20 -0
- package/src/__tests__/environment-fog-lanes.integration.test.ts +14 -0
- package/src/__tests__/environment-selection.unit.test.ts +12 -0
- package/src/__tests__/factory-contract.integration.test.ts +626 -113
- package/src/__tests__/feature-depth-input.dawn.test.ts +129 -2
- package/src/__tests__/frame-camera-selection.unit.test.ts +39 -1
- package/src/__tests__/frame-plan-contract.unit.test.ts +2 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +14 -3
- package/src/__tests__/gpu-dirty-ranges.unit.test.ts +22 -0
- package/src/__tests__/gpu-driven-baseline.characterization.test.ts +16 -3
- package/src/__tests__/gpu-driven-batch-topology-pbr.unit.test.ts +12 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +2 -1
- package/src/__tests__/gpu-driven-material-artifacts.unit.test.ts +143 -0
- package/src/__tests__/gpu-driven-pbr.dawn.test.ts +2 -2
- package/src/__tests__/gpu-driven-production.integration.test.ts +482 -3
- package/src/__tests__/gpu-driven-shadow-views.dawn.test.ts +7 -6
- package/src/__tests__/gpu-driven-shadow-views.integration.test.ts +1 -1
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +103 -4
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +18 -2
- package/src/__tests__/gpu-driven-view.browser.test.ts +5 -8
- package/src/__tests__/gpu-driven-view.dawn.test.ts +6 -2
- package/src/__tests__/gpu-driven-view.unit.test.ts +1 -1
- package/src/__tests__/gpu-pass-timing-lifecycle.integration.test.ts +1 -0
- package/src/__tests__/gpu-pass-timing.browser.test.ts +6 -4
- package/src/__tests__/gpu-pass-timing.rhi-null.unit.test.ts +1 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +12 -0
- package/src/__tests__/gpu-scene.unit.test.ts +210 -9
- package/src/__tests__/instance-allocation-failure.unit.test.ts +57 -0
- package/src/__tests__/instances-culling.integration.test.ts +10 -36
- package/src/__tests__/instances-store.unit.test.ts +105 -238
- package/src/__tests__/instances-world-ownership.integration.test.ts +62 -0
- package/src/__tests__/main-pass-material-medium-selection.unit.test.ts +146 -0
- package/src/__tests__/material-shader-prewarm.unit.test.ts +59 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +39 -1
- package/src/__tests__/mesh-submission-lifetime.unit.test.ts +31 -0
- package/src/__tests__/morph-culling-reentry.dawn.test.ts +5 -5
- package/src/__tests__/morph-visual-evidence.integration.test.ts +8 -7
- package/src/__tests__/motion-blur-compute.dawn.test.ts +589 -0
- package/src/__tests__/motion-blur.pixel.integration.test.ts +2 -2
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +4 -4
- package/src/__tests__/pbr-view-layout.unit.test.ts +9 -0
- package/src/__tests__/physical-clearcoat.integration.test.ts +58 -0
- package/src/__tests__/prepared-gpu-driven-pbr.integration.test.ts +21 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +66 -2
- package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +86 -0
- package/src/__tests__/probe-bindings.unit.test.ts +582 -1
- package/src/__tests__/probe-scene-dirty.integration.test.ts +28 -1
- package/src/__tests__/public-surface.test-d.ts +8 -0
- package/src/__tests__/receipt-observation-retirement.unit.test.ts +65 -0
- package/src/__tests__/recovery-candidate-prepare.contract.test.ts +69 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +9 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +15 -2
- package/src/__tests__/render-feature-error-reporting.unit.test.ts +44 -0
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +10 -1
- package/src/__tests__/render-feature-retry.unit.test.ts +12 -1
- package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +23 -0
- package/src/__tests__/render-scene-mixed-updates.integration.test.ts +145 -19
- package/src/__tests__/render-scene-projection.unit.test.ts +36 -11
- package/src/__tests__/render-scene-temporal-retry.unit.test.ts +37 -6
- package/src/__tests__/render-target-probe-soak.perf.test.ts +2 -2
- package/src/__tests__/render-temporal-environment-consumer.browser.test.ts +3 -3
- package/src/__tests__/render-temporal-environment-consumer.dawn.test.ts +5 -2
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +41 -7
- package/src/__tests__/renderer-frame-generation-fence.integration.test.ts +16 -0
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +33 -11
- package/src/__tests__/resource-allocation.unit.test.ts +123 -0
- package/src/__tests__/shader-manifest-fixture.ts +4 -4
- package/src/__tests__/single-layer-medium-passes.unit.test.ts +275 -0
- package/src/__tests__/skin-motion-regression.unit.test.ts +70 -1
- package/src/__tests__/skin-palette-recycling.dawn.test.ts +97 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +17 -0
- package/src/__tests__/ssr-carrier-public-contract.unit.test.ts +21 -0
- package/src/__tests__/ssr-gpu-dispatch.browser.test.ts +4 -4
- package/src/__tests__/ssr-gpu-dispatch.dawn.test.ts +2 -2
- package/src/__tests__/ssr-gpu-dispatch.ts +1 -1
- package/src/__tests__/ssr-receiver-coverage.dawn.test.ts +6 -2
- package/src/__tests__/standard-lighting-write.unit.test.ts +2 -1
- package/src/__tests__/standard-output-chain-contract.unit.test.ts +28 -0
- package/src/__tests__/standard-pbr-artifact-assembly.unit.test.ts +46 -1
- package/src/__tests__/standard-pipeline.dawn.test.ts +1 -1
- package/src/__tests__/standard-pipeline.integration.test.ts +200 -9
- package/src/__tests__/surface-dynamic-buffer-lifecycle.unit.test.ts +506 -0
- package/src/__tests__/surface-submission-observation.unit.test.ts +812 -0
- package/src/__tests__/temporal-history-lifecycle.unit.test.ts +32 -0
- package/src/__tests__/temporal-performance.integration.test.ts +3 -3
- package/src/__tests__/temporal-reset-matrix.unit.test.ts +10 -0
- package/src/__tests__/temporal-view.unit.test.ts +2 -1
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +20 -4
- package/src/__tests__/visibility-instances.integration.test.ts +7 -19
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +9 -20
- package/src/__tests__/volume-optics-oracle.unit.test.ts +7 -3
- package/src/__tests__/volumetric-fog-budget-recovery.integration.test.ts +189 -15
- package/src/__tests__/volumetric-fog-errors.unit.test.ts +4 -3
- package/src/__tests__/volumetric-fog-multiple.unit.test.ts +55 -0
- package/src/__tests__/volumetric-fog-spot-frame-optics.integration.test.ts +1 -1
- package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +558 -68
- package/src/__tests__/volumetric-fog-temporal.unit.test.ts +27 -0
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +23 -5
- package/src/assembly/analytic-fog-registration.ts +14 -0
- package/src/assembly/backend-contract.ts +30 -0
- package/src/assembly/barrel-distortion-inspection.ts +22 -0
- package/src/assembly/canvas-draw-guard.ts +11 -0
- package/src/assembly/cloud-shadow-entry.ts +22 -0
- package/src/assembly/dynamic-geometry-host.ts +65 -37
- package/src/assembly/dynamic-geometry-runtime.ts +7 -1
- package/src/assembly/factory.ts +2 -30
- package/src/assembly/fxaa-registration.ts +17 -0
- package/src/assembly/host-contract.ts +3 -3
- package/src/assembly/lod-observation.ts +12 -0
- package/src/assembly/material/assembly.ts +25 -13
- package/src/assembly/material/pipeline-helpers.ts +53 -12
- package/src/assembly/material-shader-policy.ts +55 -0
- package/src/assembly/material-shader-prewarm.ts +21 -10
- package/src/assembly/motion-blur-registration.ts +17 -0
- package/src/assembly/recovery/device-loss-fanout.ts +13 -0
- package/src/assembly/recovery/renderer-recover.ts +41 -18
- package/src/assembly/render-feature-post-processes.ts +54 -0
- package/src/assembly/renderer-facade.ts +6 -1
- package/src/assembly/renderer-feature-inspection.ts +8 -2
- package/src/assembly/renderer-frame-transaction.ts +23 -0
- package/src/assembly/renderer-inspection.ts +28 -0
- package/src/assembly/skin-palette-owner.ts +1 -1
- package/src/assembly/temporal-post-process-prewarm.ts +40 -0
- package/src/assembly/webgpu-pbr-ready.ts +9 -1
- package/src/assembly/webgpu-ready-contract.ts +8 -3
- package/src/assembly/webgpu-ready-per-pass.ts +104 -0
- package/src/assembly/webgpu-ready.ts +296 -306
- package/src/assembly/webgpu-renderer-bootstrap.ts +0 -12
- package/src/assembly/webgpu-renderer-observation-owner.ts +222 -0
- package/src/assembly/webgpu-renderer.ts +228 -281
- package/src/assembly/webgpu-vertex-layouts.ts +1 -1
- package/src/barrel-distortion.ts +247 -0
- package/src/bloom-admission.ts +21 -0
- package/src/cloud/__tests__/cloud-density-parity.dawn.test.ts +173 -0
- package/src/cloud/__tests__/cloud-layer-framebuffer-y.dawn.test.ts +265 -0
- package/src/cloud/__tests__/cloud-layer.browser.test.ts +432 -0
- package/src/cloud/__tests__/cloud-layer.unit.test.ts +634 -0
- package/src/cloud/density.ts +600 -0
- package/src/cloud/extract.ts +110 -0
- package/src/cloud/feature.ts +1810 -0
- package/src/cloud/frame-context.ts +42 -0
- package/src/cloud/inspection.ts +130 -0
- package/src/cloud/optics.ts +285 -0
- package/src/cloud/parameters.ts +255 -0
- package/src/cloud/resources.ts +122 -0
- package/src/cloud/shadow.ts +167 -0
- package/src/cloud/temporal.ts +226 -0
- package/src/components/__tests__/motion-blur.unit.test.ts +1 -0
- package/src/components/atmosphere.ts +4 -0
- package/src/components/barrel-distortion.ts +46 -0
- package/src/components/camera.ts +66 -10
- package/src/components/cloud-layer.ts +47 -0
- package/src/components/index.ts +2 -0
- package/src/components/instances.ts +18 -45
- package/src/components/mesh-filter.ts +11 -9
- package/src/components/motion-blur.ts +1 -0
- package/src/components/sprite-instances.ts +1 -1
- package/src/construct-renderer.ts +1 -1
- package/src/device/gpu-residency.ts +56 -12
- package/src/dynamic-geometry.ts +12 -1
- package/src/environment/analytic-fog.ts +44 -0
- package/src/environment/background.ts +2 -2
- package/src/errors/cloud.ts +103 -0
- package/src/errors/render.ts +58 -8
- package/src/examples/single-layer-medium-surface.ts +59 -0
- package/src/extract/camera.ts +35 -8
- package/src/extract/contracts.ts +12 -0
- package/src/extract/environment.ts +4 -0
- package/src/features/barrel-distortion.ts +172 -0
- package/src/features/error-reporting.ts +98 -0
- package/src/features/host.ts +138 -24
- package/src/features/motion-blur/__tests__/motion-blur-feature.unit.test.ts +111 -1
- package/src/features/motion-blur/__tests__/motion-blur-params.unit.test.ts +58 -3
- package/src/features/motion-blur/motion-blur-feature.ts +1519 -15
- package/src/features/motion-blur/motion-blur-params.ts +70 -2
- package/src/features/motion-blur/motion-blur-runtime.ts +176 -0
- package/src/features/plan.ts +33 -8
- package/src/features/prepared-gpu-work.ts +86 -35
- package/src/features/render-graph-compute.ts +13 -5
- package/src/features/render-graph-contribution.ts +11 -0
- package/src/features/render-graph-raster.ts +45 -3
- package/src/features/targets.ts +66 -0
- package/src/features/types.ts +47 -0
- package/src/fullscreen-post-process-pass.ts +41 -9
- package/src/gpu-dirty-ranges.ts +48 -0
- package/src/gpu-driven/batch-topology.ts +53 -0
- package/src/gpu-driven/material-artifacts.ts +35 -32
- package/src/gpu-driven/prepared-draw.ts +27 -14
- package/src/gpu-driven/production-raster-material.ts +1894 -0
- package/src/gpu-driven/production-raster.ts +904 -787
- package/src/gpu-driven/resource-allocation.ts +142 -0
- package/src/gpu-driven/shadow-ownership.ts +71 -0
- package/src/gpu-driven/view-gpu.ts +181 -10
- package/src/gpu-scene.ts +259 -101
- package/src/hdrp-buffers.ts +4 -3
- package/src/ibl/skylight-bind-group.ts +49 -7
- package/src/index.ts +228 -9
- package/src/inspection-types.ts +222 -2
- package/src/instance-buffer-cache.ts +4 -4
- package/src/instances.ts +151 -492
- package/src/pbr-pipeline.ts +219 -13
- package/src/pipeline/single-layer-medium-passes.ts +267 -0
- package/src/pipeline/standard-forward-lane.ts +313 -57
- package/src/pipeline/standard-output/graph.ts +8 -2
- package/src/pipeline/standard-output/types.ts +12 -1
- package/src/pipeline/standard-pipeline.ts +291 -18
- package/src/pipeline/standard-post.ts +397 -102
- package/src/pipeline-builder.ts +1 -1
- package/src/pipeline-spec.ts +5 -5
- package/src/plugin.ts +4 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +17 -8
- package/src/points-lines/__tests__/view-ubo.unit.test.ts +2 -1
- package/src/prepare/prepared-graphics-resolver.ts +2 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +30 -0
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +1 -1
- package/src/record/__tests__/temporal-payload.unit.test.ts +3 -2
- package/src/record/__tests__/transparent-group2-selection.unit.test.ts +11 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +1 -0
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +4 -3
- package/src/record/barrel-distortion-frame.ts +110 -0
- package/src/record/dynamic-geometry-consumption.ts +39 -9
- package/src/record/fold-buckets.ts +852 -0
- package/src/record/fold-instance-buffer.ts +51 -0
- package/src/record/frame-lighting.ts +36 -2
- package/src/record/frame-snapshot.ts +44 -4
- package/src/record/frame-targets.ts +10 -6
- package/src/record/frame.ts +373 -1099
- package/src/record/gpu-draw-receipts.ts +38 -0
- package/src/record/gpu-timing.ts +48 -5
- package/src/record/main-pass-geometry.ts +281 -83
- package/src/record/main-pass-material.ts +66 -4
- package/src/record/main-pass-sprite-draws.ts +13 -66
- package/src/record/main-pass.ts +156 -20
- package/src/record/mesh-ssbo.ts +43 -6
- package/src/record/motion-blur-receipt.ts +91 -0
- package/src/record/probe-blend-buffer.ts +180 -0
- package/src/record/recovery-pipeline.ts +35 -3
- package/src/record/render-context.ts +51 -31
- package/src/record/shadow-pass.ts +36 -2
- package/src/record/skybox-post-pass.ts +150 -200
- package/src/record/typed-frame-graph.ts +824 -44
- package/src/record/view-ubo.ts +26 -3
- package/src/record/volume-params.ts +225 -0
- package/src/recovery/render-system-candidate.ts +257 -52
- package/src/reflection/record-owner.ts +7 -3
- package/src/render-contract.ts +71 -8
- package/src/render-graph-primitives.ts +7 -1
- package/src/render-pipeline.ts +136 -1
- package/src/render-system-extract-tail.ts +72 -60
- package/src/render-system-extract.ts +117 -87
- package/src/render-system-presentation.ts +56 -0
- package/src/render-system-producer-roots.ts +96 -0
- package/src/render-system-residency.ts +159 -0
- package/src/render-system.ts +601 -482
- package/src/scene/probe-blend.ts +96 -4
- package/src/scene/render-scene.ts +431 -281
- package/src/ssao-buffers.ts +95 -2
- package/src/surface/__tests__/dynamic-input.unit.test.ts +374 -0
- package/src/surface/__tests__/gpu-driven.unit.test.ts +87 -0
- package/src/surface/dynamic-input.ts +658 -0
- package/src/surface/gpu-driven.ts +147 -0
- package/src/surface/submission-observation.ts +517 -0
- package/src/systems/skin-palette-allocator.ts +4 -1
- package/src/temporal/__tests__/temporal-frame-transaction.unit.test.ts +36 -0
- package/src/temporal/frame-coordinator.ts +8 -1
- package/src/temporal/frame.ts +20 -0
- package/src/temporal/gpu.ts +101 -17
- package/src/temporal/inspection.ts +7 -1
- package/src/temporal/standard-scene-data.ts +5 -0
- package/src/temporal/target-coverage-attachment.ts +4 -0
- package/src/temporal/view.ts +13 -2
- package/src/transmission/__tests__/single-layer-medium.unit.test.ts +149 -0
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +12 -11
- package/src/transmission/single-layer-medium.ts +322 -0
- package/src/typed-render-graph-primitives.ts +191 -50
- package/src/volume/component.ts +10 -10
- package/src/volume/extract.ts +11 -5
- package/src/volume/inspection.ts +3 -0
- package/src/volume/passes.ts +95 -8
- package/src/volume/resources.ts +2 -1
- package/src/volume/temporal.ts +11 -0
- package/dist/chunk-4NNZQCL3.mjs.map +0 -1
- package/dist/chunk-6TFBXLRJ.mjs.map +0 -1
- package/dist/chunk-DRR7D3KX.mjs.map +0 -1
- package/dist/chunk-GWCEMDVR.mjs.map +0 -1
- package/dist/chunk-JCIRYQ4V.mjs.map +0 -1
- package/dist/chunk-JRIPCMYC.mjs.map +0 -1
- package/dist/chunk-LULCA3OF.mjs +0 -1713
- package/dist/chunk-LULCA3OF.mjs.map +0 -1
- package/dist/chunk-PA5DRJNI.mjs.map +0 -1
|
@@ -25,6 +25,8 @@ export interface AtmosphereParameters {
|
|
|
25
25
|
readonly mieCoefficient: number;
|
|
26
26
|
readonly mieDirectionalG: number;
|
|
27
27
|
readonly sunAngularRadius: number;
|
|
28
|
+
readonly circumsolarStrength: number;
|
|
29
|
+
readonly circumsolarWidth: number;
|
|
28
30
|
}
|
|
29
31
|
/** Shared CPU contract for values accepted by the atmosphere shaders. */
|
|
30
32
|
export declare const ATMOSPHERE_PARAMETER_RANGES: Readonly<Record<keyof AtmosphereParameters, AtmosphereParameterRange>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/extract/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EACL,+BAA+B,EAC/B,KAAK,wBAAwB,EAG7B,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,8DAA8D;AAC9D,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;CACvB;AAED,mEAAmE;AACnE,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,MAAM,GACpB,4BAA4B,CAE9B;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAClF;IACE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,SAAS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;IACvC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;CACjC;AASD,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,YAAY,GAAG,iBAAiB,GAAG,SAAS,CAwC5F;AAMD,qFAAqF;AACrF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,oBAAoB,GAC/B,+BAA+B,GAAG,SAAS,CAS7C;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,oBAAoB,EAAE,EAC3C,aAAa,EAAE,SAAS,YAAY,EAAE,GACrC,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,CA2CvC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** One graph-valid identity for the barrel stage, feature and shader prewarm. */
|
|
2
|
+
export declare const BARREL_DISTORTION_POST_PROCESS_ID = "fullscreen.forgeax.barrel-distortion";
|
|
3
|
+
export declare const BARREL_DISTORTION_FEATURE_IDENTITY = "fullscreen.forgeax.barrel-distortion";
|
|
4
|
+
import type { RenderFeature } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* The coordinate function is exported beside the production shader so a real
|
|
7
|
+
* f32 device probe can compile exactly the same implementation. Keeping the
|
|
8
|
+
* probe source here avoids a second test-only equation that could drift from
|
|
9
|
+
* the Standard pass.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BARREL_DISTORTION_WGSL_COORDINATE = "\nstruct BarrelDistortionParams {\n strength : f32,\n centerX : f32,\n centerY : f32,\n radiusSquared : f32,\n};\n\nfn barrel_distortion_display_to_scene_uv(\n inputUv : vec2<f32>,\n params : BarrelDistortionParams,\n dimensions : vec2<f32>,\n) -> vec2<f32> {\n let aspect = dimensions.x / max(dimensions.y, 1.0);\n let p = vec2<f32>(\n 2.0 * aspect * (inputUv.x - params.centerX),\n 2.0 * (inputUv.y - params.centerY),\n );\n let t = dot(p, p) / max(params.radiusSquared, 1e-6);\n let scale = (1.0 - params.strength) / (1.0 - params.strength * t);\n return clamp(\n vec2<f32>(\n params.centerX + (inputUv.x - params.centerX) * scale,\n params.centerY + (inputUv.y - params.centerY) * scale,\n ),\n vec2<f32>(0.0),\n vec2<f32>(1.0),\n );\n}\n";
|
|
12
|
+
/**
|
|
13
|
+
* Manifest-equivalent WGSL for the bounded analytic model. The Standard
|
|
14
|
+
* owner registers this source once and keeps the graph, encoder, and submit
|
|
15
|
+
* lifecycle shared with every other fullscreen stage.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BARREL_DISTORTION_WGSL = "\nstruct BarrelDistortionParams {\n strength : f32,\n centerX : f32,\n centerY : f32,\n radiusSquared : f32,\n};\n\nfn barrel_distortion_display_to_scene_uv(\n inputUv : vec2<f32>,\n params : BarrelDistortionParams,\n dimensions : vec2<f32>,\n) -> vec2<f32> {\n let aspect = dimensions.x / max(dimensions.y, 1.0);\n let p = vec2<f32>(\n 2.0 * aspect * (inputUv.x - params.centerX),\n 2.0 * (inputUv.y - params.centerY),\n );\n let t = dot(p, p) / max(params.radiusSquared, 1e-6);\n let scale = (1.0 - params.strength) / (1.0 - params.strength * t);\n return clamp(\n vec2<f32>(\n params.centerX + (inputUv.x - params.centerX) * scale,\n params.centerY + (inputUv.y - params.centerY) * scale,\n ),\n vec2<f32>(0.0),\n vec2<f32>(1.0),\n );\n}\n\nstruct FullscreenOutput {\n @builtin(position) position : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\nfn fullscreen_triangle(vertex_index : u32) -> FullscreenOutput {\n var x : f32 = -1.0;\n var y : f32 = -1.0;\n if (vertex_index == 1u) { x = 3.0; }\n if (vertex_index == 2u) { y = 3.0; }\n let u : f32 = (x + 1.0) * 0.5;\n let v : f32 = 1.0 - (y + 1.0) * 0.5;\n var out : FullscreenOutput;\n out.position = vec4<f32>(x, y, 0.0, 1.0);\n out.uv = vec2<f32>(u, v);\n return out;\n}\n\n@group(1) @binding(0) var sceneColor : texture_2d<f32>;\n@group(1) @binding(1) var sceneSampler : sampler;\n\n@group(1) @binding(2) var<uniform> params : BarrelDistortionParams;\n\n@vertex\nfn vs_main(@builtin(vertex_index) vertex_index : u32) -> FullscreenOutput {\n return fullscreen_triangle(vertex_index);\n}\n\n@fragment\nfn fs_main(input : FullscreenOutput) -> @location(0) vec4<f32> {\n let dimensions = vec2<f32>(textureDimensions(sceneColor));\n let sampleUv = barrel_distortion_display_to_scene_uv(input.uv, params, dimensions);\n return textureSampleLevel(sceneColor, sceneSampler, sampleUv, 0.0);\n}\n";
|
|
18
|
+
/**
|
|
19
|
+
* Ordinary feature registration for the Standard linear-LDR stage.
|
|
20
|
+
* Standard still allocates the stage targets and chooses its position in the
|
|
21
|
+
* post chain; this feature owns the executable fullscreen declaration that is
|
|
22
|
+
* projected into that slot by the existing graph/encoder/submit path.
|
|
23
|
+
*/
|
|
24
|
+
export interface BarrelDistortionFeatureFrame {
|
|
25
|
+
/** True only when the extracted camera requires a spatial warp this frame. */
|
|
26
|
+
readonly active: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function createBarrelDistortionRenderFeature(): RenderFeature<BarrelDistortionFeatureFrame>;
|
|
29
|
+
//# sourceMappingURL=barrel-distortion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barrel-distortion.d.ts","sourceRoot":"","sources":["../../src/features/barrel-distortion.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,yCAAyC,CAAC;AACxF,eAAO,MAAM,kCAAkC,yCAAoC,CAAC;AAKpF,OAAO,KAAK,EAAE,aAAa,EAAyD,MAAM,SAAS,CAAC;AAEpG;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,qxBA6B7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,o3DAmClC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,mCAAmC,IAAI,aAAa,CAAC,4BAA4B,CAAC,CAwEjG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RenderError } from '../errors/render';
|
|
2
|
+
/**
|
|
3
|
+
* Recoverable feature preparation failures are still useful diagnostics, but
|
|
4
|
+
* they are not new failures on every render tick. Keep the reporting policy
|
|
5
|
+
* independent from the frame orchestration so it can be exercised without a
|
|
6
|
+
* renderer or device.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PENDING_RENDER_FEATURE_ERROR_REPORT_INTERVAL_FRAMES = 60;
|
|
9
|
+
export interface PendingRenderFeatureErrorReport {
|
|
10
|
+
readonly frame: number;
|
|
11
|
+
readonly fingerprint: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function shouldReportPendingRenderFeatureError(lastReportedFrame: Map<string, PendingRenderFeatureErrorReport>, key: string, frameNumber: number, fingerprint?: string, intervalFrames?: number): boolean;
|
|
14
|
+
export declare function reportPendingRenderFeatureErrors(errors: readonly RenderError[], frameNumber: number, lastReportedFrame: Map<string, PendingRenderFeatureErrorReport>, errorRegistry: {
|
|
15
|
+
fire(error: RenderError): void;
|
|
16
|
+
}): void;
|
|
17
|
+
//# sourceMappingURL=error-reporting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-reporting.d.ts","sourceRoot":"","sources":["../../src/features/error-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,mDAAmD,KAAK,CAAC;AAEtE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,qCAAqC,CACnD,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,+BAA+B,CAAC,EAC/D,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,WAAW,SAAK,EAChB,cAAc,SAAsD,GACnE,OAAO,CAUT;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,+BAA+B,CAAC,EAC/D,aAAa,EAAE;IAAE,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,GAChD,IAAI,CAwBN"}
|
package/dist/features/host.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type RenderError } from '../errors/render';
|
|
|
5
5
|
import type { PostProcessShaderEntry } from '../fullscreen-post-process-pass';
|
|
6
6
|
import type { RenderFeatureHostInspection } from '../inspection-types';
|
|
7
7
|
import type { PreparedGraphicsResolvedSnapshot, PreparedGraphicsResolver, PreparedGraphicsResourceLease } from '../prepare/prepared-graphics-resolver';
|
|
8
|
+
import type { CameraSnapshot } from '../render-contract';
|
|
8
9
|
import { type SceneDataCatalog } from '../temporal/scene-data-catalog';
|
|
9
10
|
import { type RenderFeatureMaterialShaderBindingContract, type RenderFeaturePlan, type RenderFeaturePlanContext, type RenderFeaturePlannedFrame } from './plan';
|
|
10
11
|
import type { RenderFeatureGpuComputePassDescriptor, RenderFeatureGpuWorkOwner } from './prepared-gpu-work';
|
|
@@ -30,6 +31,7 @@ export interface RenderFeaturePlanExecutionPass {
|
|
|
30
31
|
export interface RenderFeaturePlanExecution {
|
|
31
32
|
readonly featureIdentity: string;
|
|
32
33
|
readonly order: number;
|
|
34
|
+
readonly placement?: import('./types').RenderFeaturePlacement;
|
|
33
35
|
readonly passes: readonly RenderFeaturePlanExecutionPass[];
|
|
34
36
|
}
|
|
35
37
|
/** @internal Typed-graph adapter for the host-owned projection of a validated plan. */
|
|
@@ -43,6 +45,13 @@ export interface RenderFeatureFrameInput {
|
|
|
43
45
|
readonly worlds: readonly import('@forgeax/engine-ecs').World[];
|
|
44
46
|
readonly owner: number;
|
|
45
47
|
readonly frameNumber: number;
|
|
48
|
+
/** Renderer-selected display camera forwarded to feature extraction. */
|
|
49
|
+
readonly selectedCamera?: CameraSnapshot;
|
|
50
|
+
/** Physical render extent for bounded feature dispatch sizing. */
|
|
51
|
+
readonly frameSize?: {
|
|
52
|
+
readonly width: number;
|
|
53
|
+
readonly height: number;
|
|
54
|
+
};
|
|
46
55
|
readonly visibilitySnapshots?: readonly RenderFeatureWorldVisibilitySnapshot[];
|
|
47
56
|
readonly hiddenEntityReports?: readonly RenderFeatureHiddenEntityReport[];
|
|
48
57
|
/** Active-pipeline logical targets available to producer-owned features. */
|
|
@@ -51,6 +60,8 @@ export interface RenderFeatureFrameInput {
|
|
|
51
60
|
readonly sceneData?: SceneDataCatalog;
|
|
52
61
|
readonly generation?: number;
|
|
53
62
|
readonly caps: Readonly<RhiCaps>;
|
|
63
|
+
/** Normal frame-owner facts shared with producer extraction. */
|
|
64
|
+
readonly frame?: import('./types').RenderFeatureFrameContext;
|
|
54
65
|
/** Renderer-owned material binding contract projection for producer plans. */
|
|
55
66
|
readonly materialShaderBindingContract?: (materialShaderId: string) => RenderFeatureMaterialShaderBindingContract;
|
|
56
67
|
/** Renderer-owned prepared camera/depth/noise resources for feature plans. */
|
|
@@ -74,6 +85,8 @@ export interface RenderFeatureFrameResult {
|
|
|
74
85
|
readonly errors: readonly RenderError[];
|
|
75
86
|
readonly plans: readonly RenderFeaturePlannedFrame[];
|
|
76
87
|
readonly fullscreenEffects: ReadonlyMap<string, PostProcessShaderEntry>;
|
|
88
|
+
/** Public Standard post-effect identities; graph-local fullscreen resources are not included. */
|
|
89
|
+
readonly postProcessIdentities: readonly string[];
|
|
77
90
|
readonly preparedResourceBatches: readonly RenderFeaturePreparedResourceBatch[];
|
|
78
91
|
/**
|
|
79
92
|
* True only when the current graph resolves a transient graphics lease.
|
|
@@ -110,6 +123,8 @@ export interface RenderFeatureHost {
|
|
|
110
123
|
recover(input: RenderFeatureRecoverInput): Result<void, RenderError>;
|
|
111
124
|
createRecoveryRoot(scope: DeviceScope): LifecycleResourceSpec<unknown>;
|
|
112
125
|
diagnostics(): readonly RenderFeatureDiagnostics[];
|
|
126
|
+
/** Retain an explicitly producer-published detached inspection value. */
|
|
127
|
+
setInspection(identity: string, inspection: unknown): void;
|
|
113
128
|
/** Subscribe to lifecycle projection changes; unchanged active frames are silent. */
|
|
114
129
|
subscribeDiagnostics(listener: () => void): () => void;
|
|
115
130
|
/** Detached signature and prepared-resource accounting for diagnostics. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/features/host.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,OAAO,EAAuC,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,KAAK,WAAW,EAKjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAEV,gCAAgC,EAChC,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/features/host.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,OAAO,EAAuC,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,KAAK,WAAW,EAKjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9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CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,KAAK,MAAM,CAAC;IACrF,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,kCAAkC;IACjD,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,SAAS,kCAAkC,EAAE,EACtD,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAChC,IAAI,CAcN;AA2lCD,0EAA0E;AAC1E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,uBAAuB,GAC7B,wBAAwB,CAgT1B;AAoBD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,SAAS,aAAa,CAAC,OAAO,CAAC,EAAE,EAC3C,KAAK,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,GACxB,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAmBxC"}
|
|
@@ -10,7 +10,25 @@ export declare function addMotionBlurPass(graph: RenderGraphBuilder<RenderPipeli
|
|
|
10
10
|
export interface MotionBlurFeatureFrame {
|
|
11
11
|
readonly params: MotionBlurParams | undefined;
|
|
12
12
|
readonly demanded: boolean;
|
|
13
|
+
/** Raw accepted-submit interval; it is never replaced by ECS clamp time. */
|
|
14
|
+
readonly frameDeltaSeconds: number;
|
|
15
|
+
/** Temporal reset already admitted by the shared renderer transaction. */
|
|
16
|
+
readonly reset: boolean;
|
|
13
17
|
}
|
|
14
|
-
export
|
|
15
|
-
|
|
18
|
+
export interface MotionBlurFeatureInput {
|
|
19
|
+
readonly params: Partial<MotionBlurParams> | undefined;
|
|
20
|
+
readonly frameDeltaSeconds?: number;
|
|
21
|
+
readonly reset?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Compute owner for the long-vector lane. The summary is one 32-byte record
|
|
25
|
+
* per 16x16 tile and the reconstruction is fused: a long vector reuses an
|
|
26
|
+
* even-pixel (half-resolution) source lattice and performs depth-guided
|
|
27
|
+
* acceptance in the same dispatch. There is no scatter, atomic, or
|
|
28
|
+
* radius-squared neighbourhood work.
|
|
29
|
+
*/
|
|
30
|
+
export declare const MOTION_BLUR_COMPUTE_WGSL = "struct MotionBlurComputeParams {\n shutterAngle : f32,\n maxRadiusPixels : f32,\n sampleCount : u32,\n reset : u32,\n targetFps : f32,\n exposureScale : f32,\n frameDeltaSeconds : f32,\n flags : u32,\n};\n\nstruct MotionBlurTileSummary {\n // The two motion lanes retain the source pixel that supplied the direction.\n // Those anchors let a bounded midpoint tap hit a sparse source without\n // adding a color read or growing the 32-byte per-tile summary.\n maxMotionAndLength : vec4<f32>,\n secondaryMotionAndDepth : vec4<f32>,\n};\n\nstruct TemporalSample {\n motion : vec2<f32>,\n depth : f32,\n reactive : f32,\n validDepth : bool,\n motionValid : bool,\n};\n\nstruct MotionBlurSupport {\n primaryMotion : vec2<f32>,\n secondaryMotion : vec2<f32>,\n primaryAnchor : vec2<i32>,\n secondaryAnchor : vec2<i32>,\n primaryRadius : f32,\n secondaryRadius : f32,\n valid : bool,\n longVector : bool,\n};\n\nstruct MotionBlurTap {\n pixel : vec2<i32>,\n fallbackPixel : vec2<i32>,\n valid : bool,\n fallbackValid : bool,\n};\n\nstruct MotionBlurFilter {\n color0 : vec4<f32>,\n color1 : vec4<f32>,\n color2 : vec4<f32>,\n color3 : vec4<f32>,\n depth0 : f32,\n depth1 : f32,\n depth2 : f32,\n depth3 : f32,\n coverage0 : f32,\n coverage1 : f32,\n coverage2 : f32,\n coverage3 : f32,\n receiver : vec2<i32>,\n motion : vec2<f32>,\n radius : f32,\n receiverMask : u32,\n validMask : u32,\n valid : bool,\n};\n\nstruct MotionBlurCacheSample {\n color : vec4<f32>,\n coverage : f32,\n valid : bool,\n};\n\nstruct MotionBlurSource {\n pixel : vec2<i32>,\n motion : vec2<f32>,\n depth : f32,\n radius : f32,\n coverage0 : f32,\n coverage1 : f32,\n coverage2 : f32,\n coverage3 : f32,\n receiverMask : u32,\n valid : bool,\n};\n\n@group(0) @binding(0) var currentColor : texture_2d<f32>;\n@group(0) @binding(1) var sceneTemporal : texture_2d<f32>;\n@group(0) @binding(2) var<storage, read_write> tileSummary : array<MotionBlurTileSummary>;\n@group(0) @binding(3) var outputColor : texture_storage_2d<rgba16float, write>;\n@group(0) @binding(4) var<uniform> params : MotionBlurComputeParams;\n\n// Reconstruct a bounded part of a partially covered opaque edge and fund it\n// by attenuating the matching empty-background trail. The fixed factor keeps\n// the work and the energy adjustment independent of the blur radius.\nconst EDGE_FILL_FACTOR : f32 = 0.99;\n\n// One 8x8 workgroup covers a 16x16 tile. Each invocation reads a 2x2\n// footprint, then the workgroup reduction combines the values without\n// write contention or a serial 256-pixel loop.\nvar<workgroup> tileMotionScratch : array<vec2<f32>, 64>;\nvar<workgroup> tileLengthScratch : array<f32, 64>;\nvar<workgroup> tileSourceScratch : array<vec2<i32>, 64>;\nvar<workgroup> tileSecondaryMotionScratch : array<vec2<f32>, 64>;\nvar<workgroup> tileSecondaryLengthScratch : array<f32, 64>;\nvar<workgroup> tileSecondarySourceScratch : array<vec2<i32>, 64>;\n// The reconstruction workgroup owns a 4x4 half-resolution result cache for\n// its 8x8 output footprint. Each owner computes the complete bounded support\n// filter once. Full-resolution lanes only select a depth-compatible cached\n// result after the uniform barrier, with no cross-workgroup dependency.\n// Four quadrants are kept per half-cell. Each owner pays four receiver\n// center-color reads and at most supportCount (<=15) accepted source-color\n// reads; midpoint anchor recovery reuses an existing slot and adds no read\n// budget. The shared result retains odd/even coverage instead of spreading an\n// odd row across both rows.\nvar<workgroup> halfFilteredColor : array<vec4<f32>, 64>;\nvar<workgroup> halfFilteredDepth : array<f32, 64>;\nvar<workgroup> halfFilteredCoverage : array<f32, 64>;\nvar<workgroup> halfFilteredReceiver : array<vec2<i32>, 16>;\nvar<workgroup> halfFilteredMotion : array<vec2<f32>, 16>;\nvar<workgroup> halfFilteredRadius : array<f32, 16>;\nvar<workgroup> halfFilteredValid : array<u32, 64>;\nvar<workgroup> longVectorScratch : array<u32, 64>;\n// A reconstruct workgroup covers one 8x8 output footprint. Its first lane\n// derives the complete bounded tile neighbourhood once and publishes the top\n// two source directions for all lanes and all designated half-resolution\n// owners. This keeps summary work O(P/T^2), rather than repeating a tile walk\n// per output pixel.\nvar<workgroup> neighbourhoodPrimaryMotion : vec2<f32>;\nvar<workgroup> neighbourhoodPrimaryLength : f32;\nvar<workgroup> neighbourhoodPrimaryAnchor : vec2<i32>;\nvar<workgroup> neighbourhoodSecondaryMotion : vec2<f32>;\nvar<workgroup> neighbourhoodSecondaryLength : f32;\nvar<workgroup> neighbourhoodSecondaryAnchor : vec2<i32>;\n\n// maxRadiusPixels is authored at [0,64], so a 16-pixel tile support reaches\n// at most four tiles. The fixed 9x9 lattice is geometrically derived from its\n// index, then intersected with the circular/AABB support. It is a constant\n// bounded metadata walk: no loop scales with the requested radius and no\n// radius-squared per-pixel storage or write path is introduced.\nconst MAX_TILE_REACH : i32 = 4;\nconst TILE_NEIGHBORHOOD_SIDE : u32 = 9u;\nconst TILE_NEIGHBORHOOD_COUNT : u32 = 81u;\n\nfn finite(value : f32) -> bool {\n return value == value && abs(value) < 3.402823e+38;\n}\n\nfn pixelInBounds(pixel : vec2<i32>, dimensions : vec2<i32>) -> bool {\n return pixel.x >= 0 && pixel.y >= 0 && pixel.x < dimensions.x && pixel.y < dimensions.y;\n}\n\nfn decodeDepth(packed : f32) -> f32 {\n if (packed < 0.0) { return 0.0; }\n return exp2(packed) - 1.0;\n}\n\nfn temporalAt(pixel : vec2<i32>, dimensions : vec2<i32>) -> TemporalSample {\n let samplePixel = clamp(pixel, vec2<i32>(0), dimensions - vec2<i32>(1));\n let packed = textureLoad(sceneTemporal, samplePixel, 0);\n let invalidMotion = packed.w >= 2.0;\n return TemporalSample(\n packed.xy,\n decodeDepth(packed.z),\n clamp(packed.w - select(0.0, 2.0, invalidMotion), 0.0, 1.0),\n packed.z >= 0.0,\n !invalidMotion,\n );\n}\n\nfn depthReject(center : f32, sample : f32) -> bool {\n return sample > center + max(0.01, center * 0.01);\n}\n\nfn distinctDirection(a : vec2<f32>, b : vec2<f32>) -> bool {\n let aLength = length(a);\n let bLength = length(b);\n if (aLength <= 1e-5 || bLength <= 1e-5) { return false; }\n // Keep only genuinely different directions. Opposite signs still carry\n // separate source segments, while nearly parallel candidates do not spend\n // the bounded second-direction slot.\n return abs(dot(a / aLength, b / bLength)) < 0.94;\n}\n\nfn sourceVelocitySegmentCovers(\n receiverPixel : vec2<i32>,\n sourcePixel : vec2<i32>,\n motionPixels : vec2<f32>,\n radius : f32,\n) -> bool {\n let delta = vec2<f32>(receiverPixel - sourcePixel);\n let motionLength = length(motionPixels);\n if (motionLength <= 1e-5 || radius <= 1e-5) { return false; }\n let direction = motionPixels / motionLength;\n let along = dot(delta, direction);\n let perpendicular = abs(delta.x * direction.y - delta.y * direction.x);\n // A source segment owns a one-pixel coverage tube. This is a bounded\n // geometric test, not a radius-sized source scan, and lets a sparse mover\n // cover a static receiver without accepting a far/orthogonal source.\n return abs(along) <= radius + 0.75 && perpendicular <= 0.75;\n}\n\nfn symmetricOffset(index : u32, count : u32, motion : vec2<f32>) -> vec2<f32> {\n let denominator = max(f32(count), 1.0);\n return motion * (2.0 * (f32(index) + 0.5) / denominator - 1.0);\n}\n\nfn tileNeighborhoodOffset(index : u32) -> vec2<i32> {\n let x = i32(index % TILE_NEIGHBORHOOD_SIDE) - MAX_TILE_REACH;\n let y = i32(index / TILE_NEIGHBORHOOD_SIDE) - MAX_TILE_REACH;\n return vec2<i32>(x, y);\n}\n\nfn tileOffsetWithinSupport(offset : vec2<i32>, tileReach : i32) -> bool {\n if (offset.x == 0 && offset.y == 0) { return false; }\n let boundedReach = min(max(tileReach, 1), MAX_TILE_REACH);\n // The bounded lattice is a square around the receiver tile. The precise\n // AABB/circle intersection below decides whether a diagonal tile really\n // intersects the support; a circular pre-filter here would drop the\n // (\u00B12,\u00B12) and boundary cases before that exact test can run.\n return abs(offset.x) <= boundedReach && abs(offset.y) <= boundedReach;\n}\n\nfn tileIntersectsSupport(\n receiverPixel : vec2<i32>,\n candidateTile : vec2<i32>,\n dimensions : vec2<i32>,\n supportRadius : f32,\n) -> bool {\n // Use the receiver-to-tile-AABB lower bound. This includes every tile whose\n // contents can intersect the support, including signs and diagonals, while\n // rejecting an outside-support tile before loading its summary.\n let tileMin = vec2<f32>(candidateTile * 16);\n let tileMax = min(tileMin + vec2<f32>(16.0), vec2<f32>(dimensions));\n let receiver = vec2<f32>(receiverPixel) + vec2<f32>(0.5);\n let dx = max(max(tileMin.x - receiver.x, 0.0), receiver.x - tileMax.x);\n let dy = max(max(tileMin.y - receiver.y, 0.0), receiver.y - tileMax.y);\n let distance = vec2<f32>(dx, dy);\n return dot(distance, distance) <= supportRadius * supportRadius + 1.0;\n}\n\nfn tileIntersectsWorkgroupSupport(\n workgroupBase : vec2<i32>,\n candidateTile : vec2<i32>,\n dimensions : vec2<i32>,\n supportRadius : f32,\n) -> bool {\n // A workgroup's 8x8 rectangle is the conservative receiver domain for one\n // shared metadata walk. The AABB lower bound includes every pixel in that\n // rectangle that can reach the candidate tile, including diagonal/sign\n // variants, while rejecting a tile fully outside the support.\n let tileMin = vec2<f32>(candidateTile * 16);\n let tileMax = min(tileMin + vec2<f32>(16.0), vec2<f32>(dimensions));\n let groupMin = vec2<f32>(workgroupBase) + vec2<f32>(0.5);\n let groupMax = min(groupMin + vec2<f32>(8.0), vec2<f32>(dimensions));\n let dx = max(max(tileMin.x - groupMax.x, 0.0), groupMin.x - tileMax.x);\n let dy = max(max(tileMin.y - groupMax.y, 0.0), groupMin.y - tileMax.y);\n let distance = vec2<f32>(dx, dy);\n return dot(distance, distance) <= supportRadius * supportRadius + 1.0;\n}\n\nfn scanTileNeighbourhood(\n workgroupBase : vec2<i32>,\n dimensions : vec2<i32>,\n) {\n let tiles = (vec2<u32>(dimensions) + vec2<u32>(15)) / vec2<u32>(16);\n let tileCoordinate = workgroupBase / vec2<i32>(16);\n let currentIndex = u32(tileCoordinate.y) * tiles.x + u32(tileCoordinate.x);\n let current = tileSummary[currentIndex];\n var primary = current.maxMotionAndLength.xy * vec2<f32>(dimensions) * params.exposureScale;\n var primaryLength = length(primary);\n var primaryAnchor = vec2<i32>(\n i32(current.maxMotionAndLength.z),\n i32(current.maxMotionAndLength.w),\n );\n var secondary = current.secondaryMotionAndDepth.xy * vec2<f32>(dimensions) * params.exposureScale;\n var secondaryLength = length(secondary);\n var secondaryAnchor = vec2<i32>(\n i32(current.secondaryMotionAndDepth.z),\n i32(current.secondaryMotionAndDepth.w),\n );\n let supportRadius = min(max(params.maxRadiusPixels, 1.0), 64.0);\n let tileReach = min(MAX_TILE_REACH, max(1, i32(ceil(supportRadius / 16.0))));\n for (var tileCandidateIndex = 0u; tileCandidateIndex < TILE_NEIGHBORHOOD_COUNT; tileCandidateIndex += 1u) {\n let offset = tileNeighborhoodOffset(tileCandidateIndex);\n if (!tileOffsetWithinSupport(offset, tileReach)) { continue; }\n let candidateTile = tileCoordinate + offset;\n if (\n candidateTile.x < 0 ||\n candidateTile.y < 0 ||\n candidateTile.x >= i32(tiles.x) ||\n candidateTile.y >= i32(tiles.y) ||\n !tileIntersectsWorkgroupSupport(workgroupBase, candidateTile, dimensions, supportRadius)\n ) { continue; }\n let candidate = tileSummary[u32(candidateTile.y) * tiles.x + u32(candidateTile.x)];\n let candidatePrimary = candidate.maxMotionAndLength.xy * vec2<f32>(dimensions) * params.exposureScale;\n let candidatePrimaryLength = length(candidatePrimary);\n let candidatePrimaryAnchor = vec2<i32>(\n i32(candidate.maxMotionAndLength.z),\n i32(candidate.maxMotionAndLength.w),\n );\n if (candidatePrimaryLength > primaryLength) {\n let previousPrimary = primary;\n let previousLength = primaryLength;\n let previousAnchor = primaryAnchor;\n primary = candidatePrimary;\n primaryLength = candidatePrimaryLength;\n primaryAnchor = candidatePrimaryAnchor;\n if (previousLength > 1e-5 && distinctDirection(primary, previousPrimary) && previousLength > secondaryLength) {\n secondary = previousPrimary;\n secondaryLength = previousLength;\n secondaryAnchor = previousAnchor;\n }\n } else if (\n candidatePrimaryLength > secondaryLength &&\n distinctDirection(primary, candidatePrimary)\n ) {\n secondary = candidatePrimary;\n secondaryLength = candidatePrimaryLength;\n secondaryAnchor = candidatePrimaryAnchor;\n }\n let candidateSecondary = candidate.secondaryMotionAndDepth.xy * vec2<f32>(dimensions) * params.exposureScale;\n let candidateSecondaryLength = length(candidateSecondary);\n let candidateSecondaryAnchor = vec2<i32>(\n i32(candidate.secondaryMotionAndDepth.z),\n i32(candidate.secondaryMotionAndDepth.w),\n );\n if (candidateSecondaryLength > secondaryLength && distinctDirection(primary, candidateSecondary)) {\n secondary = candidateSecondary;\n secondaryLength = candidateSecondaryLength;\n secondaryAnchor = candidateSecondaryAnchor;\n }\n }\n neighbourhoodPrimaryMotion = primary;\n neighbourhoodPrimaryLength = primaryLength;\n neighbourhoodPrimaryAnchor = primaryAnchor;\n neighbourhoodSecondaryMotion = secondary;\n neighbourhoodSecondaryLength = secondaryLength;\n neighbourhoodSecondaryAnchor = secondaryAnchor;\n}\n\nfn validMotionParameters() -> bool {\n return\n finite(params.frameDeltaSeconds) &&\n params.frameDeltaSeconds > 0.0 &&\n params.frameDeltaSeconds <= 0.1 &&\n finite(params.exposureScale) &&\n params.exposureScale > 0.0 &&\n finite(params.targetFps) &&\n params.targetFps >= 0.0 &&\n params.targetFps <= 240.0 &&\n params.targetFps == floor(params.targetFps) &&\n params.sampleCount >= 4u &&\n params.maxRadiusPixels > 0.0 &&\n finite(params.maxRadiusPixels) &&\n params.shutterAngle > 0.0;\n}\n\nfn sourceMotionPixels(sample : TemporalSample, dimensions : vec2<i32>) -> vec2<f32> {\n return sample.motion * vec2<f32>(dimensions) * params.exposureScale;\n}\n\nfn sourceRadius(motionPixels : vec2<f32>, shutter : f32) -> f32 {\n return min(length(motionPixels) * shutter * 0.5, params.maxRadiusPixels);\n}\n\nfn resolveMotionBlurSupport(\n pixel : vec2<i32>,\n dimensions : vec2<i32>,\n) -> MotionBlurSupport {\n var empty = MotionBlurSupport(\n vec2<f32>(0.0),\n vec2<f32>(0.0),\n vec2<i32>(0),\n vec2<i32>(0),\n 0.0,\n 0.0,\n false,\n false,\n );\n if (!pixelInBounds(pixel, dimensions) || !validMotionParameters() || params.reset != 0u) {\n return empty;\n }\n let center = temporalAt(pixel, dimensions);\n if (!center.validDepth || !center.motionValid) { return empty; }\n let shutter = clamp(params.shutterAngle / 360.0, 0.0, 1.0);\n let centerMotion = sourceMotionPixels(center, dimensions);\n let centerLength = length(centerMotion);\n var primaryMotion = centerMotion;\n var primaryLength = centerLength;\n var primaryAnchor = pixel;\n var secondaryMotion = neighbourhoodSecondaryMotion;\n var secondaryLength = neighbourhoodSecondaryLength;\n var secondaryAnchor = neighbourhoodSecondaryAnchor;\n if (neighbourhoodPrimaryLength > primaryLength) {\n if (distinctDirection(primaryMotion, neighbourhoodPrimaryMotion)) {\n secondaryMotion = primaryMotion;\n secondaryLength = primaryLength;\n secondaryAnchor = pixel;\n }\n primaryMotion = neighbourhoodPrimaryMotion;\n primaryLength = neighbourhoodPrimaryLength;\n primaryAnchor = neighbourhoodPrimaryAnchor;\n } else if (\n neighbourhoodPrimaryLength > secondaryLength &&\n distinctDirection(primaryMotion, neighbourhoodPrimaryMotion)\n ) {\n secondaryMotion = neighbourhoodPrimaryMotion;\n secondaryLength = neighbourhoodPrimaryLength;\n secondaryAnchor = neighbourhoodPrimaryAnchor;\n }\n if (\n secondaryLength <= 1e-5 ||\n !distinctDirection(primaryMotion, secondaryMotion)\n ) {\n secondaryMotion = vec2<f32>(0.0);\n secondaryLength = 0.0;\n }\n empty.primaryMotion = primaryMotion;\n empty.secondaryMotion = secondaryMotion;\n empty.primaryAnchor = primaryAnchor;\n empty.secondaryAnchor = secondaryAnchor;\n empty.primaryRadius = sourceRadius(primaryMotion, shutter);\n empty.secondaryRadius = sourceRadius(secondaryMotion, shutter);\n empty.valid = empty.primaryRadius > 1e-5 || empty.secondaryRadius > 1e-5;\n empty.longVector = max(empty.primaryRadius, empty.secondaryRadius) > 8.0;\n return empty;\n}\n\nfn sourceAnchorForReceiver(\n receiverPixel : vec2<i32>,\n anchor : vec2<i32>,\n motion : vec2<f32>,\n dimensions : vec2<i32>,\n) -> vec2<i32> {\n // A tile summary has one source anchor, while a horizontal source may span\n // the tile's perpendicular axis. Project that anchor onto the receiver's\n // motion line before the midpoint read. The following source footprint\n // validates the projected pixel, so a thin or off-axis source cannot be\n // invented by the projection.\n let motionLength = length(motion);\n if (motionLength <= 1e-5) { return anchor; }\n let direction = motion / motionLength;\n let delta = vec2<f32>(receiverPixel - anchor);\n let perpendicular = delta - direction * dot(delta, direction);\n let projected = vec2<f32>(anchor) + perpendicular;\n let candidate = vec2<i32>(floor(projected + vec2<f32>(0.5)));\n return clamp(candidate, vec2<i32>(0), dimensions - vec2<i32>(1));\n}\n\nfn supportTap(\n receiverPixel : vec2<i32>,\n index : u32,\n count : u32,\n motion : vec2<f32>,\n radius : f32,\n anchor : vec2<i32>,\n dimensions : vec2<i32>,\n) -> MotionBlurTap {\n // Preserve the geometric midpoint as the primary sample. The source anchor\n // is a recovery coordinate for a sparse tile summary, not a replacement for\n // the receiver's authored support. It is tried only when this midpoint has\n // no valid source, and therefore never adds a color read or a tap.\n var fallbackPixel = vec2<i32>(0);\n var fallbackValid = false;\n if (index == count / 2u) {\n fallbackPixel = sourceAnchorForReceiver(receiverPixel, anchor, motion, dimensions);\n fallbackValid = pixelInBounds(fallbackPixel, dimensions);\n }\n let direction = motion / max(length(motion), 1e-5);\n let offset = symmetricOffset(index, count, direction * radius);\n let dimensionsF = vec2<f32>(dimensions);\n let uv = (vec2<f32>(receiverPixel) + vec2<f32>(0.5) + offset) / dimensionsF;\n if (uv.x < 0.0 || uv.y < 0.0 || uv.x >= 1.0 || uv.y >= 1.0) {\n return MotionBlurTap(vec2<i32>(0), fallbackPixel, false, fallbackValid);\n }\n let candidate = vec2<i32>(floor(uv * dimensionsF));\n return MotionBlurTap(candidate, fallbackPixel, pixelInBounds(candidate, dimensions), fallbackValid);\n}\n\nfn sourceAt(\n receiverPixel : vec2<i32>,\n sourcePixel : vec2<i32>,\n centerDepth : f32,\n shutter : f32,\n dimensions : vec2<i32>,\n) -> MotionBlurSource {\n let empty = MotionBlurSource(\n vec2<i32>(0),\n vec2<f32>(0.0),\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0u,\n false,\n );\n if (!pixelInBounds(sourcePixel, dimensions)) { return empty; }\n let source = temporalAt(sourcePixel, dimensions);\n if (!source.validDepth || !source.motionValid || depthReject(centerDepth, source.depth)) {\n return empty;\n }\n let motionPixels = sourceMotionPixels(source, dimensions);\n let radius = sourceRadius(motionPixels, shutter);\n if (!sourceVelocitySegmentCovers(receiverPixel, sourcePixel, motionPixels, radius)) {\n return empty;\n }\n return MotionBlurSource(\n sourcePixel,\n motionPixels,\n source.depth,\n radius,\n 1.0,\n 1.0,\n 1.0,\n 1.0,\n 0u,\n true,\n );\n}\n\n// A half-resolution owner represents a complete 2x2 receiving footprint. The\n// source motion test is evaluated against every receiving pixel in that\n// footprint, so odd/even rows and columns remain visible without a second\n// filter pass or an unbounded neighbourhood walk.\nfn sourceAtFootprint(\n receiverPixel : vec2<i32>,\n sourcePixel : vec2<i32>,\n centerDepth : f32,\n shutter : f32,\n dimensions : vec2<i32>,\n) -> MotionBlurSource {\n var selected = MotionBlurSource(\n vec2<i32>(0),\n vec2<f32>(0.0),\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0u,\n false,\n );\n var selectedDepth = 3.402823e+38;\n var coverage0 = 0.0;\n var coverage1 = 0.0;\n var coverage2 = 0.0;\n var coverage3 = 0.0;\n var selectedReceiverMask = 0u;\n for (var y = 0u; y < 2u; y += 1u) {\n for (var x = 0u; x < 2u; x += 1u) {\n let candidatePixel = sourcePixel + vec2<i32>(i32(x), i32(y));\n if (!pixelInBounds(candidatePixel, dimensions)) { continue; }\n let temporal = temporalAt(candidatePixel, dimensions);\n if (!temporal.validDepth || !temporal.motionValid || depthReject(centerDepth, temporal.depth)) {\n continue;\n }\n let motionPixels = sourceMotionPixels(temporal, dimensions);\n let radius = sourceRadius(motionPixels, shutter);\n var receiverMask = 0u;\n // A source half-cell and a receiver half-cell share the same integer\n // displacement. This one-to-one correspondence keeps a diagonal source\n // from being counted for all four receiver quadrants just because its\n // tube crosses the quadrant. The segment test still supplies the motion\n // support and depth/validity checks remain source-owned.\n let receiver = receiverPixel + vec2<i32>(i32(x), i32(y));\n if (\n pixelInBounds(receiver, dimensions) &&\n sourceVelocitySegmentCovers(receiver, candidatePixel, motionPixels, radius)\n ) {\n receiverMask = receiverMask | (1u << (y * 2u + x));\n }\n if (receiverMask == 0u) { continue; }\n if (!selected.valid || temporal.depth < selectedDepth) {\n selected = MotionBlurSource(\n candidatePixel,\n motionPixels,\n temporal.depth,\n radius,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n receiverMask,\n true,\n );\n selectedDepth = temporal.depth;\n coverage0 = 0.0;\n coverage1 = 0.0;\n coverage2 = 0.0;\n coverage3 = 0.0;\n selectedReceiverMask = receiverMask;\n }\n if (abs(temporal.depth - selectedDepth) <= 1e-4) {\n // The common integer displacement above gives each source cell one\n // receiver quadrant. The matching footprint therefore contributes its\n // full unit overlap to that one owner.\n if ((receiverMask & 1u) != 0u) { coverage0 += 1.0; }\n if ((receiverMask & 2u) != 0u) { coverage1 += 1.0; }\n if ((receiverMask & 4u) != 0u) { coverage2 += 1.0; }\n if ((receiverMask & 8u) != 0u) { coverage3 += 1.0; }\n selectedReceiverMask = selectedReceiverMask | receiverMask;\n }\n }\n }\n if (selected.valid) {\n // The owner samples a 2x2 source footprint but pays for one color read.\n // Each receiving quadrant keeps the fraction of that footprint that is\n // covered at the selected depth. This preserves energy at boundaries and\n // carries a one-pixel odd-row feature into its real row only.\n selected.coverage0 = min(coverage0, 1.0) * select(0.0, 1.0, (selectedReceiverMask & 1u) != 0u);\n selected.coverage1 = min(coverage1, 1.0) * select(0.0, 1.0, (selectedReceiverMask & 2u) != 0u);\n selected.coverage2 = min(coverage2, 1.0) * select(0.0, 1.0, (selectedReceiverMask & 4u) != 0u);\n selected.coverage3 = min(coverage3, 1.0) * select(0.0, 1.0, (selectedReceiverMask & 8u) != 0u);\n selected.receiverMask = selectedReceiverMask;\n }\n return selected;\n}\n\nfn midpointTileOwnership(\n receiverPixel : vec2<i32>,\n source : MotionBlurSource,\n) -> f32 {\n // A recovered tile anchor represents one two-pixel source footprint. The\n // footprint is split across the finite, geometrically derived tile bands of\n // the support segment. One half-cell owner per band claims the represented\n // midpoint slot, rather than painting every receiver in the interval.\n let sourcePixel = source.pixel;\n let motionLength = length(source.motion);\n if (motionLength <= 1e-5 || source.radius <= 1e-5) { return 0.0; }\n let receiverTile = receiverPixel / vec2<i32>(16);\n let sourceTile = sourcePixel / vec2<i32>(16);\n let tileDelta = vec2<f32>(sourceTile - receiverTile);\n let direction = source.motion / motionLength;\n let along = abs(dot(tileDelta, direction));\n let perpendicular = abs(tileDelta.x * direction.y - tileDelta.y * direction.x);\n let tileReach = min(4, max(1, i32(ceil(source.radius / 16.0))));\n if (along < 1.0 || ceil(along) > f32(tileReach) || perpendicular > 1.0) { return 0.0; }\n let groupBase = (receiverPixel / vec2<i32>(8)) * vec2<i32>(8);\n let local = receiverPixel - groupBase;\n let ownerX = select(\n clamp(((sourcePixel.x - groupBase.x) / 2) * 2, 0, 6),\n select(0, 6, sourcePixel.x > receiverPixel.x),\n sourcePixel.x != receiverPixel.x,\n );\n let ownerY = select(\n clamp(((sourcePixel.y - groupBase.y) / 2) * 2, 0, 6),\n select(0, 6, sourcePixel.y > receiverPixel.y),\n sourcePixel.y != receiverPixel.y,\n );\n if (local.x != ownerX || local.y != ownerY) { return 0.0; }\n let sourceFootprintLength = 2.0;\n let supportLength = max(2.0 * source.radius, sourceFootprintLength);\n // Divide the finite footprint ownership over every reachable tile band.\n // This keeps the total recovery mass bounded when the support grows from\n // 32 to 64 pixels while retaining a nonzero owner at any in-view band.\n return min(1.0, sourceFootprintLength / (supportLength * f32(tileReach)));\n}\n\nfn integrateLongColor(\n filtered : vec4<f32>,\n validCount : f32,\n hasAcceptedSource : bool,\n uncovered : f32,\n count : u32,\n supportCount : u32,\n centerColor : vec4<f32>,\n centerMoving : bool,\n) -> vec4<f32> {\n // Uncovered ownership is decremented at the same time as validCount is incremented\n // for both geometric and midpoint-recovered samples. Keep the derived cap\n // as a guard against floating point accumulation and make the ownership\n // transfer explicit instead of adding an independent brightness term.\n let conservedUncovered = min(\n max(uncovered, 0.0),\n max(f32(supportCount) - validCount, 0.0),\n );\n // A moving receiver can be partially covered at a silhouette edge. Use the\n // accepted foreground only for the receiver's missing current coverage; a\n // fully covered receiver keeps the original center contribution and the\n // Dawn energy contract remains unchanged for uniform opaque surfaces.\n let acceptedColor = select(\n vec3<f32>(0.0),\n filtered.rgb / max(validCount, 1.0),\n hasAcceptedSource && validCount > 0.0,\n );\n // Preserve the color target's authored alpha as the output floor. It is\n // separate from the RGB test below, which identifies an empty background\n // receiver without treating alpha as a scene-coverage attachment.\n let missingForeground = 1.0 - clamp(centerColor.a, 0.0, 1.0);\n let edgeCoverage = select(missingForeground, 1.0, centerMoving);\n let edgeFill = acceptedColor * edgeCoverage * EDGE_FILL_FACTOR;\n let movingFallback = select(centerColor.rgb, edgeFill, hasAcceptedSource && validCount > 0.0);\n let background = select(vec3<f32>(0.0), movingFallback, centerMoving);\n // The accepted colour can come from a transparent receiver's moving\n // foreground. Carry the same bounded support coverage into alpha so that\n // RGB written outside the current silhouette is not composited as black.\n // Preserve the receiver's authored coverage as a floor: blur must not make\n // an already visible pixel disappear.\n let acceptedAlpha = select(\n 0.0,\n filtered.a / max(validCount, 1.0),\n validCount > 0.0,\n );\n let acceptedCoverage = validCount + missingForeground * conservedUncovered;\n let reconstructedAlpha = acceptedAlpha * acceptedCoverage / max(f32(count), 1.0);\n let outputAlpha = clamp(max(centerColor.a, reconstructedAlpha), 0.0, 1.0);\n let emptyReceiver =\n !centerMoving &&\n hasAcceptedSource &&\n max(max(abs(centerColor.r), abs(centerColor.g)), abs(centerColor.b)) < 1e-4;\n let sourceScale = select(1.0, 1.0 - EDGE_FILL_FACTOR, emptyReceiver);\n let sourceContribution = filtered.rgb * sourceScale;\n let trailScale = select(1.0, 1.0 - EDGE_FILL_FACTOR, emptyReceiver);\n let trailContribution = background * conservedUncovered * trailScale;\n return vec4<f32>(\n (sourceContribution + centerColor.rgb + trailContribution) / max(f32(count), 1.0),\n outputAlpha,\n );\n}\n\nfn longSupportFilter(\n receiverPixel : vec2<i32>,\n support : MotionBlurSupport,\n centerDepth : f32,\n dimensions : vec2<i32>,\n) -> MotionBlurFilter {\n var empty = MotionBlurFilter(\n vec4<f32>(0.0),\n vec4<f32>(0.0),\n vec4<f32>(0.0),\n vec4<f32>(0.0),\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n receiverPixel,\n vec2<f32>(0.0),\n 0.0,\n 0u,\n 0u,\n false,\n );\n if (!support.valid) { return empty; }\n let count = min(params.sampleCount, 16u);\n // The authored tier is the total source colour-read budget. Reserve one slot\n // for the receiver/background contribution; the remaining bounded taps\n // (at most 15) are split between the two source directions when needed.\n let supportCount = max(count - 1u, 1u);\n let useSecondDirection = support.secondaryRadius > 1e-5 && distinctDirection(support.primaryMotion, support.secondaryMotion);\n let primaryCount = select(supportCount, max(supportCount / 2u, 1u), useSecondDirection);\n let secondaryCount = max(supportCount - primaryCount, 1u);\n let shutter = clamp(params.shutterAngle / 360.0, 0.0, 1.0);\n let center = temporalAt(receiverPixel, dimensions);\n // Keep each receiving quadrant's own center color. Reusing the owner\n // pixel for all four quadrants causes a one-pixel parity shift to duplicate\n // a bright source (or erase a bright receiver) in the half-resolution cache.\n var centerColor0 = colorAt(receiverPixel, dimensions);\n var centerColor1 = colorAt(receiverPixel + vec2<i32>(1, 0), dimensions);\n var centerColor2 = colorAt(receiverPixel + vec2<i32>(0, 1), dimensions);\n var centerColor3 = colorAt(receiverPixel + vec2<i32>(1, 1), dimensions);\n var filtered0 = vec4<f32>(0.0);\n var filtered1 = vec4<f32>(0.0);\n var filtered2 = vec4<f32>(0.0);\n var filtered3 = vec4<f32>(0.0);\n var validCount0 = 0.0;\n var validCount1 = 0.0;\n var validCount2 = 0.0;\n var validCount3 = 0.0;\n var hasAcceptedSource0 = false;\n var hasAcceptedSource1 = false;\n var hasAcceptedSource2 = false;\n var hasAcceptedSource3 = false;\n var uncovered0 = f32(supportCount);\n var uncovered1 = f32(supportCount);\n var uncovered2 = f32(supportCount);\n var uncovered3 = f32(supportCount);\n var midpointFallbackPixel = vec2<i32>(0);\n var midpointFallbackValid = false;\n var midpointFallbackRadius = 0.0;\n var nearestDepth0 = 3.402823e+38;\n var nearestDepth1 = 3.402823e+38;\n var nearestDepth2 = 3.402823e+38;\n var nearestDepth3 = 3.402823e+38;\n for (var index = 0u; index < 16u; index += 1u) {\n if (index >= supportCount) { break; }\n let secondDirection = useSecondDirection && index >= primaryCount;\n let localIndex = select(index, index - primaryCount, secondDirection);\n let localCount = select(primaryCount, secondaryCount, secondDirection);\n let selectedMotion = select(support.primaryMotion, support.secondaryMotion, secondDirection);\n let selectedRadius = select(support.primaryRadius, support.secondaryRadius, secondDirection);\n let tap = supportTap(\n receiverPixel,\n localIndex,\n localCount,\n selectedMotion,\n selectedRadius,\n select(support.primaryAnchor, support.secondaryAnchor, secondDirection),\n dimensions,\n );\n if (!tap.valid) {\n if (tap.fallbackValid && selectedRadius > midpointFallbackRadius) {\n midpointFallbackPixel = tap.fallbackPixel;\n midpointFallbackValid = true;\n midpointFallbackRadius = selectedRadius;\n }\n continue;\n }\n let source = sourceAtFootprint(\n receiverPixel,\n tap.pixel,\n centerDepth,\n shutter,\n dimensions,\n );\n if (!source.valid) {\n if (tap.fallbackValid && selectedRadius > midpointFallbackRadius) {\n midpointFallbackPixel = tap.fallbackPixel;\n midpointFallbackValid = true;\n midpointFallbackRadius = selectedRadius;\n }\n continue;\n }\n let sampleColor = colorAt(source.pixel, dimensions);\n // Keep the receiver's own color as the center contribution. A source\n // footprint may cover an adjacent receiver quadrant without being the\n // receiver itself; substituting its color here creates odd/even-alignment\n // brightening at thin-object boundaries.\n if ((source.receiverMask & 1u) != 0u) {\n filtered0 += sampleColor * source.coverage0;\n validCount0 += source.coverage0;\n hasAcceptedSource0 = true;\n uncovered0 = max(uncovered0 - source.coverage0, 0.0);\n nearestDepth0 = min(nearestDepth0, source.depth);\n }\n if ((source.receiverMask & 2u) != 0u) {\n filtered1 += sampleColor * source.coverage1;\n validCount1 += source.coverage1;\n hasAcceptedSource1 = true;\n uncovered1 = max(uncovered1 - source.coverage1, 0.0);\n nearestDepth1 = min(nearestDepth1, source.depth);\n }\n if ((source.receiverMask & 4u) != 0u) {\n filtered2 += sampleColor * source.coverage2;\n validCount2 += source.coverage2;\n hasAcceptedSource2 = true;\n uncovered2 = max(uncovered2 - source.coverage2, 0.0);\n nearestDepth2 = min(nearestDepth2, source.depth);\n }\n if ((source.receiverMask & 8u) != 0u) {\n filtered3 += sampleColor * source.coverage3;\n validCount3 += source.coverage3;\n hasAcceptedSource3 = true;\n uncovered3 = max(uncovered3 - source.coverage3, 0.0);\n nearestDepth3 = min(nearestDepth3, source.depth);\n }\n }\n // A tile anchor recovers a sparse source only for the widest support tier,\n // where the fixed geometric lattice can leave a source between taps. It\n // spends the represented midpoint ownership of the finite support segment;\n // every accepted colour, coverage and depth contribution uses that same\n // bounded ownership, so the fallback cannot create an opaque stripe. The\n // shorter tiers keep their exact geometric energy and do not need recovery.\n if (midpointFallbackValid && max(support.primaryRadius, support.secondaryRadius) > 32.0) {\n let fallbackSource = sourceAtFootprint(\n receiverPixel,\n midpointFallbackPixel,\n centerDepth,\n shutter,\n dimensions,\n );\n if (fallbackSource.valid) {\n let midpointWeight = midpointTileOwnership(receiverPixel, fallbackSource);\n if (\n midpointWeight > 0.0\n ) {\n let fallbackColor = colorAt(fallbackSource.pixel, dimensions);\n let fallbackWeight0 = fallbackSource.coverage0 * midpointWeight;\n let fallbackWeight1 = fallbackSource.coverage1 * midpointWeight;\n let fallbackWeight2 = fallbackSource.coverage2 * midpointWeight;\n let fallbackWeight3 = fallbackSource.coverage3 * midpointWeight;\n if (validCount0 <= 0.0 && (fallbackSource.receiverMask & 1u) != 0u) {\n let ownedWeight0 = min(fallbackWeight0, uncovered0);\n if (ownedWeight0 > 0.0) {\n filtered0 += fallbackColor * ownedWeight0;\n validCount0 += ownedWeight0;\n hasAcceptedSource0 = true;\n uncovered0 = max(uncovered0 - ownedWeight0, 0.0);\n nearestDepth0 = min(nearestDepth0, fallbackSource.depth);\n }\n }\n if (validCount1 <= 0.0 && (fallbackSource.receiverMask & 2u) != 0u) {\n let ownedWeight1 = min(fallbackWeight1, uncovered1);\n if (ownedWeight1 > 0.0) {\n filtered1 += fallbackColor * ownedWeight1;\n validCount1 += ownedWeight1;\n hasAcceptedSource1 = true;\n uncovered1 = max(uncovered1 - ownedWeight1, 0.0);\n nearestDepth1 = min(nearestDepth1, fallbackSource.depth);\n }\n }\n if (validCount2 <= 0.0 && (fallbackSource.receiverMask & 4u) != 0u) {\n let ownedWeight2 = min(fallbackWeight2, uncovered2);\n if (ownedWeight2 > 0.0) {\n filtered2 += fallbackColor * ownedWeight2;\n validCount2 += ownedWeight2;\n hasAcceptedSource2 = true;\n uncovered2 = max(uncovered2 - ownedWeight2, 0.0);\n nearestDepth2 = min(nearestDepth2, fallbackSource.depth);\n }\n }\n if (validCount3 <= 0.0 && (fallbackSource.receiverMask & 8u) != 0u) {\n let ownedWeight3 = min(fallbackWeight3, uncovered3);\n if (ownedWeight3 > 0.0) {\n filtered3 += fallbackColor * ownedWeight3;\n validCount3 += ownedWeight3;\n hasAcceptedSource3 = true;\n uncovered3 = max(uncovered3 - ownedWeight3, 0.0);\n nearestDepth3 = min(nearestDepth3, fallbackSource.depth);\n }\n }\n }\n }\n }\n let moving0 = temporalAt(receiverPixel, dimensions);\n let moving1 = temporalAt(receiverPixel + vec2<i32>(1, 0), dimensions);\n let moving2 = temporalAt(receiverPixel + vec2<i32>(0, 1), dimensions);\n let moving3 = temporalAt(receiverPixel + vec2<i32>(1, 1), dimensions);\n let motion0 = sourceMotionPixels(moving0, dimensions);\n let motion1 = sourceMotionPixels(moving1, dimensions);\n let motion2 = sourceMotionPixels(moving2, dimensions);\n let motion3 = sourceMotionPixels(moving3, dimensions);\n let centerMoving0 = moving0.validDepth && moving0.motionValid && sourceRadius(motion0, shutter) > 1e-5;\n let centerMoving1 = moving1.validDepth && moving1.motionValid && sourceRadius(motion1, shutter) > 1e-5;\n let centerMoving2 = moving2.validDepth && moving2.motionValid && sourceRadius(motion2, shutter) > 1e-5;\n let centerMoving3 = moving3.validDepth && moving3.motionValid && sourceRadius(motion3, shutter) > 1e-5;\n empty.color0 = integrateLongColor(filtered0, validCount0, hasAcceptedSource0, uncovered0, count, supportCount, centerColor0, centerMoving0);\n empty.color1 = integrateLongColor(filtered1, validCount1, hasAcceptedSource1, uncovered1, count, supportCount, centerColor1, centerMoving1);\n empty.color2 = integrateLongColor(filtered2, validCount2, hasAcceptedSource2, uncovered2, count, supportCount, centerColor2, centerMoving2);\n empty.color3 = integrateLongColor(filtered3, validCount3, hasAcceptedSource3, uncovered3, count, supportCount, centerColor3, centerMoving3);\n empty.depth0 = select(centerDepth, nearestDepth0, validCount0 > 0.0);\n empty.depth1 = select(centerDepth, nearestDepth1, validCount1 > 0.0);\n empty.depth2 = select(centerDepth, nearestDepth2, validCount2 > 0.0);\n empty.depth3 = select(centerDepth, nearestDepth3, validCount3 > 0.0);\n empty.coverage0 = validCount0 / max(f32(supportCount), 1.0);\n empty.coverage1 = validCount1 / max(f32(supportCount), 1.0);\n empty.coverage2 = validCount2 / max(f32(supportCount), 1.0);\n empty.coverage3 = validCount3 / max(f32(supportCount), 1.0);\n empty.motion = select(support.primaryMotion, support.secondaryMotion, support.primaryRadius <= 1e-5);\n empty.radius = max(support.primaryRadius, support.secondaryRadius);\n empty.receiverMask =\n select(0u, 1u, validCount0 > 0.0 || centerMoving0) |\n select(0u, 2u, validCount1 > 0.0 || centerMoving1) |\n select(0u, 4u, validCount2 > 0.0 || centerMoving2) |\n select(0u, 8u, validCount3 > 0.0 || centerMoving3);\n empty.validMask =\n select(0u, 1u, validCount0 > 0.0 || centerMoving0) |\n select(0u, 2u, validCount1 > 0.0 || centerMoving1) |\n select(0u, 4u, validCount2 > 0.0 || centerMoving2) |\n select(0u, 8u, validCount3 > 0.0 || centerMoving3);\n empty.valid = empty.validMask != 0u;\n return empty;\n}\n\nfn colorAt(pixel : vec2<i32>, dimensions : vec2<i32>) -> vec4<f32> {\n return textureLoad(currentColor, clamp(pixel, vec2<i32>(0), dimensions - vec2<i32>(1)), 0);\n}\n\nfn cacheFootprintContains(receiverPixel : vec2<i32>, ownerPixel : vec2<i32>) -> bool {\n return\n receiverPixel.x >= ownerPixel.x && receiverPixel.x <= ownerPixel.x + 1 &&\n receiverPixel.y >= ownerPixel.y && receiverPixel.y <= ownerPixel.y + 1;\n}\n\nfn cachedSupportCovers(\n receiverPixel : vec2<i32>,\n ownerPixel : vec2<i32>,\n motion : vec2<f32>,\n radius : f32,\n) -> bool {\n if (!cacheFootprintContains(receiverPixel, ownerPixel)) { return false; }\n let motionLength = length(motion);\n if (motionLength <= 1e-5 || radius <= 1e-5) { return false; }\n let direction = motion / motionLength;\n let delta = vec2<f32>(receiverPixel - ownerPixel);\n let along = dot(delta, direction);\n let perpendicular = abs(delta.x * direction.y - delta.y * direction.x);\n return abs(along) <= radius + 1.0 && perpendicular <= 1.0;\n}\n\nfn cachedDirectionMatches(support : MotionBlurSupport, motion : vec2<f32>) -> bool {\n let motionLength = length(motion);\n if (motionLength <= 1e-5) { return false; }\n let direction = motion / motionLength;\n if (support.primaryRadius > 1e-5 && abs(dot(normalize(support.primaryMotion), direction)) >= 0.94) {\n return true;\n }\n return support.secondaryRadius > 1e-5 && abs(dot(normalize(support.secondaryMotion), direction)) >= 0.94;\n}\n\nfn depthGuidedHalfResolutionColor(\n localId : vec3<u32>,\n receiverPixel : vec2<i32>,\n support : MotionBlurSupport,\n centerDepth : f32,\n) -> MotionBlurCacheSample {\n let cell = vec2<i32>(localId.xy / vec2<u32>(2));\n let quadrant = (localId.y % 2u) * 2u + (localId.x % 2u);\n var selected = MotionBlurCacheSample(vec4<f32>(0.0), 0.0, false);\n var selectedDelta = 3.402823e+38;\n // Search the bounded adjacent cache cells, but accept only a cell whose\n // authored 2x2 footprint and direction actually cover this receiver.\n for (var y = -1; y <= 1; y += 1) {\n for (var x = -1; x <= 1; x += 1) {\n let candidateCell = cell + vec2<i32>(x, y);\n if (candidateCell.x < 0 || candidateCell.y < 0 || candidateCell.x >= 4 || candidateCell.y >= 4) { continue; }\n let cacheCellIndex = u32(candidateCell.y * 4 + candidateCell.x);\n let index = cacheCellIndex * 4u + quadrant;\n if (\n halfFilteredValid[index] == 0u ||\n depthReject(centerDepth, halfFilteredDepth[index]) ||\n !cachedDirectionMatches(support, halfFilteredMotion[cacheCellIndex]) ||\n !cachedSupportCovers(\n receiverPixel,\n halfFilteredReceiver[cacheCellIndex],\n halfFilteredMotion[cacheCellIndex],\n halfFilteredRadius[cacheCellIndex],\n )\n ) { continue; }\n let delta = abs(halfFilteredDepth[index] - centerDepth);\n if (!selected.valid || delta < selectedDelta) {\n selected.color = halfFilteredColor[index];\n selected.coverage = halfFilteredCoverage[index];\n selectedDelta = delta;\n selected.valid = true;\n }\n }\n }\n return selected;\n}\n\n@compute @workgroup_size(8, 8)\nfn tile_summary(\n @builtin(global_invocation_id) id : vec3<u32>,\n @builtin(local_invocation_id) localId : vec3<u32>,\n @builtin(local_invocation_index) localIndex : u32,\n @builtin(workgroup_id) workgroupId : vec3<u32>,\n) {\n let dimensions = textureDimensions(sceneTemporal);\n let tiles = (dimensions + vec2<u32>(15)) / vec2<u32>(16);\n let tile = workgroupId.xy;\n let inTile = tile.x < tiles.x && tile.y < tiles.y;\n var maxMotion = vec2<f32>(0.0);\n var maxLength = 0.0;\n var maxSource = vec2<i32>(0);\n var secondaryMotion = vec2<f32>(0.0);\n var secondaryLength = 0.0;\n var secondarySource = vec2<i32>(0);\n for (var localY = 0u; localY < 2u; localY += 1u) {\n for (var localX = 0u; localX < 2u; localX += 1u) {\n let pixel = tile * vec2<u32>(16) + localId.xy * vec2<u32>(2) + vec2<u32>(localX, localY);\n if (!inTile || pixel.x >= dimensions.x || pixel.y >= dimensions.y) { continue; }\n let sample = temporalAt(vec2<i32>(pixel), vec2<i32>(dimensions));\n if (!sample.validDepth || !sample.motionValid) { continue; }\n let motionLength = length(sample.motion * vec2<f32>(dimensions));\n if (motionLength > maxLength) {\n if (distinctDirection(maxMotion, sample.motion)) {\n secondaryMotion = maxMotion;\n secondaryLength = maxLength;\n secondarySource = maxSource;\n }\n maxLength = motionLength;\n maxMotion = sample.motion;\n maxSource = vec2<i32>(pixel);\n } else if (\n motionLength > secondaryLength &&\n distinctDirection(maxMotion, sample.motion)\n ) {\n secondaryLength = motionLength;\n secondaryMotion = sample.motion;\n secondarySource = vec2<i32>(pixel);\n }\n }\n }\n tileMotionScratch[localIndex] = maxMotion;\n tileLengthScratch[localIndex] = maxLength;\n tileSourceScratch[localIndex] = maxSource;\n tileSecondaryMotionScratch[localIndex] = secondaryMotion;\n tileSecondaryLengthScratch[localIndex] = secondaryLength;\n tileSecondarySourceScratch[localIndex] = secondarySource;\n workgroupBarrier();\n for (var stride = 32u; stride > 0u; stride = stride / 2u) {\n if (localIndex < stride) {\n let otherIndex = localIndex + stride;\n let otherLength = tileLengthScratch[otherIndex];\n if (otherLength > tileLengthScratch[localIndex]) {\n let oldMotion = tileMotionScratch[localIndex];\n let oldLength = tileLengthScratch[localIndex];\n let oldSource = tileSourceScratch[localIndex];\n tileLengthScratch[localIndex] = otherLength;\n tileMotionScratch[localIndex] = tileMotionScratch[otherIndex];\n tileSourceScratch[localIndex] = tileSourceScratch[otherIndex];\n if (\n oldLength > 1e-5 &&\n distinctDirection(tileMotionScratch[localIndex], oldMotion) &&\n oldLength > tileSecondaryLengthScratch[localIndex]\n ) {\n tileSecondaryLengthScratch[localIndex] = oldLength;\n tileSecondaryMotionScratch[localIndex] = oldMotion;\n tileSecondarySourceScratch[localIndex] = oldSource;\n }\n }\n if (\n tileSecondaryLengthScratch[otherIndex] > tileSecondaryLengthScratch[localIndex] &&\n distinctDirection(\n tileMotionScratch[localIndex],\n tileSecondaryMotionScratch[otherIndex],\n )\n ) {\n tileSecondaryLengthScratch[localIndex] = tileSecondaryLengthScratch[otherIndex];\n tileSecondaryMotionScratch[localIndex] = tileSecondaryMotionScratch[otherIndex];\n tileSecondarySourceScratch[localIndex] = tileSecondarySourceScratch[otherIndex];\n }\n if (\n tileLengthScratch[otherIndex] > tileSecondaryLengthScratch[localIndex] &&\n distinctDirection(tileMotionScratch[localIndex], tileMotionScratch[otherIndex])\n ) {\n tileSecondaryLengthScratch[localIndex] = tileLengthScratch[otherIndex];\n tileSecondaryMotionScratch[localIndex] = tileMotionScratch[otherIndex];\n tileSecondarySourceScratch[localIndex] = tileSourceScratch[otherIndex];\n }\n }\n workgroupBarrier();\n }\n if (localIndex == 0u && inTile) {\n let tileIndex = tile.y * tiles.x + tile.x;\n tileSummary[tileIndex] = MotionBlurTileSummary(\n vec4<f32>(\n tileMotionScratch[0],\n f32(tileSourceScratch[0].x),\n f32(tileSourceScratch[0].y),\n ),\n vec4<f32>(\n tileSecondaryMotionScratch[0],\n f32(tileSecondarySourceScratch[0].x),\n f32(tileSecondarySourceScratch[0].y),\n ),\n );\n }\n}\n\n@compute @workgroup_size(8, 8)\nfn reconstruct(\n @builtin(global_invocation_id) id : vec3<u32>,\n @builtin(local_invocation_id) localId : vec3<u32>,\n @builtin(workgroup_id) workgroupId : vec3<u32>,\n) {\n let dimensions = textureDimensions(currentColor);\n let colorDimensions = vec2<i32>(dimensions);\n let pixel = vec2<i32>(id.xy);\n let inBounds = id.x < dimensions.x && id.y < dimensions.y;\n let workgroupBase = vec2<i32>(workgroupId.xy * vec2<u32>(8));\n let ownsHalfCell = (localId.x % 2u == 0u) && (localId.y % 2u == 0u);\n let halfIndex = (localId.y / 2u) * 4u + (localId.x / 2u);\n let localIndex = localId.y * 8u + localId.x;\n if (localIndex == 0u) {\n scanTileNeighbourhood(workgroupBase, colorDimensions);\n }\n workgroupBarrier();\n let support = resolveMotionBlurSupport(pixel, colorDimensions);\n let longVector = support.valid && support.longVector;\n\n longVectorScratch[localId.y * 8u + localId.x] = select(0u, 1u, longVector);\n workgroupBarrier();\n for (var longStride = 32u; longStride > 0u; longStride = longStride / 2u) {\n let localIndex = localId.y * 8u + localId.x;\n if (localIndex < longStride) {\n longVectorScratch[localIndex] = max(\n longVectorScratch[localIndex],\n longVectorScratch[localIndex + longStride],\n );\n }\n workgroupBarrier();\n }\n let anyLongVector = longVectorScratch[0] != 0u;\n if (anyLongVector && ownsHalfCell) {\n // Every designated owner evaluates the full support exactly once. The\n // cached result includes filtered color, nearest accepted depth, and\n // coverage; no 2x2 prefilter is substituted for the long gather.\n let sourcePixel = workgroupBase + vec2<i32>(localId.xy);\n let sourceSupport = resolveMotionBlurSupport(sourcePixel, colorDimensions);\n let filtered = longSupportFilter(\n sourcePixel,\n sourceSupport,\n temporalAt(sourcePixel, colorDimensions).depth,\n colorDimensions,\n );\n halfFilteredReceiver[halfIndex] = sourcePixel;\n halfFilteredMotion[halfIndex] = filtered.motion;\n halfFilteredRadius[halfIndex] = filtered.radius;\n let cacheBase = halfIndex * 4u;\n halfFilteredColor[cacheBase] = filtered.color0;\n halfFilteredColor[cacheBase + 1u] = filtered.color1;\n halfFilteredColor[cacheBase + 2u] = filtered.color2;\n halfFilteredColor[cacheBase + 3u] = filtered.color3;\n halfFilteredDepth[cacheBase] = filtered.depth0;\n halfFilteredDepth[cacheBase + 1u] = filtered.depth1;\n halfFilteredDepth[cacheBase + 2u] = filtered.depth2;\n halfFilteredDepth[cacheBase + 3u] = filtered.depth3;\n halfFilteredCoverage[cacheBase] = filtered.coverage0;\n halfFilteredCoverage[cacheBase + 1u] = filtered.coverage1;\n halfFilteredCoverage[cacheBase + 2u] = filtered.coverage2;\n halfFilteredCoverage[cacheBase + 3u] = filtered.coverage3;\n halfFilteredValid[cacheBase] = select(0u, 1u, (filtered.validMask & 1u) != 0u);\n halfFilteredValid[cacheBase + 1u] = select(0u, 1u, (filtered.validMask & 2u) != 0u);\n halfFilteredValid[cacheBase + 2u] = select(0u, 1u, (filtered.validMask & 4u) != 0u);\n halfFilteredValid[cacheBase + 3u] = select(0u, 1u, (filtered.validMask & 8u) != 0u);\n }\n workgroupBarrier();\n // No invocation can return before both uniform barriers above. This keeps\n // odd extents and out-of-bounds lanes from allowing a long source to read a\n // cache entry that another invocation has not published yet.\n if (!inBounds) {\n return;\n }\n if (!support.valid) {\n textureStore(outputColor, pixel, colorAt(pixel, colorDimensions));\n return;\n }\n if (longVector) {\n let cached = depthGuidedHalfResolutionColor(\n localId,\n pixel,\n support,\n temporalAt(pixel, colorDimensions).depth,\n );\n if (cached.valid) {\n textureStore(outputColor, pixel, cached.color);\n } else {\n textureStore(outputColor, pixel, colorAt(pixel, colorDimensions));\n }\n return;\n }\n let useSecondDirection = support.secondaryRadius > 1e-5 && distinctDirection(support.primaryMotion, support.secondaryMotion);\n let count = min(params.sampleCount, 16u);\n let supportCount = max(count - 1u, 1u);\n let primaryCount = select(supportCount, max(supportCount / 2u, 1u), useSecondDirection);\n let secondaryCount = max(supportCount - primaryCount, 1u);\n let shutter = clamp(params.shutterAngle / 360.0, 0.0, 1.0);\n let center = temporalAt(pixel, colorDimensions);\n let centerMotion = sourceMotionPixels(center, colorDimensions);\n let centerMoving = center.validDepth && center.motionValid && sourceRadius(centerMotion, shutter) > 1e-5;\n let centerColor = colorAt(pixel, colorDimensions);\n var accum = vec4<f32>(0.0);\n var weight = 0.0;\n for (var index = 0u; index < 16u; index += 1u) {\n if (index >= supportCount) { break; }\n let secondDirection = useSecondDirection && index >= primaryCount;\n let localIndex = select(index, index - primaryCount, secondDirection);\n let localCount = select(primaryCount, secondaryCount, secondDirection);\n let selectedMotion = select(support.primaryMotion, support.secondaryMotion, secondDirection);\n let selectedRadius = select(support.primaryRadius, support.secondaryRadius, secondDirection);\n let tap = supportTap(\n pixel,\n localIndex,\n localCount,\n selectedMotion,\n selectedRadius,\n select(support.primaryAnchor, support.secondaryAnchor, secondDirection),\n colorDimensions,\n );\n if (!tap.valid) { continue; }\n let source = sourceAt(pixel, tap.pixel, center.depth, shutter, colorDimensions);\n if (!source.valid) { continue; }\n let sampleColor = colorAt(source.pixel, colorDimensions);\n accum += sampleColor;\n weight += 1.0;\n }\n let uncovered = max(f32(supportCount) - weight, 0.0);\n let acceptedColor = select(vec3<f32>(0.0), accum.rgb / max(weight, 1.0), weight > 0.0);\n let missingForeground = 1.0 - clamp(centerColor.a, 0.0, 1.0);\n let edgeCoverage = select(missingForeground, 1.0, centerMoving);\n let edgeFill = acceptedColor * edgeCoverage * EDGE_FILL_FACTOR;\n let movingFallback = select(centerColor.rgb, edgeFill, weight > 0.0);\n let uncoveredColor = select(vec3<f32>(0.0), movingFallback, centerMoving);\n let acceptedAlpha = select(0.0, accum.a / max(weight, 1.0), weight > 0.0);\n let acceptedCoverage = weight + missingForeground * uncovered;\n let reconstructedAlpha = acceptedAlpha * acceptedCoverage / max(f32(count), 1.0);\n let outputAlpha = clamp(max(centerColor.a, reconstructedAlpha), 0.0, 1.0);\n let emptyReceiver =\n !centerMoving &&\n weight > 0.0 &&\n max(max(abs(centerColor.r), abs(centerColor.g)), abs(centerColor.b)) < 1e-4;\n let sourceScale = select(1.0, 1.0 - EDGE_FILL_FACTOR, emptyReceiver);\n let sourceContribution = accum.rgb * sourceScale;\n let trailScale = select(1.0, 1.0 - EDGE_FILL_FACTOR, emptyReceiver);\n let trailContribution = uncoveredColor * uncovered * trailScale;\n textureStore(\n outputColor,\n pixel,\n vec4<f32>((sourceContribution + centerColor.rgb + trailContribution) / max(f32(count), 1.0), outputAlpha),\n );\n}\n";
|
|
31
|
+
export declare function encodeMotionBlurComputeParams(params: MotionBlurParams, frameDeltaSeconds?: number, reset?: boolean): Uint8Array;
|
|
32
|
+
export declare function planMotionBlur(params: MotionBlurParams, context: RenderFeaturePlanContext, temporal?: Pick<MotionBlurFeatureFrame, 'frameDeltaSeconds' | 'reset'>): Result<RenderFeaturePlan, RenderError>;
|
|
33
|
+
export declare function createMotionBlurFeature(read: () => MotionBlurFeatureInput | undefined): RenderFeature<MotionBlurFeatureFrame>;
|
|
16
34
|
//# sourceMappingURL=motion-blur-feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-blur-feature.d.ts","sourceRoot":"","sources":["../../../src/features/motion-blur/motion-blur-feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAA+B,MAAM,UAAU,CAAC;AAC3E,OAAO,
|
|
1
|
+
{"version":3,"file":"motion-blur-feature.d.ts","sourceRoot":"","sources":["../../../src/features/motion-blur/motion-blur-feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM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B,SAAS,EAC1B,KAAK,UAAQ,GACZ,UAAU,CAgBZ;AAMD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,wBAAwB,EACjC,QAAQ,GAAE,IAAI,CAAC,sBAAsB,EAAE,mBAAmB,GAAG,OAAO,CAGnE,GACA,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAgMxC;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,sBAAsB,GAAG,SAAS,GAC7C,aAAa,CAAC,sBAAsB,CAAC,CA0BvC"}
|
|
@@ -3,7 +3,13 @@ export interface MotionBlurParams {
|
|
|
3
3
|
readonly shutterAngle: number;
|
|
4
4
|
readonly maxRadiusPixels: number;
|
|
5
5
|
readonly sampleCount: number;
|
|
6
|
+
/** Target presentation rate used to convert frame displacement to exposure. 0 follows frame time. */
|
|
7
|
+
readonly targetFps: number;
|
|
6
8
|
}
|
|
9
|
+
/** WGSL uniform size for the renderer-owned Motion Blur parameter block. */
|
|
10
|
+
export declare const MOTION_BLUR_PARAMS_BYTE_SIZE = 32;
|
|
11
|
+
/** The only quality tiers the shader is allowed to execute. */
|
|
12
|
+
export type MotionBlurSampleTier = 0 | 4 | 8 | 16;
|
|
7
13
|
export declare const DEFAULT_MOTION_BLUR_PARAMS: MotionBlurParams;
|
|
8
14
|
export interface MotionBlurInvalidParamsDetail {
|
|
9
15
|
readonly field: keyof MotionBlurParams;
|
|
@@ -21,5 +27,20 @@ export declare class MotionBlurValidationError extends Error {
|
|
|
21
27
|
}
|
|
22
28
|
export declare function validateMotionBlurParams(input: Partial<MotionBlurParams> | undefined): Result<MotionBlurParams, MotionBlurValidationError>;
|
|
23
29
|
export declare function motionBlurTemporalDemand(params: MotionBlurParams | undefined): boolean;
|
|
30
|
+
/** Round authored work down to the bounded shader tiers without changing exposure length. */
|
|
31
|
+
export declare function effectiveMotionBlurSampleCount(sampleCount: number): MotionBlurSampleTier;
|
|
32
|
+
/** Reject a frame interval that cannot represent a stable temporal pair. */
|
|
33
|
+
export declare function isMotionBlurIntervalValid(frameDeltaSeconds: number): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Convert current-to-previous frame displacement into the authored target-rate exposure.
|
|
36
|
+
* Invalid intervals return zero so callers can commit a fresh baseline without blurring it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function motionBlurExposureScale(frameDeltaSeconds: number, targetFps: number): number;
|
|
39
|
+
/**
|
|
40
|
+
* Derive a render interval from the host sample clock before ECS time policy
|
|
41
|
+
* clamps it. A finite raw pair is never clamped here, so a hitch remains
|
|
42
|
+
* visible to temporal admission.
|
|
43
|
+
*/
|
|
44
|
+
export declare function motionBlurSampleDelta(sampleTimeSeconds: number | undefined, previousSampleTimeSeconds: number | undefined, fallbackDeltaSeconds: number): number;
|
|
24
45
|
export declare function resolveMotionBlurParams(input: Partial<MotionBlurParams> | undefined): Result<MotionBlurParams | undefined, MotionBlurValidationError>;
|
|
25
46
|
//# sourceMappingURL=motion-blur-params.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-blur-params.d.ts","sourceRoot":"","sources":["../../../src/features/motion-blur/motion-blur-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"motion-blur-params.d.ts","sourceRoot":"","sources":["../../../src/features/motion-blur/motion-blur-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,M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BAAgB,uBAAuB,CAAC,iBAAiB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAY5F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,yBAAyB,EAAE,MAAM,GAAG,SAAS,EAC7C,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAcR;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,SAAS,GAC3C,MAAM,CAAC,gBAAgB,GAAG,SAAS,EAAE,yBAAyB,CAAC,CAGjE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { MotionBlurExecutionReceipt, MotionBlurInspection } from '../../inspection-types';
|
|
2
|
+
import type { CameraSnapshot } from '../../render-contract';
|
|
3
|
+
import type { TemporalFrameTransactionInspection } from '../../temporal/frame';
|
|
4
|
+
import type { TemporalView } from '../../temporal/view';
|
|
5
|
+
import type { MotionBlurFeatureInput } from './motion-blur-feature';
|
|
6
|
+
import { type MotionBlurValidationError } from './motion-blur-params';
|
|
7
|
+
export interface MotionBlurRuntimeCapabilities {
|
|
8
|
+
readonly compute: boolean;
|
|
9
|
+
readonly storageBuffer: boolean;
|
|
10
|
+
readonly storageTexture: boolean;
|
|
11
|
+
readonly rgba16floatRenderable: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface MotionBlurFramePlan {
|
|
14
|
+
readonly rawSampleDelta: number;
|
|
15
|
+
readonly demanded: boolean;
|
|
16
|
+
readonly featureInput: MotionBlurFeatureInput | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface MotionBlurDrawOptions {
|
|
19
|
+
readonly sampleTimeSeconds?: number;
|
|
20
|
+
readonly temporalReset?: true;
|
|
21
|
+
}
|
|
22
|
+
export declare function motionBlurDrawOptions(input: {
|
|
23
|
+
readonly sampleTimeSeconds?: number;
|
|
24
|
+
readonly temporalReset?: boolean;
|
|
25
|
+
}): MotionBlurDrawOptions;
|
|
26
|
+
/** Derive one motion-blur temporal plan before the record transaction starts. */
|
|
27
|
+
export declare function planMotionBlurFrame(input: {
|
|
28
|
+
readonly params: CameraSnapshot['motionBlur'];
|
|
29
|
+
readonly sampleTimeSeconds: number | undefined;
|
|
30
|
+
readonly acceptedSampleTimeSeconds: number | undefined;
|
|
31
|
+
readonly fallbackDeltaSeconds: number;
|
|
32
|
+
readonly acceptedTemporal: TemporalView | undefined;
|
|
33
|
+
readonly temporalReset: boolean;
|
|
34
|
+
readonly width: number;
|
|
35
|
+
readonly height: number;
|
|
36
|
+
readonly cameraViewIdentity: string;
|
|
37
|
+
readonly historyVersion: number;
|
|
38
|
+
readonly environmentSignature: string;
|
|
39
|
+
readonly fogSignature: string;
|
|
40
|
+
readonly deviceGeneration: number;
|
|
41
|
+
}): MotionBlurFramePlan;
|
|
42
|
+
/** Project the bounded inspection record without exposing renderer internals. */
|
|
43
|
+
export declare function projectMotionBlurInspection(input: {
|
|
44
|
+
readonly camera: CameraSnapshot | undefined;
|
|
45
|
+
readonly invalidParams: MotionBlurValidationError | undefined;
|
|
46
|
+
readonly capabilities: MotionBlurRuntimeCapabilities;
|
|
47
|
+
readonly acceptedTemporal: TemporalView | undefined;
|
|
48
|
+
readonly transaction: TemporalFrameTransactionInspection;
|
|
49
|
+
readonly execution: MotionBlurExecutionReceipt | undefined;
|
|
50
|
+
readonly temporalFrameId: number | undefined;
|
|
51
|
+
readonly deviceGeneration: number;
|
|
52
|
+
readonly graphGeneration: number;
|
|
53
|
+
}): MotionBlurInspection | undefined;
|
|
54
|
+
//# sourceMappingURL=motion-blur-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion-blur-runtime.d.ts","sourceRoot":"","sources":["../../../src/features/motion-blur/motion-blur-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,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AoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,YAAY,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC,GAAG,mBAAmB,CAoCtB;AAED,iFAAiF;AACjF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,YAAY,EAAE,6BAA6B,CAAC;IACrD,QAAQ,CAAC,gBAAgB,EAAE,YAAY,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,WAAW,EAAE,kCAAkC,CAAC;IACzD,QAAQ,CAAC,SAAS,EAAE,0BAA0B,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC,GAAG,oBAAoB,GAAG,SAAS,CAmEnC"}
|
package/dist/features/plan.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { GraphBufferAccess, GraphTextureAccess } from '@forgeax/engine-rend
|
|
|
2
2
|
import type { RhiCaps, TextureFormat } from '@forgeax/engine-rhi';
|
|
3
3
|
import { type Result } from '@forgeax/engine-types';
|
|
4
4
|
import type { RenderError } from '../errors/render';
|
|
5
|
-
import type
|
|
5
|
+
import { type SceneDataTarget } from '../temporal/scene-data';
|
|
6
6
|
import type { RenderFeatureGpuBufferUsage, RenderFeatureGpuProgramDescriptor } from './prepared-gpu-work';
|
|
7
7
|
import type { RenderFeaturePipelineDescriptor } from './prepared-graphics';
|
|
8
8
|
export type RenderFeatureResourceUsage = GraphBufferAccess | GraphTextureAccess;
|
|
@@ -36,7 +36,13 @@ export interface RenderFeatureFullscreenProgramDeclaration {
|
|
|
36
36
|
readonly kind: 'fullscreen-program';
|
|
37
37
|
readonly name: string;
|
|
38
38
|
readonly source: string;
|
|
39
|
+
/** Optional fragment entry point when one WGSL module owns multiple passes. */
|
|
40
|
+
readonly fragmentEntryPoint?: string;
|
|
39
41
|
readonly reads?: readonly RenderFeatureFullscreenRead[];
|
|
42
|
+
/** Bind the renderer-owned View group at group(0) for camera reconstruction. */
|
|
43
|
+
readonly usesView?: boolean;
|
|
44
|
+
/** Read-only storage buffers appended after the regular color/depth reads. */
|
|
45
|
+
readonly storageBindings?: readonly number[];
|
|
40
46
|
readonly params?: {
|
|
41
47
|
readonly byteSize: number;
|
|
42
48
|
readonly defaultValue: Uint8Array;
|
|
@@ -75,8 +81,8 @@ export type RenderFeatureResourceDeclaration = RenderFeatureFullscreenProgramDec
|
|
|
75
81
|
readonly kind: 'sampler';
|
|
76
82
|
readonly value: unknown;
|
|
77
83
|
};
|
|
78
|
-
/** Optional graph target
|
|
79
|
-
readonly logicalTarget?:
|
|
84
|
+
/** Optional graph target or semantic scene-data target backing the resource. */
|
|
85
|
+
readonly logicalTarget?: RenderFeatureSampledTarget;
|
|
80
86
|
} | {
|
|
81
87
|
readonly kind: 'compute-bindings';
|
|
82
88
|
readonly name: string;
|
|
@@ -203,6 +209,9 @@ export interface RenderFeaturePlanContext {
|
|
|
203
209
|
readonly caps: Readonly<RhiCaps>;
|
|
204
210
|
readonly frame: {
|
|
205
211
|
readonly frameNumber: number;
|
|
212
|
+
/** Physical render extent used for bounded compute dispatch sizing. */
|
|
213
|
+
readonly width?: number;
|
|
214
|
+
readonly height?: number;
|
|
206
215
|
};
|
|
207
216
|
readonly generation: number;
|
|
208
217
|
readonly targets: readonly RenderFeatureLogicalTarget[];
|
|
@@ -219,9 +228,11 @@ export interface RenderFeaturePlannedFrame {
|
|
|
219
228
|
readonly generation: number;
|
|
220
229
|
readonly signature: string;
|
|
221
230
|
readonly plan: RenderFeaturePlan;
|
|
231
|
+
/** Placement selected by the installed feature; omitted means the legacy post stage. */
|
|
232
|
+
readonly placement?: import('./types').RenderFeaturePlacement;
|
|
222
233
|
}
|
|
223
234
|
export interface RenderFeatureDerivedAccess {
|
|
224
|
-
readonly resource: string;
|
|
235
|
+
readonly resource: string | SceneDataTarget;
|
|
225
236
|
readonly usage: RenderFeatureResourceUsage;
|
|
226
237
|
}
|
|
227
238
|
/** Detached accounting for the canonical plan signature path. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/features/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/features/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAA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