@forgeax/engine-render 0.1.33 → 0.1.35
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 +1062 -127
- 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/device-feature-admission.d.ts +2 -2
- 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/host-contract.d.ts +6 -5
- package/dist/assembly/host-contract.d.ts.map +1 -1
- 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/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/render-target-host.d.ts +5 -0
- package/dist/assembly/render-target-host.d.ts.map +1 -1
- 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/webgpu-pbr-ready.d.ts +1 -0
- package/dist/assembly/webgpu-pbr-ready.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 +1 -1
- 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 +2 -1
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
- package/dist/authoring.mjs +2 -4
- package/dist/authoring.mjs.map +1 -1
- package/dist/barrel-distortion.d.ts +47 -0
- package/dist/barrel-distortion.d.ts.map +1 -0
- package/dist/chunk-3XUBWRY2.mjs +1842 -0
- package/dist/chunk-3XUBWRY2.mjs.map +1 -0
- package/dist/{chunk-OO3DRYK7.mjs → chunk-G6HDNGY7.mjs} +2400 -1767
- package/dist/chunk-G6HDNGY7.mjs.map +1 -0
- package/dist/{chunk-ZDQWGQW7.mjs → chunk-LM5IE7GF.mjs} +4 -4
- package/dist/{chunk-ZDQWGQW7.mjs.map → chunk-LM5IE7GF.mjs.map} +1 -1
- package/dist/{chunk-VOZWDM3L.mjs → chunk-LNIUIKQ7.mjs} +1514 -498
- package/dist/chunk-LNIUIKQ7.mjs.map +1 -0
- package/dist/chunk-MXTWKZO4.mjs +3268 -0
- package/dist/chunk-MXTWKZO4.mjs.map +1 -0
- package/dist/chunk-MZ4C7EHF.mjs +6942 -0
- package/dist/chunk-MZ4C7EHF.mjs.map +1 -0
- package/dist/chunk-RIPAEGI6.mjs +48 -0
- package/dist/chunk-RIPAEGI6.mjs.map +1 -0
- package/dist/{chunk-LEAXOMYJ.mjs → chunk-SGPUJW3F.mjs} +117 -5
- package/dist/chunk-SGPUJW3F.mjs.map +1 -0
- package/dist/{chunk-PA5DRJNI.mjs → chunk-X2KA6WHM.mjs} +29 -4
- package/dist/chunk-X2KA6WHM.mjs.map +1 -0
- package/dist/{chunk-BLXGONR2.mjs → chunk-XSFB7XXQ.mjs} +51 -4
- package/dist/chunk-XSFB7XXQ.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/barrel-distortion.d.ts +13 -0
- package/dist/components/barrel-distortion.d.ts.map +1 -0
- 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/construct-renderer.d.ts +1 -1
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +8406 -5785
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/gpu-residency.d.ts +19 -19
- 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/errors/cloud.d.ts +59 -0
- package/dist/errors/cloud.d.ts.map +1 -0
- package/dist/errors/render.d.ts +20 -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 +5 -1
- package/dist/extract/contracts.d.ts.map +1 -1
- package/dist/extract/material-context.d.ts +7 -0
- package/dist/extract/material-context.d.ts.map +1 -0
- 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 +6 -2
- package/dist/features/error-reporting.d.ts.map +1 -1
- package/dist/features/host.d.ts +15 -0
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/plan.d.ts +10 -0
- package/dist/features/plan.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 +48 -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/glyph-text-layout-system.d.ts +1 -1
- package/dist/glyph-text-layout-system.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.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 +47 -3
- 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 +26 -2
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +5 -0
- 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/frame-resources.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +14 -5
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +30 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +780 -9
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +135 -1
- 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 +47 -100
- package/dist/instances.d.ts.map +1 -1
- package/dist/internal.mjs +7 -8
- package/dist/internal.mjs.map +1 -1
- package/dist/pbr-pipeline.d.ts +22 -4
- 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/lut-gpu.d.ts +2 -2
- package/dist/pipeline/standard-output/lut-gpu.d.ts.map +1 -1
- package/dist/pipeline/standard-output/resources.d.ts +2 -2
- package/dist/pipeline/standard-output/resources.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.map +1 -1
- package/dist/pipeline-builder.d.ts +1 -1
- package/dist/pipeline-builder.d.ts.map +1 -1
- 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/publication/contract.d.ts +77 -0
- package/dist/publication/contract.d.ts.map +1 -0
- package/dist/publication/dependencies.d.ts +7 -0
- package/dist/publication/dependencies.d.ts.map +1 -0
- package/dist/publication/prepare-geometry.d.ts +9 -0
- package/dist/publication/prepare-geometry.d.ts.map +1 -0
- package/dist/publication/programs.d.ts +5 -0
- package/dist/publication/programs.d.ts.map +1 -0
- package/dist/publication/publisher.d.ts +33 -0
- package/dist/publication/publisher.d.ts.map +1 -0
- package/dist/publication/receiver.d.ts +29 -0
- package/dist/publication/receiver.d.ts.map +1 -0
- package/dist/publication/resource-scope.d.ts +18 -0
- package/dist/publication/resource-scope.d.ts.map +1 -0
- package/dist/publication/targets.d.ts +33 -0
- package/dist/publication/targets.d.ts.map +1 -0
- package/dist/publication/video.d.ts +5 -0
- package/dist/publication/video.d.ts.map +1 -0
- 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 +43 -9
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame.d.ts +15 -65
- 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/helpers.d.ts +2 -2
- package/dist/record/helpers.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +22 -6
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +14 -10
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +3 -16
- 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/motion-blur-receipt.d.ts +11 -0
- package/dist/record/motion-blur-receipt.d.ts.map +1 -0
- package/dist/record/prepared-material-bindings.d.ts +3 -3
- package/dist/record/prepared-material-bindings.d.ts.map +1 -1
- 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 +24 -5
- 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 +1 -1
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/sprite-instance-buffer.d.ts +31 -0
- package/dist/record/sprite-instance-buffer.d.ts.map +1 -0
- package/dist/record/target-capture-graph.d.ts +19 -0
- package/dist/record/target-capture-graph.d.ts.map +1 -0
- package/dist/record/typed-frame-graph.d.ts +24 -15
- 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 +14 -4
- 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 +46 -5
- 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 +103 -2
- 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 +18 -9
- 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-projections.d.ts +3 -2
- package/dist/render-system-projections.d.ts.map +1 -1
- 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 +22 -21
- 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 +18 -7
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/scene/render-source.d.ts +42 -0
- package/dist/scene/render-source.d.ts.map +1 -0
- package/dist/scene/source-systems.d.ts +6 -0
- package/dist/scene/source-systems.d.ts.map +1 -0
- 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/systems/skin-palette-types.d.ts +10 -0
- package/dist/systems/skin-palette-types.d.ts.map +1 -1
- package/dist/systems/transparent-dispatch.d.ts +2 -2
- package/dist/systems/transparent-dispatch.d.ts.map +1 -1
- package/dist/systems/transparent-sort-config.d.ts +2 -1
- package/dist/systems/transparent-sort-config.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 +6 -7
- 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/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 +14 -2
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/volume/component.d.ts +9 -4
- 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/package.json +22 -21
- package/src/__tests__/atmosphere-daylight.dawn.test.ts +72 -0
- package/src/__tests__/auto-exposure-transaction.integration.test.ts +4 -9
- 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__/construct-renderer-identity.unit.test.ts +49 -0
- package/src/__tests__/detached-recovery-graph.unit.test.ts +277 -0
- package/src/__tests__/device-feature-admission.unit.test.ts +3 -2
- 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__/factory-contract.integration.test.ts +295 -45
- package/src/__tests__/feature-depth-input.dawn.test.ts +129 -2
- 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-material-artifacts.unit.test.ts +143 -0
- package/src/__tests__/gpu-driven-pbr.dawn.test.ts +5 -6
- package/src/__tests__/gpu-driven-production.integration.test.ts +482 -3
- package/src/__tests__/gpu-driven-shadow-views.dawn.test.ts +6 -5
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +94 -6
- 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-scene.unit.test.ts +119 -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 +97 -305
- package/src/__tests__/instances-world-ownership.integration.test.ts +62 -0
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +4 -1
- package/src/__tests__/main-pass-material-medium-selection.unit.test.ts +145 -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__/materials-standard-contract.unit.test.ts +0 -1
- 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 +13 -7
- 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 +66 -8
- package/src/__tests__/physical-material-budget.unit.test.ts +40 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +66 -2
- package/src/__tests__/probe-bindings.unit.test.ts +582 -1
- package/src/__tests__/probe-scene-dirty.integration.test.ts +28 -1
- 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 +8 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +15 -2
- package/src/__tests__/render-feature-error-reporting.unit.test.ts +21 -1
- 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-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 +20 -20
- 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 +42 -8
- package/src/__tests__/renderer-frame-generation-fence.integration.test.ts +16 -0
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +26 -10
- package/src/__tests__/resource-allocation.unit.test.ts +123 -0
- 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 +15 -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-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.integration.test.ts +182 -1
- 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__/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 +4 -2
- package/src/__tests__/volumetric-fog-budget-recovery.integration.test.ts +30 -20
- 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 +113 -9
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +5 -3
- 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/device-feature-admission.ts +2 -2
- 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/host-contract.ts +8 -5
- 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/recovery/device-loss-fanout.ts +13 -0
- package/src/assembly/recovery/renderer-recover.ts +50 -18
- package/src/assembly/render-feature-post-processes.ts +54 -0
- package/src/assembly/render-target-host.ts +57 -47
- package/src/assembly/renderer-facade.ts +7 -2
- 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 +3 -3
- package/src/assembly/webgpu-pbr-ready.ts +9 -1
- package/src/assembly/webgpu-ready-per-pass.ts +104 -0
- package/src/assembly/webgpu-ready.ts +116 -62
- 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 +303 -313
- package/src/assembly/webgpu-vertex-layouts.ts +1 -1
- package/src/barrel-distortion.ts +247 -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/barrel-distortion.ts +46 -0
- 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/sprite-instances.ts +1 -1
- package/src/construct-renderer.ts +1 -1
- package/src/device/gpu-residency.ts +26 -25
- package/src/dynamic-geometry.ts +12 -1
- package/src/errors/cloud.ts +103 -0
- package/src/errors/render.ts +47 -8
- package/src/examples/single-layer-medium-surface.ts +59 -0
- package/src/extract/camera.ts +15 -1
- package/src/extract/contracts.ts +5 -0
- package/src/extract/material-context.ts +21 -0
- package/src/features/barrel-distortion.ts +172 -0
- package/src/features/error-reporting.ts +26 -6
- package/src/features/host.ts +128 -19
- package/src/features/plan.ts +10 -0
- package/src/features/render-graph-contribution.ts +9 -0
- package/src/features/render-graph-raster.ts +45 -3
- package/src/features/targets.ts +66 -0
- package/src/features/types.ts +51 -0
- package/src/fullscreen-post-process-pass.ts +41 -9
- package/src/glyph-text-layout-system.ts +2 -2
- package/src/gpu-dirty-ranges.ts +48 -0
- package/src/gpu-driven/batch-topology.ts +53 -0
- package/src/gpu-driven/material-artifacts.ts +33 -25
- package/src/gpu-driven/prepared-draw.ts +12 -4
- package/src/gpu-driven/production-raster-material.ts +1894 -0
- package/src/gpu-driven/production-raster.ts +825 -784
- 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 +164 -10
- package/src/gpu-scene.ts +75 -84
- package/src/hdrp-buffers.ts +4 -3
- package/src/ibl/frame-resources.ts +0 -1
- package/src/ibl/skylight-bind-group.ts +62 -32
- package/src/index.ts +205 -9
- package/src/inspection-types.ts +162 -0
- package/src/instance-buffer-cache.ts +4 -4
- package/src/instances.ts +152 -569
- package/src/pbr-pipeline.ts +230 -30
- 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/lut-gpu.ts +3 -3
- package/src/pipeline/standard-output/resources.ts +2 -2
- package/src/pipeline/standard-output/types.ts +12 -1
- package/src/pipeline/standard-pipeline.ts +291 -18
- package/src/pipeline/standard-post.ts +90 -24
- package/src/pipeline-builder.ts +1 -1
- package/src/plugin.ts +4 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +17 -8
- package/src/prepare/prepared-graphics-resolver.ts +2 -0
- package/src/publication/__tests__/derived-geometry.integration.test.ts +177 -0
- package/src/publication/__tests__/features.integration.test.ts +122 -0
- package/src/publication/__tests__/programs.unit.test.ts +25 -0
- package/src/publication/__tests__/publication.integration.test.ts +370 -0
- package/src/publication/__tests__/targets.integration.test.ts +120 -0
- package/src/publication/__tests__/video.browser.test.ts +50 -0
- package/src/publication/contract.ts +104 -0
- package/src/publication/dependencies.ts +54 -0
- package/src/publication/prepare-geometry.ts +94 -0
- package/src/publication/programs.ts +45 -0
- package/src/publication/publisher.ts +618 -0
- package/src/publication/receiver.ts +297 -0
- package/src/publication/resource-scope.ts +31 -0
- package/src/publication/targets.ts +182 -0
- package/src/publication/video.ts +33 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +30 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +15 -1
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +9 -11
- package/src/record/__tests__/temporal-payload.unit.test.ts +1 -1
- 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__/video-texture-view.unit.test.ts +9 -9
- 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 +855 -0
- package/src/record/fold-instance-buffer.ts +51 -0
- package/src/record/frame-lighting.ts +36 -2
- package/src/record/frame-snapshot.ts +45 -9
- package/src/record/frame.ts +258 -1105
- package/src/record/gpu-draw-receipts.ts +38 -0
- package/src/record/gpu-timing.ts +48 -5
- package/src/record/helpers.ts +2 -2
- package/src/record/main-pass-geometry.ts +272 -84
- package/src/record/main-pass-material.ts +102 -36
- package/src/record/main-pass-sprite-draws.ts +13 -217
- package/src/record/main-pass.ts +164 -27
- package/src/record/motion-blur-receipt.ts +91 -0
- package/src/record/prepared-material-bindings.ts +11 -6
- package/src/record/probe-blend-buffer.ts +180 -0
- package/src/record/recovery-pipeline.ts +35 -3
- package/src/record/render-context.ts +41 -5
- package/src/record/shadow-pass.ts +30 -4
- package/src/record/skybox-post-pass.ts +28 -4
- package/src/record/sprite-instance-buffer.ts +155 -0
- package/src/record/target-capture-graph.ts +258 -0
- package/src/record/typed-frame-graph.ts +776 -340
- package/src/record/view-ubo.ts +27 -4
- package/src/record/volume-params.ts +225 -0
- package/src/recovery/render-system-candidate.ts +243 -50
- package/src/reflection/record-owner.ts +7 -3
- package/src/render-contract.ts +54 -5
- package/src/render-graph-primitives.ts +7 -1
- package/src/render-pipeline.ts +130 -0
- package/src/render-system-extract-tail.ts +90 -78
- package/src/render-system-extract.ts +76 -76
- package/src/render-system-presentation.ts +56 -0
- package/src/render-system-producer-roots.ts +96 -0
- package/src/render-system-projections.ts +3 -2
- package/src/render-system-residency.ts +159 -0
- package/src/render-system.ts +421 -408
- package/src/scene/probe-blend.ts +96 -4
- package/src/scene/render-scene.ts +416 -337
- package/src/scene/render-source.ts +90 -0
- package/src/scene/source-systems.ts +33 -0
- 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 +5 -1
- package/src/systems/skin-palette-types.ts +11 -0
- package/src/systems/transparent-dispatch.ts +2 -2
- package/src/systems/transparent-sort-config.ts +3 -1
- 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/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 +70 -2
- package/src/volume/component.ts +10 -9
- package/src/volume/extract.ts +11 -5
- package/src/volume/inspection.ts +3 -0
- package/src/volume/passes.ts +87 -4
- package/src/volume/resources.ts +2 -1
- package/dist/chunk-3RTCJTH4.mjs +0 -1610
- package/dist/chunk-3RTCJTH4.mjs.map +0 -1
- package/dist/chunk-BLXGONR2.mjs.map +0 -1
- package/dist/chunk-ILQ5MEZF.mjs +0 -32
- package/dist/chunk-ILQ5MEZF.mjs.map +0 -1
- package/dist/chunk-LEAXOMYJ.mjs.map +0 -1
- package/dist/chunk-NB2S7ZRX.mjs +0 -1783
- package/dist/chunk-NB2S7ZRX.mjs.map +0 -1
- package/dist/chunk-NNQL7CB3.mjs +0 -1713
- package/dist/chunk-NNQL7CB3.mjs.map +0 -1
- package/dist/chunk-OO3DRYK7.mjs.map +0 -1
- package/dist/chunk-PA5DRJNI.mjs.map +0 -1
- package/dist/chunk-PLAXOOX5.mjs +0 -1907
- package/dist/chunk-PLAXOOX5.mjs.map +0 -1
- package/dist/chunk-RXZ3RGOU.mjs +0 -53
- package/dist/chunk-RXZ3RGOU.mjs.map +0 -1
- package/dist/chunk-VOZWDM3L.mjs.map +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
RenderGraphBuilder,
|
|
4
|
-
RenderGraphError,
|
|
5
|
-
} from '@forgeax/engine-render-graph';
|
|
1
|
+
import type { GraphTextureDescriptor, RenderGraphBuilder } from '@forgeax/engine-render-graph';
|
|
2
|
+
import { RenderGraphError } from '@forgeax/engine-render-graph';
|
|
6
3
|
import { err, ok, type Result } from '@forgeax/engine-types';
|
|
4
|
+
import { CLOUD_LAYER_FEATURE_IDENTITY } from '../cloud/feature';
|
|
7
5
|
import { addAtmosphereBackground } from '../environment/background';
|
|
8
6
|
import { SceneDataUnavailableError } from '../errors/render';
|
|
7
|
+
import { BARREL_DISTORTION_FEATURE_IDENTITY } from '../features/barrel-distortion';
|
|
9
8
|
import {
|
|
10
9
|
GPU_TEXTURE_USAGE_COPY_SRC,
|
|
11
10
|
GPU_TEXTURE_USAGE_RENDER_ATTACHMENT,
|
|
@@ -14,12 +13,14 @@ import {
|
|
|
14
13
|
import type {
|
|
15
14
|
RenderPipeline,
|
|
16
15
|
RenderPipelineFrame,
|
|
16
|
+
RenderPipelineSurfaceMediumPair,
|
|
17
17
|
RenderPipelineTopology,
|
|
18
18
|
} from '../render-pipeline';
|
|
19
19
|
import {
|
|
20
20
|
createRenderPipelineTarget,
|
|
21
21
|
importRenderPipelineSurface,
|
|
22
22
|
type RenderPipelineTarget,
|
|
23
|
+
renderPipelineCloudHistoryTargets,
|
|
23
24
|
} from '../render-pipeline';
|
|
24
25
|
import {
|
|
25
26
|
addStandardSceneDataPass,
|
|
@@ -43,6 +44,11 @@ import {
|
|
|
43
44
|
import { addTypedShadowPasses } from '../typed-shadow-passes';
|
|
44
45
|
import { addAuthoredVolumetricFogPasses } from '../volume/passes';
|
|
45
46
|
import { renderExtentSize } from './render-extent';
|
|
47
|
+
import {
|
|
48
|
+
addSingleLayerMediumMsaaPairProducer,
|
|
49
|
+
addSingleLayerMediumPasses,
|
|
50
|
+
addSingleLayerMediumRawDepthProducer,
|
|
51
|
+
} from './single-layer-medium-passes';
|
|
46
52
|
import type { StandardPipelineBuildContext } from './standard-build-context';
|
|
47
53
|
import {
|
|
48
54
|
addStandardClusterMembershipPass,
|
|
@@ -71,6 +77,10 @@ function buildUrp(
|
|
|
71
77
|
|
|
72
78
|
const internalSize =
|
|
73
79
|
topology.extent === undefined ? 'surface' : renderExtentSize(topology.extent, 'internal');
|
|
80
|
+
const internalCopySize =
|
|
81
|
+
topology.extent === undefined
|
|
82
|
+
? { width: topology.surface.width, height: topology.surface.height }
|
|
83
|
+
: renderExtentSize(topology.extent, 'internal');
|
|
74
84
|
|
|
75
85
|
const clearOnly = topology.clearOnly === true;
|
|
76
86
|
const msaa = !clearOnly && topology.camera.antialias === 'msaa' && topology.lane.multisample;
|
|
@@ -93,7 +103,7 @@ function buildUrp(
|
|
|
93
103
|
});
|
|
94
104
|
const needsTemporalIntermediate = temporalDemand.targetCount === 1;
|
|
95
105
|
const sceneFormat =
|
|
96
|
-
hdr || linearLdr || rawOnly || needsTemporalIntermediate
|
|
106
|
+
hdr || linearLdr || rawOnly || needsTemporalIntermediate || topology.singleLayerMedium === true
|
|
97
107
|
? 'rgba16float'
|
|
98
108
|
: topology.surface.storageFormat;
|
|
99
109
|
|
|
@@ -113,7 +123,13 @@ function buildUrp(
|
|
|
113
123
|
domain: 'display-encoded',
|
|
114
124
|
})
|
|
115
125
|
: ok(surface.value.display)
|
|
116
|
-
: hdr ||
|
|
126
|
+
: hdr ||
|
|
127
|
+
fxaa ||
|
|
128
|
+
linearLdr ||
|
|
129
|
+
msaa ||
|
|
130
|
+
rawOnly ||
|
|
131
|
+
needsTemporalIntermediate ||
|
|
132
|
+
topology.singleLayerMedium === true
|
|
117
133
|
? target(graph, 'scene-color', {
|
|
118
134
|
format: sceneFormat,
|
|
119
135
|
size: internalSize,
|
|
@@ -147,6 +163,27 @@ function buildUrp(
|
|
|
147
163
|
: sceneResolved;
|
|
148
164
|
if (!scene.ok) return scene;
|
|
149
165
|
|
|
166
|
+
const mediumTargets =
|
|
167
|
+
topology.singleLayerMedium === true
|
|
168
|
+
? (() => {
|
|
169
|
+
const nearestLayer = target(graph, 'single-layer-medium-nearest-layer', {
|
|
170
|
+
format: scene.value.format,
|
|
171
|
+
size: internalSize,
|
|
172
|
+
sampleCount: msaa ? 4 : 1,
|
|
173
|
+
domain: 'linear-ldr',
|
|
174
|
+
});
|
|
175
|
+
if (!nearestLayer.ok) return nearestLayer;
|
|
176
|
+
const nearestDepth = target(graph, 'single-layer-medium-nearest-depth', {
|
|
177
|
+
format: 'depth24plus-stencil8',
|
|
178
|
+
size: internalSize,
|
|
179
|
+
sampleCount: msaa ? 4 : 1,
|
|
180
|
+
});
|
|
181
|
+
if (!nearestDepth.ok) return nearestDepth;
|
|
182
|
+
return ok({ nearestLayer: nearestLayer.value, nearestDepth: nearestDepth.value });
|
|
183
|
+
})()
|
|
184
|
+
: ok(undefined);
|
|
185
|
+
if (!mediumTargets.ok) return mediumTargets;
|
|
186
|
+
|
|
150
187
|
const reflectionFallback = topology.reflectionFallback?.enabled
|
|
151
188
|
? target(graph, 'reflection-fallback-linear-hdr', {
|
|
152
189
|
format: 'rgba16float',
|
|
@@ -214,10 +251,96 @@ function buildUrp(
|
|
|
214
251
|
});
|
|
215
252
|
if (!gpuDriven.ok) return gpuDriven;
|
|
216
253
|
const transmissionDemand = transmissionDemandForTopology(topology);
|
|
254
|
+
const backdropDemand = {
|
|
255
|
+
activeCount: transmissionDemand.activeCount + (topology.singleLayerMedium === true ? 1 : 0),
|
|
256
|
+
needsRoughMips: transmissionDemand.needsRoughMips,
|
|
257
|
+
};
|
|
217
258
|
const transmissionActive = resolveTransmissionBackdropTopology({
|
|
218
259
|
demand: transmissionDemand,
|
|
219
260
|
sourceSampleCount: scene.value.sampleCount,
|
|
220
261
|
}).active;
|
|
262
|
+
const backdropActive = resolveTransmissionBackdropTopology({
|
|
263
|
+
demand: backdropDemand,
|
|
264
|
+
sourceSampleCount: scene.value.sampleCount,
|
|
265
|
+
}).active;
|
|
266
|
+
const featureRasterWork =
|
|
267
|
+
context.hasFeatureRasterWork?.(CLOUD_LAYER_FEATURE_IDENTITY, 'scene') === true;
|
|
268
|
+
const cloudScene =
|
|
269
|
+
featureRasterWork && !msaa
|
|
270
|
+
? target(graph, 'cloud-layer-scene-color', {
|
|
271
|
+
format: sceneResolved.value.format,
|
|
272
|
+
size: internalSize,
|
|
273
|
+
sampleCount: 1,
|
|
274
|
+
domain: hdr ? 'linear-hdr' : 'linear-ldr',
|
|
275
|
+
usage:
|
|
276
|
+
GPU_TEXTURE_USAGE_COPY_SRC |
|
|
277
|
+
GPU_TEXTURE_USAGE_RENDER_ATTACHMENT |
|
|
278
|
+
GPU_TEXTURE_USAGE_TEXTURE_BINDING,
|
|
279
|
+
})
|
|
280
|
+
: ok(undefined);
|
|
281
|
+
if (!cloudScene.ok) return cloudScene;
|
|
282
|
+
const cloudShadow =
|
|
283
|
+
featureRasterWork && context.cloudShadowResolution !== undefined
|
|
284
|
+
? target(graph, 'cloud-layer-shadow', {
|
|
285
|
+
format: 'rgba16float',
|
|
286
|
+
size: {
|
|
287
|
+
width: context.cloudShadowResolution,
|
|
288
|
+
height: context.cloudShadowResolution,
|
|
289
|
+
depthOrArrayLayers: 1,
|
|
290
|
+
},
|
|
291
|
+
sampleCount: 1,
|
|
292
|
+
domain: 'linear-hdr',
|
|
293
|
+
usage:
|
|
294
|
+
GPU_TEXTURE_USAGE_COPY_SRC |
|
|
295
|
+
GPU_TEXTURE_USAGE_RENDER_ATTACHMENT |
|
|
296
|
+
GPU_TEXTURE_USAGE_TEXTURE_BINDING,
|
|
297
|
+
})
|
|
298
|
+
: ok(undefined);
|
|
299
|
+
if (!cloudShadow.ok) return cloudShadow;
|
|
300
|
+
const featureTargets = [
|
|
301
|
+
{
|
|
302
|
+
name: 'linear-hdr',
|
|
303
|
+
kind: 'scene-color',
|
|
304
|
+
texture: sceneResolved.value.texture,
|
|
305
|
+
view: sceneResolved.value.view,
|
|
306
|
+
format: sceneResolved.value.format,
|
|
307
|
+
sampleCount: 1,
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
kind: 'scene-depth',
|
|
311
|
+
texture: depth.value.texture,
|
|
312
|
+
view: depth.value.view,
|
|
313
|
+
format: depth.value.format,
|
|
314
|
+
sampleCount: depth.value.sampleCount,
|
|
315
|
+
},
|
|
316
|
+
...(cloudShadow.value === undefined
|
|
317
|
+
? []
|
|
318
|
+
: [
|
|
319
|
+
{
|
|
320
|
+
name: 'cloud-shadow',
|
|
321
|
+
kind: 'scene-color' as const,
|
|
322
|
+
texture: cloudShadow.value.texture,
|
|
323
|
+
view: cloudShadow.value.view,
|
|
324
|
+
format: cloudShadow.value.format,
|
|
325
|
+
sampleCount: 1 as const,
|
|
326
|
+
},
|
|
327
|
+
]),
|
|
328
|
+
...(context.cloudHistory === undefined
|
|
329
|
+
? []
|
|
330
|
+
: renderPipelineCloudHistoryTargets(context.cloudHistory)),
|
|
331
|
+
] as const;
|
|
332
|
+
// Produce the density cache and spatial receiver shadow before opaque
|
|
333
|
+
// shading. The cloud composite is a later scene pass, so it cannot be
|
|
334
|
+
// projected in this call without being overwritten by `main`.
|
|
335
|
+
const shadowFeatures = context.contributeFeatures(
|
|
336
|
+
featureTargets,
|
|
337
|
+
[],
|
|
338
|
+
cloudShadow.value === undefined ? {} : { 'cloud-shadow': cloudShadow.value },
|
|
339
|
+
[],
|
|
340
|
+
'scene',
|
|
341
|
+
['cloud-layer-density-cache', 'cloud-layer-shadow'],
|
|
342
|
+
);
|
|
343
|
+
if (!shadowFeatures.ok) return shadowFeatures;
|
|
221
344
|
const main = addTypedScenePass(graph, {
|
|
222
345
|
environment: atmosphere.value,
|
|
223
346
|
name: 'main',
|
|
@@ -231,20 +354,68 @@ function buildUrp(
|
|
|
231
354
|
...(shadows.value.directional === undefined ? [] : [shadows.value.directional]),
|
|
232
355
|
shadows.value.spot,
|
|
233
356
|
...(shadows.value.point === undefined ? [] : [shadows.value.point]),
|
|
357
|
+
...(cloudShadow.value === undefined ? [] : [cloudShadow.value]),
|
|
234
358
|
],
|
|
235
359
|
...(shadows.value.directional === undefined
|
|
236
360
|
? {}
|
|
237
361
|
: { directionalShadow: shadows.value.directional }),
|
|
238
362
|
spotShadow: shadows.value.spot,
|
|
363
|
+
cloudShadow: cloudShadow.value,
|
|
239
364
|
selector: { LightMode: ['Forward'] },
|
|
240
365
|
colorLoadOp: 'load',
|
|
241
366
|
extraAccesses: clusterReads,
|
|
242
|
-
|
|
367
|
+
// Opaque, transmission and ordinary transparency are separate queue
|
|
368
|
+
// segments. Keeping the opaque filter unconditional prevents an
|
|
369
|
+
// ordinary transparent material from being drawn before the cloud pass.
|
|
370
|
+
recordMode: 'opaque' as const,
|
|
371
|
+
...(backdropActive && gpuDriven.value !== undefined
|
|
372
|
+
? { gpuDrivenFilter: 'opaque' as const }
|
|
373
|
+
: {}),
|
|
243
374
|
...(gpuDriven.value === undefined ? {} : { gpuDriven: gpuDriven.value }),
|
|
244
375
|
...(context.occlusion === undefined ? {} : { occlusion: context.occlusion }),
|
|
245
376
|
});
|
|
246
377
|
if (!main.ok) return main;
|
|
247
378
|
|
|
379
|
+
const opaqueMediumPair =
|
|
380
|
+
topology.singleLayerMedium === true && msaa
|
|
381
|
+
? addSingleLayerMediumMsaaPairProducer({
|
|
382
|
+
graph,
|
|
383
|
+
label: 'single-layer-medium-opaque-resolve',
|
|
384
|
+
sourceColor: scene.value,
|
|
385
|
+
sourceDepth: depth.value,
|
|
386
|
+
size: internalSize,
|
|
387
|
+
})
|
|
388
|
+
: ok(undefined);
|
|
389
|
+
if (!opaqueMediumPair.ok) return opaqueMediumPair;
|
|
390
|
+
if (cloudScene.value !== undefined) {
|
|
391
|
+
const compositeFeatures = context.contributeFeatures(
|
|
392
|
+
featureTargets,
|
|
393
|
+
[],
|
|
394
|
+
{
|
|
395
|
+
'motion-input': sceneResolved.value,
|
|
396
|
+
'motion-output': cloudScene.value,
|
|
397
|
+
...(cloudShadow.value === undefined ? {} : { 'cloud-shadow': cloudShadow.value }),
|
|
398
|
+
...(context.cloudHistory === undefined
|
|
399
|
+
? {}
|
|
400
|
+
: {
|
|
401
|
+
'cloud-history-radiance-current': context.cloudHistory.currentRadiance,
|
|
402
|
+
'cloud-history-radiance-previous': context.cloudHistory.previousRadiance,
|
|
403
|
+
'cloud-history-transmittance-current': context.cloudHistory.currentTransmittance,
|
|
404
|
+
'cloud-history-transmittance-previous': context.cloudHistory.previousTransmittance,
|
|
405
|
+
'cloud-history-depth-current': context.cloudHistory.currentDepth,
|
|
406
|
+
'cloud-history-depth-previous': context.cloudHistory.previousDepth,
|
|
407
|
+
}),
|
|
408
|
+
},
|
|
409
|
+
[],
|
|
410
|
+
'scene',
|
|
411
|
+
// One half-resolution transport MRT produces radiance, transmittance and
|
|
412
|
+
// representative depth; the full-resolution resolve consumes that same
|
|
413
|
+
// frame and advances the ping-pong history on submit.
|
|
414
|
+
['cloud-layer-transport', 'cloud-layer-resolve'],
|
|
415
|
+
);
|
|
416
|
+
if (!compositeFeatures.ok) return compositeFeatures;
|
|
417
|
+
}
|
|
418
|
+
|
|
248
419
|
const temporalLane = topology.lane.compute ? 'clustered' : 'cpu-webgl2';
|
|
249
420
|
const temporalAdmission = standardTemporalLaneAdmission({
|
|
250
421
|
lane: temporalLane,
|
|
@@ -284,62 +455,135 @@ function buildUrp(
|
|
|
284
455
|
if (!coverage.ok) return coverage;
|
|
285
456
|
}
|
|
286
457
|
|
|
458
|
+
let sceneForLater: RenderPipelineTarget = scene.value;
|
|
459
|
+
let sceneResolvedForLater: RenderPipelineTarget = sceneResolved.value;
|
|
460
|
+
if (cloudScene.value !== undefined) {
|
|
461
|
+
sceneForLater = cloudScene.value;
|
|
462
|
+
sceneResolvedForLater = cloudScene.value;
|
|
463
|
+
}
|
|
464
|
+
|
|
287
465
|
const transmission = addTransmissionBackdropPasses({
|
|
288
466
|
graph,
|
|
289
|
-
source:
|
|
290
|
-
demand:
|
|
291
|
-
copySize:
|
|
467
|
+
source: sceneResolvedForLater,
|
|
468
|
+
demand: backdropDemand,
|
|
469
|
+
copySize: internalCopySize,
|
|
292
470
|
encodeRoughMip: context.encodeTransmissionMip,
|
|
293
471
|
includeConsumerPasses: false,
|
|
294
472
|
});
|
|
295
473
|
if (!transmission.ok) return transmission;
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
474
|
+
if (topology.singleLayerMedium === true) {
|
|
475
|
+
const nearestTargets = mediumTargets.value;
|
|
476
|
+
const backdrop = transmission.value.backdrop?.view;
|
|
477
|
+
if (nearestTargets === undefined || backdrop === undefined) {
|
|
478
|
+
return err(
|
|
479
|
+
new RenderGraphError({
|
|
480
|
+
code: 'resource-descriptor-invalid',
|
|
481
|
+
expected: 'single-layer medium graph has nearest targets and an opaque backdrop',
|
|
482
|
+
hint: 'keep the shared transmission backdrop copy ahead of the Surface passes',
|
|
483
|
+
detail: {
|
|
484
|
+
resourceLabel: 'single-layer-medium',
|
|
485
|
+
field: 'backdrop',
|
|
486
|
+
expected: 'resolved graph texture view',
|
|
487
|
+
actual: 'missing',
|
|
488
|
+
},
|
|
489
|
+
}),
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
let rawDepthTarget: RenderPipelineTarget | undefined = opaqueMediumPair.value?.depth;
|
|
493
|
+
if (rawDepthTarget === undefined) {
|
|
494
|
+
const rawDepth = addSingleLayerMediumRawDepthProducer({
|
|
495
|
+
graph,
|
|
496
|
+
sourceColor: sceneResolvedForLater,
|
|
497
|
+
sourceDepth: depth.value,
|
|
498
|
+
size: internalSize,
|
|
499
|
+
});
|
|
500
|
+
if (!rawDepth.ok) return rawDepth;
|
|
501
|
+
rawDepthTarget = rawDepth.value;
|
|
502
|
+
}
|
|
503
|
+
const surfacePair: RenderPipelineSurfaceMediumPair = {
|
|
504
|
+
opaqueColor: opaqueMediumPair.value?.color.view ?? backdrop,
|
|
505
|
+
rawDepth:
|
|
506
|
+
rawDepthTarget === undefined
|
|
507
|
+
? { status: 'unavailable', reason: 'depth-copy-unavailable' }
|
|
508
|
+
: { status: 'available', view: rawDepthTarget.view },
|
|
509
|
+
};
|
|
510
|
+
const mediumPasses = addSingleLayerMediumPasses({
|
|
511
|
+
graph,
|
|
512
|
+
size: internalSize,
|
|
513
|
+
...nearestTargets,
|
|
514
|
+
color: sceneForLater,
|
|
515
|
+
...(msaa ? { colorResolve: sceneResolvedForLater } : {}),
|
|
326
516
|
depth: depth.value,
|
|
327
|
-
...(msaa ? { resolve: sceneResolved.value } : {}),
|
|
328
517
|
sampled: [
|
|
329
518
|
...(shadows.value.directional === undefined ? [] : [shadows.value.directional]),
|
|
330
519
|
shadows.value.spot,
|
|
331
520
|
...(shadows.value.point === undefined ? [] : [shadows.value.point]),
|
|
521
|
+
...(cloudShadow.value === undefined ? [] : [cloudShadow.value]),
|
|
332
522
|
],
|
|
333
523
|
directionalShadow: shadows.value.directional,
|
|
334
524
|
spotShadow: shadows.value.spot,
|
|
335
|
-
|
|
336
|
-
colorLoadOp: 'load',
|
|
337
|
-
depthLoadOp: 'load',
|
|
338
|
-
recordMode: 'transparent',
|
|
525
|
+
cloudShadow: cloudShadow.value,
|
|
339
526
|
extraAccesses: clusterReads,
|
|
527
|
+
surfacePair,
|
|
528
|
+
...(gpuDriven.value === undefined ? {} : { gpuDriven: gpuDriven.value }),
|
|
340
529
|
});
|
|
341
|
-
if (!
|
|
342
|
-
|
|
530
|
+
if (!mediumPasses.ok) return mediumPasses;
|
|
531
|
+
}
|
|
532
|
+
if (backdropActive) {
|
|
533
|
+
if (transmissionActive) {
|
|
534
|
+
const transmissionPass = addTypedScenePass(graph, {
|
|
535
|
+
environment: atmosphere.value,
|
|
536
|
+
name: 'transmission-forward',
|
|
537
|
+
color: sceneForLater,
|
|
538
|
+
depth: depth.value,
|
|
539
|
+
...(msaa ? { resolve: sceneResolvedForLater } : {}),
|
|
540
|
+
sampled: [
|
|
541
|
+
...(shadows.value.directional === undefined ? [] : [shadows.value.directional]),
|
|
542
|
+
shadows.value.spot,
|
|
543
|
+
...(shadows.value.point === undefined ? [] : [shadows.value.point]),
|
|
544
|
+
...(cloudShadow.value === undefined ? [] : [cloudShadow.value]),
|
|
545
|
+
],
|
|
546
|
+
directionalShadow: shadows.value.directional,
|
|
547
|
+
spotShadow: shadows.value.spot,
|
|
548
|
+
cloudShadow: cloudShadow.value,
|
|
549
|
+
selector: { LightMode: ['Forward'] },
|
|
550
|
+
colorLoadOp: 'load',
|
|
551
|
+
depthLoadOp: 'load',
|
|
552
|
+
recordMode: 'transmission',
|
|
553
|
+
extraAccesses: clusterReads,
|
|
554
|
+
// Inject the complete backdrop view so the Standard shader can select
|
|
555
|
+
// the producer's optional roughness mip level. mipViews[0] is only the
|
|
556
|
+
// copy destination view and intentionally exposes one level.
|
|
557
|
+
transmissionBackdrop: transmission.value.backdrop?.view,
|
|
558
|
+
});
|
|
559
|
+
if (!transmissionPass.ok) return transmissionPass;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
const transparentPass = addTypedScenePass(graph, {
|
|
563
|
+
environment: atmosphere.value,
|
|
564
|
+
name: 'transparent',
|
|
565
|
+
color: sceneForLater,
|
|
566
|
+
depth: depth.value,
|
|
567
|
+
...(msaa ? { resolve: sceneResolvedForLater } : {}),
|
|
568
|
+
sampled: [
|
|
569
|
+
...(shadows.value.directional === undefined ? [] : [shadows.value.directional]),
|
|
570
|
+
shadows.value.spot,
|
|
571
|
+
...(shadows.value.point === undefined ? [] : [shadows.value.point]),
|
|
572
|
+
...(cloudShadow.value === undefined ? [] : [cloudShadow.value]),
|
|
573
|
+
],
|
|
574
|
+
directionalShadow: shadows.value.directional,
|
|
575
|
+
spotShadow: shadows.value.spot,
|
|
576
|
+
cloudShadow: cloudShadow.value,
|
|
577
|
+
selector: { LightMode: ['Forward'] },
|
|
578
|
+
colorLoadOp: 'load',
|
|
579
|
+
depthLoadOp: 'load',
|
|
580
|
+
recordMode: 'transparent',
|
|
581
|
+
transparentDepthWrite: true,
|
|
582
|
+
extraAccesses: clusterReads,
|
|
583
|
+
});
|
|
584
|
+
if (!transparentPass.ok) return transparentPass;
|
|
585
|
+
if (backdropActive) {
|
|
586
|
+
const temporal = addTransmissionBackdropTemporalPass(graph, sceneResolvedForLater);
|
|
343
587
|
if (!temporal.ok) return temporal;
|
|
344
588
|
}
|
|
345
589
|
|
|
@@ -353,25 +597,31 @@ function buildUrp(
|
|
|
353
597
|
const volume = addAuthoredVolumetricFogPasses(
|
|
354
598
|
graph,
|
|
355
599
|
topology,
|
|
356
|
-
|
|
600
|
+
sceneResolvedForLater,
|
|
357
601
|
depthSample.value,
|
|
358
602
|
shadows.value.directional?.view,
|
|
359
603
|
shadows.value.spot.view,
|
|
360
604
|
clusterBuffers.value,
|
|
605
|
+
cloudShadow.value?.view,
|
|
361
606
|
);
|
|
362
607
|
if (!volume.ok) return volume;
|
|
363
608
|
}
|
|
364
609
|
|
|
610
|
+
// Project the remaining generic post features after every scene producer has
|
|
611
|
+
// finished. The forward lane may have replaced the scene target with the
|
|
612
|
+
// cloud-resolved target; keep the MSAA resolve target paired with that final
|
|
613
|
+
// color target so feature attachments observe the same surface that the
|
|
614
|
+
// Standard observation reads.
|
|
365
615
|
const features = context.contributeFeatures(
|
|
366
616
|
[
|
|
367
617
|
{
|
|
368
618
|
name: 'linear-hdr',
|
|
369
619
|
kind: 'scene-color',
|
|
370
|
-
texture:
|
|
371
|
-
view:
|
|
372
|
-
...(msaa ? { resolveTarget:
|
|
373
|
-
format:
|
|
374
|
-
sampleCount:
|
|
620
|
+
texture: sceneForLater.texture,
|
|
621
|
+
view: sceneForLater.view,
|
|
622
|
+
...(msaa ? { resolveTarget: sceneResolvedForLater.view } : {}),
|
|
623
|
+
format: sceneForLater.format,
|
|
624
|
+
sampleCount: sceneForLater.sampleCount,
|
|
375
625
|
},
|
|
376
626
|
{
|
|
377
627
|
kind: 'scene-depth',
|
|
@@ -385,17 +635,23 @@ function buildUrp(
|
|
|
385
635
|
{},
|
|
386
636
|
[
|
|
387
637
|
...clusterReads,
|
|
388
|
-
...[
|
|
638
|
+
...[
|
|
639
|
+
shadows.value.directional,
|
|
640
|
+
shadows.value.spot,
|
|
641
|
+
shadows.value.point,
|
|
642
|
+
cloudShadow.value,
|
|
643
|
+
].flatMap((target) =>
|
|
389
644
|
target === undefined ? [] : [{ resource: target.view, usage: 'sampled-read' as const }],
|
|
390
645
|
),
|
|
391
646
|
],
|
|
647
|
+
{ exclude: [BARREL_DISTORTION_FEATURE_IDENTITY] },
|
|
392
648
|
);
|
|
393
649
|
if (!features.ok) return features;
|
|
394
650
|
|
|
395
651
|
if (hdr || linearLdr || rawOnly) {
|
|
396
652
|
const observation = addTypedFrameObservationPass(
|
|
397
653
|
graph,
|
|
398
|
-
|
|
654
|
+
sceneResolvedForLater,
|
|
399
655
|
'forgeax::standard',
|
|
400
656
|
);
|
|
401
657
|
if (!observation.ok) return observation;
|
|
@@ -411,7 +667,7 @@ function buildUrp(
|
|
|
411
667
|
const post = addStandardPost(
|
|
412
668
|
context,
|
|
413
669
|
topology,
|
|
414
|
-
|
|
670
|
+
sceneResolvedForLater,
|
|
415
671
|
depth.value,
|
|
416
672
|
surface.value,
|
|
417
673
|
temporal.value?.temporal,
|
|
@@ -31,6 +31,7 @@ function requestedStages(input: StandardOutputRequest): StandardOutputLogicalSta
|
|
|
31
31
|
if (input.exposure || input.whiteBalance) stages.push('exposure-white-balance');
|
|
32
32
|
stages.push('tone');
|
|
33
33
|
if (input.lut) stages.push('lut');
|
|
34
|
+
if (input.barrelDistortion === true) stages.push('barrel-distortion');
|
|
34
35
|
if (input.fxaa) stages.push('fxaa');
|
|
35
36
|
stages.push('output-encoding');
|
|
36
37
|
return stages;
|
|
@@ -50,6 +51,7 @@ function physicalStages(
|
|
|
50
51
|
case 'tone':
|
|
51
52
|
return { name, input: LINEAR_HDR_DOMAIN, output: LINEAR_LDR_DOMAIN };
|
|
52
53
|
case 'lut':
|
|
54
|
+
case 'barrel-distortion':
|
|
53
55
|
case 'fxaa':
|
|
54
56
|
return { name, input: LINEAR_LDR_DOMAIN, output: LINEAR_LDR_DOMAIN };
|
|
55
57
|
case 'output-encoding':
|
|
@@ -62,8 +64,11 @@ function physicalStages(
|
|
|
62
64
|
|
|
63
65
|
export function createStandardOutputPlan(input: StandardOutputRequest): StandardOutputPlan {
|
|
64
66
|
const logicalStages = requestedStages(input);
|
|
65
|
-
const incrementalResources =
|
|
66
|
-
|
|
67
|
+
const incrementalResources = [
|
|
68
|
+
...(input.lut ? ['standard-color-lut'] : []),
|
|
69
|
+
...(input.barrelDistortion === true ? ['standard-barrel-distortion'] : []),
|
|
70
|
+
];
|
|
71
|
+
const incrementalBindings = (input.lut ? 2 : 0) + (input.barrelDistortion === true ? 3 : 0);
|
|
67
72
|
return {
|
|
68
73
|
lane: input.lane,
|
|
69
74
|
features: {
|
|
@@ -74,6 +79,7 @@ export function createStandardOutputPlan(input: StandardOutputRequest): Standard
|
|
|
74
79
|
exposure: input.exposure,
|
|
75
80
|
whiteBalance: input.whiteBalance,
|
|
76
81
|
lut: input.lut,
|
|
82
|
+
barrelDistortion: input.barrelDistortion === true,
|
|
77
83
|
fxaa: input.fxaa,
|
|
78
84
|
},
|
|
79
85
|
outputEncoding: input.outputEncoding,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { AssetRegistry } from '@forgeax/engine-assets-runtime';
|
|
2
2
|
import { resolveAssetHandle } from '@forgeax/engine-assets-runtime';
|
|
3
|
-
import type { World } from '@forgeax/engine-ecs';
|
|
4
3
|
import type { RenderGraphBuilder, RenderGraphError } from '@forgeax/engine-render-graph';
|
|
5
4
|
import type {
|
|
6
5
|
BindGroup,
|
|
@@ -13,6 +12,7 @@ import type {
|
|
|
13
12
|
} from '@forgeax/engine-rhi';
|
|
14
13
|
import { err, type Handle, ok, type Result, type TextureAsset } from '@forgeax/engine-types';
|
|
15
14
|
import type { GpuResidencyCache, TextureGpuEntry } from '../../device/gpu-residency';
|
|
15
|
+
import type { RenderResourceScope } from '../../publication/resource-scope';
|
|
16
16
|
import type { RenderPipelineFrame, RenderPipelineTarget } from '../../render-pipeline';
|
|
17
17
|
import {
|
|
18
18
|
admitStandardColorLut,
|
|
@@ -41,7 +41,7 @@ export interface StandardLutGraphProjection {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export interface StandardLutGpuPreparationInput {
|
|
44
|
-
readonly world:
|
|
44
|
+
readonly world: RenderResourceScope;
|
|
45
45
|
readonly handle: Handle<'TextureAsset', 'shared'>;
|
|
46
46
|
readonly strength: number;
|
|
47
47
|
readonly assets: AssetRegistry;
|
|
@@ -125,7 +125,7 @@ export function prepareStandardLutGpu(
|
|
|
125
125
|
if (!asset.ok) {
|
|
126
126
|
return failure(
|
|
127
127
|
'standard-lut-residency-failed',
|
|
128
|
-
'the authored TextureAsset handle resolves in the active
|
|
128
|
+
'the authored TextureAsset handle resolves in the active RenderResourceScope',
|
|
129
129
|
'register or rebuild the TextureAsset, then retry the same camera generation',
|
|
130
130
|
causeDetail(asset.error),
|
|
131
131
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { World } from '@forgeax/engine-ecs';
|
|
2
1
|
import { err, ok, type Result, RhiError } from '@forgeax/engine-rhi';
|
|
3
2
|
import { toShared } from '@forgeax/engine-types';
|
|
3
|
+
import type { RenderResourceScope } from '../../publication/resource-scope';
|
|
4
4
|
import type { RenderFrameState } from '../../record/frame-snapshot';
|
|
5
5
|
import type { RenderSystemInternals } from '../../record/render-context';
|
|
6
6
|
import type { CameraSnapshot } from '../../render-contract';
|
|
@@ -17,7 +17,7 @@ export function prepareStandardOutputResources(
|
|
|
17
17
|
state: RenderFrameState,
|
|
18
18
|
internals: RenderSystemInternals,
|
|
19
19
|
camera: CameraSnapshot | undefined,
|
|
20
|
-
world:
|
|
20
|
+
world: RenderResourceScope,
|
|
21
21
|
): Result<void, RhiError> {
|
|
22
22
|
const output = camera?.output;
|
|
23
23
|
if (output?.exposure.kind === 'auto') {
|
|
@@ -8,6 +8,7 @@ export const STANDARD_OUTPUT_LOGICAL_STAGES = [
|
|
|
8
8
|
'exposure-white-balance',
|
|
9
9
|
'tone',
|
|
10
10
|
'lut',
|
|
11
|
+
'barrel-distortion',
|
|
11
12
|
'fxaa',
|
|
12
13
|
'output-encoding',
|
|
13
14
|
] as const;
|
|
@@ -32,6 +33,8 @@ export interface StandardOutputRequest {
|
|
|
32
33
|
readonly exposure: boolean;
|
|
33
34
|
readonly whiteBalance: boolean;
|
|
34
35
|
readonly lut: boolean;
|
|
36
|
+
/** Output-space barrel warp; runs after LUT in linear-LDR. */
|
|
37
|
+
readonly barrelDistortion?: boolean;
|
|
35
38
|
readonly fxaa: boolean;
|
|
36
39
|
readonly outputEncoding: StandardOutputEncoding;
|
|
37
40
|
}
|
|
@@ -47,7 +50,15 @@ export interface StandardOutputPlan {
|
|
|
47
50
|
readonly features: Readonly<
|
|
48
51
|
Pick<
|
|
49
52
|
StandardOutputRequest,
|
|
50
|
-
|
|
53
|
+
| 'temporal'
|
|
54
|
+
| 'meter'
|
|
55
|
+
| 'bloom'
|
|
56
|
+
| 'dof'
|
|
57
|
+
| 'exposure'
|
|
58
|
+
| 'whiteBalance'
|
|
59
|
+
| 'lut'
|
|
60
|
+
| 'barrelDistortion'
|
|
61
|
+
| 'fxaa'
|
|
51
62
|
>
|
|
52
63
|
>;
|
|
53
64
|
readonly outputEncoding: StandardOutputEncoding;
|