@forgeax/engine-render 0.1.6 → 0.1.19
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 +279 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/assembly/backend-contract.d.ts +12 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -1
- package/dist/assembly/factory.d.ts +19 -2
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/host-contract.d.ts +4 -0
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/renderer-frame-transaction.d.ts +39 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -0
- package/dist/assembly/renderer-inspection.d.ts +22 -0
- package/dist/assembly/renderer-inspection.d.ts.map +1 -0
- package/dist/assembly/renderer-lifecycle.d.ts +4 -0
- package/dist/assembly/renderer-lifecycle.d.ts.map +1 -0
- package/dist/authoring.d.ts +1 -0
- package/dist/authoring.d.ts.map +1 -1
- package/dist/authoring.mjs +4 -2
- package/dist/authoring.mjs.map +1 -1
- package/dist/chunk-FJ6P52EE.mjs +46 -0
- package/dist/chunk-FJ6P52EE.mjs.map +1 -0
- package/dist/chunk-IPXCABEP.mjs +73 -0
- package/dist/chunk-IPXCABEP.mjs.map +1 -0
- package/dist/chunk-JDWARUOI.mjs +44 -0
- package/dist/chunk-JDWARUOI.mjs.map +1 -0
- package/dist/chunk-LOSO4CTV.mjs +901 -0
- package/dist/chunk-LOSO4CTV.mjs.map +1 -0
- package/dist/chunk-PCHBPYML.mjs +385 -0
- package/dist/chunk-PCHBPYML.mjs.map +1 -0
- package/dist/chunk-RJRUS55L.mjs +9323 -0
- package/dist/chunk-RJRUS55L.mjs.map +1 -0
- package/dist/{chunk-QC4VW3XJ.mjs → chunk-RXZ3RGOU.mjs} +4 -30
- package/dist/chunk-RXZ3RGOU.mjs.map +1 -0
- package/dist/{chunk-CQXZC5XI.mjs → chunk-VFPLTKCU.mjs} +79 -69
- package/dist/chunk-VFPLTKCU.mjs.map +1 -0
- package/dist/{chunk-SCRSAK5B.mjs → chunk-YTQ5C7YQ.mjs} +231 -127
- package/dist/chunk-YTQ5C7YQ.mjs.map +1 -0
- package/dist/components/atmosphere.d.ts +9 -0
- package/dist/components/atmosphere.d.ts.map +1 -0
- package/dist/components/camera.d.ts +2 -1
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/fog.d.ts +8 -0
- package/dist/components/fog.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/lines.d.ts +5 -0
- package/dist/components/lines.d.ts.map +1 -0
- package/dist/components/motion-blur.d.ts +7 -0
- package/dist/components/motion-blur.d.ts.map +1 -0
- package/dist/components/points.d.ts +15 -0
- package/dist/components/points.d.ts.map +1 -0
- package/dist/construct-renderer.d.ts +2 -2
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +11419 -16442
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/device-scope.d.ts +4 -0
- package/dist/device/device-scope.d.ts.map +1 -1
- package/dist/environment/frame.d.ts +60 -0
- package/dist/environment/frame.d.ts.map +1 -0
- package/dist/environment/generation.d.ts +21 -0
- package/dist/environment/generation.d.ts.map +1 -0
- package/dist/environment/graph.d.ts +4 -0
- package/dist/environment/graph.d.ts.map +1 -0
- package/dist/environment/inspection.d.ts +48 -0
- package/dist/environment/inspection.d.ts.map +1 -0
- package/dist/environment/lifecycle.d.ts +39 -0
- package/dist/environment/lifecycle.d.ts.map +1 -0
- package/dist/environment/signature.d.ts +25 -0
- package/dist/environment/signature.d.ts.map +1 -0
- package/dist/errors/render.d.ts +217 -1
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/extract/camera.d.ts +5 -0
- package/dist/extract/camera.d.ts.map +1 -0
- package/dist/extract/environment.d.ts +74 -0
- package/dist/extract/environment.d.ts.map +1 -0
- package/dist/extract/visibility.d.ts +1 -1
- package/dist/extract/visibility.d.ts.map +1 -1
- package/dist/features/host.d.ts +9 -2
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-feature.d.ts +16 -0
- package/dist/features/motion-blur/motion-blur-feature.d.ts.map +1 -0
- package/dist/features/motion-blur/motion-blur-params.d.ts +25 -0
- package/dist/features/motion-blur/motion-blur-params.d.ts.map +1 -0
- package/dist/features/plan.d.ts +17 -2
- package/dist/features/plan.d.ts.map +1 -1
- package/dist/features/prepared-gpu-work.d.ts +3 -1
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/prepared-graphics.d.ts +2 -1
- package/dist/features/prepared-graphics.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +7 -2
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/targets.d.ts +3 -0
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +12 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +7 -1
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +2 -0
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +5 -6
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +46 -1
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.mjs +2 -0
- package/dist/materials.d.ts +22 -0
- package/dist/materials.d.ts.map +1 -1
- package/dist/pbr-pipeline.d.ts +12 -6
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-pipeline.d.ts +3 -0
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts +48 -0
- package/dist/pipeline/standard-post.d.ts.map +1 -0
- package/dist/pipeline/standard-profile.d.ts +3 -6
- package/dist/pipeline/standard-profile.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +18 -0
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/points-lines/admission.d.ts +36 -0
- package/dist/points-lines/admission.d.ts.map +1 -0
- package/dist/points-lines/bounds.d.ts +8 -0
- package/dist/points-lines/bounds.d.ts.map +1 -0
- package/dist/points-lines/expansion-cache.d.ts +28 -0
- package/dist/points-lines/expansion-cache.d.ts.map +1 -0
- package/dist/points-lines/inspection.d.ts +53 -0
- package/dist/points-lines/inspection.d.ts.map +1 -0
- package/dist/points-lines/prepare.d.ts +67 -0
- package/dist/points-lines/prepare.d.ts.map +1 -0
- package/dist/points-lines/record.d.ts +60 -0
- package/dist/points-lines/record.d.ts.map +1 -0
- package/dist/points-lines/snapshot.d.ts +49 -0
- package/dist/points-lines/snapshot.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +100 -5
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame-targets.d.ts.map +1 -1
- package/dist/record/frame.d.ts +4 -2
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +18 -0
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +8 -5
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +8 -1
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +2 -0
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +93 -18
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/skybox-post-pass.d.ts +1 -11
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +26 -2
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +10 -1
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/render-contract.d.ts +102 -10
- 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 +50 -6
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +32 -5
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts +27 -5
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/render-scene-types.d.ts +3 -0
- package/dist/scene/render-scene-types.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +43 -2
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/temporal/coverage.d.ts +42 -0
- package/dist/temporal/coverage.d.ts.map +1 -0
- package/dist/temporal/frame-coordinator.d.ts +99 -0
- package/dist/temporal/frame-coordinator.d.ts.map +1 -0
- package/dist/temporal/gpu.d.ts +39 -0
- package/dist/temporal/gpu.d.ts.map +1 -0
- package/dist/temporal/history.d.ts +37 -0
- package/dist/temporal/history.d.ts.map +1 -0
- package/dist/temporal/index.d.ts +7 -0
- package/dist/temporal/index.d.ts.map +1 -0
- package/dist/temporal/index.mjs +8 -0
- package/dist/temporal/index.mjs.map +1 -0
- package/dist/temporal/inspection.d.ts +36 -0
- package/dist/temporal/inspection.d.ts.map +1 -0
- package/dist/temporal/scene-data-catalog.d.ts +48 -0
- package/dist/temporal/scene-data-catalog.d.ts.map +1 -0
- package/dist/temporal/scene-data.d.ts +43 -0
- package/dist/temporal/scene-data.d.ts.map +1 -0
- package/dist/temporal/standard-scene-data.d.ts +61 -0
- package/dist/temporal/standard-scene-data.d.ts.map +1 -0
- package/dist/temporal/taa-history-resources.d.ts +22 -0
- package/dist/temporal/taa-history-resources.d.ts.map +1 -0
- package/dist/temporal/taa-history-store.d.ts +27 -0
- package/dist/temporal/taa-history-store.d.ts.map +1 -0
- package/dist/temporal/taa-resolve.d.ts +15 -0
- package/dist/temporal/taa-resolve.d.ts.map +1 -0
- package/dist/temporal/temporal-view.d.ts +40 -0
- package/dist/temporal/temporal-view.d.ts.map +1 -0
- package/dist/temporal/transaction.d.ts +9 -0
- package/dist/temporal/transaction.d.ts.map +1 -0
- package/dist/temporal/view.d.ts +56 -0
- package/dist/temporal/view.d.ts.map +1 -0
- package/dist/transmission/backdrop.d.ts +147 -0
- package/dist/transmission/backdrop.d.ts.map +1 -0
- package/dist/transmission/inspection.d.ts +57 -0
- package/dist/transmission/inspection.d.ts.map +1 -0
- package/dist/transmission/oracle.d.ts +42 -0
- package/dist/transmission/oracle.d.ts.map +1 -0
- package/dist/transmission/projection.d.ts +37 -0
- package/dist/transmission/projection.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +25 -2
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/package.json +24 -19
- package/src/__tests__/ai-user-cold-start.integration.test.ts +59 -0
- package/src/__tests__/ai-user-public-surface.test-d.ts +45 -0
- package/src/__tests__/authoring-path.unit.test.ts +9 -0
- package/src/__tests__/bloom-exact-zero.unit.test.ts +202 -0
- package/src/__tests__/bloom-lifecycle.integration.test.ts +125 -0
- package/src/__tests__/construct-renderer-identity.unit.test.ts +4 -3
- package/src/__tests__/detached-inspection.integration.test.ts +177 -0
- package/src/__tests__/environment-fog-lanes.integration.test.ts +219 -0
- package/src/__tests__/environment-generation.integration.test.ts +141 -0
- package/src/__tests__/environment-selection.unit.test.ts +245 -0
- package/src/__tests__/factory-contract.integration.test.ts +1380 -9
- package/src/__tests__/frame-plan-contract.unit.test.ts +90 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +7 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +12 -2
- package/src/__tests__/gpu-driven-production.integration.test.ts +74 -22
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +37 -0
- package/src/__tests__/gpu-scene.unit.test.ts +10 -0
- package/src/__tests__/injection-kind-owner.test-d.ts +2 -1
- package/src/__tests__/material-contract-inventory.unit.test.ts +62 -0
- package/src/__tests__/material-cooked-projection.unit.test.ts +18 -124
- package/src/__tests__/material-static-dynamic-route.unit.test.ts +28 -28
- package/src/__tests__/materials-transmission-validation.unit.test.ts +36 -0
- package/src/__tests__/morph-feature-plan.unit.test.ts +7 -0
- package/src/__tests__/motion-blur.pixel.integration.test.ts +121 -0
- package/src/__tests__/public-surface.test-d.ts +15 -1
- package/src/__tests__/render-error-code-owner.test-d.ts +15 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +11 -2
- package/src/__tests__/render-error-exhaustive.test-d.ts +22 -0
- package/src/__tests__/render-feature-errors.unit.test.ts +33 -3
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +44 -0
- package/src/__tests__/render-feature-plan.test-d.ts +22 -89
- package/src/__tests__/render-scene-projection.unit.test.ts +28 -0
- package/src/__tests__/render-temporal-environment-consumer.browser.test.ts +26 -0
- package/src/__tests__/render-temporal-environment-consumer.dawn.test.ts +21 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +433 -1
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +405 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +22 -0
- package/src/__tests__/scene-data-catalog.unit.test.ts +59 -0
- package/src/__tests__/scene-data-consumer.integration.test.ts +67 -0
- package/src/__tests__/scene-data-contract.test-d.ts +35 -0
- package/src/__tests__/scene-data-inspection.unit.test.ts +41 -0
- package/src/__tests__/scene-data-public-surface.test-d.ts +34 -0
- package/src/__tests__/shader-manifest-fixture.ts +111 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +102 -0
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +24 -3
- package/src/__tests__/standard-pipeline.dawn.test.ts +15 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +543 -1
- package/src/__tests__/standard-profile-oracle.unit.test.ts +10 -2
- package/src/__tests__/standard-temporal-producer.integration.test.ts +35 -0
- package/src/__tests__/surface-configuration.unit.test.ts +211 -12
- package/src/__tests__/taa-transaction.integration.test.ts +30 -0
- package/src/__tests__/temporal-admission.integration.test.ts +40 -0
- package/src/__tests__/temporal-coverage.unit.test.ts +35 -0
- package/src/__tests__/temporal-demand.unit.test.ts +44 -0
- package/src/__tests__/temporal-frame-coordinator.unit.test.ts +64 -0
- package/src/__tests__/temporal-graph-topology.unit.test.ts +51 -0
- package/src/__tests__/temporal-history-lifecycle.unit.test.ts +170 -0
- package/src/__tests__/temporal-performance.integration.test.ts +615 -0
- package/src/__tests__/temporal-reset-matrix.unit.test.ts +97 -0
- package/src/__tests__/temporal-transaction.integration.test.ts +60 -0
- package/src/__tests__/temporal-view.unit.test.ts +152 -0
- package/src/__tests__/transmission-prewarm.unit.test.ts +93 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +230 -1
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +25 -1
- package/src/__tests__/urp-pipeline.unit.test.ts +4 -3
- package/src/__tests__/visibility-extract.integration.test.ts +27 -1
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +10 -0
- package/src/assembly/backend-contract.ts +47 -1
- package/src/assembly/factory.ts +1295 -507
- package/src/assembly/host-contract.ts +4 -0
- package/src/assembly/material/assembly.ts +2 -5
- package/src/assembly/renderer-frame-transaction.ts +75 -0
- package/src/assembly/renderer-inspection.ts +112 -0
- package/src/assembly/renderer-lifecycle.ts +6 -0
- package/src/authoring.ts +1 -0
- package/src/components/__tests__/motion-blur.unit.test.ts +14 -0
- package/src/components/__tests__/points-lines-admission.unit.test.ts +219 -0
- package/src/components/__tests__/points-lines-schema.unit.test.ts +56 -0
- package/src/components/__tests__/schema-contract.unit.test.ts +6 -1
- package/src/components/atmosphere.ts +10 -0
- package/src/components/camera.ts +2 -1
- package/src/components/fog.ts +9 -0
- package/src/components/index.ts +10 -0
- package/src/components/lines.ts +18 -0
- package/src/components/motion-blur.ts +8 -0
- package/src/components/points.ts +40 -0
- package/src/construct-renderer.ts +40 -3
- package/src/device/device-scope.ts +15 -1
- package/src/environment/frame.ts +185 -0
- package/src/environment/generation.ts +23 -0
- package/src/environment/graph.ts +9 -0
- package/src/environment/inspection.ts +87 -0
- package/src/environment/lifecycle.ts +250 -0
- package/src/environment/signature.ts +55 -0
- package/src/errors/render.ts +429 -1
- package/src/extract/camera.ts +78 -0
- package/src/extract/environment.ts +171 -0
- package/src/extract/visibility.ts +38 -19
- package/src/features/host.ts +36 -5
- package/src/features/motion-blur/__tests__/motion-blur-feature.unit.test.ts +67 -0
- package/src/features/motion-blur/__tests__/motion-blur-params.unit.test.ts +53 -0
- package/src/features/motion-blur/motion-blur-feature.ts +119 -0
- package/src/features/motion-blur/motion-blur-params.ts +89 -0
- package/src/features/plan.ts +32 -3
- package/src/features/prepared-gpu-work.ts +21 -6
- package/src/features/prepared-graphics.ts +2 -1
- package/src/features/render-graph-raster.ts +24 -4
- package/src/features/targets.ts +24 -2
- package/src/features/types.ts +13 -0
- package/src/fullscreen-post-process-pass.ts +34 -4
- package/src/gpu-driven/production-raster.ts +6 -1
- package/src/gpu-scene.ts +24 -0
- package/src/ibl/skylight-bind-group.ts +30 -38
- package/src/index.ts +83 -6
- package/src/inspection-types.ts +52 -0
- package/src/internal.ts +5 -0
- package/src/materials.ts +119 -24
- package/src/pbr-pipeline.ts +66 -20
- package/src/pipeline/standard-forward-lane.ts +158 -101
- package/src/pipeline/standard-pipeline.ts +156 -105
- package/src/pipeline/standard-post.ts +373 -0
- package/src/pipeline/standard-profile.ts +11 -11
- package/src/pipeline-builder.ts +102 -12
- package/src/pipeline-spec.ts +9 -0
- package/src/plugin.ts +6 -0
- package/src/points-lines/__tests__/bounds.unit.test.ts +21 -0
- package/src/points-lines/__tests__/cache-recovery.unit.test.ts +157 -0
- package/src/points-lines/__tests__/inspection-lanes.integration.test.ts +146 -0
- package/src/points-lines/__tests__/inspection.unit.test.ts +173 -0
- package/src/points-lines/__tests__/lane-structural.integration.test.ts +122 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +400 -0
- package/src/points-lines/__tests__/raster-lane.integration.test.ts +44 -0
- package/src/points-lines/__tests__/snapshot.unit.test.ts +101 -0
- package/src/points-lines/__tests__/view-ubo.unit.test.ts +73 -0
- package/src/points-lines/admission.ts +238 -0
- package/src/points-lines/bounds.ts +23 -0
- package/src/points-lines/expansion-cache.ts +215 -0
- package/src/points-lines/inspection.ts +97 -0
- package/src/points-lines/prepare.ts +177 -0
- package/src/points-lines/record.ts +125 -0
- package/src/points-lines/snapshot.ts +130 -0
- package/src/record/__tests__/fullscreen-temporal-routing.unit.test.ts +25 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +47 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +12 -1
- package/src/record/__tests__/material-pipeline-pending-cache.unit.test.ts +22 -0
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +75 -0
- package/src/record/__tests__/standard-pbr-ubo-layout.unit.test.ts +67 -0
- package/src/record/__tests__/temporal-payload.unit.test.ts +164 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +127 -0
- package/src/record/frame-lighting.ts +14 -2
- package/src/record/frame-snapshot.ts +129 -5
- package/src/record/frame-targets.ts +15 -6
- package/src/record/frame.ts +119 -4
- package/src/record/main-pass-geometry.ts +178 -40
- package/src/record/main-pass-material.ts +114 -66
- package/src/record/main-pass-sprite-draws.ts +79 -102
- package/src/record/main-pass.ts +83 -7
- package/src/record/mesh-ssbo.ts +22 -3
- package/src/record/render-context.ts +209 -23
- package/src/record/shadow-pass.ts +129 -28
- package/src/record/skybox-post-pass.ts +99 -42
- package/src/record/typed-frame-graph.ts +582 -42
- package/src/record/view-ubo.ts +99 -4
- package/src/render-contract.ts +121 -7
- package/src/render-graph-primitives.ts +18 -1
- package/src/render-pipeline.ts +100 -27
- package/src/render-system-extract.ts +264 -77
- package/src/render-system.ts +786 -43
- package/src/scene/render-scene-types.ts +3 -0
- package/src/scene/render-scene.ts +307 -9
- package/src/temporal/__tests__/taa-history-resources.unit.test.ts +45 -0
- package/src/temporal/coverage.ts +76 -0
- package/src/temporal/frame-coordinator.ts +311 -0
- package/src/temporal/gpu.ts +287 -0
- package/src/temporal/history.ts +92 -0
- package/src/temporal/index.ts +6 -0
- package/src/temporal/inspection.ts +97 -0
- package/src/temporal/scene-data-catalog.ts +200 -0
- package/src/temporal/scene-data.ts +149 -0
- package/src/temporal/standard-scene-data.ts +182 -0
- package/src/temporal/taa-history-resources.ts +128 -0
- package/src/temporal/taa-history-store.ts +79 -0
- package/src/temporal/taa-resolve.ts +34 -0
- package/src/temporal/temporal-view.ts +169 -0
- package/src/temporal/transaction.ts +17 -0
- package/src/temporal/view.ts +161 -0
- package/src/transmission/__tests__/capability.unit.test.ts +83 -0
- package/src/transmission/__tests__/composition.integration.test.ts +161 -0
- package/src/transmission/__tests__/inspection.unit.test.ts +241 -0
- package/src/transmission/__tests__/lifecycle.integration.test.ts +96 -0
- package/src/transmission/__tests__/oracle.unit.test.ts +131 -0
- package/src/transmission/__tests__/projection.unit.test.ts +71 -0
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +438 -0
- package/src/transmission/__tests__/transmission-backdrop-topology.unit.test.ts +109 -0
- package/src/transmission/__tests__/transmission-backdrop.dawn.test.ts +105 -0
- package/src/transmission/backdrop.ts +572 -0
- package/src/transmission/inspection.ts +190 -0
- package/src/transmission/oracle.ts +141 -0
- package/src/transmission/projection.ts +83 -0
- package/src/typed-render-graph-primitives.ts +162 -9
- package/dist/__tests__/authoring-path.unit.test.d.ts +0 -2
- package/dist/__tests__/authoring-path.unit.test.d.ts.map +0 -1
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts +0 -2
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts.map +0 -1
- package/dist/__tests__/callback-inference.test-d.d.ts +0 -2
- package/dist/__tests__/callback-inference.test-d.d.ts.map +0 -1
- package/dist/__tests__/cluster-binner.test.d.ts +0 -2
- package/dist/__tests__/cluster-binner.test.d.ts.map +0 -1
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts +0 -2
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts.map +0 -1
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts +0 -2
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +0 -1
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +0 -2
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +0 -1
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts +0 -2
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts.map +0 -1
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts +0 -2
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts.map +0 -1
- package/dist/__tests__/factory-contract.integration.test.d.ts +0 -2
- package/dist/__tests__/factory-contract.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/frame-observation.contract.test.d.ts +0 -2
- package/dist/__tests__/frame-observation.contract.test.d.ts.map +0 -1
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +0 -2
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +0 -1
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts +0 -2
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts +0 -6
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +0 -18
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view-reference.d.ts +0 -15
- package/dist/__tests__/gpu-driven-view-reference.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts +0 -7
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts +0 -2
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +0 -1
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts +0 -2
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts.map +0 -1
- package/dist/__tests__/injection-kind-owner.test-d.d.ts +0 -2
- package/dist/__tests__/injection-kind-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts +0 -2
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts +0 -2
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts +0 -2
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts +0 -2
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts.map +0 -1
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts +0 -2
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-stride-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/material-stride-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts +0 -2
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts +0 -2
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts.map +0 -1
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts +0 -2
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts.map +0 -1
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts +0 -2
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts +0 -2
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-default-off.test.d.ts +0 -2
- package/dist/__tests__/profiler-default-off.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-phase-catalog.test.d.ts +0 -2
- package/dist/__tests__/profiler-phase-catalog.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-phase-integration.test.d.ts +0 -2
- package/dist/__tests__/profiler-phase-integration.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-phase-token.test.d.ts +0 -2
- package/dist/__tests__/profiler-phase-token.test.d.ts.map +0 -1
- package/dist/__tests__/public-surface.test-d.d.ts +0 -2
- package/dist/__tests__/public-surface.test-d.d.ts.map +0 -1
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-error-code-owner.test-d.d.ts +0 -2
- package/dist/__tests__/render-error-code-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts +0 -2
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts +0 -2
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-assembly.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-context.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-context.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-contract.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-contract.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-docs.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-docs.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-errors.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-errors.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts +0 -2
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-plan.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-plan.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-plan.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-retry.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-retry.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts +0 -7
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts.map +0 -1
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts +0 -2
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-hzb-gpu.d.ts +0 -7
- package/dist/__tests__/render-graph-hzb-gpu.d.ts.map +0 -1
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts +0 -2
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts +0 -2
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts +0 -12
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts.map +0 -1
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts +0 -2
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-scene-projection.unit.test.d.ts +0 -2
- package/dist/__tests__/render-scene-projection.unit.test.d.ts.map +0 -1
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts +0 -2
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts.map +0 -1
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +0 -2
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +0 -1
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts +0 -2
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts +0 -2
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts.map +0 -1
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ssao-config.unit.test.d.ts +0 -2
- package/dist/__tests__/ssao-config.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/standard-descriptors.test-d.d.ts +0 -2
- package/dist/__tests__/standard-descriptors.test-d.d.ts.map +0 -1
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts +0 -2
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/standard-pipeline.integration.test.d.ts +0 -2
- package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +0 -1
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +0 -2
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +0 -1
- package/dist/__tests__/surface-configuration.unit.test.d.ts +0 -2
- package/dist/__tests__/surface-configuration.unit.test.d.ts.map +0 -1
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts +0 -2
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts.map +0 -1
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts +0 -2
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts.map +0 -1
- package/dist/__tests__/urp-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/urp-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts +0 -2
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-extract.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-extract.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-extract.perf.test.d.ts +0 -2
- package/dist/__tests__/visibility-extract.perf.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-instances.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-instances.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-public-surface.test-d.d.ts +0 -2
- package/dist/__tests__/visibility-public-surface.test-d.d.ts.map +0 -1
- package/dist/__tests__/visibility-resolver.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-resolver.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts.map +0 -1
- package/dist/__tests__/vocabulary.unit.test.d.ts +0 -2
- package/dist/__tests__/vocabulary.unit.test.d.ts.map +0 -1
- package/dist/chunk-CQXZC5XI.mjs.map +0 -1
- package/dist/chunk-QC4VW3XJ.mjs.map +0 -1
- package/dist/chunk-SCRSAK5B.mjs.map +0 -1
- package/dist/components/__tests__/schema-contract.unit.test.d.ts +0 -2
- package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +0 -1
- package/dist/components/__tests__/schema-parity.unit.test.d.ts +0 -2
- package/dist/components/__tests__/schema-parity.unit.test.d.ts.map +0 -1
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts +0 -2
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts +0 -2
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts +0 -2
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts +0 -2
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts +0 -2
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts.map +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { RenderGraphBuilder } from '@forgeax/engine-render-graph';
|
|
2
|
+
import type { RhiDevice } from '@forgeax/engine-rhi';
|
|
3
|
+
import { rhi } from '@forgeax/engine-rhi-null';
|
|
4
|
+
import { beforeAll, describe, expect, it } from 'vitest';
|
|
5
|
+
import type { RenderPipelineFrame } from '../../render-pipeline';
|
|
6
|
+
import { createRenderPipelineTarget } from '../../render-pipeline';
|
|
7
|
+
import { sortDispatchByQueue } from '../../render-system-extract';
|
|
8
|
+
import { addTransmissionBackdropPasses, type TransmissionBackdropGraph } from '../backdrop';
|
|
9
|
+
import { fresnelReflectance, resolveRefractionBackdrop } from '../oracle.js';
|
|
10
|
+
|
|
11
|
+
let device: RhiDevice;
|
|
12
|
+
|
|
13
|
+
beforeAll(async () => {
|
|
14
|
+
const adapter = await rhi.requestAdapter();
|
|
15
|
+
if (!adapter.ok) throw adapter.error;
|
|
16
|
+
const created = await adapter.value.requestDevice();
|
|
17
|
+
if (!created.ok) throw created.error;
|
|
18
|
+
device = created.value;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
async function buildComposition(): Promise<{
|
|
22
|
+
readonly graph: TransmissionBackdropGraph;
|
|
23
|
+
readonly passes: readonly string[];
|
|
24
|
+
readonly accesses: ReadonlyMap<string, readonly string[]>;
|
|
25
|
+
readonly roughMipLevels: readonly number[];
|
|
26
|
+
}> {
|
|
27
|
+
const roughMipLevels: number[] = [];
|
|
28
|
+
const graph = new RenderGraphBuilder<RenderPipelineFrame>();
|
|
29
|
+
const source = createRenderPipelineTarget(graph, 'opaque-resolved', {
|
|
30
|
+
format: 'rgba16float',
|
|
31
|
+
size: 'surface',
|
|
32
|
+
sampleCount: 1,
|
|
33
|
+
});
|
|
34
|
+
if (!source.ok) throw source.error;
|
|
35
|
+
graph
|
|
36
|
+
.addRasterPass('opaque-resolve', {
|
|
37
|
+
accesses: [{ resource: source.value.view, usage: 'color-attachment' }],
|
|
38
|
+
colorAttachments: [{ view: source.value.view, loadOp: 'clear', storeOp: 'store' }],
|
|
39
|
+
encode: () => undefined,
|
|
40
|
+
})
|
|
41
|
+
.unwrap();
|
|
42
|
+
|
|
43
|
+
const added = addTransmissionBackdropPasses({
|
|
44
|
+
graph,
|
|
45
|
+
source: source.value,
|
|
46
|
+
demand: { activeCount: 1, needsRoughMips: true },
|
|
47
|
+
copySize: { width: 8, height: 4 },
|
|
48
|
+
encodeRoughMip: ({ pass, level }) => {
|
|
49
|
+
roughMipLevels.push(level);
|
|
50
|
+
pass.draw(3, 1, 0, 0);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
if (!added.ok) throw added.error;
|
|
54
|
+
const compiled = graph.compile({ device, surfaceSize: { width: 8, height: 4 } });
|
|
55
|
+
if (!compiled.ok) throw compiled.error;
|
|
56
|
+
const encoder = device.createCommandEncoder({ label: 'transmission-composition-test' });
|
|
57
|
+
if (!encoder.ok) throw encoder.error;
|
|
58
|
+
const executed = compiled.value.execute({ encoder: encoder.value } as RenderPipelineFrame);
|
|
59
|
+
if (!executed.ok) throw executed.error;
|
|
60
|
+
const finished = encoder.value.finish();
|
|
61
|
+
if (!finished.ok) throw finished.error;
|
|
62
|
+
const inspected = compiled.value.inspect();
|
|
63
|
+
return {
|
|
64
|
+
graph: added.value,
|
|
65
|
+
passes: inspected.passes.map((pass) => pass.name),
|
|
66
|
+
accesses: new Map(
|
|
67
|
+
inspected.passes.map((pass) => [
|
|
68
|
+
pass.name,
|
|
69
|
+
pass.accesses.map((access) => `${access.resource}:${access.usage}`),
|
|
70
|
+
]),
|
|
71
|
+
),
|
|
72
|
+
roughMipLevels,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function expectCompositionContract(
|
|
77
|
+
passes: readonly string[],
|
|
78
|
+
accesses: ReadonlyMap<string, readonly string[]>,
|
|
79
|
+
): void {
|
|
80
|
+
expect(passes).toEqual([
|
|
81
|
+
'opaque-resolve',
|
|
82
|
+
'transmission-backdrop-copy',
|
|
83
|
+
'transmission-backdrop-mip',
|
|
84
|
+
'transmission-backdrop-mip-2',
|
|
85
|
+
'transmission-backdrop-mip-3',
|
|
86
|
+
'transmission-forward',
|
|
87
|
+
'transparent',
|
|
88
|
+
'temporal',
|
|
89
|
+
]);
|
|
90
|
+
expect(accesses.get('transmission-backdrop-copy')).toEqual([
|
|
91
|
+
'opaque-resolved:copy-src',
|
|
92
|
+
'transmission-backdrop:copy-dst',
|
|
93
|
+
]);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
describe('transmission composition integration', () => {
|
|
97
|
+
it('keeps one shared backdrop copy before single-layer consumers', async () => {
|
|
98
|
+
const built = await buildComposition();
|
|
99
|
+
|
|
100
|
+
expect(built.graph.topology).toMatchObject({
|
|
101
|
+
active: true,
|
|
102
|
+
copyCount: 1,
|
|
103
|
+
mipCount: 1,
|
|
104
|
+
aliasCount: 0,
|
|
105
|
+
});
|
|
106
|
+
expectCompositionContract(built.passes, built.accesses);
|
|
107
|
+
expect(built.roughMipLevels).toEqual([1, 2, 3]);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('falls back from edge or TIR refraction through environment to unrefracted color', () => {
|
|
111
|
+
expect(
|
|
112
|
+
resolveRefractionBackdrop({
|
|
113
|
+
uv: [0.01, 0.5],
|
|
114
|
+
refracted: [0.1, 0.2, 0.3],
|
|
115
|
+
environment: [0.4, 0.5, 0.6],
|
|
116
|
+
unrefracted: [0.7, 0.8, 0.9],
|
|
117
|
+
}),
|
|
118
|
+
).toEqual({ source: 'environment', color: [0.4, 0.5, 0.6] });
|
|
119
|
+
expect(
|
|
120
|
+
resolveRefractionBackdrop({
|
|
121
|
+
uv: [0.01, 0.5],
|
|
122
|
+
unrefracted: [0.7, 0.8, 0.9],
|
|
123
|
+
}),
|
|
124
|
+
).toEqual({ source: 'unrefracted', color: [0.7, 0.8, 0.9] });
|
|
125
|
+
expect(fresnelReflectance(0.5, 1.5)).toBe(1);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('keeps transmission layers before ordinary BLEND in stable queue order', () => {
|
|
129
|
+
const ordered = sortDispatchByQueue([
|
|
130
|
+
{ id: 'near-blend', queue: 3000 },
|
|
131
|
+
{ id: 'near-transmission', queue: 2001 },
|
|
132
|
+
{ id: 'far-transmission', queue: 2000 },
|
|
133
|
+
]);
|
|
134
|
+
expect(ordered.map((entry) => entry.id)).toEqual([
|
|
135
|
+
'far-transmission',
|
|
136
|
+
'near-transmission',
|
|
137
|
+
'near-blend',
|
|
138
|
+
]);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it.each([
|
|
142
|
+
[
|
|
143
|
+
'omitted-backdrop-copy',
|
|
144
|
+
(passes: readonly string[]) => passes.filter((name) => name !== 'transmission-backdrop-copy'),
|
|
145
|
+
],
|
|
146
|
+
['reversed-phase-order', (passes: readonly string[]) => [...passes].reverse()],
|
|
147
|
+
] as const)('dev falsifier %s breaks the composition contract', async (_name, falsify) => {
|
|
148
|
+
const built = await buildComposition();
|
|
149
|
+
expect(() => expectCompositionContract(falsify(built.passes), built.accesses)).toThrow();
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
it('dev falsifier reactive-zero-coverage breaks the composition contract', async () => {
|
|
153
|
+
const built = await buildComposition();
|
|
154
|
+
expect(() =>
|
|
155
|
+
expectCompositionContract(
|
|
156
|
+
built.passes.filter((name) => name !== 'temporal'),
|
|
157
|
+
built.accesses,
|
|
158
|
+
),
|
|
159
|
+
).toThrow();
|
|
160
|
+
});
|
|
161
|
+
});
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
resolveTransmissionBackdropTopology,
|
|
4
|
+
type TransmissionBackdropResourceFacts,
|
|
5
|
+
TransmissionCandidateAdmission,
|
|
6
|
+
type TransmissionCapabilityFacts,
|
|
7
|
+
} from '../backdrop';
|
|
8
|
+
import {
|
|
9
|
+
estimateTransmissionBackdropBytes,
|
|
10
|
+
inspectTransmission,
|
|
11
|
+
inspectTransmissionFromAdmission,
|
|
12
|
+
type TransmissionInspectionInput,
|
|
13
|
+
transmissionInspectionToJson,
|
|
14
|
+
} from '../inspection';
|
|
15
|
+
|
|
16
|
+
function facts(overrides: Partial<TransmissionCapabilityFacts> = {}): TransmissionCapabilityFacts {
|
|
17
|
+
return {
|
|
18
|
+
format: 'rgba16float',
|
|
19
|
+
renderAttachment: true,
|
|
20
|
+
copySrc: true,
|
|
21
|
+
textureBinding: true,
|
|
22
|
+
mipView: true,
|
|
23
|
+
filteringSampler: true,
|
|
24
|
+
bindGroupLayout: true,
|
|
25
|
+
msaaResolve: true,
|
|
26
|
+
resourceCreation: true,
|
|
27
|
+
...overrides,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function resource(overrides: Partial<TransmissionBackdropResourceFacts> = {}) {
|
|
32
|
+
return {
|
|
33
|
+
extent: { width: 4, height: 4 },
|
|
34
|
+
format: 'rgba16float',
|
|
35
|
+
mipCount: 2,
|
|
36
|
+
bytes: 160,
|
|
37
|
+
deviceGeneration: 3,
|
|
38
|
+
...overrides,
|
|
39
|
+
} satisfies TransmissionBackdropResourceFacts;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function input(overrides: Partial<TransmissionInspectionInput> = {}): TransmissionInspectionInput {
|
|
43
|
+
return {
|
|
44
|
+
demand: { activeCount: 2, needsRoughMips: true },
|
|
45
|
+
topology: resolveTransmissionBackdropTopology({
|
|
46
|
+
demand: { activeCount: 2, needsRoughMips: true },
|
|
47
|
+
sourceSampleCount: 1,
|
|
48
|
+
}),
|
|
49
|
+
extent: { width: 4, height: 4 },
|
|
50
|
+
generation: 7,
|
|
51
|
+
lastKnownGood: true,
|
|
52
|
+
recovery: 'idle',
|
|
53
|
+
transmissionDrawCount: 2,
|
|
54
|
+
fallbackCount: 1,
|
|
55
|
+
...overrides,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
describe('detached transmission inspection', () => {
|
|
60
|
+
it('derives the bounded cost fields from demand and typed topology', () => {
|
|
61
|
+
const inspection = inspectTransmission(input());
|
|
62
|
+
|
|
63
|
+
expect(inspection).toEqual({
|
|
64
|
+
activeCount: 2,
|
|
65
|
+
needsRoughMips: true,
|
|
66
|
+
extent: { width: 4, height: 4 },
|
|
67
|
+
format: 'rgba16float',
|
|
68
|
+
mipCount: 2,
|
|
69
|
+
bytes: 160,
|
|
70
|
+
copyCount: 1,
|
|
71
|
+
transmissionDrawCount: 2,
|
|
72
|
+
fallbackCount: 1,
|
|
73
|
+
generation: 7,
|
|
74
|
+
singleLayer: true,
|
|
75
|
+
lifecycle: 'resident',
|
|
76
|
+
lastKnownGood: true,
|
|
77
|
+
recovery: 'idle',
|
|
78
|
+
capability: { ok: true, missing: [] },
|
|
79
|
+
});
|
|
80
|
+
expect(Object.isFrozen(inspection)).toBe(true);
|
|
81
|
+
expect(Object.isFrozen(inspection.extent)).toBe(true);
|
|
82
|
+
expect(estimateTransmissionBackdropBytes({ width: 4, height: 4 }, 2)).toBe(160);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('restores exact zero physical work when demand has no active candidate', () => {
|
|
86
|
+
const inspection = inspectTransmission({
|
|
87
|
+
demand: { activeCount: 0, needsRoughMips: false },
|
|
88
|
+
topology: resolveTransmissionBackdropTopology({
|
|
89
|
+
demand: { activeCount: 0, needsRoughMips: false },
|
|
90
|
+
sourceSampleCount: 4,
|
|
91
|
+
}),
|
|
92
|
+
extent: { width: 320, height: 200 },
|
|
93
|
+
generation: 8,
|
|
94
|
+
lastKnownGood: false,
|
|
95
|
+
recovery: 'idle',
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
expect(inspection).toMatchObject({
|
|
99
|
+
activeCount: 0,
|
|
100
|
+
needsRoughMips: false,
|
|
101
|
+
mipCount: 0,
|
|
102
|
+
bytes: 0,
|
|
103
|
+
copyCount: 0,
|
|
104
|
+
transmissionDrawCount: 0,
|
|
105
|
+
fallbackCount: 0,
|
|
106
|
+
singleLayer: true,
|
|
107
|
+
lifecycle: 'inactive',
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('projects only committed admission facts and keeps a compatible LKG on rejection', () => {
|
|
112
|
+
const admission = new TransmissionCandidateAdmission();
|
|
113
|
+
const demand = { activeCount: 1, needsRoughMips: true } as const;
|
|
114
|
+
expect(admission.admit(demand, facts(), resource()).ok).toBe(true);
|
|
115
|
+
|
|
116
|
+
const rejected = admission.admit(demand, facts({ copySrc: false }), resource());
|
|
117
|
+
expect(rejected).toMatchObject({ ok: false, published: false, generation: 1 });
|
|
118
|
+
|
|
119
|
+
const inspection = inspectTransmissionFromAdmission({
|
|
120
|
+
admission: admission.inspectLifecycle(),
|
|
121
|
+
topology: resolveTransmissionBackdropTopology({ demand, sourceSampleCount: 1 }),
|
|
122
|
+
extent: { width: 99, height: 99 },
|
|
123
|
+
transmissionDrawCount: 1,
|
|
124
|
+
});
|
|
125
|
+
expect(inspection).toMatchObject({
|
|
126
|
+
generation: 1,
|
|
127
|
+
extent: { width: 4, height: 4 },
|
|
128
|
+
bytes: 160,
|
|
129
|
+
copyCount: 1,
|
|
130
|
+
lifecycle: 'resident',
|
|
131
|
+
lastKnownGood: true,
|
|
132
|
+
recovery: 'compatible-lkg',
|
|
133
|
+
capability: { ok: false, missing: ['copySrc'] },
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it('does not expose live GPU objects and serializes deterministically', () => {
|
|
138
|
+
const inspection = inspectTransmission(
|
|
139
|
+
input({
|
|
140
|
+
capability: { ok: false, missing: ['resourceCreation'] },
|
|
141
|
+
lifecycle: 'failed',
|
|
142
|
+
recovery: 'rebuild-required',
|
|
143
|
+
}),
|
|
144
|
+
);
|
|
145
|
+
const serialized = transmissionInspectionToJson(inspection);
|
|
146
|
+
expect(JSON.parse(serialized)).toEqual(inspection);
|
|
147
|
+
expect(serialized).not.toMatch(/texture|view|encoder|queue/i);
|
|
148
|
+
expect(Object.keys(inspection)).toEqual([
|
|
149
|
+
'activeCount',
|
|
150
|
+
'needsRoughMips',
|
|
151
|
+
'extent',
|
|
152
|
+
'format',
|
|
153
|
+
'mipCount',
|
|
154
|
+
'bytes',
|
|
155
|
+
'copyCount',
|
|
156
|
+
'transmissionDrawCount',
|
|
157
|
+
'fallbackCount',
|
|
158
|
+
'generation',
|
|
159
|
+
'singleLayer',
|
|
160
|
+
'lifecycle',
|
|
161
|
+
'lastKnownGood',
|
|
162
|
+
'recovery',
|
|
163
|
+
'capability',
|
|
164
|
+
]);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it('clears the old physical resource after device loss while retaining demand for rebuild', () => {
|
|
168
|
+
const admission = new TransmissionCandidateAdmission();
|
|
169
|
+
const demand = { activeCount: 1, needsRoughMips: false } as const;
|
|
170
|
+
admission.admit(demand, facts(), resource({ mipCount: 1, bytes: 128 }));
|
|
171
|
+
admission.markDeviceLost();
|
|
172
|
+
|
|
173
|
+
const inspection = inspectTransmissionFromAdmission({
|
|
174
|
+
admission: admission.inspectLifecycle(),
|
|
175
|
+
topology: resolveTransmissionBackdropTopology({ demand, sourceSampleCount: 1 }),
|
|
176
|
+
extent: { width: 4, height: 4 },
|
|
177
|
+
});
|
|
178
|
+
expect(inspection).toMatchObject({
|
|
179
|
+
activeCount: 1,
|
|
180
|
+
needsRoughMips: false,
|
|
181
|
+
mipCount: 0,
|
|
182
|
+
bytes: 0,
|
|
183
|
+
copyCount: 0,
|
|
184
|
+
generation: 1,
|
|
185
|
+
lifecycle: 'device-lost',
|
|
186
|
+
lastKnownGood: false,
|
|
187
|
+
recovery: 'rebuild-required',
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it('retires an incompatible resize candidate instead of exposing stale LKG bytes', () => {
|
|
192
|
+
const admission = new TransmissionCandidateAdmission();
|
|
193
|
+
const demand = { activeCount: 1, needsRoughMips: true } as const;
|
|
194
|
+
expect(admission.admit(demand, facts(), resource()).ok).toBe(true);
|
|
195
|
+
|
|
196
|
+
const rejected = admission.admit(
|
|
197
|
+
demand,
|
|
198
|
+
facts({ copySrc: false }),
|
|
199
|
+
resource({ extent: { width: 8, height: 4 }, mipCount: 4, bytes: 352 }),
|
|
200
|
+
);
|
|
201
|
+
expect(rejected).toMatchObject({
|
|
202
|
+
ok: false,
|
|
203
|
+
published: false,
|
|
204
|
+
generation: 1,
|
|
205
|
+
demand,
|
|
206
|
+
missing: ['copySrc'],
|
|
207
|
+
});
|
|
208
|
+
expect(admission.inspectLifecycle()).toMatchObject({
|
|
209
|
+
lifecycle: 'failed',
|
|
210
|
+
lastKnownGood: false,
|
|
211
|
+
recovery: 'rebuild-required',
|
|
212
|
+
});
|
|
213
|
+
expect(admission.inspectLifecycle()).not.toHaveProperty('resource');
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it('publishes a recovered resource after an explicit device-loss recovery', () => {
|
|
217
|
+
const admission = new TransmissionCandidateAdmission();
|
|
218
|
+
const demand = { activeCount: 1, needsRoughMips: true } as const;
|
|
219
|
+
expect(admission.admit(demand, facts(), resource()).ok).toBe(true);
|
|
220
|
+
|
|
221
|
+
admission.markRecoveryStarted();
|
|
222
|
+
expect(admission.inspectLifecycle()).toMatchObject({
|
|
223
|
+
lifecycle: 'recovering',
|
|
224
|
+
lastKnownGood: false,
|
|
225
|
+
recovery: 'rebuild-required',
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const recovered = admission.admit(
|
|
229
|
+
demand,
|
|
230
|
+
facts(),
|
|
231
|
+
resource({ deviceGeneration: 4, extent: { width: 8, height: 4 }, mipCount: 3, bytes: 336 }),
|
|
232
|
+
);
|
|
233
|
+
expect(recovered).toMatchObject({ ok: true, published: true, generation: 2 });
|
|
234
|
+
expect(admission.inspectLifecycle()).toMatchObject({
|
|
235
|
+
lifecycle: 'resident',
|
|
236
|
+
lastKnownGood: true,
|
|
237
|
+
recovery: 'recovered',
|
|
238
|
+
resource: expect.objectContaining({ deviceGeneration: 4, extent: { width: 8, height: 4 } }),
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
resolveTransmissionBackdropTopology,
|
|
4
|
+
type TransmissionBackdropResourceFacts,
|
|
5
|
+
TransmissionCandidateAdmission,
|
|
6
|
+
type TransmissionCapabilityFacts,
|
|
7
|
+
} from '../backdrop';
|
|
8
|
+
import { inspectTransmissionFromAdmission } from '../inspection';
|
|
9
|
+
|
|
10
|
+
const capability: TransmissionCapabilityFacts = {
|
|
11
|
+
format: 'rgba16float',
|
|
12
|
+
renderAttachment: true,
|
|
13
|
+
copySrc: true,
|
|
14
|
+
textureBinding: true,
|
|
15
|
+
mipView: true,
|
|
16
|
+
filteringSampler: true,
|
|
17
|
+
bindGroupLayout: true,
|
|
18
|
+
msaaResolve: true,
|
|
19
|
+
resourceCreation: true,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function resource(
|
|
23
|
+
extent: { width: number; height: number },
|
|
24
|
+
deviceGeneration: number,
|
|
25
|
+
): TransmissionBackdropResourceFacts {
|
|
26
|
+
return {
|
|
27
|
+
extent,
|
|
28
|
+
format: 'rgba16float',
|
|
29
|
+
mipCount: 1,
|
|
30
|
+
bytes: extent.width * extent.height * 8,
|
|
31
|
+
deviceGeneration,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
describe('transmission backdrop lifecycle', () => {
|
|
36
|
+
it('retires a stale-size candidate instead of publishing it as compatible LKG', () => {
|
|
37
|
+
const admission = new TransmissionCandidateAdmission();
|
|
38
|
+
const demand = { activeCount: 1, needsRoughMips: false } as const;
|
|
39
|
+
admission.admit(demand, capability, resource({ width: 4, height: 4 }, 1));
|
|
40
|
+
const rejected = admission.admit(
|
|
41
|
+
demand,
|
|
42
|
+
{ ...capability, copySrc: false },
|
|
43
|
+
resource({ width: 8, height: 4 }, 1),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
expect(rejected).toMatchObject({ ok: false, published: false, generation: 1 });
|
|
47
|
+
expect(admission.inspectLifecycle()).not.toHaveProperty('resource');
|
|
48
|
+
expect(
|
|
49
|
+
inspectTransmissionFromAdmission({
|
|
50
|
+
admission: admission.inspectLifecycle(),
|
|
51
|
+
topology: resolveTransmissionBackdropTopology({ demand, sourceSampleCount: 1 }),
|
|
52
|
+
extent: { width: 8, height: 4 },
|
|
53
|
+
transmissionDrawCount: 1,
|
|
54
|
+
}),
|
|
55
|
+
).toMatchObject({ lifecycle: 'failed', recovery: 'rebuild-required', bytes: 0 });
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('keeps demand through device loss and publishes a replacement generation', () => {
|
|
59
|
+
const admission = new TransmissionCandidateAdmission();
|
|
60
|
+
const demand = { activeCount: 1, needsRoughMips: true } as const;
|
|
61
|
+
admission.admit(demand, capability, resource({ width: 4, height: 4 }, 1));
|
|
62
|
+
admission.markDeviceLost();
|
|
63
|
+
expect(admission.inspectLifecycle()).toMatchObject({
|
|
64
|
+
demand,
|
|
65
|
+
lifecycle: 'device-lost',
|
|
66
|
+
lastKnownGood: false,
|
|
67
|
+
recovery: 'rebuild-required',
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const replacement = admission.admit(demand, capability, resource({ width: 8, height: 4 }, 2));
|
|
71
|
+
expect(replacement).toMatchObject({ ok: true, published: true, generation: 2 });
|
|
72
|
+
expect(admission.inspectLifecycle()).toMatchObject({
|
|
73
|
+
lifecycle: 'resident',
|
|
74
|
+
lastKnownGood: true,
|
|
75
|
+
recovery: 'recovered',
|
|
76
|
+
resource: { deviceGeneration: 2, extent: { width: 8, height: 4 } },
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('returns exact zero physical work after the last active material is removed', () => {
|
|
81
|
+
const admission = new TransmissionCandidateAdmission();
|
|
82
|
+
admission.admit(
|
|
83
|
+
{ activeCount: 1, needsRoughMips: false },
|
|
84
|
+
capability,
|
|
85
|
+
resource({ width: 4, height: 4 }, 1),
|
|
86
|
+
);
|
|
87
|
+
const zero = admission.admit({ activeCount: 0, needsRoughMips: false }, capability);
|
|
88
|
+
expect(zero).toMatchObject({ ok: true, published: true, generation: 2 });
|
|
89
|
+
expect(admission.inspectLifecycle()).toMatchObject({
|
|
90
|
+
demand: { activeCount: 0, needsRoughMips: false },
|
|
91
|
+
lifecycle: 'inactive',
|
|
92
|
+
lastKnownGood: false,
|
|
93
|
+
recovery: 'recovered',
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
beerLambertAttenuation,
|
|
4
|
+
fresnelF0,
|
|
5
|
+
fresnelReflectance,
|
|
6
|
+
isFiniteColor,
|
|
7
|
+
isWithinGuardBand,
|
|
8
|
+
resolveRefractionBackdrop,
|
|
9
|
+
roughnessToLod,
|
|
10
|
+
splitTransmissionEnergy,
|
|
11
|
+
} from '../oracle.js';
|
|
12
|
+
|
|
13
|
+
const finite = (value: number): boolean => Number.isFinite(value);
|
|
14
|
+
|
|
15
|
+
describe('transmission CPU oracle', () => {
|
|
16
|
+
it('uses the dielectric F0 formula and increases with IOR', () => {
|
|
17
|
+
expect(fresnelF0(1.5)).toBeCloseTo(0.04, 8);
|
|
18
|
+
expect(fresnelF0(1.33)).toBeLessThan(fresnelF0(1.5));
|
|
19
|
+
expect(fresnelF0(2)).toBeGreaterThan(fresnelF0(1.5));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('keeps total internal reflection as reflection', () => {
|
|
23
|
+
expect(fresnelReflectance(0.5, 1.5)).toBe(1);
|
|
24
|
+
expect(fresnelReflectance(1, 1 / 1.5)).toBeCloseTo(0.04, 8);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('partitions transmission only from non-metal energy', () => {
|
|
28
|
+
const dielectric = splitTransmissionEnergy({
|
|
29
|
+
transmission: 1,
|
|
30
|
+
metallic: 0,
|
|
31
|
+
cosTheta: 1,
|
|
32
|
+
ior: 1.5,
|
|
33
|
+
});
|
|
34
|
+
const metal = splitTransmissionEnergy({
|
|
35
|
+
transmission: 1,
|
|
36
|
+
metallic: 1,
|
|
37
|
+
cosTheta: 1,
|
|
38
|
+
ior: 1.5,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
expect(dielectric.transmission).toBeGreaterThan(0);
|
|
42
|
+
expect(metal.transmission).toBe(0);
|
|
43
|
+
expect(
|
|
44
|
+
dielectric.reflection +
|
|
45
|
+
dielectric.transmission +
|
|
46
|
+
dielectric.diffuse +
|
|
47
|
+
dielectric.metallicResidual,
|
|
48
|
+
).toBeCloseTo(1, 8);
|
|
49
|
+
expect(
|
|
50
|
+
metal.reflection + metal.transmission + metal.diffuse + metal.metallicResidual,
|
|
51
|
+
).toBeCloseTo(1, 8);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('applies Beer attenuation per component and preserves neutral boundaries', () => {
|
|
55
|
+
expect(beerLambertAttenuation([0.25, 0.5, 1], 2, 4)).toEqual([0.5, Math.SQRT2 / 2, 1]);
|
|
56
|
+
expect(beerLambertAttenuation([0.25, 0.5, 1], 0, 4)).toEqual([1, 1, 1]);
|
|
57
|
+
expect(beerLambertAttenuation([0.25, 0.5, 1], 2)).toEqual([1, 1, 1]);
|
|
58
|
+
expect(beerLambertAttenuation([0, 0.5, 1], 1, 2)[0]).toBe(0);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('keeps zero-color absorption finite', () => {
|
|
62
|
+
const attenuation = beerLambertAttenuation([0, 0, 0], 3, 2);
|
|
63
|
+
expect(attenuation).toEqual([0, 0, 0]);
|
|
64
|
+
expect(attenuation.every(finite)).toBe(true);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('maps roughness squared to a bounded monotonic LOD', () => {
|
|
68
|
+
expect(roughnessToLod(0, 8)).toBe(0);
|
|
69
|
+
expect(roughnessToLod(0.5, 8)).toBe(2);
|
|
70
|
+
expect(roughnessToLod(1, 8)).toBe(8);
|
|
71
|
+
expect(roughnessToLod(0.75, 8)).toBeGreaterThan(roughnessToLod(0.5, 8));
|
|
72
|
+
expect(roughnessToLod(2, 8)).toBe(8);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('rejects the protected edge guard band', () => {
|
|
76
|
+
expect(isWithinGuardBand([0.02, 0.5])).toBe(true);
|
|
77
|
+
expect(isWithinGuardBand([0.01, 0.5])).toBe(false);
|
|
78
|
+
expect(isWithinGuardBand([0.5, 0.98])).toBe(true);
|
|
79
|
+
expect(isWithinGuardBand([0.5, 0.99])).toBe(false);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('falls back from an invalid refraction sample to environment then baseline', () => {
|
|
83
|
+
expect(
|
|
84
|
+
resolveRefractionBackdrop({
|
|
85
|
+
uv: [0.01, 0.5],
|
|
86
|
+
refracted: [0.1, 0.2, 0.3],
|
|
87
|
+
environment: [0.4, 0.5, 0.6],
|
|
88
|
+
unrefracted: [0.7, 0.8, 0.9],
|
|
89
|
+
}),
|
|
90
|
+
).toEqual({ source: 'environment', color: [0.4, 0.5, 0.6] });
|
|
91
|
+
expect(
|
|
92
|
+
resolveRefractionBackdrop({
|
|
93
|
+
uv: [0.01, 0.5],
|
|
94
|
+
unrefracted: [0.7, 0.8, 0.9],
|
|
95
|
+
}),
|
|
96
|
+
).toEqual({ source: 'unrefracted', color: [0.7, 0.8, 0.9] });
|
|
97
|
+
expect(
|
|
98
|
+
resolveRefractionBackdrop({
|
|
99
|
+
uv: [0.5, 0.5],
|
|
100
|
+
refracted: [0.1, 0.2, 0.3],
|
|
101
|
+
environment: [0.4, 0.5, 0.6],
|
|
102
|
+
unrefracted: [0.7, 0.8, 0.9],
|
|
103
|
+
}),
|
|
104
|
+
).toEqual({ source: 'refracted', color: [0.1, 0.2, 0.3] });
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('guards non-finite inputs without producing non-finite output', () => {
|
|
108
|
+
const energy = splitTransmissionEnergy({
|
|
109
|
+
transmission: Number.NaN,
|
|
110
|
+
metallic: Number.POSITIVE_INFINITY,
|
|
111
|
+
cosTheta: Number.NaN,
|
|
112
|
+
ior: Number.NaN,
|
|
113
|
+
});
|
|
114
|
+
const values = [
|
|
115
|
+
fresnelF0(Number.NaN),
|
|
116
|
+
fresnelReflectance(Number.NaN, Number.NaN),
|
|
117
|
+
energy.reflection,
|
|
118
|
+
energy.transmission,
|
|
119
|
+
energy.diffuse,
|
|
120
|
+
energy.metallicResidual,
|
|
121
|
+
beerLambertAttenuation([Number.NaN, 0, 1], Number.NaN, 1)[0],
|
|
122
|
+
roughnessToLod(Number.NaN, 8),
|
|
123
|
+
];
|
|
124
|
+
expect(values.every(finite)).toBe(true);
|
|
125
|
+
expect(
|
|
126
|
+
isFiniteColor(
|
|
127
|
+
resolveRefractionBackdrop({ uv: [Number.NaN, 0], unrefracted: [1, 1, 1] }).color,
|
|
128
|
+
),
|
|
129
|
+
).toBe(true);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
PersistentTransmissionDemandProjection,
|
|
4
|
+
type TransmissionDemandCandidate,
|
|
5
|
+
} from '../projection';
|
|
6
|
+
|
|
7
|
+
function candidate(
|
|
8
|
+
transmission: number,
|
|
9
|
+
roughness: number,
|
|
10
|
+
overrides: Partial<TransmissionDemandCandidate> = {},
|
|
11
|
+
): TransmissionDemandCandidate {
|
|
12
|
+
return {
|
|
13
|
+
attached: true,
|
|
14
|
+
ready: true,
|
|
15
|
+
transmission,
|
|
16
|
+
roughness,
|
|
17
|
+
...overrides,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe('persistent transmission demand projection', () => {
|
|
22
|
+
it('publishes only activeCount and needsRoughMips', () => {
|
|
23
|
+
const projection = new PersistentTransmissionDemandProjection();
|
|
24
|
+
|
|
25
|
+
expect(projection.inspect()).toEqual({ activeCount: 0, needsRoughMips: false });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('counts only attached, ready materials with positive transmission', () => {
|
|
29
|
+
const projection = new PersistentTransmissionDemandProjection();
|
|
30
|
+
|
|
31
|
+
projection.apply([
|
|
32
|
+
{ kind: 'upsert', key: 'smooth', candidate: candidate(0.5, 0) },
|
|
33
|
+
{ kind: 'upsert', key: 'zero', candidate: candidate(0, 0.8) },
|
|
34
|
+
{ kind: 'upsert', key: 'detached', candidate: candidate(0.8, 0.8, { attached: false }) },
|
|
35
|
+
{ kind: 'upsert', key: 'unready', candidate: candidate(0.8, 0.8, { ready: false }) },
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
expect(projection.inspect()).toEqual({ activeCount: 1, needsRoughMips: false });
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('conservatively requests one shared rough mip chain for active rough transmission', () => {
|
|
42
|
+
const projection = new PersistentTransmissionDemandProjection();
|
|
43
|
+
|
|
44
|
+
projection.apply([{ kind: 'upsert', key: 'rough', candidate: candidate(0.8, 0.35) }]);
|
|
45
|
+
|
|
46
|
+
expect(projection.inspect()).toEqual({ activeCount: 1, needsRoughMips: true });
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('returns exact zero after the final active material is detached or removed', () => {
|
|
50
|
+
const projection = new PersistentTransmissionDemandProjection();
|
|
51
|
+
projection.apply([{ kind: 'upsert', key: 'only', candidate: candidate(1, 0.5) }]);
|
|
52
|
+
|
|
53
|
+
projection.apply([
|
|
54
|
+
{ kind: 'upsert', key: 'only', candidate: candidate(1, 0.5, { attached: false }) },
|
|
55
|
+
]);
|
|
56
|
+
expect(projection.inspect()).toEqual({ activeCount: 0, needsRoughMips: false });
|
|
57
|
+
|
|
58
|
+
projection.apply([{ kind: 'remove', key: 'only' }]);
|
|
59
|
+
expect(projection.inspect()).toEqual({ activeCount: 0, needsRoughMips: false });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('does not scan or rebuild when no material delta is published', () => {
|
|
63
|
+
const projection = new PersistentTransmissionDemandProjection();
|
|
64
|
+
projection.apply([{ kind: 'upsert', key: 'stable', candidate: candidate(0.6, 0.2) }]);
|
|
65
|
+
const before = projection.inspect();
|
|
66
|
+
|
|
67
|
+
projection.apply([]);
|
|
68
|
+
|
|
69
|
+
expect(projection.inspect()).toEqual(before);
|
|
70
|
+
});
|
|
71
|
+
});
|