@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
|
@@ -7,15 +7,15 @@ import type { GpuBuffer } from './gpu-resource';
|
|
|
7
7
|
* and routes dispose through the RHI shim's destroy bookkeeping SSOT. The
|
|
8
8
|
* two `uploaded*` fields are the cache invalidation fingerprint -- when the
|
|
9
9
|
* archetype version bumps or the byte length changes, the record stage
|
|
10
|
-
* allocates a fresh GpuBuffer and replaces the entry.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* allocates a fresh GpuBuffer and replaces the entry. World-authored Instances
|
|
11
|
+
* use renderer-private projection identity; sprite/fold snapshots use entity
|
|
12
|
+
* identity. Neither cache key is an authoring handle.
|
|
13
13
|
*/
|
|
14
14
|
export interface InstanceBufferCacheEntry {
|
|
15
15
|
readonly buffer: GpuBuffer;
|
|
16
16
|
readonly uploadedByteLength: number;
|
|
17
17
|
readonly uploadedArchVersion: number;
|
|
18
|
-
/**
|
|
18
|
+
/** Accepted instance-projection revision uploaded into this buffer. */
|
|
19
19
|
readonly uploadedRevision?: number;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-buffer-cache.d.ts","sourceRoot":"","sources":["../src/instance-buffer-cache.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,
|
|
1
|
+
{"version":3,"file":"instance-buffer-cache.d.ts","sourceRoot":"","sources":["../src/instance-buffer-cache.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,uEAAuE;IACvE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAaD;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EAC1C,aAAa,CAAC,EAAE,4BAA4B,GAC3C,IAAI,CAGN;AAED,iFAAiF;AACjF,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EAC1C,aAAa,CAAC,EAAE,4BAA4B,GAC3C,IAAI,CAGN;AAED,kFAAkF;AAClF,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,wBAAwB,EAAE,EACnC,aAAa,CAAC,EAAE,4BAA4B,GAC3C,IAAI,CAGN"}
|
package/dist/instances.d.ts
CHANGED
|
@@ -1,42 +1,25 @@
|
|
|
1
|
+
import { InstanceTransformsStrideMismatchError } from '@forgeax/engine-ecs/projection';
|
|
1
2
|
import type { RhiErrorCode } from '@forgeax/engine-rhi';
|
|
2
|
-
|
|
3
|
+
/** Renderer projection identity; never stored in a World or SceneAsset. */
|
|
3
4
|
export type InstanceCollectionId = number & {
|
|
4
5
|
readonly __forgeaxInstanceCollectionId: unique symbol;
|
|
5
6
|
};
|
|
6
|
-
export interface
|
|
7
|
+
export interface InstanceCollectionInfo {
|
|
7
8
|
readonly collectionId: InstanceCollectionId;
|
|
8
|
-
}
|
|
9
|
-
export interface InstanceCollectionInfo extends InstanceCollectionData {
|
|
10
9
|
readonly count: number;
|
|
11
|
-
readonly capacity: number;
|
|
12
10
|
readonly revision: number;
|
|
13
11
|
}
|
|
14
12
|
export interface InstanceDirtyRange {
|
|
15
13
|
start: number;
|
|
16
14
|
end: number;
|
|
17
15
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Choose the ranges that initialize one resident GPU allocation.
|
|
20
|
-
*
|
|
21
|
-
* A cache miss is not a delta upload: recovery, reassociation, and any other
|
|
22
|
-
* new resident has uninitialized device memory. The canonical collection must
|
|
23
|
-
* therefore be copied in full even when the current authoring revision only
|
|
24
|
-
* records a partial dirty range. Existing residents keep the narrower ranges.
|
|
25
|
-
*/
|
|
26
|
-
export declare function instanceUploadRangesForResident(activeIsNew: boolean, dirtyRanges: readonly InstanceDirtyRange[], fullRange: InstanceDirtyRange): readonly InstanceDirtyRange[];
|
|
27
16
|
export interface InstanceCollectionSnapshot extends InstanceCollectionInfo {
|
|
28
17
|
readonly transforms: Float32Array;
|
|
29
|
-
/** Unique identity generations that travel with an instance through reorder. */
|
|
30
18
|
readonly generations: Uint32Array;
|
|
31
|
-
readonly dirtyRanges: readonly InstanceDirtyRange[];
|
|
32
19
|
}
|
|
33
|
-
/** The renderer-owned submission lane selected for one collection. */
|
|
34
20
|
export type InstanceSubmissionLane = 'unresident' | 'direct-storage' | 'chunked-storage' | 'direct-uniform' | 'chunked-uniform' | 'unavailable';
|
|
35
|
-
/** Backend identity carried by collection residency and failure facts. */
|
|
36
21
|
export type InstanceBackendKind = 'webgpu' | 'wgpu-native' | 'wgpu-webgl2' | 'null' | 'unknown';
|
|
37
|
-
/** Closed record-stage failure vocabulary for collection residency. */
|
|
38
22
|
export type InstanceCollectionFailureCode = RhiErrorCode | 'queue-write-buffer-failed';
|
|
39
|
-
/** Typed producer facts retained when a collection cannot be admitted. */
|
|
40
23
|
export interface InstanceCollectionFailureFacts {
|
|
41
24
|
readonly requestedBytes: number;
|
|
42
25
|
readonly supportedBytes: number | undefined;
|
|
@@ -45,11 +28,9 @@ export interface InstanceCollectionFailureFacts {
|
|
|
45
28
|
readonly cause: string;
|
|
46
29
|
readonly recovery: string;
|
|
47
30
|
}
|
|
48
|
-
/** Detached, bounded collection evidence exposed by Renderer.inspect(). */
|
|
49
31
|
export interface InstanceCollectionInspection extends InstanceCollectionInfo {
|
|
50
32
|
readonly residentGeneration: number | undefined;
|
|
51
33
|
readonly lane: InstanceSubmissionLane;
|
|
52
|
-
readonly dirtyRanges: readonly InstanceDirtyRange[];
|
|
53
34
|
readonly uploadRanges: readonly InstanceDirtyRange[];
|
|
54
35
|
readonly uploadedBytes: number;
|
|
55
36
|
readonly requestedBytes: number;
|
|
@@ -63,74 +44,56 @@ export interface InstanceCollectionInspection extends InstanceCollectionInfo {
|
|
|
63
44
|
readonly detail: InstanceCollectionFailureFacts;
|
|
64
45
|
} | undefined;
|
|
65
46
|
}
|
|
66
|
-
export
|
|
67
|
-
readonly
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
readonly
|
|
72
|
-
readonly transforms
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
readonly actual: number | string;
|
|
47
|
+
export declare class InstanceTransformsError extends Error {
|
|
48
|
+
readonly detail: {
|
|
49
|
+
readonly actualLength: number;
|
|
50
|
+
readonly nonFiniteIndex?: number;
|
|
51
|
+
};
|
|
52
|
+
readonly code: "instance-transforms-invalid";
|
|
53
|
+
readonly expected = "finite column-major mat4 values, with transforms.length a multiple of 16";
|
|
54
|
+
readonly hint = "repair Instances.transforms in the World or source SceneAsset and retry";
|
|
55
|
+
constructor(detail: {
|
|
56
|
+
readonly actualLength: number;
|
|
57
|
+
readonly nonFiniteIndex?: number;
|
|
58
|
+
});
|
|
79
59
|
}
|
|
80
|
-
export
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
|
|
60
|
+
export declare function validateInstanceTransforms(transforms: ArrayLike<number>): InstanceTransformsError | InstanceTransformsStrideMismatchError | undefined;
|
|
61
|
+
/** A new allocation must receive the complete payload, including after recovery. */
|
|
62
|
+
export declare function instanceUploadRangesForResident(activeIsNew: boolean, dirtyRanges: readonly InstanceDirtyRange[], fullRange: InstanceDirtyRange): readonly InstanceDirtyRange[];
|
|
63
|
+
interface Residency {
|
|
64
|
+
readonly frameNumber: number;
|
|
65
|
+
readonly residentGeneration: number | undefined;
|
|
66
|
+
readonly lane: InstanceSubmissionLane;
|
|
67
|
+
readonly uploadRanges: readonly InstanceDirtyRange[];
|
|
68
|
+
readonly uploadedBytes: number;
|
|
69
|
+
readonly requestedBytes: number;
|
|
70
|
+
readonly supportedBytes: number | undefined;
|
|
71
|
+
readonly backend: InstanceBackendKind;
|
|
72
|
+
readonly error: InstanceCollectionInspection['error'];
|
|
90
73
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
* Renderer-owned canonical storage for explicit instance transforms.
|
|
94
|
-
*
|
|
95
|
-
* ECS carries only `Instances.collectionId`; this owner keeps the copied
|
|
96
|
-
* matrices, revision and dirty intervals independent of archetype capacity.
|
|
97
|
-
* Snapshots are detached before they cross into extraction, so callers cannot
|
|
98
|
-
* mutate the canonical source behind the revision protocol.
|
|
99
|
-
*/
|
|
100
|
-
export declare class InstanceCollectionStore {
|
|
74
|
+
/** Rebuildable renderer projection. All authoring and entity lifetime belong to World. */
|
|
75
|
+
export declare class InstanceProjectionStore {
|
|
101
76
|
private nextId;
|
|
102
|
-
private
|
|
103
|
-
private
|
|
104
|
-
private disposed;
|
|
77
|
+
private nextGeneration;
|
|
78
|
+
private identities;
|
|
105
79
|
private readonly records;
|
|
106
80
|
private readonly residency;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
_inspections(): readonly InstanceCollectionInspection[];
|
|
121
|
-
/** @internal Renderer record owner reports the accepted collection lane. */
|
|
122
|
-
_reportResidency(input: {
|
|
81
|
+
project(world: object, entity: number, transforms: ArrayLike<number>): InstanceCollectionSnapshot;
|
|
82
|
+
/** Called only after the owning RenderScene accepts its prepared changes. */
|
|
83
|
+
accept(world: object, entity: number, snapshot: {
|
|
84
|
+
readonly collectionId?: InstanceCollectionId;
|
|
85
|
+
readonly revision?: number;
|
|
86
|
+
readonly transforms: Float32Array;
|
|
87
|
+
readonly generations?: Uint32Array;
|
|
88
|
+
}): void;
|
|
89
|
+
release(world: object, entity: number): void;
|
|
90
|
+
retain(ids: ReadonlySet<InstanceCollectionId>): void;
|
|
91
|
+
dispose(): void;
|
|
92
|
+
_resetResidency(): void;
|
|
93
|
+
_reportResidency(input: Omit<Residency, 'error' | 'lane'> & {
|
|
123
94
|
readonly collectionId: InstanceCollectionId;
|
|
124
|
-
readonly frameNumber: number;
|
|
125
|
-
readonly residentGeneration: number;
|
|
126
95
|
readonly lane: Exclude<InstanceSubmissionLane, 'unresident' | 'unavailable'>;
|
|
127
|
-
readonly uploadRanges: readonly InstanceDirtyRange[];
|
|
128
|
-
readonly uploadedBytes: number;
|
|
129
|
-
readonly requestedBytes: number;
|
|
130
|
-
readonly supportedBytes: number | undefined;
|
|
131
|
-
readonly backend: InstanceBackendKind;
|
|
132
96
|
}): void;
|
|
133
|
-
/** @internal Renderer record owner reports a typed admission failure. */
|
|
134
97
|
_reportFailure(input: {
|
|
135
98
|
readonly collectionId: InstanceCollectionId;
|
|
136
99
|
readonly code: InstanceCollectionFailureCode;
|
|
@@ -138,23 +101,7 @@ export declare class InstanceCollectionStore {
|
|
|
138
101
|
readonly hint: string;
|
|
139
102
|
readonly facts: InstanceCollectionFailureFacts;
|
|
140
103
|
}): void;
|
|
141
|
-
|
|
142
|
-
_resetResidency(): void;
|
|
143
|
-
snapshot(id: InstanceCollectionId): InstanceCollectionResult<InstanceCollectionSnapshot>;
|
|
144
|
-
/**
|
|
145
|
-
* Read a detached matrix view without advancing the render-consumption
|
|
146
|
-
* cursor. Inspection and picking may call this between authoring updates;
|
|
147
|
-
* the next renderer snapshot must still receive the complete dirty union.
|
|
148
|
-
*/
|
|
149
|
-
peek(id: InstanceCollectionId): InstanceCollectionResult<InstanceCollectionSnapshot>;
|
|
150
|
-
release(id: InstanceCollectionId): InstanceCollectionResult<void>;
|
|
151
|
-
/** Drop all canonical matrices during Renderer disposal. */
|
|
152
|
-
dispose(): void;
|
|
153
|
-
private live;
|
|
154
|
-
private detachedSnapshot;
|
|
155
|
-
private info;
|
|
156
|
-
private allocateGenerations;
|
|
157
|
-
private validateReplacementGenerations;
|
|
158
|
-
private projectInspection;
|
|
104
|
+
_inspections(frameNumber: number): readonly InstanceCollectionInspection[];
|
|
159
105
|
}
|
|
106
|
+
export {};
|
|
160
107
|
//# sourceMappingURL=instances.d.ts.map
|
package/dist/instances.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../src/instances.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../src/instances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,2EAA2E;AAC3E,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG;IAC1C,QAAQ,CAAC,6BAA6B,EAAE,OAAO,MAAM,CAAC;CACvD,CAAC;AACF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AACD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC;AACD,MAAM,MAAM,sBAAsB,GAC9B,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,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D,GAAG,IAAI;IAmBR,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,4BAA4B,EAAE;CAoB3E"}
|
package/dist/internal.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export { PROBE_MAX_CONTRIBUTORS, SSR_HISTORY_FORMAT, SsrHistoryOwner, admitProbeContributors, blendLightProbes,
|
|
2
|
-
|
|
3
|
-
import './chunk-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { EXTENDED_LIGHTING_TOPOLOGY } from './chunk-
|
|
7
|
-
export { DeviceScope, EXTENDED_LIGHTING_REQUIRED_SAMPLED_TEXTURES, deriveExtendedLightingCapability, extendedLightingSampledTextureCapacityAvailable, validateGraphTargetCaptureReadback } from './chunk-
|
|
8
|
-
export { createLightResourceUnavailable, createVisibilityBudget } from './chunk-NB2S7ZRX.mjs';
|
|
1
|
+
export { PROBE_MAX_CONTRIBUTORS, SSR_HISTORY_FORMAT, SsrHistoryOwner, admitProbeContributors, blendLightProbes, createExtendedLightingState, createSsrHistoryOwner, estimateSsrSpatialMemory, projectExtendedLightingInspection, promoteExtendedLightingCandidate, recordExtendedLightingFailure, scaledProbeWeight, setOcclusionRuntimeTestHooks } from './chunk-3XUBWRY2.mjs';
|
|
2
|
+
export { buildRectAreaWorldFrame, rectAreaFacesPoint } from './chunk-G6HDNGY7.mjs';
|
|
3
|
+
import './chunk-X2KA6WHM.mjs';
|
|
4
|
+
export { TemporalFrameCoordinator } from './chunk-LM5IE7GF.mjs';
|
|
5
|
+
import './chunk-RIPAEGI6.mjs';
|
|
6
|
+
import { EXTENDED_LIGHTING_TOPOLOGY } from './chunk-MXTWKZO4.mjs';
|
|
7
|
+
export { DeviceScope, EXTENDED_LIGHTING_REQUIRED_SAMPLED_TEXTURES, createLightResourceUnavailable, createVisibilityBudget, deriveExtendedLightingCapability, extendedLightingSampledTextureCapacityAvailable, validateGraphTargetCaptureReadback } from './chunk-MXTWKZO4.mjs';
|
|
9
8
|
export { resolveTilesetRuntime } from '@forgeax/engine-assets-runtime';
|
|
10
9
|
import '@forgeax/engine-shader';
|
|
11
10
|
import { ok, err } from '@forgeax/engine-types';
|
package/dist/internal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/prepare/extended-lighting/ltc-resources.ts","../src/ssr/temporal.ts"],"names":["ok","err"],"mappings":";;;;;;;;;;;;AAoCO,SAAS,sBAAsB,KAAA,EAA8C;AAClF,EAAA,MAAM,WAAW,KAAA,CAAM,YAAA;AACvB,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,0BAAA;AAAA,IACV,UAAA,EAAY,MAAM,KAAA,CAAM,UAAA;AAAA,IACxB,aAAA,EAAe,WAAW,UAAA,GAAa,SAAA;AAAA,IACvC,UAAA,EAAY,WAAW,CAAA,GAAI,CAAA;AAAA,IAC3B,aAAa,QAAA,IAAY,KAAA,CAAM,uBAAuB,KAAA,CAAM,KAAA,CAAM,aAAa,CAAA,GAAI;AAAA,GACrF;AACF;ACPA,SAAS,eAAe,KAAA,EAAoC;AAC1D,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,IAAA,IAAQ,WAAW,KAAA,EAAO;AACnE,IAAA,MAAM,QAAS,KAAA,CAAuC,KAAA;AACtD,IAAA,IAAI,UAAU,OAAA,IAAW,KAAA,KAAU,YAAY,KAAA,KAAU,QAAA,IAAY,UAAU,QAAA,EAAU;AACvF,MAAA,OAAO,KAAA;AAAA,IACT;AAAA,EACF;AACA,EAAA,OAAO,QAAA;AACT;AACA,SAAS,iBAAoB,KAAA,EAA+D;AAC1F,EAAA,MAAM,WAAA,GAAc,KAAA,CAAM,WAAA,EAAa,QAAA,CAAS,KAAK,CAAA,GACjD,KAAA,CAAM,WAAA,GACN,CAAC,GAAI,KAAA,CAAM,WAAA,IAAe,IAAK,KAAc,CAAA;AACjD,EAAA,OAAO,EAAE,GAAG,KAAA,EAAO,cAAA,EAAgB,MAAM,WAAA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AAK,KAAA,CAAM,WAAW,KAAK,CAAA;AAC3B,MAAA,OAAOC,GAAAA,CAAI;AAAA,QACT,IAAA,EAAM,2BAAA;AAAA,QACN,QAAA,EAAU,gBAAgB,KAAK,CAAA,uBAAA,CAAA;AAAA,QAC/B,IAAA,EAAM,2EAAA;AAAA,QACN,MAAA,EAAQ,EAAE,KAAA,EAAO,KAAA;AAAM,OACxB,CAAA;AAAA,IACH;AACA,IAAA,OAAO,IAAA,CAAK,OAAO,SAAS,CAAA;AAAA,EAC9B;AAAA,EACA,MAAM,MAAA,EAAqC;AACzC,IAAA,IAAA,CAAK,OAAA,CAAQ,MAAM,MAAM,CAAA;AACzB,IAAA,gBAAA,CAAiB,IAAA,CAAK,aAAa,MAAM,CAAA;AAAA,EAC3C;AAAA,EACA,gBAAA,CACE,OACA,SAAA,EACM;AACN,IAAA,IAAA,CAAK,OAAA,CAAQ,gBAAA,CAAiB,KAAA,EAAO,SAAS,CAAA;AAAA,EAChD;AAAA,EACA,OAAA,GAAiC;AAC/B,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,WAAA,CAAY,OAAA,EAAQ;AAC1C,IAAA,OAAO,OAAO,MAAA,CAAO;AAAA,MACnB,aAAa,QAAA,CAAS,KAAA;AAAA,MACtB,aAAa,QAAA,CAAS,WAAA;AAAA,MACtB,oBAAoB,QAAA,CAAS,OAAA;AAAA,MAC7B,OAAA,EAAS,IAAA,CAAK,OAAA,CAAQ,OAAA;AAAQ,KAC/B,CAAA;AAAA,EACH;AACF;AACO,SAAS,yBAAA,CACd,aACA,OAAA,EACwB;AACxB,EAAA,OAAO,IAAI,mBAAA,CAAoB,WAAA,EAAa,OAAO,CAAA;AACrD","file":"internal.mjs","sourcesContent":["// @forgeax/engine-render - DeviceScope-owned RectArea LTC resources.\n\nimport type { Result, RhiDevice, RhiError, Texture } from '@forgeax/engine-rhi';\nimport { LTC_TABLE_HEIGHT, LTC_TABLE_WIDTH, LTC_TABLES } from '@forgeax/engine-shader';\nimport { err, ok } from '@forgeax/engine-types';\nimport { type DeviceScope, LifecycleTransaction } from '../../device/device-scope';\nimport {\n GPU_TEXTURE_USAGE_COPY_DST,\n GPU_TEXTURE_USAGE_TEXTURE_BINDING,\n} from '../../gpu-texture-usage';\nimport { deriveExtendedLightingCapability, EXTENDED_LIGHTING_TOPOLOGY } from './resources';\n\nexport interface LtcResourcePlanInput {\n readonly scope: DeviceScope;\n readonly ltcAvailable: boolean;\n readonly residentGeneration?: number;\n}\n\nexport interface LtcResourcePlan {\n readonly topology: typeof EXTENDED_LIGHTING_TOPOLOGY;\n readonly generation: number;\n readonly rectAdmission: 'admitted' | 'omitted';\n readonly tableCount: number;\n readonly uploadCount: number;\n}\n\nexport interface LtcResourceCandidate {\n readonly topology: typeof EXTENDED_LIGHTING_TOPOLOGY;\n readonly generation: number;\n readonly scope: DeviceScope;\n readonly lambertTexture: Texture;\n readonly ggxTexture: Texture;\n readonly tableCount: 2;\n readonly uploadCount: 2;\n}\n\nexport function deriveLtcResourcePlan(input: LtcResourcePlanInput): LtcResourcePlan {\n const admitted = input.ltcAvailable;\n return {\n topology: EXTENDED_LIGHTING_TOPOLOGY,\n generation: input.scope.generation,\n rectAdmission: admitted ? 'admitted' : 'omitted',\n tableCount: admitted ? 2 : 0,\n uploadCount: admitted && input.residentGeneration !== input.scope.generation ? 2 : 0,\n };\n}\n\nfunction failure(expected: string, actual: string): Result<never, RhiError> {\n return err({\n code: 'webgpu-runtime-error',\n expected,\n hint: 'inspect device capabilities and retry the extendedLighting candidate',\n detail: { error: { code: 'ltc-resource', message: actual } },\n } as RhiError);\n}\n\nfunction textureBytes(table: Uint16Array): Uint8Array {\n return new Uint8Array(table.buffer, table.byteOffset, table.byteLength);\n}\n\n/** Create both tracked tables atomically; unavailable LTC only omits Rect. */\nexport async function createLtcResourceCandidate(input: {\n readonly device: RhiDevice | undefined;\n readonly scope: DeviceScope;\n}): Promise<Result<LtcResourceCandidate | undefined, RhiError>> {\n if (input.device === undefined) return ok(undefined);\n if (!deriveExtendedLightingCapability(input.device).admitted) return ok(undefined);\n const device = input.device;\n\n const transaction = new LifecycleTransaction(input.scope);\n let lambertTexture: Texture | undefined;\n let ggxTexture: Texture | undefined;\n const createTable = (label: string, table: Uint16Array): Texture => {\n const texture = device.createTexture({\n label,\n size: { width: LTC_TABLE_WIDTH, height: LTC_TABLE_HEIGHT, depthOrArrayLayers: 1 },\n mipLevelCount: 1,\n sampleCount: 1,\n dimension: '2d',\n format: 'rgba16float',\n usage: GPU_TEXTURE_USAGE_COPY_DST | GPU_TEXTURE_USAGE_TEXTURE_BINDING,\n viewFormats: [],\n textureBindingViewDimension: undefined,\n });\n if (texture === undefined || !texture.ok) {\n throw texture?.error ?? new Error('LTC texture creation returned no result');\n }\n const write = device.queue.writeTexture(\n { texture: texture.value, mipLevel: 0, origin: { x: 0, y: 0, z: 0 } },\n textureBytes(table),\n { offset: 0, bytesPerRow: LTC_TABLE_WIDTH * 8, rowsPerImage: LTC_TABLE_HEIGHT },\n { width: LTC_TABLE_WIDTH, height: LTC_TABLE_HEIGHT, depthOrArrayLayers: 1 },\n );\n if (!write.ok) throw write.error;\n return texture.value;\n };\n\n transaction.add({\n kind: 'texture',\n create: () => {\n lambertTexture = createTable('extended-lighting-ltc-lambert', LTC_TABLES.lambert);\n return lambertTexture;\n },\n cleanup: (value) => {\n const destroyed = input.device?.destroyTexture(value);\n if (destroyed !== undefined && !destroyed.ok) throw destroyed.error;\n },\n });\n transaction.add({\n kind: 'texture',\n create: () => {\n ggxTexture = createTable('extended-lighting-ltc-ggx', LTC_TABLES.ggx);\n return ggxTexture;\n },\n cleanup: (value) => {\n const destroyed = input.device?.destroyTexture(value);\n if (destroyed !== undefined && !destroyed.ok) throw destroyed.error;\n },\n });\n\n const committed = await transaction.commit();\n if (!committed.ok)\n return failure(committed.error.primary.expected, committed.error.primary.message);\n if (lambertTexture === undefined || ggxTexture === undefined) {\n return failure('two LTC textures', 'the transaction committed without both tables');\n }\n return ok({\n topology: EXTENDED_LIGHTING_TOPOLOGY,\n generation: input.scope.generation,\n scope: input.scope,\n lambertTexture,\n ggxTexture,\n tableCount: 2,\n uploadCount: 2,\n });\n}\n","import { err, ok, type Result } from '@forgeax/engine-types';\nimport type {\n TemporalFrameBeginInput,\n TemporalFrameCandidate,\n TemporalFrameConsumerId,\n TemporalFrameCoordinator,\n TemporalFrameError,\n TemporalFramePhases,\n TemporalFrameReceipt,\n TemporalFrameStage,\n} from '../temporal/frame-coordinator';\nimport type {\n SsrHistoryCandidate,\n SsrHistoryError,\n SsrHistoryFailureStage,\n SsrHistoryInspection,\n SsrHistoryOwner,\n SsrHistoryResetReason,\n} from './history';\n\nexport interface SsrTemporalCandidate<T> {\n readonly temporal: TemporalFrameCandidate<T>;\n readonly history: SsrHistoryCandidate;\n}\nexport interface SsrTemporalExecutionError {\n readonly code: 'ssr-temporal-stage-failed';\n readonly expected: string;\n readonly hint: string;\n readonly detail: Readonly<{ readonly stage: TemporalFrameStage; readonly cause: unknown }>;\n}\nexport interface SsrTemporalInspection {\n readonly sharedEpoch: number;\n readonly consumerIds: readonly TemporalFrameConsumerId[];\n readonly coordinatorAttempt: 'none' | 'active' | 'committed' | 'aborted';\n readonly history: SsrHistoryInspection;\n}\nexport type SsrTemporalError = TemporalFrameError | SsrHistoryError | SsrTemporalExecutionError;\n\nfunction stageFromError(cause: unknown): TemporalFrameStage {\n if (typeof cause === 'object' && cause !== null && 'stage' in cause) {\n const stage = (cause as { readonly stage?: unknown }).stage;\n if (stage === 'build' || stage === 'encode' || stage === 'finish' || stage === 'submit') {\n return stage;\n }\n }\n return 'submit';\n}\nfunction coordinatorInput<T>(input: TemporalFrameBeginInput<T>): TemporalFrameBeginInput<T> {\n const consumerIds = input.consumerIds?.includes('ssr')\n ? input.consumerIds\n : [...(input.consumerIds ?? []), 'ssr' as const];\n return { ...input, temporalDemand: true, consumerIds };\n}\nfunction resetCoordinator<T>(\n coordinator: TemporalFrameCoordinator<T>,\n reason: SsrHistoryResetReason,\n): void {\n switch (reason) {\n case 'first-enable':\n case 'disable':\n return;\n case 'resize':\n coordinator.reset('resize');\n return;\n case 'camera-cut':\n coordinator.reset('cut');\n return;\n case 'history-version':\n coordinator.reset('camera-switch');\n return;\n case 'coverage-loss':\n coordinator.reset('detach');\n return;\n case 'reflection-generation':\n case 'device-recovery':\n coordinator.reset('device-generation');\n return;\n }\n}\n\n/** Stages SSR history beside the shared renderer transaction without owning submit or epochs. */\nexport class SsrTemporalConsumer<T = unknown> {\n constructor(\n private readonly coordinator: TemporalFrameCoordinator<T>,\n readonly history: SsrHistoryOwner,\n ) {}\n begin(\n input: TemporalFrameBeginInput<T>,\n ): Result<SsrTemporalCandidate<T>, TemporalFrameError | SsrHistoryError> {\n const history = this.history.beginFrame();\n if (!history.ok) return history;\n const temporal = this.coordinator.begin(coordinatorInput(input));\n if (!temporal.ok) {\n this.history.abortFrame(history.value, 'build');\n return temporal;\n }\n return ok({ temporal: temporal.value, history: history.value });\n }\n commit(\n candidate: SsrTemporalCandidate<T>,\n ): Result<TemporalFrameReceipt<T>, TemporalFrameError | SsrHistoryError> {\n const committed = this.coordinator.commit(candidate.temporal);\n if (!committed.ok) {\n this.history.abortFrame(candidate.history, 'submit');\n return committed;\n }\n const history = this.history.commitFrame(candidate.history);\n if (!history.ok) return history;\n return committed;\n }\n abort(candidate: SsrTemporalCandidate<T>, stage: SsrHistoryFailureStage): void {\n this.history.abortFrame(candidate.history, stage);\n this.coordinator.abort(candidate.temporal, stage);\n }\n run(\n input: TemporalFrameBeginInput<T>,\n phases: TemporalFramePhases<T>,\n ): Result<TemporalFrameReceipt<T>, SsrTemporalError> {\n const started = this.begin(input);\n if (!started.ok) return started;\n const candidate = started.value;\n try {\n const built = phases.build();\n phases.encode(built);\n phases.finish();\n phases.submit();\n } catch (cause) {\n const stage = stageFromError(cause);\n this.abort(candidate, stage);\n return err({\n code: 'ssr-temporal-stage-failed',\n expected: `SSR temporal ${stage} succeeds before commit`,\n hint: 'inspect the owned stage failure and retry without promoting the candidate',\n detail: { stage, cause },\n });\n }\n return this.commit(candidate);\n }\n reset(reason: SsrHistoryResetReason): void {\n this.history.reset(reason);\n resetCoordinator(this.coordinator, reason);\n }\n retireAfterFence(\n queue: Parameters<SsrHistoryOwner['retireAfterFence']>[0],\n onFailure: Parameters<SsrHistoryOwner['retireAfterFence']>[1],\n ): void {\n this.history.retireAfterFence(queue, onFailure);\n }\n inspect(): SsrTemporalInspection {\n const temporal = this.coordinator.inspect();\n return Object.freeze({\n sharedEpoch: temporal.epoch,\n consumerIds: temporal.consumerIds,\n coordinatorAttempt: temporal.attempt,\n history: this.history.inspect(),\n });\n }\n}\nexport function createSsrTemporalConsumer<T>(\n coordinator: TemporalFrameCoordinator<T>,\n history: SsrHistoryOwner,\n): SsrTemporalConsumer<T> {\n return new SsrTemporalConsumer(coordinator, history);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/prepare/extended-lighting/ltc-resources.ts","../src/ssr/temporal.ts"],"names":["ok","err"],"mappings":";;;;;;;;;;;AAoCO,SAAS,sBAAsB,KAAA,EAA8C;AAClF,EAAA,MAAM,WAAW,KAAA,CAAM,YAAA;AACvB,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,0BAAA;AAAA,IACV,UAAA,EAAY,MAAM,KAAA,CAAM,UAAA;AAAA,IACxB,aAAA,EAAe,WAAW,UAAA,GAAa,SAAA;AAAA,IACvC,UAAA,EAAY,WAAW,CAAA,GAAI,CAAA;AAAA,IAC3B,aAAa,QAAA,IAAY,KAAA,CAAM,uBAAuB,KAAA,CAAM,KAAA,CAAM,aAAa,CAAA,GAAI;AAAA,GACrF;AACF;ACPA,SAAS,eAAe,KAAA,EAAoC;AAC1D,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,IAAA,IAAQ,WAAW,KAAA,EAAO;AACnE,IAAA,MAAM,QAAS,KAAA,CAAuC,KAAA;AACtD,IAAA,IAAI,UAAU,OAAA,IAAW,KAAA,KAA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AAA,MAC7B,OAAA,EAAS,IAAA,CAAK,OAAA,CAAQ,OAAA;AAAQ,KAC/B,CAAA;AAAA,EACH;AACF;AACO,SAAS,yBAAA,CACd,aACA,OAAA,EACwB;AACxB,EAAA,OAAO,IAAI,mBAAA,CAAoB,WAAA,EAAa,OAAO,CAAA;AACrD","file":"internal.mjs","sourcesContent":["// @forgeax/engine-render - DeviceScope-owned RectArea LTC resources.\n\nimport type { Result, RhiDevice, RhiError, Texture } from '@forgeax/engine-rhi';\nimport { LTC_TABLE_HEIGHT, LTC_TABLE_WIDTH, LTC_TABLES } from '@forgeax/engine-shader';\nimport { err, ok } from '@forgeax/engine-types';\nimport { type DeviceScope, LifecycleTransaction } from '../../device/device-scope';\nimport {\n GPU_TEXTURE_USAGE_COPY_DST,\n GPU_TEXTURE_USAGE_TEXTURE_BINDING,\n} from '../../gpu-texture-usage';\nimport { deriveExtendedLightingCapability, EXTENDED_LIGHTING_TOPOLOGY } from './resources';\n\nexport interface LtcResourcePlanInput {\n readonly scope: DeviceScope;\n readonly ltcAvailable: boolean;\n readonly residentGeneration?: number;\n}\n\nexport interface LtcResourcePlan {\n readonly topology: typeof EXTENDED_LIGHTING_TOPOLOGY;\n readonly generation: number;\n readonly rectAdmission: 'admitted' | 'omitted';\n readonly tableCount: number;\n readonly uploadCount: number;\n}\n\nexport interface LtcResourceCandidate {\n readonly topology: typeof EXTENDED_LIGHTING_TOPOLOGY;\n readonly generation: number;\n readonly scope: DeviceScope;\n readonly lambertTexture: Texture;\n readonly ggxTexture: Texture;\n readonly tableCount: 2;\n readonly uploadCount: 2;\n}\n\nexport function deriveLtcResourcePlan(input: LtcResourcePlanInput): LtcResourcePlan {\n const admitted = input.ltcAvailable;\n return {\n topology: EXTENDED_LIGHTING_TOPOLOGY,\n generation: input.scope.generation,\n rectAdmission: admitted ? 'admitted' : 'omitted',\n tableCount: admitted ? 2 : 0,\n uploadCount: admitted && input.residentGeneration !== input.scope.generation ? 2 : 0,\n };\n}\n\nfunction failure(expected: string, actual: string): Result<never, RhiError> {\n return err({\n code: 'webgpu-runtime-error',\n expected,\n hint: 'inspect device capabilities and retry the extendedLighting candidate',\n detail: { error: { code: 'ltc-resource', message: actual } },\n } as RhiError);\n}\n\nfunction textureBytes(table: Uint16Array): Uint8Array {\n return new Uint8Array(table.buffer, table.byteOffset, table.byteLength);\n}\n\n/** Create both tracked tables atomically; unavailable LTC only omits Rect. */\nexport async function createLtcResourceCandidate(input: {\n readonly device: RhiDevice | undefined;\n readonly scope: DeviceScope;\n}): Promise<Result<LtcResourceCandidate | undefined, RhiError>> {\n if (input.device === undefined) return ok(undefined);\n if (!deriveExtendedLightingCapability(input.device).admitted) return ok(undefined);\n const device = input.device;\n\n const transaction = new LifecycleTransaction(input.scope);\n let lambertTexture: Texture | undefined;\n let ggxTexture: Texture | undefined;\n const createTable = (label: string, table: Uint16Array): Texture => {\n const texture = device.createTexture({\n label,\n size: { width: LTC_TABLE_WIDTH, height: LTC_TABLE_HEIGHT, depthOrArrayLayers: 1 },\n mipLevelCount: 1,\n sampleCount: 1,\n dimension: '2d',\n format: 'rgba16float',\n usage: GPU_TEXTURE_USAGE_COPY_DST | GPU_TEXTURE_USAGE_TEXTURE_BINDING,\n viewFormats: [],\n textureBindingViewDimension: undefined,\n });\n if (texture === undefined || !texture.ok) {\n throw texture?.error ?? new Error('LTC texture creation returned no result');\n }\n const write = device.queue.writeTexture(\n { texture: texture.value, mipLevel: 0, origin: { x: 0, y: 0, z: 0 } },\n textureBytes(table),\n { offset: 0, bytesPerRow: LTC_TABLE_WIDTH * 8, rowsPerImage: LTC_TABLE_HEIGHT },\n { width: LTC_TABLE_WIDTH, height: LTC_TABLE_HEIGHT, depthOrArrayLayers: 1 },\n );\n if (!write.ok) throw write.error;\n return texture.value;\n };\n\n transaction.add({\n kind: 'texture',\n create: () => {\n lambertTexture = createTable('extended-lighting-ltc-lambert', LTC_TABLES.lambert);\n return lambertTexture;\n },\n cleanup: (value) => {\n const destroyed = input.device?.destroyTexture(value);\n if (destroyed !== undefined && !destroyed.ok) throw destroyed.error;\n },\n });\n transaction.add({\n kind: 'texture',\n create: () => {\n ggxTexture = createTable('extended-lighting-ltc-ggx', LTC_TABLES.ggx);\n return ggxTexture;\n },\n cleanup: (value) => {\n const destroyed = input.device?.destroyTexture(value);\n if (destroyed !== undefined && !destroyed.ok) throw destroyed.error;\n },\n });\n\n const committed = await transaction.commit();\n if (!committed.ok)\n return failure(committed.error.primary.expected, committed.error.primary.message);\n if (lambertTexture === undefined || ggxTexture === undefined) {\n return failure('two LTC textures', 'the transaction committed without both tables');\n }\n return ok({\n topology: EXTENDED_LIGHTING_TOPOLOGY,\n generation: input.scope.generation,\n scope: input.scope,\n lambertTexture,\n ggxTexture,\n tableCount: 2,\n uploadCount: 2,\n });\n}\n","import { err, ok, type Result } from '@forgeax/engine-types';\nimport type {\n TemporalFrameBeginInput,\n TemporalFrameCandidate,\n TemporalFrameConsumerId,\n TemporalFrameCoordinator,\n TemporalFrameError,\n TemporalFramePhases,\n TemporalFrameReceipt,\n TemporalFrameStage,\n} from '../temporal/frame-coordinator';\nimport type {\n SsrHistoryCandidate,\n SsrHistoryError,\n SsrHistoryFailureStage,\n SsrHistoryInspection,\n SsrHistoryOwner,\n SsrHistoryResetReason,\n} from './history';\n\nexport interface SsrTemporalCandidate<T> {\n readonly temporal: TemporalFrameCandidate<T>;\n readonly history: SsrHistoryCandidate;\n}\nexport interface SsrTemporalExecutionError {\n readonly code: 'ssr-temporal-stage-failed';\n readonly expected: string;\n readonly hint: string;\n readonly detail: Readonly<{ readonly stage: TemporalFrameStage; readonly cause: unknown }>;\n}\nexport interface SsrTemporalInspection {\n readonly sharedEpoch: number;\n readonly consumerIds: readonly TemporalFrameConsumerId[];\n readonly coordinatorAttempt: 'none' | 'active' | 'committed' | 'aborted';\n readonly history: SsrHistoryInspection;\n}\nexport type SsrTemporalError = TemporalFrameError | SsrHistoryError | SsrTemporalExecutionError;\n\nfunction stageFromError(cause: unknown): TemporalFrameStage {\n if (typeof cause === 'object' && cause !== null && 'stage' in cause) {\n const stage = (cause as { readonly stage?: unknown }).stage;\n if (stage === 'build' || stage === 'encode' || stage === 'finish' || stage === 'submit') {\n return stage;\n }\n }\n return 'submit';\n}\nfunction coordinatorInput<T>(input: TemporalFrameBeginInput<T>): TemporalFrameBeginInput<T> {\n const consumerIds = input.consumerIds?.includes('ssr')\n ? input.consumerIds\n : [...(input.consumerIds ?? []), 'ssr' as const];\n return { ...input, temporalDemand: true, consumerIds };\n}\nfunction resetCoordinator<T>(\n coordinator: TemporalFrameCoordinator<T>,\n reason: SsrHistoryResetReason,\n): void {\n switch (reason) {\n case 'first-enable':\n case 'disable':\n return;\n case 'resize':\n coordinator.reset('resize');\n return;\n case 'camera-cut':\n coordinator.reset('cut');\n return;\n case 'history-version':\n coordinator.reset('camera-switch');\n return;\n case 'coverage-loss':\n coordinator.reset('detach');\n return;\n case 'reflection-generation':\n case 'device-recovery':\n coordinator.reset('device-generation');\n return;\n }\n}\n\n/** Stages SSR history beside the shared renderer transaction without owning submit or epochs. */\nexport class SsrTemporalConsumer<T = unknown> {\n constructor(\n private readonly coordinator: TemporalFrameCoordinator<T>,\n readonly history: SsrHistoryOwner,\n ) {}\n begin(\n input: TemporalFrameBeginInput<T>,\n ): Result<SsrTemporalCandidate<T>, TemporalFrameError | SsrHistoryError> {\n const history = this.history.beginFrame();\n if (!history.ok) return history;\n const temporal = this.coordinator.begin(coordinatorInput(input));\n if (!temporal.ok) {\n this.history.abortFrame(history.value, 'build');\n return temporal;\n }\n return ok({ temporal: temporal.value, history: history.value });\n }\n commit(\n candidate: SsrTemporalCandidate<T>,\n ): Result<TemporalFrameReceipt<T>, TemporalFrameError | SsrHistoryError> {\n const committed = this.coordinator.commit(candidate.temporal);\n if (!committed.ok) {\n this.history.abortFrame(candidate.history, 'submit');\n return committed;\n }\n const history = this.history.commitFrame(candidate.history);\n if (!history.ok) return history;\n return committed;\n }\n abort(candidate: SsrTemporalCandidate<T>, stage: SsrHistoryFailureStage): void {\n this.history.abortFrame(candidate.history, stage);\n this.coordinator.abort(candidate.temporal, stage);\n }\n run(\n input: TemporalFrameBeginInput<T>,\n phases: TemporalFramePhases<T>,\n ): Result<TemporalFrameReceipt<T>, SsrTemporalError> {\n const started = this.begin(input);\n if (!started.ok) return started;\n const candidate = started.value;\n try {\n const built = phases.build();\n phases.encode(built);\n phases.finish();\n phases.submit();\n } catch (cause) {\n const stage = stageFromError(cause);\n this.abort(candidate, stage);\n return err({\n code: 'ssr-temporal-stage-failed',\n expected: `SSR temporal ${stage} succeeds before commit`,\n hint: 'inspect the owned stage failure and retry without promoting the candidate',\n detail: { stage, cause },\n });\n }\n return this.commit(candidate);\n }\n reset(reason: SsrHistoryResetReason): void {\n this.history.reset(reason);\n resetCoordinator(this.coordinator, reason);\n }\n retireAfterFence(\n queue: Parameters<SsrHistoryOwner['retireAfterFence']>[0],\n onFailure: Parameters<SsrHistoryOwner['retireAfterFence']>[1],\n ): void {\n this.history.retireAfterFence(queue, onFailure);\n }\n inspect(): SsrTemporalInspection {\n const temporal = this.coordinator.inspect();\n return Object.freeze({\n sharedEpoch: temporal.epoch,\n consumerIds: temporal.consumerIds,\n coordinatorAttempt: temporal.attempt,\n history: this.history.inspect(),\n });\n }\n}\nexport function createSsrTemporalConsumer<T>(\n coordinator: TemporalFrameCoordinator<T>,\n history: SsrHistoryOwner,\n): SsrTemporalConsumer<T> {\n return new SsrTemporalConsumer(coordinator, history);\n}\n"]}
|
package/dist/pbr-pipeline.d.ts
CHANGED
|
@@ -90,6 +90,14 @@ export type InjectionKind = keyof typeof INJECTION_KIND_LENGTHS;
|
|
|
90
90
|
* ```
|
|
91
91
|
*/
|
|
92
92
|
export declare function appendInjection(bgl: readonly GPUBindGroupLayoutEntry[], kind: InjectionKind): GPUBindGroupLayoutEntry[];
|
|
93
|
+
/**
|
|
94
|
+
* Append the renderer-owned inputs required by the Engine single-layer
|
|
95
|
+
* medium template. They intentionally live after the normal IBL and
|
|
96
|
+
* transmission injections so authored parameter schemas remain the only
|
|
97
|
+
* source of the prefix. The raw-depth texture is an r32float producer
|
|
98
|
+
* resource and therefore uses the unfilterable-float/non-filtering pair.
|
|
99
|
+
*/
|
|
100
|
+
export declare function appendSingleLayerMediumInjection(bgl: readonly GPUBindGroupLayoutEntry[]): GPUBindGroupLayoutEntry[];
|
|
93
101
|
export declare const INJECTION_KIND_LENGTHS: {
|
|
94
102
|
shadow: number;
|
|
95
103
|
ibl: number;
|
|
@@ -236,6 +244,16 @@ export declare function buildPbrSkinLayouts(device: PbrPipelineDevice, caps: Pbr
|
|
|
236
244
|
* and prevents a direct draw from having to bind a dummy visible stream.
|
|
237
245
|
*/
|
|
238
246
|
export declare function buildGpuDrivenPbrInstancesBindGroupLayout(device: PbrPipelineDevice, caps: PbrCaps): BindGroupLayout;
|
|
247
|
+
/**
|
|
248
|
+
* Build the slot-3 layout used by direct single-layer-medium draws.
|
|
249
|
+
*
|
|
250
|
+
* Direct Surface draws retain their ordinary instance transforms at binding
|
|
251
|
+
* zero, but consume the same producer-owned ProbeBlend, dynamic page, frame
|
|
252
|
+
* rows, and shared time resources as the scene-index lane. Binding six is the
|
|
253
|
+
* per-draw frame-row base; it keeps a local instance index independent from
|
|
254
|
+
* the renderer's compact scene-index address.
|
|
255
|
+
*/
|
|
256
|
+
export declare function buildSurfaceDirectInstancesBindGroupLayout(device: PbrPipelineDevice, caps: PbrCaps): BindGroupLayout;
|
|
239
257
|
/** Build the four-slot rigid scene-index pipeline layout. */
|
|
240
258
|
export declare function buildGpuDrivenPbrPipelineLayout(device: PbrPipelineDevice, pbr: PbrPipelineLayoutBundle, gpuDrivenInstancesBgl: BindGroupLayout): PipelineLayout;
|
|
241
259
|
/** Build the four-slot skinned scene-index pipeline layout. */
|
|
@@ -246,13 +264,13 @@ export declare function createPbrSkinMeshBindGroupEntries(meshBuffer: Buffer, me
|
|
|
246
264
|
export declare function pbrSkinMeshDynamicOffsets(meshOffset: number, paletteOffset: number): readonly [number, number, number];
|
|
247
265
|
/**
|
|
248
266
|
* Build a stand-alone 7-entry unlit material BGL. Round-4 D-5 keeps unlit
|
|
249
|
-
* material BG isolated from Skylight binding 7..
|
|
267
|
+
* material BG isolated from Skylight binding 7..12 -- unlit demos do not
|
|
250
268
|
* pay for IBL state. The unlit pipeline still binds material at slot 1,
|
|
251
269
|
* just with a 7-entry layout.
|
|
252
270
|
*
|
|
253
271
|
* Note: at the moment the runtime still routes both unlit + standard
|
|
254
272
|
* through a single 14-entry pipeline layout; the unlit material BG
|
|
255
|
-
* carries fallback identity resources at binding 7..
|
|
273
|
+
* carries fallback identity resources at binding 7..12. This factory is
|
|
256
274
|
* exported as a future-proof seam for the moment when unlit demos own
|
|
257
275
|
* their own pipeline layout (t57 (e) test pins the contract today so the
|
|
258
276
|
* eventual split has a green target).
|
|
@@ -309,7 +327,7 @@ export declare const SPRITE_PASS_PER_INSTANCE_REGION_VARIANT_SET = "";
|
|
|
309
327
|
*
|
|
310
328
|
* Three groups by derivation source:
|
|
311
329
|
* 1. Shader-derived (paramSchema reflection + injection chain):
|
|
312
|
-
* - `'pbr-material-merged'` — derived user region + Skylight
|
|
330
|
+
* - `'pbr-material-merged'` — derived user region + Skylight 6 + transmission 2
|
|
313
331
|
* - `'unlit-material'` — 7 entries: base PBR material only (no inject)
|
|
314
332
|
* - `'hdrp-7-slot'` — 7 entries (binding 0 + 3..8): HDRP cluster + SSAO group(2) BGL
|
|
315
333
|
* 2. Caps-driven literal shapes (no shader):
|
|
@@ -336,7 +354,7 @@ export declare const SPRITE_PASS_PER_INSTANCE_REGION_VARIANT_SET = "";
|
|
|
336
354
|
* - `'fullscreen-post-with-scene-depth-msaa'` — the depth-read layout with
|
|
337
355
|
* `texture.multisampled=true`, selected for a 4-sample scene depth target.
|
|
338
356
|
*/
|
|
339
|
-
export type BglKind = 'pbr-view' | 'pbr-material-merged' | 'pbr-mesh-array' | 'pbr-instances' | 'pbr-gpu-driven-instances' | 'pbr-skin-mesh-array' | 'unlit-material' | 'hdrp-7-slot' | 'fullscreen-post' | 'fullscreen-post-with-params' | 'fullscreen-post-with-scene-depth' | 'fullscreen-post-with-scene-depth-msaa';
|
|
357
|
+
export type BglKind = 'pbr-view' | 'pbr-material-merged' | 'pbr-mesh-array' | 'pbr-instances' | 'pbr-gpu-driven-instances' | 'pbr-surface-direct-instances' | 'pbr-skin-mesh-array' | 'unlit-material' | 'hdrp-7-slot' | 'fullscreen-post' | 'fullscreen-post-with-params' | 'fullscreen-post-with-scene-depth' | 'fullscreen-post-with-scene-depth-msaa' | 'fullscreen-post-with-paired-msaa';
|
|
340
358
|
/**
|
|
341
359
|
* Output shape of {@link buildBindGroupLayoutDescriptor}: matches the RHI
|
|
342
360
|
* `BindGroupLayoutDescriptor` (label + entries with `ExplicitUndefined`) so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbr-pipeline.d.ts","sourceRoot":"","sources":["../src/pbr-pipeline.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,EACN,cAAc,EACd,SAAS,EACT,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAkB1D,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,uBAAuB,GAAG,sBAAsB,CAAC,CAAC;AAIlG,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,eAAe,C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kCAAkC,GAClC,uCAAuC,GACvC,kCAAkC,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,uBAAuB,EAAE,CAAC;CAC7C;AAED,2DAA2D;AAC3D,wBAAgB,mCAAmC,IAAI,+BAA+B,CAiDrF;AAED,qEAAqE;AACrE,wBAAgB,uCAAuC,IAAI,+BAA+B,CAwBzF;AAgDD,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE;IACP,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACnD,GACA,+BAA+B,CA4YjC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type GraphAccess, type GraphTextureDescriptor, type RenderGraphBuilder, RenderGraphError } from '@forgeax/engine-render-graph';
|
|
2
|
+
import { type Result } from '@forgeax/engine-types';
|
|
3
|
+
import type { RenderPipelineFrame, RenderPipelineGpuDrivenProjection, RenderPipelineSurfaceMediumPair, RenderPipelineTarget } from '../render-pipeline';
|
|
4
|
+
/** Stable renderer-owned post-process identity for the independent depth copy. */
|
|
5
|
+
export declare const SINGLE_LAYER_MEDIUM_RAW_DEPTH_POST_PROCESS_ID: "forgeax.single-layer-medium-raw-depth";
|
|
6
|
+
export declare const SINGLE_LAYER_MEDIUM_MSAA_PAIRED_COLOR_POST_PROCESS_ID: "forgeax.single-layer-medium-msaa-paired-color";
|
|
7
|
+
export declare const SINGLE_LAYER_MEDIUM_MSAA_RAW_DEPTH_POST_PROCESS_ID: "forgeax.single-layer-medium-msaa-raw-depth";
|
|
8
|
+
export interface SingleLayerMediumMsaaPair {
|
|
9
|
+
readonly color: RenderPipelineTarget;
|
|
10
|
+
readonly depth: RenderPipelineTarget;
|
|
11
|
+
}
|
|
12
|
+
export interface SingleLayerMediumRawDepthProducerInput {
|
|
13
|
+
readonly graph: RenderGraphBuilder<RenderPipelineFrame>;
|
|
14
|
+
/** Resource/pass prefix; defaults to the opaque scene producer identity. */
|
|
15
|
+
readonly label?: string | undefined;
|
|
16
|
+
/** The already-resolved opaque color keeps the fullscreen primitive's input ABI complete. */
|
|
17
|
+
readonly sourceColor: RenderPipelineTarget;
|
|
18
|
+
/** The opaque depth pass output. It is sampled only by the copy producer. */
|
|
19
|
+
readonly sourceDepth: RenderPipelineTarget;
|
|
20
|
+
/** Must match the Standard scene depth extent (surface or internal resolution). */
|
|
21
|
+
readonly size: GraphTextureDescriptor['size'];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Produce an independent, single-sample raw-depth texture for Surface media.
|
|
25
|
+
*
|
|
26
|
+
* The graph source is the completed opaque depth pass and the destination is
|
|
27
|
+
* an r32float color target. This intermediate is the only place that samples
|
|
28
|
+
* the hardware depth view; medium materials bind the independent result while
|
|
29
|
+
* writing the scene depth attachment. MSAA is rejected at the producer seam
|
|
30
|
+
* until the backend has an explicit depth resolve policy.
|
|
31
|
+
*/
|
|
32
|
+
export declare function addSingleLayerMediumRawDepthProducer(input: SingleLayerMediumRawDepthProducerInput): Result<RenderPipelineTarget, RenderGraphError>;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a four-sample color/depth pair by selecting the nearest depth sample
|
|
35
|
+
* and the color at that exact sample index. This is deliberately separate
|
|
36
|
+
* from WebGPU's averaging color resolve, which cannot preserve the opaque or
|
|
37
|
+
* nearest-water sample associated with the selected depth.
|
|
38
|
+
*/
|
|
39
|
+
export declare function addSingleLayerMediumMsaaPairProducer(input: {
|
|
40
|
+
readonly graph: RenderGraphBuilder<RenderPipelineFrame>;
|
|
41
|
+
readonly label: string;
|
|
42
|
+
readonly sourceColor: RenderPipelineTarget;
|
|
43
|
+
readonly sourceDepth: RenderPipelineTarget;
|
|
44
|
+
readonly size: GraphTextureDescriptor['size'];
|
|
45
|
+
}): Result<SingleLayerMediumMsaaPair, RenderGraphError>;
|
|
46
|
+
/** Inputs shared by the two graph passes owned by the Surface model. */
|
|
47
|
+
export interface SingleLayerMediumPassInput {
|
|
48
|
+
readonly graph: RenderGraphBuilder<RenderPipelineFrame>;
|
|
49
|
+
readonly size: GraphTextureDescriptor['size'];
|
|
50
|
+
readonly nearestLayer: RenderPipelineTarget;
|
|
51
|
+
readonly nearestDepth: RenderPipelineTarget;
|
|
52
|
+
readonly color: RenderPipelineTarget;
|
|
53
|
+
readonly colorResolve?: RenderPipelineTarget | undefined;
|
|
54
|
+
readonly depth: RenderPipelineTarget;
|
|
55
|
+
readonly sampled?: readonly RenderPipelineTarget[] | undefined;
|
|
56
|
+
readonly directionalShadow?: RenderPipelineTarget | undefined;
|
|
57
|
+
readonly spotShadow?: RenderPipelineTarget | undefined;
|
|
58
|
+
/** Optional producer-owned cloud shadow bound through the Standard frame group. */
|
|
59
|
+
readonly cloudShadow?: RenderPipelineTarget | undefined;
|
|
60
|
+
readonly ssao?: RenderPipelineTarget | undefined;
|
|
61
|
+
readonly extraAccesses?: readonly GraphAccess[] | undefined;
|
|
62
|
+
/** Producer-owned pair of opaque color and sampled raw-depth facts. */
|
|
63
|
+
readonly surfacePair: RenderPipelineSurfaceMediumPair;
|
|
64
|
+
readonly gpuDriven?: RenderPipelineGpuDrivenProjection | undefined;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Admit the nearest-layer and color Surface submissions to the existing
|
|
68
|
+
* Standard graph only when the producer supplied a paired sampled raw depth.
|
|
69
|
+
* The pair is deliberately an input: this helper does not invent a backdrop,
|
|
70
|
+
* copy depth, or turn an unavailable fact into a graph resource.
|
|
71
|
+
*/
|
|
72
|
+
export declare function addSingleLayerMediumPasses(input: SingleLayerMediumPassInput): Result<void, RenderGraphError>;
|
|
73
|
+
//# sourceMappingURL=single-layer-medium-passes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-layer-medium-passes.d.ts","sourceRoot":"","sources":["../../src/pipeline/single-layer-medium-passes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EACV,mBAAmB,EACnB,iCAAiC,EACjC,+BAA+B,EAC/B,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAI5B,kFAAkF;AAClF,eAAO,MAAM,6CAA6C,EACxD,uCAAgD,CAAC;AACnD,eAAO,MAAM,qDAAqD,EAChE,+CAAwD,CAAC;AAC3D,eAAO,MAAM,kDAAkD,EAC7D,4CAAqD,CAAC;AAExD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;CACtC;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IACxD,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,sCAAsC,GAC5C,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAkChD;AAED;;;;;GAKG;AACH,wBAAgB,o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C,WAAW,EAAE,+BAA+B,CAAC;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,iCAAiC,GAAG,SAAS,CAAC;CACpE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,0BAA0B,GAChC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAyFhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-forward-lane.d.ts","sourceRoot":"","sources":["../../src/pipeline/standard-forward-lane.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standard-forward-lane.d.ts","sourceRoot":"","sources":["../../src/pipeline/standard-forward-lane.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,cAAc,EAGd,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAkC5B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAM7E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAW/E,iBAAS,QAAQ,CACf,OAAO,EAAE,4BAA4B,EACrC,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,0BAA0B,GACnC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAimBrC;AAED,eAAO,MAAM,wBAAwB,iBAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-output/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAGV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAG,8BAA8B,CAAU;IACxD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;gBAEzD,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAO5D;
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-output/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAGV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAG,8BAA8B,CAAU;IACxD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;gBAEzD,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAO5D;AA0CD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,qBAAqB,GAAG,kBAAkB,CA6BzF;AAUD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,kBAAkB,GACvB,MAAM,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CA0CrD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AssetRegistry } from '@forgeax/engine-assets-runtime';
|
|
2
|
-
import type { World } from '@forgeax/engine-ecs';
|
|
3
2
|
import type { RenderGraphBuilder, RenderGraphError } from '@forgeax/engine-render-graph';
|
|
4
3
|
import type { BindGroup, BindGroupLayout, RhiDevice, Sampler, Texture, TextureView } from '@forgeax/engine-rhi';
|
|
5
4
|
import { type Handle, type Result } from '@forgeax/engine-types';
|
|
6
5
|
import type { GpuResidencyCache } from '../../device/gpu-residency';
|
|
6
|
+
import type { RenderResourceScope } from '../../publication/resource-scope';
|
|
7
7
|
import type { RenderPipelineFrame, RenderPipelineTarget } from '../../render-pipeline';
|
|
8
8
|
import { type StandardLutAdmissionError, type StandardLutAdmissionErrorCode } from './lut-admission';
|
|
9
9
|
export interface StandardLutGpuResources {
|
|
@@ -24,7 +24,7 @@ export interface StandardLutGraphProjection {
|
|
|
24
24
|
readonly bindGroup: BindGroup;
|
|
25
25
|
}
|
|
26
26
|
export interface StandardLutGpuPreparationInput {
|
|
27
|
-
readonly world:
|
|
27
|
+
readonly world: RenderResourceScope;
|
|
28
28
|
readonly handle: Handle<'TextureAsset', 'shared'>;
|
|
29
29
|
readonly strength: number;
|
|
30
30
|
readonly assets: AssetRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lut-gpu.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-output/lut-gpu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"lut-gpu.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-output/lut-gpu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EAEf,SAAS,EACT,OAAO,EACP,OAAO,EACP,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAO,KAAK,MAAM,EAAM,KAAK,MAAM,EAAqB,MAAM,uBAAuB,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM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AaD,uFAAuF;AACvF,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAGvF;AAED,MAAM,MAAM,uBAAuB,GAC/B,6BAA6B,GAC7B,+BAA+B,GAC/B,qCAAqC,GACrC,+BAA+B,GAC/B,2BAA2B,GAC3B,kCAAkC,GAClC,6BAA6B,GAC7B,uCAAuC,GACvC,0BAA0B,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CACtE;AAED,MAAM,MAAM,2BAA2B,GAAG,yBAAyB,GAAG,mBAAmB,CAAC;AAyB1F,6EAA6E;AAC7E,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,8BAA8B,GACpC,MAAM,CAAC,uBAAuB,EAAE,2BAA2B,CAAC,CAqL9D;AAmBD,sEAAsE;AACtE,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,EAC9C,KAAK,EAAE,oBAAoB,EAC3B,MAAM,EAAE,oBAAoB,EAC5B,GAAG,EAAE,0BAA0B,GAC9B,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CA8EhC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { World } from '@forgeax/engine-ecs';
|
|
2
1
|
import { type Result, RhiError } from '@forgeax/engine-rhi';
|
|
2
|
+
import type { RenderResourceScope } from '../../publication/resource-scope';
|
|
3
3
|
import type { RenderFrameState } from '../../record/frame-snapshot';
|
|
4
4
|
import type { RenderSystemInternals } from '../../record/render-context';
|
|
5
5
|
import type { CameraSnapshot } from '../../render-contract';
|
|
6
6
|
/** Ordinary frames and detached recovery graphs prepare the same output resources. */
|
|
7
|
-
export declare function prepareStandardOutputResources(state: RenderFrameState, internals: RenderSystemInternals, camera: CameraSnapshot | undefined, world:
|
|
7
|
+
export declare function prepareStandardOutputResources(state: RenderFrameState, internals: RenderSystemInternals, camera: CameraSnapshot | undefined, world: RenderResourceScope): Result<void, RhiError>;
|
|
8
8
|
/** Drop lost-device handles without destroying them; retain only reset CPU/LKG facts. */
|
|
9
9
|
export declare function resetStandardOutputForDeviceLoss(state: RenderFrameState, deviceEpoch: number): void;
|
|
10
10
|
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-output/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-output/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAS5D,sFAAsF;AACtF,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,gBAAgB,EACvB,SAAS,EAAE,qBAAqB,EAChC,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,KAAK,EAAE,mBAAmB,GACzB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CA6ExB;AAED,yFAAyF;AACzF,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,GAClB,IAAI,CAiBN"}
|