@forgeax/engine-runtime 0.1.4 → 0.1.7
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 +65 -83
- package/dist/.tsbuildinfo +1 -1
- package/dist/__tests__/animation-graph-collect-roundtrip.test.d.ts +2 -0
- package/dist/__tests__/animation-graph-collect-roundtrip.test.d.ts.map +1 -0
- package/dist/__tests__/animation-graph-serialize.unit.test.d.ts +2 -0
- package/dist/__tests__/animation-graph-serialize.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-brand-and-name-retirement.test.d.ts +2 -0
- package/dist/__tests__/asset-brand-and-name-retirement.test.d.ts.map +1 -0
- package/dist/__tests__/asset-error-exhaustive.test-d.d.ts +11 -0
- package/dist/__tests__/asset-error-exhaustive.test-d.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-guid-reverse.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-guid-reverse.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-hdr-equirect.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-hdr-equirect.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-mesh-pack-payload.dawn.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-mesh-pack-payload.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-mounts.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-mounts.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.browser.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.browser.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.dawn.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.listCatalog.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.listCatalog.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.mesh-bin.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.mesh-bin.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.pack-cache.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.pack-cache.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.raw-container-failfast.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.raw-container-failfast.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.recursive.spec.d.ts +2 -0
- package/dist/__tests__/asset-registry.recursive.spec.d.ts.map +1 -0
- package/dist/__tests__/asset-registry.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset.unit.test.d.ts +2 -0
- package/dist/__tests__/asset.unit.test.d.ts.map +1 -0
- package/dist/__tests__/audio-load-by-guid.unit.test.d.ts +2 -0
- package/dist/__tests__/audio-load-by-guid.unit.test.d.ts.map +1 -0
- package/dist/__tests__/backend-selection.integration.test.d.ts +2 -0
- package/dist/__tests__/backend-selection.integration.test.d.ts.map +1 -0
- package/dist/__tests__/basis-catalog-dispatch.integration.test.d.ts +2 -0
- package/dist/__tests__/basis-catalog-dispatch.integration.test.d.ts.map +1 -0
- package/dist/__tests__/builtin-asset-registry.unit.test.d.ts +2 -0
- package/dist/__tests__/builtin-asset-registry.unit.test.d.ts.map +1 -0
- package/dist/__tests__/collect-scene-asset.test.d.ts +1 -2
- package/dist/__tests__/collect-scene-asset.test.d.ts.map +1 -1
- package/dist/__tests__/collect-scene-mount-collapse.test.d.ts +2 -0
- package/dist/__tests__/collect-scene-mount-collapse.test.d.ts.map +1 -0
- package/dist/__tests__/collect-transient-roundtrip.test.d.ts +1 -1
- package/dist/__tests__/collect-transient-roundtrip.test.d.ts.map +1 -1
- package/dist/__tests__/collect-transient-skip.test.d.ts +1 -2
- package/dist/__tests__/collect-transient-skip.test.d.ts.map +1 -1
- package/dist/__tests__/compressed-texture-physical-extent.integration.test.d.ts +2 -0
- package/dist/__tests__/compressed-texture-physical-extent.integration.test.d.ts.map +1 -0
- package/dist/__tests__/dawn/mesh-update-dawn.test.d.ts +2 -0
- package/dist/__tests__/dawn/mesh-update-dawn.test.d.ts.map +1 -0
- package/dist/__tests__/dawn/upload-texture.dawn.test.d.ts +2 -0
- package/dist/__tests__/dawn/upload-texture.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/draw-published.d.ts +2 -2
- package/dist/__tests__/draw-published.d.ts.map +1 -1
- package/dist/__tests__/dynamic-texture-store.unit.test.d.ts +2 -0
- package/dist/__tests__/dynamic-texture-store.unit.test.d.ts.map +1 -0
- package/dist/__tests__/errors.unit.test.d.ts +2 -0
- package/dist/__tests__/errors.unit.test.d.ts.map +1 -0
- package/dist/__tests__/extract-skin-mismatch.unit.test.d.ts +2 -0
- package/dist/__tests__/extract-skin-mismatch.unit.test.d.ts.map +1 -0
- package/dist/__tests__/fetch-binary-decompress.test.d.ts +2 -0
- package/dist/__tests__/fetch-binary-decompress.test.d.ts.map +1 -0
- package/dist/__tests__/four-path-compression.integration.test.d.ts +2 -0
- package/dist/__tests__/four-path-compression.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fullscreen-feature-host.dawn.test.d.ts +2 -0
- package/dist/__tests__/fullscreen-feature-host.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/guid-for-asset.unit.test.d.ts +2 -0
- package/dist/__tests__/guid-for-asset.unit.test.d.ts.map +1 -0
- package/dist/__tests__/handle-migration.test.d.ts +2 -0
- package/dist/__tests__/handle-migration.test.d.ts.map +1 -0
- package/dist/__tests__/helpers/register-runtime-components.d.ts.map +1 -1
- package/dist/__tests__/host-custom-kind-contract.test-d.d.ts +2 -0
- package/dist/__tests__/host-custom-kind-contract.test-d.d.ts.map +1 -0
- package/dist/__tests__/host-custom-kind-contract.test.d.ts +2 -0
- package/dist/__tests__/host-custom-kind-contract.test.d.ts.map +1 -0
- package/dist/__tests__/inspect-name.test.d.ts +2 -0
- package/dist/__tests__/inspect-name.test.d.ts.map +1 -0
- package/dist/__tests__/instantiate-mount-deferred-wiring.test.d.ts +2 -0
- package/dist/__tests__/instantiate-mount-deferred-wiring.test.d.ts.map +1 -0
- package/dist/__tests__/loadbyguid-payload.unit.test.d.ts +2 -0
- package/dist/__tests__/loadbyguid-payload.unit.test.d.ts.map +1 -0
- package/dist/__tests__/loadbyguid-texture-intern.unit.test.d.ts +2 -0
- package/dist/__tests__/loadbyguid-texture-intern.unit.test.d.ts.map +1 -0
- package/dist/__tests__/loader-extract-graceful.test.d.ts +2 -0
- package/dist/__tests__/loader-extract-graceful.test.d.ts.map +1 -0
- package/dist/__tests__/loader-name-survival.test.d.ts +2 -0
- package/dist/__tests__/loader-name-survival.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-bin-contract.test.d.ts +2 -0
- package/dist/__tests__/mesh-bin-contract.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-bin-skin-roundtrip.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-bin-skin-roundtrip.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-bin.test.d.ts +2 -0
- package/dist/__tests__/mesh-bin.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-loader-skin-contract.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-loader-skin-contract.unit.test.d.ts.map +1 -0
- package/dist/__tests__/new-kind-refs-contract.test.d.ts +2 -0
- package/dist/__tests__/new-kind-refs-contract.test.d.ts.map +1 -0
- package/dist/__tests__/package-promotion.test.d.ts +2 -0
- package/dist/__tests__/package-promotion.test.d.ts.map +1 -0
- package/dist/__tests__/package-rename.test.d.ts +2 -0
- package/dist/__tests__/package-rename.test.d.ts.map +1 -0
- package/dist/__tests__/recover-error-exhaustive.test-d.d.ts +1 -1
- package/dist/__tests__/recover-error-exhaustive.test-d.d.ts.map +1 -1
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts +1 -1
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -1
- package/dist/__tests__/render-feature-prepared-graphics.fixture.d.ts +10 -0
- package/dist/__tests__/render-feature-prepared-graphics.fixture.d.ts.map +1 -0
- package/dist/__tests__/render-system-extract.unit.test.d.ts +2 -0
- package/dist/__tests__/render-system-extract.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-test-utils.d.ts +10 -0
- package/dist/__tests__/renderer-test-utils.d.ts.map +1 -0
- package/dist/__tests__/renderer.test-d.d.ts +2 -0
- package/dist/__tests__/renderer.test-d.d.ts.map +1 -0
- package/dist/__tests__/resolve-asset-handle-err.test.d.ts +2 -0
- package/dist/__tests__/resolve-asset-handle-err.test.d.ts.map +1 -0
- package/dist/__tests__/resolve-asset-handle.unit.test.d.ts +2 -0
- package/dist/__tests__/resolve-asset-handle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/resolveName-fallback.test.d.ts +2 -0
- package/dist/__tests__/resolveName-fallback.test.d.ts.map +1 -0
- package/dist/__tests__/resolveName-null-package.test.d.ts +2 -0
- package/dist/__tests__/resolveName-null-package.test.d.ts.map +1 -0
- package/dist/__tests__/resolveName-unified-entry.test.d.ts +2 -0
- package/dist/__tests__/resolveName-unified-entry.test.d.ts.map +1 -0
- package/dist/__tests__/resolveName.test.d.ts +2 -0
- package/dist/__tests__/resolveName.test.d.ts.map +1 -0
- package/dist/__tests__/roots-to-scene-asset.test.d.ts +1 -1
- package/dist/__tests__/roots-to-scene-asset.test.d.ts.map +1 -1
- package/dist/__tests__/roundtrip-primitive.test.d.ts +2 -0
- package/dist/__tests__/roundtrip-primitive.test.d.ts.map +1 -0
- package/dist/__tests__/scene-bare-guid-refs-instantiate.test.d.ts +2 -0
- package/dist/__tests__/scene-bare-guid-refs-instantiate.test.d.ts.map +1 -0
- package/dist/__tests__/scene-instance-authoring.integration.test.d.ts +2 -0
- package/dist/__tests__/scene-instance-authoring.integration.test.d.ts.map +1 -0
- package/dist/__tests__/scene-mount-fixed-point.test.d.ts +2 -0
- package/dist/__tests__/scene-mount-fixed-point.test.d.ts.map +1 -0
- package/dist/__tests__/scene-mount-roundtrip.test.d.ts +2 -0
- package/dist/__tests__/scene-mount-roundtrip.test.d.ts.map +1 -0
- package/dist/__tests__/scene-mount-wrapper-roundtrip.test.d.ts +2 -0
- package/dist/__tests__/scene-mount-wrapper-roundtrip.test.d.ts.map +1 -0
- package/dist/__tests__/scene-sugar-instantiate.test.d.ts +2 -0
- package/dist/__tests__/scene-sugar-instantiate.test.d.ts.map +1 -0
- package/dist/__tests__/serialize-mounts-roundtrip.test.d.ts +2 -0
- package/dist/__tests__/serialize-mounts-roundtrip.test.d.ts.map +1 -0
- package/dist/__tests__/serialize-scene-asset.test.d.ts +1 -1
- package/dist/__tests__/serialize-scene-asset.test.d.ts.map +1 -1
- package/dist/__tests__/template-game-default-api-contract.test.d.ts +2 -0
- package/dist/__tests__/template-game-default-api-contract.test.d.ts.map +1 -0
- package/dist/__tests__/tileset-asset-validate.test.d.ts +2 -0
- package/dist/__tests__/tileset-asset-validate.test.d.ts.map +1 -0
- package/dist/__tests__/transcode-fallback.unit.test.d.ts +2 -0
- package/dist/__tests__/transcode-fallback.unit.test.d.ts.map +1 -0
- package/dist/__tests__/transient-runtime-behavior.test.d.ts +2 -0
- package/dist/__tests__/transient-runtime-behavior.test.d.ts.map +1 -0
- package/dist/__tests__/video-loader-consumption.test.d.ts +2 -0
- package/dist/__tests__/video-loader-consumption.test.d.ts.map +1 -0
- package/dist/__tests__/video-loader-smoke.dawn.test.d.ts +2 -0
- package/dist/__tests__/video-loader-smoke.dawn.test.d.ts.map +1 -0
- package/dist/backend-selection.d.ts +13 -0
- package/dist/backend-selection.d.ts.map +1 -0
- package/dist/collect-scene-asset.d.ts +7 -4
- package/dist/collect-scene-asset.d.ts.map +1 -1
- package/dist/createRenderer.d.ts +14 -2
- package/dist/createRenderer.d.ts.map +1 -1
- package/dist/errors/environment.d.ts +1 -1
- package/dist/errors/environment.d.ts.map +1 -1
- package/dist/index.d.ts +20 -82
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +107 -108
- package/dist/index.mjs.map +1 -1
- package/dist/renderer-host.d.ts +9 -0
- package/dist/renderer-host.d.ts.map +1 -0
- package/dist/renderer-host.mjs +62 -0
- package/dist/renderer-host.mjs.map +1 -0
- package/dist/scene-instances/index.d.ts +2 -0
- package/dist/scene-instances/index.d.ts.map +1 -0
- package/dist/scene-utils/mount-override-fold.d.ts +1 -2
- package/dist/scene-utils/mount-override-fold.d.ts.map +1 -1
- package/dist/systems/sprite-animation-tick.d.ts +1 -1
- package/dist/systems/sprite-animation-tick.d.ts.map +1 -1
- package/dist/systems/transparent-sort.d.ts +1 -2
- package/dist/systems/transparent-sort.d.ts.map +1 -1
- package/dist/tilemap-register-validate.d.ts.map +1 -1
- package/package.json +34 -33
- package/src/__tests__/active-camera.unit.test.ts +19 -9
- package/src/__tests__/animation-graph-collect-roundtrip.test.ts +213 -0
- package/src/__tests__/animation-graph-serialize.unit.test.ts +171 -0
- package/src/__tests__/append-injection.test.ts +1 -1
- package/src/__tests__/asset-brand-and-name-retirement.test.ts +102 -0
- package/src/__tests__/asset-error-exhaustive.test-d.ts +62 -0
- package/src/__tests__/asset-registry-guid-reverse.test.ts +608 -0
- package/src/__tests__/asset-registry-hdr-equirect.test.ts +78 -0
- package/src/__tests__/asset-registry-mesh-pack-payload.dawn.test.ts +232 -0
- package/src/__tests__/asset-registry-mounts.test.ts +806 -0
- package/src/__tests__/asset-registry.browser.test.ts +81 -0
- package/src/__tests__/asset-registry.dawn.test.ts +94 -0
- package/src/__tests__/asset-registry.listCatalog.test.ts +170 -0
- package/src/__tests__/asset-registry.mesh-bin.test.ts +316 -0
- package/src/__tests__/asset-registry.pack-cache.test.ts +969 -0
- package/src/__tests__/asset-registry.raw-container-failfast.test.ts +225 -0
- package/src/__tests__/asset-registry.recursive.spec.ts +1397 -0
- package/src/__tests__/asset-registry.unit.test.ts +1030 -0
- package/src/__tests__/asset.unit.test.ts +7107 -0
- package/src/__tests__/audio-load-by-guid.unit.test.ts +126 -0
- package/src/__tests__/backend-selection.integration.test.ts +11 -0
- package/src/__tests__/basis-catalog-dispatch.integration.test.ts +320 -0
- package/src/__tests__/bind-group-cache-keying.test.ts +4 -4
- package/src/__tests__/block-upload-math.unit.test.ts +2 -2
- package/src/__tests__/builtin-asset-registry.unit.test.ts +112 -0
- package/src/__tests__/builtin-shader-register-e2e.test.ts +1 -1
- package/src/__tests__/cache-false-eviction.test.ts +2 -1
- package/src/__tests__/cache-isolation-matrix.test.ts +2 -1
- package/src/__tests__/camera-clear-snapshot-equivalence.unit.test.ts +5 -6
- package/src/__tests__/clamp-to-last.e2e.browser.test.ts +29 -19
- package/src/__tests__/collect-scene-asset.test.ts +49 -52
- package/src/__tests__/collect-scene-mount-collapse.test.ts +391 -0
- package/src/__tests__/collect-subtree.unit.test.ts +1 -2
- package/src/__tests__/collect-transient-children-absent.test.ts +24 -10
- package/src/__tests__/collect-transient-roundtrip.test.ts +44 -20
- package/src/__tests__/collect-transient-skip.test.ts +24 -13
- package/src/__tests__/components.test-d.ts +1 -6
- package/src/__tests__/components.unit.test.ts +20 -19
- package/src/__tests__/composite-skybox-cross-world.browser.test.ts +59 -27
- package/src/__tests__/compressed-texture-physical-extent.integration.test.ts +139 -0
- package/src/__tests__/create-renderer-assembly.integration.test.ts +42 -29
- package/src/__tests__/createRenderer-dispose.test.ts +35 -402
- package/src/__tests__/createRenderer.browser-no-webgpu.test.ts +25 -30
- package/src/__tests__/createRenderer.unit.test.ts +1 -1
- package/src/__tests__/dawn/hello-sprite-nineslice-section.dawn.test.ts +27 -63
- package/src/__tests__/dawn/ibl-precompute-readback.dawn.test.ts +56 -47
- package/src/__tests__/dawn/instances-per-instance-pbr.dawn.test.ts +49 -29
- package/src/__tests__/dawn/instances-shadow.dawn.test.ts +26 -15
- package/src/__tests__/dawn/instances-uniform-fallback.dawn.test.ts +13 -14
- package/src/__tests__/dawn/material-alpha.dawn.test.ts +23 -31
- package/src/__tests__/dawn/material-cooked-fixture.dawn.test.ts +24 -9
- package/src/__tests__/dawn/{mesh-update.dawn.test.ts → mesh-update-dawn.test.ts} +42 -134
- package/src/__tests__/dawn/mipmap-srgb-linear.dawn.test.ts +14 -7
- package/src/__tests__/dawn/per-entity-material-texture-isolation.dawn.test.ts +16 -28
- package/src/__tests__/dawn/sprite-nineslice-mesh-bind.dawn.test.ts +23 -39
- package/src/__tests__/dawn/upload-texture.dawn.test.ts +198 -0
- package/src/__tests__/dawn/user-handle-mesh-render.dawn.test.ts +12 -14
- package/src/__tests__/dawn/user-mesh-upload.dawn.test.ts +27 -22
- package/src/__tests__/dawn/zero-manifest-mesh-fail.dawn.test.ts +25 -28
- package/src/__tests__/dawn/zero-manifest-ready.dawn.test.ts +10 -11
- package/src/__tests__/demo-sortscope-migration.unit.test.ts +5 -5
- package/src/__tests__/derive-bgl-integration.test.ts +34 -44
- package/src/__tests__/derive-render-data-skin.unit.test.ts +1 -1
- package/src/__tests__/draw-published.ts +11 -4
- package/src/__tests__/dynamic-texture-store.unit.test.ts +190 -0
- package/src/__tests__/equirect-bc6h.integration.test.ts +144 -21
- package/src/__tests__/errors.unit.test.ts +1227 -0
- package/src/__tests__/extract-frames-graceful-degradation.test.ts +3 -7
- package/src/__tests__/extract-frames-merge.test.ts +35 -22
- package/src/__tests__/extract-record-no-hardcoded-texture-fields.test.ts +5 -16
- package/src/__tests__/extract-skin-mismatch.unit.test.ts +322 -0
- package/src/__tests__/fetch-binary-decompress.test.ts +356 -0
- package/src/__tests__/four-path-compression.integration.test.ts +395 -0
- package/src/__tests__/frame-targets-shadow-regression.unit.test.ts +1 -1
- package/src/__tests__/fullscreen-feature-host.dawn.test.ts +80 -0
- package/src/__tests__/fullscreen-post-bgl-depth.test.ts +4 -2
- package/src/__tests__/fullscreen-post-depth-params-arity.test.ts +3 -3
- package/src/__tests__/fullscreen-post-process-pass.dawn.test.ts +39 -23
- package/src/__tests__/fullscreen-post-process-pass.unit.test.ts +4 -2
- package/src/__tests__/fxaa-pixel-diff.dawn.test.ts +28 -17
- package/src/__tests__/fxaa-validation-and-resize.dawn.test.ts +29 -18
- package/src/__tests__/fxaa-zero-overhead.dawn.test.ts +16 -12
- package/src/__tests__/geometry.unit.test.ts +525 -159
- package/src/__tests__/glyph-tilemap-worldid.test.ts +1 -1
- package/src/__tests__/gpu-resource-cow-survivor.test.ts +6 -4
- package/src/__tests__/guid-for-asset.unit.test.ts +102 -0
- package/src/__tests__/handle-migration.test.ts +136 -0
- package/src/__tests__/helpers/register-runtime-components.ts +4 -2
- package/src/__tests__/helpers/register-scene-components.ts +1 -1
- package/src/__tests__/host-custom-kind-contract.test-d.ts +47 -0
- package/src/__tests__/host-custom-kind-contract.test.ts +578 -0
- package/src/__tests__/inspect-name.test.ts +139 -0
- package/src/__tests__/instances.test-d.ts +1 -1
- package/src/__tests__/instantiate-mount-deferred-wiring.test.ts +112 -0
- package/src/__tests__/light-casters-9-light.browser.test.ts +73 -76
- package/src/__tests__/light-gpu-byte-neutral.unit.test.ts +7 -10
- package/src/__tests__/light-snapshot.test-d.ts +2 -2
- package/src/__tests__/lights-vec-negative.unit.test.ts +1 -1
- package/src/__tests__/lights.unit.test.ts +31 -511
- package/src/__tests__/loadbyguid-payload.unit.test.ts +117 -0
- package/src/__tests__/loadbyguid-texture-intern.unit.test.ts +213 -0
- package/src/__tests__/loader-extract-graceful.test.ts +146 -0
- package/src/__tests__/loader-name-survival.test.ts +213 -0
- package/src/__tests__/m3-vec-negative.unit.test.ts +3 -2
- package/src/__tests__/material-texture-uv-scale.unit.test.ts +101 -31
- package/src/__tests__/materials.unit.test.ts +10 -27
- package/src/__tests__/mesh-bin-contract.test.ts +28 -0
- package/src/__tests__/mesh-bin-skin-roundtrip.unit.test.ts +149 -0
- package/src/__tests__/mesh-bin.test.ts +38 -0
- package/src/__tests__/mesh-loader-skin-contract.unit.test.ts +120 -0
- package/src/__tests__/mesh-ssbo-grow.unit.test.ts +3 -3
- package/src/__tests__/mip-gate.unit.test.ts +1 -1
- package/src/__tests__/msaa-sprite-pixel-diff.dawn.test.ts +29 -68
- package/src/__tests__/new-kind-refs-contract.test.ts +132 -0
- package/src/__tests__/node-shims.d.ts +4 -6
- package/src/__tests__/package-promotion.test.ts +88 -0
- package/src/__tests__/package-rename.test.ts +103 -0
- package/src/__tests__/pass-selector.unit.test.ts +2 -2
- package/src/__tests__/pbr-pipeline.unit.test.ts +21 -25
- package/src/__tests__/pipeline-builder-msaa.unit.test.ts +6 -9
- package/src/__tests__/pipeline-cache-keying.unit.test.ts +6 -9
- package/src/__tests__/pipeline-spec.test.ts +16 -177
- package/src/__tests__/pipeline.unit.test.ts +154 -1693
- package/src/__tests__/point-light-shadow.dawn.test.ts +33 -42
- package/src/__tests__/point-light-shadow.unit.test.ts +19 -60
- package/src/__tests__/post-process-error-codes.unit.test.ts +4 -1
- package/src/__tests__/post-process-params-component.unit.test.ts +1 -1
- package/src/__tests__/post-process-params-extract.unit.test.ts +2 -5
- package/src/__tests__/postprocess-camera-consistency.test.ts +4 -7
- package/src/__tests__/profiler-assembly.integration.test.ts +1 -1
- package/src/__tests__/propagate-transforms.dawn.test.ts +12 -11
- package/src/__tests__/record-worldid-isolation.test.ts +7 -29
- package/src/__tests__/recover-error-exhaustive.test-d.ts +1 -1
- package/src/__tests__/render-error-exhaustive.test-d.ts +117 -71
- package/src/__tests__/render-feature-assembly.test-d.ts +20 -9
- package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +8 -6
- package/src/__tests__/render-feature-prepared-graphics.browser.test.ts +65 -559
- package/src/__tests__/render-feature-prepared-graphics.dawn.test.ts +57 -544
- package/src/__tests__/render-feature-prepared-graphics.fixture.ts +104 -0
- package/src/__tests__/render-feature-prepared-graphics.integration.test.ts +40 -248
- package/src/__tests__/render-feature-prepared-graphics.regression.integration.test.ts +83 -340
- package/src/__tests__/render-feature-recover.integration.test.ts +9 -49
- package/src/__tests__/render-feature-runtime-surface.test-d.ts +17 -20
- package/src/__tests__/render-schema-consumer.integration.test.ts +20 -13
- package/src/__tests__/render-schema-owner-boundary.unit.test.ts +2 -6
- package/src/__tests__/render-system-cross-world-overlay-queue.test.ts +5 -5
- package/src/__tests__/render-system-extract-dispatch-ordering.test.ts +16 -31
- package/src/__tests__/render-system-extract.test.ts +36 -51
- package/src/__tests__/render-system-extract.unit.test.ts +360 -0
- package/src/__tests__/render-system-fold-bucket.unit.test.ts +3 -5
- package/src/__tests__/render-system-fold-fallback.unit.test.ts +6 -3
- package/src/__tests__/render-system-fold-material.unit.test.ts +3 -5
- package/src/__tests__/render-system-fold-metrics.unit.test.ts +5 -5
- package/src/__tests__/render-system-fold-modegate.unit.test.ts +6 -6
- package/src/__tests__/render-system-fold.dawn.test.ts +7 -5
- package/src/__tests__/render-system-mega.test.ts +292 -190
- package/src/__tests__/render-system-owner-split-contract.test.ts +10 -32
- package/src/__tests__/render-system-record-multi-material-textureview.test.ts +59 -45
- package/src/__tests__/render-system-record-per-submesh-transparency.test.ts +23 -29
- package/src/__tests__/render-system-record.test.ts +398 -235
- package/src/__tests__/render-system-record.unit.test.ts +25 -26
- package/src/__tests__/render-system-skin-bg.unit.test.ts +8 -12
- package/src/__tests__/renderer-consumer.test-d.ts +16 -3
- package/src/__tests__/renderer-health.unit.test.ts +26 -916
- package/src/__tests__/renderer-lifecycle.integration.test.ts +19 -6
- package/src/__tests__/renderer-recover.unit.test.ts +49 -1069
- package/src/__tests__/renderer-result.test-d.ts +19 -9
- package/src/__tests__/renderer-surface.unit.test.ts +3 -5
- package/src/__tests__/renderer-test-utils.ts +56 -0
- package/src/__tests__/renderer.test-d.ts +61 -0
- package/src/__tests__/resolve-asset-handle-err.test.ts +111 -0
- package/src/__tests__/resolve-asset-handle.unit.test.ts +64 -0
- package/src/__tests__/resolve-depth-only-view.test.ts +1 -1
- package/src/__tests__/resolveName-fallback.test.ts +64 -0
- package/src/__tests__/resolveName-null-package.test.ts +38 -0
- package/src/__tests__/resolveName-unified-entry.test.ts +65 -0
- package/src/__tests__/resolveName.test.ts +64 -0
- package/src/__tests__/rhi-null-command-flow.unit.test.ts +56 -260
- package/src/__tests__/rhi-null-renderer-lifecycle.unit.test.ts +41 -169
- package/src/__tests__/roots-to-scene-asset.test.ts +199 -93
- package/src/__tests__/roundtrip-primitive.test.ts +351 -0
- package/src/__tests__/scene-bare-guid-refs-instantiate.test.ts +123 -0
- package/src/__tests__/scene-equirect-roundtrip.test.ts +103 -16
- package/src/__tests__/scene-instance-authoring.integration.test.ts +8 -0
- package/src/__tests__/scene-instance-bridge.integration.test.ts +1 -1
- package/src/__tests__/scene-instance-component.test.ts +1 -1
- package/src/__tests__/scene-mount-fixed-point.test.ts +257 -0
- package/src/__tests__/scene-mount-roundtrip.test.ts +987 -0
- package/src/__tests__/scene-mount-wrapper-roundtrip.test.ts +202 -0
- package/src/__tests__/scene-sugar-instantiate.test.ts +324 -0
- package/src/__tests__/serialize-mounts-roundtrip.test.ts +533 -0
- package/src/__tests__/serialize-scene-asset.test.ts +219 -22
- package/src/__tests__/shadow-caster-empty-schema.test.ts +3 -3
- package/src/__tests__/shadow-csm-cascade-loadop.test.ts +37 -17
- package/src/__tests__/shadow-csm-component.test.ts +3 -5
- package/src/__tests__/shadow-csm-extract.test.ts +2 -100
- package/src/__tests__/shadow-csm-orthoz.test.ts +2 -16
- package/src/__tests__/shadow-csm-runtime-vary.dawn.test.ts +19 -14
- package/src/__tests__/shadow-csm-tile-consistency.test.ts +32 -26
- package/src/__tests__/shadow-csm-ubo.dawn.test.ts +8 -49
- package/src/__tests__/shadow-csm-ubo.test.ts +3 -25
- package/src/__tests__/shadow-csm-viewport.browser.test.ts +1 -1
- package/src/__tests__/shadow-fields-observable.dawn.test.ts +67 -56
- package/src/__tests__/shadow-m1.dawn.test.ts +8 -9
- package/src/__tests__/shadow-mesh-ssbo-order.test.ts +11 -27
- package/src/__tests__/skin-errors.unit.test.ts +1 -1
- package/src/__tests__/skin-extract-getarrayview-count.unit.test.ts +7 -5
- package/src/__tests__/skylight-lazy-projection.test.ts +36 -15
- package/src/__tests__/sparse-tag-scene-roundtrip.test.ts +5 -5
- package/src/__tests__/sprite-cullmode-flip.dawn.test.ts +47 -64
- package/src/__tests__/sprite-lit-bgl-byte-identical.test.ts +15 -14
- package/src/__tests__/sprite-lit-extract-branch.test.ts +1 -1
- package/src/__tests__/sprite-lit-pipeline-cache-key.test.ts +1 -1
- package/src/__tests__/ssao-bgl.test.ts +16 -9
- package/src/__tests__/ssao-buffers.test.ts +2 -2
- package/src/__tests__/ssao-data.test.ts +2 -2
- package/src/__tests__/ssao-errors.test.ts +1 -1
- package/src/__tests__/ssao-passes.test.ts +68 -392
- package/src/__tests__/ssao-pipelines.test.ts +1 -1
- package/src/__tests__/ssao-uniform-layout.test.ts +8 -6
- package/src/__tests__/stencil-outline-pixel.dawn.test.ts +25 -17
- package/src/__tests__/swap-chain-format.unit.test.ts +5 -7
- package/src/__tests__/systems.unit.test.ts +536 -1326
- package/src/__tests__/template-game-default-api-contract.test.ts +362 -0
- package/src/__tests__/text.unit.test.ts +56 -33
- package/src/__tests__/tilemap-childed-despawn.test.ts +8 -14
- package/src/__tests__/tilemap-chunk-extract.overhang-bounds.test.ts +8 -12
- package/src/__tests__/tilemap-chunk-extract.propagate-order.test.ts +2 -1
- package/src/__tests__/tilemap-chunk-extract.test.ts +13 -17
- package/src/__tests__/tilemap-dirty-rebuild.test.ts +7 -11
- package/src/__tests__/tilemap-material-cache.test.ts +8 -13
- package/src/__tests__/tilemap-multi-atlas.test.ts +12 -32
- package/src/__tests__/tilemap-owner-boundary.unit.test.ts +5 -2
- package/src/__tests__/tilemap-region-pack.test.ts +8 -12
- package/src/__tests__/tilemap-spawn-flip-pivot.test.ts +8 -12
- package/src/__tests__/tilemap-uv-inset.test.ts +11 -14
- package/src/__tests__/tilemap-validate.test.ts +1 -1
- package/src/__tests__/tileset-asset-validate.test.ts +638 -0
- package/src/__tests__/transcode-fallback.unit.test.ts +207 -0
- package/src/__tests__/transform-hierarchy-pixel-diff.dawn.test.ts +36 -28
- package/src/__tests__/transient-fields-collect.test.ts +28 -21
- package/src/__tests__/transient-runtime-behavior.test.ts +227 -0
- package/src/__tests__/transparent-sort-tilemap-sprite-interleave.test.ts +4 -4
- package/src/__tests__/variant-selection.unit.test.ts +1 -1
- package/src/__tests__/video-extract-bindgroup.dawn.test.ts +89 -136
- package/src/__tests__/video-loader-consumption.test.ts +86 -0
- package/src/__tests__/video-loader-smoke.dawn.test.ts +60 -0
- package/src/__tests__/view-ubo-layout.browser.test.ts +0 -22
- package/src/__tests__/world-entity-key.test.ts +1 -1
- package/src/__tests__/world-scene-despawn.test.ts +1 -1
- package/src/__tests__/world-scene-instantiate.test.ts +2 -36
- package/src/__tests__/world-scene-nested.test.ts +1 -1
- package/src/__tests__/world-scene-override.test.ts +1 -1
- package/src/backend-selection.ts +69 -0
- package/src/collect-scene-asset.ts +35 -23
- package/src/components/__tests__/camera.test-d.ts +1 -1
- package/src/components/__tests__/camera.test.ts +1 -1
- package/src/components/__tests__/sprite-animation.test-d.ts +2 -2
- package/src/components/__tests__/tile-layer.test-d.ts +1 -1
- package/src/components/__tests__/tile-layer.unit.test.ts +2 -2
- package/src/createRenderer.ts +24 -36
- package/src/errors/environment.ts +1 -1
- package/src/index.ts +51 -113
- package/src/renderer-host.ts +33 -0
- package/src/scene-instances/__tests__/post-spawn-resolve-joints.unit.test.ts +1 -1
- package/src/scene-instances/index.ts +4 -0
- package/src/scene-utils/mount-override-fold.ts +3 -7
- package/src/systems/__tests__/transparent-sort.bench.ts +3 -3
- package/src/systems/sprite-animation-tick.ts +1 -1
- package/src/systems/transparent-sort.ts +38 -38
- package/src/tilemap-register-validate.ts +4 -4
- package/dist/__tests__/bind-group-cache-binding.test.d.ts +0 -2
- package/dist/__tests__/bind-group-cache-binding.test.d.ts.map +0 -1
- package/dist/__tests__/bind-group-cache-frame.test.d.ts +0 -2
- package/dist/__tests__/bind-group-cache-frame.test.d.ts.map +0 -1
- package/dist/__tests__/dawn/mesh-update.dawn.test.d.ts +0 -2
- package/dist/__tests__/dawn/mesh-update.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/dispatch-fullscreen-pass-composite-swapchain.dawn.test.d.ts +0 -2
- package/dist/__tests__/dispatch-fullscreen-pass-composite-swapchain.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/dispatch-fullscreen-pass-custom-reads.dawn.test.d.ts +0 -2
- package/dist/__tests__/dispatch-fullscreen-pass-custom-reads.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/dispatch-fullscreen-pass-depth-composite.dawn.test.d.ts +0 -2
- package/dist/__tests__/dispatch-fullscreen-pass-depth-composite.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/dispatch-fullscreen-pass-params.unit.test.d.ts +0 -2
- package/dist/__tests__/dispatch-fullscreen-pass-params.unit.test.d.ts.map +0 -1
- package/dist/__tests__/fog-producer-manifest.d.ts +0 -131
- package/dist/__tests__/fog-producer-manifest.d.ts.map +0 -1
- package/dist/__tests__/fog-producer-pixel-probe.d.ts +0 -42
- package/dist/__tests__/fog-producer-pixel-probe.d.ts.map +0 -1
- package/dist/__tests__/fog-producer-pixel.browser.test.d.ts +0 -2
- package/dist/__tests__/fog-producer-pixel.browser.test.d.ts.map +0 -1
- package/dist/__tests__/fog-producer-pixel.dawn.test.d.ts +0 -2
- package/dist/__tests__/fog-producer-pixel.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/fog-producer-real-fixture.d.ts +0 -5
- package/dist/__tests__/fog-producer-real-fixture.d.ts.map +0 -1
- package/dist/__tests__/fog-producer-vfx-effect.d.ts +0 -3
- package/dist/__tests__/fog-producer-vfx-effect.d.ts.map +0 -1
- package/dist/__tests__/fog-scene-asset.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-scene-asset.integration.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-resource-store-cubemap-status.test.d.ts +0 -2
- package/dist/__tests__/gpu-resource-store-cubemap-status.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-resource.test.d.ts +0 -2
- package/dist/__tests__/gpu-resource.test.d.ts.map +0 -1
- package/dist/__tests__/hdrp-bgl-slots.browser.test.d.ts +0 -2
- package/dist/__tests__/hdrp-bgl-slots.browser.test.d.ts.map +0 -1
- package/dist/__tests__/hdrp-buffers.unit.test.d.ts +0 -2
- package/dist/__tests__/hdrp-buffers.unit.test.d.ts.map +0 -1
- package/dist/__tests__/hdrp-execute-filter.unit.test.d.ts +0 -2
- package/dist/__tests__/hdrp-execute-filter.unit.test.d.ts.map +0 -1
- package/dist/__tests__/hdrp-gbuffer-attachments.browser.test.d.ts +0 -2
- package/dist/__tests__/hdrp-gbuffer-attachments.browser.test.d.ts.map +0 -1
- package/dist/__tests__/hdrp-pipeline-asset-type.test-d.d.ts +0 -2
- package/dist/__tests__/hdrp-pipeline-asset-type.test-d.d.ts.map +0 -1
- package/dist/__tests__/hdrp-ssao-boundary.test.d.ts +0 -2
- package/dist/__tests__/hdrp-ssao-boundary.test.d.ts.map +0 -1
- package/dist/__tests__/hdrp-ssao-falsification.test.d.ts +0 -2
- package/dist/__tests__/hdrp-ssao-falsification.test.d.ts.map +0 -1
- package/dist/__tests__/helpers/primitive-world.d.ts +0 -8
- package/dist/__tests__/helpers/primitive-world.d.ts.map +0 -1
- package/dist/__tests__/helpers/render-asset-port.d.ts +0 -15
- package/dist/__tests__/helpers/render-asset-port.d.ts.map +0 -1
- package/dist/__tests__/helpers/scene-asset-port.d.ts +0 -9
- package/dist/__tests__/helpers/scene-asset-port.d.ts.map +0 -1
- package/dist/__tests__/material-derived-coordinates.integration.test.d.ts +0 -2
- package/dist/__tests__/material-derived-coordinates.integration.test.d.ts.map +0 -1
- package/dist/__tests__/pipeline-layout-selection.test.d.ts +0 -2
- package/dist/__tests__/pipeline-layout-selection.test.d.ts.map +0 -1
- package/dist/__tests__/post-process-reads-narrowing.test-d.d.ts +0 -2
- package/dist/__tests__/post-process-reads-narrowing.test-d.d.ts.map +0 -1
- package/dist/__tests__/post-process-register-roundtrip.dawn.test.d.ts +0 -2
- package/dist/__tests__/post-process-register-roundtrip.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-zero-feature.browser.test.d.ts +0 -2
- package/dist/__tests__/render-feature-zero-feature.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-pipeline-trivial.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-pipeline-trivial.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-csm-caster-membership.test.d.ts +0 -2
- package/dist/__tests__/shadow-csm-caster-membership.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-csm-pssm.test.d.ts +0 -2
- package/dist/__tests__/shadow-csm-pssm.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-csm-temporal.browser.test.d.ts +0 -2
- package/dist/__tests__/shadow-csm-temporal.browser.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-csm-viewport.test.d.ts +0 -2
- package/dist/__tests__/shadow-csm-viewport.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-m2.dawn.test.d.ts +0 -2
- package/dist/__tests__/shadow-m2.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-m3-calibrate-run.dawn.test.d.ts +0 -2
- package/dist/__tests__/shadow-m3-calibrate-run.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-m3-calibrate.d.ts +0 -83
- package/dist/__tests__/shadow-m3-calibrate.d.ts.map +0 -1
- package/dist/__tests__/shadow-m3.dawn.test.d.ts +0 -2
- package/dist/__tests__/shadow-m3.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-probe-control-flow.dawn.test.d.ts +0 -2
- package/dist/__tests__/shadow-probe-control-flow.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/shadow-quality-metrics.dawn.test.d.ts +0 -2
- package/dist/__tests__/shadow-quality-metrics.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/temporal-off-path.unit.test.d.ts +0 -2
- package/dist/__tests__/temporal-off-path.unit.test.d.ts.map +0 -1
- package/dist/__tests__/video-cache-regression.unit.test.d.ts +0 -2
- package/dist/__tests__/video-cache-regression.unit.test.d.ts.map +0 -1
- package/dist/asset-kind.d.ts +0 -4
- package/dist/asset-kind.d.ts.map +0 -1
- package/dist/errors/sprite-animation.d.ts +0 -3
- package/dist/errors/sprite-animation.d.ts.map +0 -1
- package/dist/scene-asset-port.d.ts +0 -17
- package/dist/scene-asset-port.d.ts.map +0 -1
- package/dist/scene-collect-errors.d.ts +0 -22
- package/dist/scene-collect-errors.d.ts.map +0 -1
- package/dist/shadow-m3-calibrate.d.ts +0 -40
- package/dist/shadow-m3-calibrate.d.ts.map +0 -1
- package/src/__tests__/bind-group-cache-binding.test.ts +0 -2513
- package/src/__tests__/bind-group-cache-frame.test.ts +0 -1511
- package/src/__tests__/dispatch-fullscreen-pass-composite-swapchain.dawn.test.ts +0 -204
- package/src/__tests__/dispatch-fullscreen-pass-custom-reads.dawn.test.ts +0 -297
- package/src/__tests__/dispatch-fullscreen-pass-depth-composite.dawn.test.ts +0 -271
- package/src/__tests__/dispatch-fullscreen-pass-params.unit.test.ts +0 -321
- package/src/__tests__/fog-producer-manifest.ts +0 -162
- package/src/__tests__/fog-producer-pixel-probe.ts +0 -263
- package/src/__tests__/fog-producer-pixel.browser.test.ts +0 -26
- package/src/__tests__/fog-producer-pixel.dawn.test.ts +0 -55
- package/src/__tests__/fog-producer-real-fixture.ts +0 -805
- package/src/__tests__/fog-producer-vfx-effect.ts +0 -272
- package/src/__tests__/fog-scene-asset.integration.test.ts +0 -123
- package/src/__tests__/gpu-resource-store-cubemap-status.test.ts +0 -207
- package/src/__tests__/gpu-resource.test.ts +0 -1206
- package/src/__tests__/hdrp-bgl-slots.browser.test.ts +0 -50
- package/src/__tests__/hdrp-buffers.unit.test.ts +0 -70
- package/src/__tests__/hdrp-execute-filter.unit.test.ts +0 -200
- package/src/__tests__/hdrp-gbuffer-attachments.browser.test.ts +0 -64
- package/src/__tests__/hdrp-pipeline-asset-type.test-d.ts +0 -139
- package/src/__tests__/hdrp-ssao-boundary.test.ts +0 -237
- package/src/__tests__/hdrp-ssao-falsification.test.ts +0 -289
- package/src/__tests__/helpers/primitive-world.ts +0 -91
- package/src/__tests__/helpers/render-asset-port.ts +0 -65
- package/src/__tests__/helpers/scene-asset-port.ts +0 -23
- package/src/__tests__/material-derived-coordinates.integration.test.ts +0 -100
- package/src/__tests__/pipeline-layout-selection.test.ts +0 -298
- package/src/__tests__/post-process-reads-narrowing.test-d.ts +0 -52
- package/src/__tests__/post-process-register-roundtrip.dawn.test.ts +0 -230
- package/src/__tests__/render-feature-zero-feature.browser.test.ts +0 -152
- package/src/__tests__/render-pipeline-trivial.dawn.test.ts +0 -525
- package/src/__tests__/shadow-csm-caster-membership.test.ts +0 -232
- package/src/__tests__/shadow-csm-pssm.test.ts +0 -142
- package/src/__tests__/shadow-csm-temporal.browser.test.ts +0 -145
- package/src/__tests__/shadow-csm-viewport.test.ts +0 -74
- package/src/__tests__/shadow-m2.dawn.test.ts +0 -394
- package/src/__tests__/shadow-m3-calibrate-run.dawn.test.ts +0 -248
- package/src/__tests__/shadow-m3-calibrate.ts +0 -203
- package/src/__tests__/shadow-m3.dawn.test.ts +0 -288
- package/src/__tests__/shadow-probe-control-flow.dawn.test.ts +0 -264
- package/src/__tests__/shadow-quality-metrics.dawn.test.ts +0 -324
- package/src/__tests__/temporal-off-path.unit.test.ts +0 -69
- package/src/__tests__/video-cache-regression.unit.test.ts +0 -186
- package/src/asset-kind.ts +0 -7
- package/src/errors/sprite-animation.ts +0 -5
- package/src/scene-asset-port.ts +0 -32
- package/src/scene-collect-errors.ts +0 -30
- package/src/shadow-m3-calibrate.ts +0 -171
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// point-light-shadow.dawn.test.ts
|
|
2
|
-
// feat-20260612-point-light-shadows
|
|
2
|
+
// feat-20260612-point-light-shadows M0 / T-M0-1.
|
|
3
3
|
//
|
|
4
4
|
// Minimal dawn-node fixture: create texture_depth_cube_array (512x512 depth32float,
|
|
5
5
|
// layers=1), execute textureSampleCompareLevel via a compute shader, read back
|
|
@@ -217,24 +217,23 @@ describe('M0 cube_array comparison sampler (dawn)', () => {
|
|
|
217
217
|
});
|
|
218
218
|
});
|
|
219
219
|
|
|
220
|
-
// feat-20260612-point-light-shadows
|
|
220
|
+
// feat-20260612-point-light-shadows M4 / T-M4-8 (AC-10 dawn smoke).
|
|
221
221
|
//
|
|
222
|
-
// Structural-only
|
|
223
|
-
//
|
|
224
|
-
// closures) produces an identical 6 x N pass-count topology when N
|
|
222
|
+
// Structural-only Standard point-shadow smoke: validates that the shared
|
|
223
|
+
// The typed point-shadow primitive produces an identical 6 x N pass-count topology when N
|
|
225
224
|
// snapshots are queued. The actual dawn-node device path is exercised by
|
|
226
225
|
// T-M0-1 above (cube_array comparison sampler); this smoke focuses on the
|
|
227
226
|
// `recordPointShadowPass` 6-face inner loop invariant from the host side
|
|
228
227
|
// — exactly what dawn-node would observe at the GPU layer were the BGL
|
|
229
228
|
// hookup landed.
|
|
230
229
|
//
|
|
231
|
-
// Pixel readback of
|
|
230
|
+
// Pixel readback of the point-light shadow lands in M5 / T-M5-1 (AC-15
|
|
232
231
|
// dawn-e2e).
|
|
233
|
-
describe('M4
|
|
234
|
-
it("'
|
|
232
|
+
describe('M4 Standard point shadow smoke (dawn structural)', () => {
|
|
233
|
+
it("'Standard point shadow smoke' -- 6 x N pass-count topology preserved (AC-10)", async () => {
|
|
235
234
|
// recordPointShadowPass walks `frameState.pointShadowSnapshots` and emits
|
|
236
235
|
// 6 face passes per non-undefined snapshot. The structural assertion is
|
|
237
|
-
// unit-testable without a GPU
|
|
236
|
+
// unit-testable without a GPU and owned by the Standard point-shadow path;
|
|
238
237
|
// the dawn-node project simply re-verifies the contract from the dawn
|
|
239
238
|
// test harness so a future BGL hookup change cannot regress the topology
|
|
240
239
|
// count without tripping at least one project.
|
|
@@ -248,36 +247,30 @@ describe('M4 HDRP point shadow smoke (dawn structural)', () => {
|
|
|
248
247
|
expect(count).toBe(6 * n);
|
|
249
248
|
}
|
|
250
249
|
});
|
|
251
|
-
|
|
252
|
-
it("'HDRP point shadow smoke' -- hdrpPipeline.buildGraph imports addPointShadowPass (T-M4-1 wiring)", async () => {
|
|
253
|
-
const hdrpModule = await import('@forgeax/engine-render/internal');
|
|
254
|
-
expect(hdrpModule.hdrpPipeline).toBeDefined();
|
|
255
|
-
expect(typeof hdrpModule.hdrpPipeline.build).toBe('function');
|
|
256
|
-
});
|
|
257
250
|
});
|
|
258
251
|
|
|
259
|
-
// feat-20260612-point-light-shadows
|
|
252
|
+
// feat-20260612-point-light-shadows M5 / T-M5-1 (AC-15 e2e dawn pixel readback).
|
|
260
253
|
//
|
|
261
254
|
// End-to-end fixture proving the cube_array depth atlas + comparison sampler
|
|
262
255
|
// primitive that point-light shadows ride on can distinguish "occluded"
|
|
263
256
|
// (closer occluder depth) from "non-occluded" (open horizon depth) when both
|
|
264
257
|
// fragments query the same cube atlas with different reference depths.
|
|
265
258
|
//
|
|
266
|
-
// Pipeline budget posture (scope-amended): the
|
|
267
|
-
//
|
|
259
|
+
// Pipeline budget posture (scope-amended): the shared `pbr-view-bgl`
|
|
260
|
+
// extension to declare bindings 5 + 6 was deferred from M5
|
|
268
261
|
// (T-M3-6 + T-M4-6 carry-over concern) because the cascade through
|
|
269
262
|
// vite-plugin-shader define maps + createRenderer fallback resources +
|
|
270
263
|
// render-system-record viewBindGroup builder + shadowParams per-frame fill
|
|
271
264
|
// exceeds the M5 milestone budget. T-M5-1 is therefore implemented against
|
|
272
|
-
// the same raw RHI primitive that the
|
|
265
|
+
// the same raw RHI primitive that the Standard shaders sample through the
|
|
273
266
|
// the BGL hookup lands: a `texture_depth_cube_array` cleared per-face to
|
|
274
267
|
// distinct depth values, sampled via `textureSampleCompareLevel` with two
|
|
275
268
|
// refs that simulate the occluded vs non-occluded fragments. The depth
|
|
276
269
|
// values + ref values are chosen so the comparison passes for the open
|
|
277
270
|
// fragment (returns 1.0) and fails for the occluded fragment (returns 0.0).
|
|
278
271
|
//
|
|
279
|
-
// This validates the dawn-node end-to-end chain that the production
|
|
280
|
-
//
|
|
272
|
+
// This validates the dawn-node end-to-end chain that the production Standard
|
|
273
|
+
// forward pass relies on (cube_array creation -> face attachments ->
|
|
281
274
|
// sampling via comparison sampler -> pixel-distinct results), so when the
|
|
282
275
|
// follow-on BGL hookup lands the AC-15 bar shifts from "raw RHI primitive
|
|
283
276
|
// works" to "createRenderer path works" without re-discovering the dawn
|
|
@@ -476,7 +469,7 @@ describe('M5 point shadow e2e readback (dawn, T-M5-1 / AC-15)', () => {
|
|
|
476
469
|
// Per requirements §5.4 falsification proof contract.
|
|
477
470
|
expect(result[0]).toBe(0.0);
|
|
478
471
|
expect(result[1]).toBe(1.0);
|
|
479
|
-
// The closed-form contract the
|
|
472
|
+
// The closed-form contract the Standard forward path relies on:
|
|
480
473
|
// shadowFactor for occluded fragment is strictly less than for the
|
|
481
474
|
// non-occluded one, so frame brightness on the occluded pixel is
|
|
482
475
|
// strictly less than on the non-occluded pixel.
|
|
@@ -550,14 +543,14 @@ describe('Round-2 F-3 / Issue 3: createRenderer e2e dawn (T-M5-1)', () => {
|
|
|
550
543
|
// pattern). buildEngineShaderManifest produces the data: URL the
|
|
551
544
|
// renderer's shaderManifestUrl needs.
|
|
552
545
|
const { World } = await import('@forgeax/engine-ecs');
|
|
553
|
-
const componentsModule = await import('@forgeax/engine-render
|
|
546
|
+
const componentsModule = await import('@forgeax/engine-render');
|
|
554
547
|
const sceneComponents = await import('@forgeax/engine-scene');
|
|
555
548
|
const { Camera, DirectionalLight, MeshFilter, MeshRenderer } = componentsModule;
|
|
556
549
|
const { Transform } = sceneComponents;
|
|
557
550
|
const { PointLight } = componentsModule;
|
|
558
|
-
const { PointLightShadow } = await import('@forgeax/engine-render
|
|
559
|
-
const {
|
|
560
|
-
const {
|
|
551
|
+
const { PointLightShadow } = await import('@forgeax/engine-render');
|
|
552
|
+
const { constructRuntimeRendererHost } = await import('../renderer-host');
|
|
553
|
+
const { HANDLE_CUBE } = await import('@forgeax/engine-assets-runtime');
|
|
561
554
|
const { buildEngineShaderManifest } = await import('@forgeax/engine-vite-plugin-shader');
|
|
562
555
|
const manifest = await buildEngineShaderManifest();
|
|
563
556
|
const manifestUrl = `data:application/json,${encodeURIComponent(JSON.stringify(manifest))}`;
|
|
@@ -620,16 +613,22 @@ describe('Round-2 F-3 / Issue 3: createRenderer e2e dawn (T-M5-1)', () => {
|
|
|
620
613
|
removeEventListener() {},
|
|
621
614
|
} as unknown as HTMLCanvasElement;
|
|
622
615
|
|
|
623
|
-
let
|
|
616
|
+
let host: Awaited<ReturnType<typeof constructRuntimeRendererHost>>;
|
|
624
617
|
try {
|
|
625
|
-
|
|
618
|
+
host = await constructRuntimeRendererHost(
|
|
619
|
+
mockCanvas,
|
|
620
|
+
{},
|
|
621
|
+
{
|
|
622
|
+
shaderManifestUrl: manifestUrl,
|
|
623
|
+
},
|
|
624
|
+
);
|
|
626
625
|
} finally {
|
|
627
626
|
globalThis.navigator.gpu.requestAdapter = originalRequestAdapter;
|
|
628
627
|
}
|
|
629
|
-
expect(
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
628
|
+
expect(host.ok).toBe(true);
|
|
629
|
+
if (!host.ok) throw host.error;
|
|
630
|
+
const { renderer } = host.value;
|
|
631
|
+
expect(renderer.inspect().state).toBe('alive');
|
|
633
632
|
const device = sharedDevice;
|
|
634
633
|
if (device === undefined) throw new Error('GPUDevice not captured');
|
|
635
634
|
|
|
@@ -639,10 +638,6 @@ describe('Round-2 F-3 / Issue 3: createRenderer e2e dawn (T-M5-1)', () => {
|
|
|
639
638
|
// early because lights.pointShadow is empty). The renderer is
|
|
640
639
|
// re-used; only the World changes. --
|
|
641
640
|
const worldBaseline = new World();
|
|
642
|
-
const baselineCubeHandle = worldBaseline.internSharedRef(
|
|
643
|
-
'MeshAsset',
|
|
644
|
-
createPrimitiveMesh('cube').unwrap(),
|
|
645
|
-
);
|
|
646
641
|
worldBaseline.spawn(
|
|
647
642
|
{
|
|
648
643
|
component: Transform,
|
|
@@ -674,7 +669,7 @@ describe('Round-2 F-3 / Issue 3: createRenderer e2e dawn (T-M5-1)', () => {
|
|
|
674
669
|
scale: [1, 1, 1],
|
|
675
670
|
},
|
|
676
671
|
},
|
|
677
|
-
{ component: MeshFilter, data: { assetHandle:
|
|
672
|
+
{ component: MeshFilter, data: { assetHandle: HANDLE_CUBE } },
|
|
678
673
|
{ component: MeshRenderer, data: {} },
|
|
679
674
|
);
|
|
680
675
|
worldBaseline.spawn(
|
|
@@ -718,10 +713,6 @@ describe('Round-2 F-3 / Issue 3: createRenderer e2e dawn (T-M5-1)', () => {
|
|
|
718
713
|
// sampling (compared to the no-shadow path which reads the all-1.0
|
|
719
714
|
// fallback cube_array). --
|
|
720
715
|
const worldShadow = new World();
|
|
721
|
-
const shadowCubeHandle = worldShadow.internSharedRef(
|
|
722
|
-
'MeshAsset',
|
|
723
|
-
createPrimitiveMesh('cube').unwrap(),
|
|
724
|
-
);
|
|
725
716
|
worldShadow.spawn(
|
|
726
717
|
{
|
|
727
718
|
component: Transform,
|
|
@@ -753,7 +744,7 @@ describe('Round-2 F-3 / Issue 3: createRenderer e2e dawn (T-M5-1)', () => {
|
|
|
753
744
|
scale: [1, 1, 1],
|
|
754
745
|
},
|
|
755
746
|
},
|
|
756
|
-
{ component: MeshFilter, data: { assetHandle:
|
|
747
|
+
{ component: MeshFilter, data: { assetHandle: HANDLE_CUBE } },
|
|
757
748
|
{ component: MeshRenderer, data: {} },
|
|
758
749
|
);
|
|
759
750
|
worldShadow.spawn(
|
|
@@ -14,13 +14,21 @@
|
|
|
14
14
|
import { World } from '@forgeax/engine-ecs';
|
|
15
15
|
import { componentDefinition, componentSchema } from '@forgeax/engine-ecs/internal';
|
|
16
16
|
import { vec3 } from '@forgeax/engine-math';
|
|
17
|
-
import {
|
|
18
|
-
buildPointShadowMatrices,
|
|
19
|
-
PointLightShadow,
|
|
20
|
-
ShadowInvalidConfigError,
|
|
21
|
-
validatePointLightShadowData,
|
|
22
|
-
} from '@forgeax/engine-render/internal';
|
|
17
|
+
import { PointLightShadow } from '@forgeax/engine-render';
|
|
23
18
|
import { describe, expect, it } from 'vitest';
|
|
19
|
+
import { validatePointLightShadowData } from '../../../render/src/components/light-helpers';
|
|
20
|
+
import { ShadowInvalidConfigError } from '../../../render/src/errors/render';
|
|
21
|
+
import {
|
|
22
|
+
BYTES_PER_LIGHT_SLOT,
|
|
23
|
+
LIGHTSLOT_LAYOUT,
|
|
24
|
+
packLightSlot,
|
|
25
|
+
} from '../../../render/src/light-buffer-layout';
|
|
26
|
+
import { buildPointShadowMatrices } from '../../../render/src/render-system-extract';
|
|
27
|
+
import {
|
|
28
|
+
SHADOW_ATLAS_DEFAULT_FACE_SIZE,
|
|
29
|
+
SHADOW_ATLAS_DEFAULT_LAYERS,
|
|
30
|
+
ShadowAtlas,
|
|
31
|
+
} from '../../../render/src/shadow-atlas';
|
|
24
32
|
|
|
25
33
|
type PointShadowSpawnResult = ReturnType<World['spawn']>;
|
|
26
34
|
|
|
@@ -432,7 +440,6 @@ function spawnValidatedPointShadow(
|
|
|
432
440
|
// recordFrame never invokes atlas.ensure(). The unit guarantee here
|
|
433
441
|
// is that `new ShadowAtlas(device)` itself does no GPU work — the
|
|
434
442
|
// construction-only path stays allocation-free.
|
|
435
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
436
443
|
new ShadowAtlas(makeMockDevice().device);
|
|
437
444
|
expect(calls.createTexture).toBe(0);
|
|
438
445
|
expect(calls.createTextureView).toBe(0);
|
|
@@ -441,7 +448,6 @@ function spawnValidatedPointShadow(
|
|
|
441
448
|
|
|
442
449
|
it('ensure() lazily allocates exactly one texture + cube-array view + sampler', async () => {
|
|
443
450
|
const { device, calls } = makeMockDevice();
|
|
444
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
445
451
|
const atlas = new ShadowAtlas(device);
|
|
446
452
|
expect(atlas.isAllocated()).toBe(false);
|
|
447
453
|
atlas.ensure();
|
|
@@ -454,7 +460,6 @@ function spawnValidatedPointShadow(
|
|
|
454
460
|
|
|
455
461
|
it('ensure() is idempotent — second call is zero-cost', async () => {
|
|
456
462
|
const { device, calls } = makeMockDevice();
|
|
457
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
458
463
|
const atlas = new ShadowAtlas(device);
|
|
459
464
|
atlas.ensure();
|
|
460
465
|
atlas.ensure();
|
|
@@ -466,7 +471,6 @@ function spawnValidatedPointShadow(
|
|
|
466
471
|
|
|
467
472
|
it('faceView caches per (layer, face) — second call same key is zero-cost', async () => {
|
|
468
473
|
const { device, calls } = makeMockDevice();
|
|
469
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
470
474
|
const atlas = new ShadowAtlas(device);
|
|
471
475
|
atlas.ensure();
|
|
472
476
|
// 1 view from ensure() (cube-array sampling view).
|
|
@@ -483,14 +487,12 @@ function spawnValidatedPointShadow(
|
|
|
483
487
|
|
|
484
488
|
it('faceView throws when called before ensure()', async () => {
|
|
485
489
|
const { device } = makeMockDevice();
|
|
486
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
487
490
|
const atlas = new ShadowAtlas(device);
|
|
488
491
|
expect(() => atlas.faceView(0, 0)).toThrow(/before ensure/);
|
|
489
492
|
});
|
|
490
493
|
|
|
491
494
|
it('faceView range-checks layer + face', async () => {
|
|
492
495
|
const { device } = makeMockDevice();
|
|
493
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
494
496
|
const atlas = new ShadowAtlas(device, { layers: 4 });
|
|
495
497
|
atlas.ensure();
|
|
496
498
|
expect(() => atlas.faceView(-1, 0)).toThrow(/layer out of range/);
|
|
@@ -501,7 +503,6 @@ function spawnValidatedPointShadow(
|
|
|
501
503
|
|
|
502
504
|
it('dispose() releases GPU memory + clears caches; subsequent ensure() re-allocates', async () => {
|
|
503
505
|
const { device, calls } = makeMockDevice();
|
|
504
|
-
const { ShadowAtlas } = await import('@forgeax/engine-render/internal');
|
|
505
506
|
const atlas = new ShadowAtlas(device);
|
|
506
507
|
atlas.ensure();
|
|
507
508
|
atlas.faceView(0, 0); // populate the per-face cache
|
|
@@ -521,8 +522,6 @@ function spawnValidatedPointShadow(
|
|
|
521
522
|
|
|
522
523
|
it('default size + layers match plan-strategy §D-1 (512 x 512 x 4 cube layers)', async () => {
|
|
523
524
|
const { device } = makeMockDevice();
|
|
524
|
-
const { SHADOW_ATLAS_DEFAULT_FACE_SIZE, SHADOW_ATLAS_DEFAULT_LAYERS, ShadowAtlas } =
|
|
525
|
-
await import('@forgeax/engine-render/internal');
|
|
526
525
|
expect(SHADOW_ATLAS_DEFAULT_FACE_SIZE).toBe(512);
|
|
527
526
|
expect(SHADOW_ATLAS_DEFAULT_LAYERS).toBe(4);
|
|
528
527
|
const atlas = new ShadowAtlas(device);
|
|
@@ -531,7 +530,7 @@ function spawnValidatedPointShadow(
|
|
|
531
530
|
});
|
|
532
531
|
});
|
|
533
532
|
|
|
534
|
-
describe('
|
|
533
|
+
describe('point shadow pass topology (T-M3-5 / AC-04 + AC-09)', () => {
|
|
535
534
|
it('AC-04: 6 x N pass-count formula — N=0 emits 0 passes, N=4 emits 24', () => {
|
|
536
535
|
// The 6 x N invariant is the structural contract recordPointShadowPass
|
|
537
536
|
// upholds: per the loop in render-system-record.ts, exactly 6 face
|
|
@@ -548,46 +547,10 @@ function spawnValidatedPointShadow(
|
|
|
548
547
|
expect(count).toBe(6 * n);
|
|
549
548
|
}
|
|
550
549
|
});
|
|
551
|
-
|
|
552
|
-
it('AC-09: addPointShadowPass primitive exists; execute closure early-returns on empty snapshot', async () => {
|
|
553
|
-
// The URP buildGraph contract: the point-shadow pass node is declared
|
|
554
|
-
// unconditionally, but `recordPointShadowPass` (the execute closure)
|
|
555
|
-
// early-returns when `frameState.pointShadowSnapshots.length === 0`
|
|
556
|
-
// so zero-shadow scenes pay zero GPU work. The pure-buildGraph
|
|
557
|
-
// declaration approach keeps the memoized graph stable across
|
|
558
|
-
// snapshot count drift (no rebuild on add/remove of a
|
|
559
|
-
// PointLightShadow component); AC-09's zero-allocation guarantee is
|
|
560
|
-
// upheld by the atlas's `ensure()` lazy-allocate path which
|
|
561
|
-
// `recordFrame` also gates on the same `length > 0` check.
|
|
562
|
-
const primitivesModule = await import('@forgeax/engine-render/internal');
|
|
563
|
-
// The addPointShadowPass primitive is exported from
|
|
564
|
-
// render-graph-primitives.ts; urp-pipeline.ts imports + invokes it
|
|
565
|
-
// unconditionally inside buildGraph. The execute closure is the gate.
|
|
566
|
-
expect(typeof primitivesModule.addPointShadowPass).toBe('function');
|
|
567
|
-
// Smoke: addPointShadowPass takes (graph, name) and returns void —
|
|
568
|
-
// mirrors addShadowPass / addSkyboxPass signatures.
|
|
569
|
-
expect(primitivesModule.addPointShadowPass.length).toBe(2);
|
|
570
|
-
});
|
|
571
550
|
});
|
|
572
551
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
it('AC-04 + AC-05: HDRP buildGraph imports addPointShadowPass; same primitive as URP', async () => {
|
|
576
|
-
// hdrp-pipeline.ts imports `addPointShadowPass` from
|
|
577
|
-
// render-graph-primitives.ts and calls it unconditionally inside
|
|
578
|
-
// buildGraph (T-M4-1). Both pipelines share the SAME primitive +
|
|
579
|
-
// execute closure (`recordPointShadowPass`), so the 6 x N pass-count
|
|
580
|
-
// contract is identical to URP's: zero-shadow scenes -> zero passes
|
|
581
|
-
// (AC-05 no-regression for HDRP), N=4 lights -> 24 caster passes
|
|
582
|
-
// (AC-04 6 x N).
|
|
583
|
-
const hdrpModule = await import('@forgeax/engine-render/internal');
|
|
584
|
-
expect(hdrpModule.hdrpPipeline).toBeDefined();
|
|
585
|
-
expect(typeof hdrpModule.hdrpPipeline.build).toBe('function');
|
|
586
|
-
expect(hdrpModule.hdrpPipeline.build.length).toBe(2);
|
|
587
|
-
});
|
|
588
|
-
|
|
589
|
-
it('AC-13: packLightSlot writes shadow info onto LightSlot pad lanes (byte 52..64)', async () => {
|
|
590
|
-
const { packLightSlot } = await import('@forgeax/engine-render/internal');
|
|
552
|
+
describe('standard point shadow light-slot packing (AC-05)', () => {
|
|
553
|
+
it('AC-13: packLightSlot writes shadow info onto LightSlot pad lanes (byte 52..64)', () => {
|
|
591
554
|
const snap = {
|
|
592
555
|
kind: 'point' as const,
|
|
593
556
|
position: vec3.create(1, 2, 3),
|
|
@@ -614,8 +577,7 @@ function spawnValidatedPointShadow(
|
|
|
614
577
|
expect(withShadow[15]).toBe(25);
|
|
615
578
|
});
|
|
616
579
|
|
|
617
|
-
it('AC-13: spot light packLightSlot leaves pad lanes at sentinel (-1, 0, 0)',
|
|
618
|
-
const { packLightSlot } = await import('@forgeax/engine-render/internal');
|
|
580
|
+
it('AC-13: spot light packLightSlot leaves pad lanes at sentinel (-1, 0, 0)', () => {
|
|
619
581
|
const spotSnap = {
|
|
620
582
|
kind: 'spot' as const,
|
|
621
583
|
entity: 0,
|
|
@@ -646,10 +608,7 @@ function spawnValidatedPointShadow(
|
|
|
646
608
|
expect(packed[15]).toBe(0);
|
|
647
609
|
});
|
|
648
610
|
|
|
649
|
-
it('AC-05: LIGHTSLOT_LAYOUT byteSize unchanged at 64 (no-regression for
|
|
650
|
-
const { LIGHTSLOT_LAYOUT, BYTES_PER_LIGHT_SLOT } = await import(
|
|
651
|
-
'@forgeax/engine-render/internal'
|
|
652
|
-
);
|
|
611
|
+
it('AC-05: LIGHTSLOT_LAYOUT byteSize unchanged at 64 (no-regression for standard)', () => {
|
|
653
612
|
// The pad-lane re-purposing must not change the total LightSlot size:
|
|
654
613
|
// the std430 vec4 stride is preserved; only the field semantics within
|
|
655
614
|
// bytes 52..64 changed (u32 pad -> i32 layer + f32 near + f32 far).
|
|
@@ -16,8 +16,11 @@
|
|
|
16
16
|
// (5) POST_PROCESS_EXPECTED + postProcessHint resolve both new codes (the
|
|
17
17
|
// hint switch's own `default: never` arm guards completeness there too).
|
|
18
18
|
|
|
19
|
-
import { PostProcessError, type PostProcessErrorCode } from '@forgeax/engine-render/internal';
|
|
20
19
|
import { describe, expect, it } from 'vitest';
|
|
20
|
+
import {
|
|
21
|
+
PostProcessError,
|
|
22
|
+
type PostProcessErrorCode,
|
|
23
|
+
} from '../../../render/src/post-process-errors';
|
|
21
24
|
|
|
22
25
|
// Compile-time exhaustiveness probe: a switch over every member with no default.
|
|
23
26
|
// If a future code is added to the union without a case here, `code` is not
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { World } from '@forgeax/engine-ecs';
|
|
11
11
|
import { componentId, componentSchema } from '@forgeax/engine-ecs/internal';
|
|
12
|
-
import { PostProcessParams } from '@forgeax/engine-render
|
|
12
|
+
import { PostProcessParams } from '@forgeax/engine-render';
|
|
13
13
|
import { describe, expect, it } from 'vitest';
|
|
14
14
|
|
|
15
15
|
describe('PostProcessParams component definition', () => {
|
|
@@ -8,12 +8,9 @@
|
|
|
8
8
|
// collects into Map<shaderId, AllowSharedBufferSource>.
|
|
9
9
|
|
|
10
10
|
import { World } from '@forgeax/engine-ecs';
|
|
11
|
-
import {
|
|
12
|
-
extractFrame,
|
|
13
|
-
PostProcessParams,
|
|
14
|
-
prepareExtractContext,
|
|
15
|
-
} from '@forgeax/engine-render/internal';
|
|
11
|
+
import { PostProcessParams } from '@forgeax/engine-render';
|
|
16
12
|
import { describe, expect, it } from 'vitest';
|
|
13
|
+
import { extractFrame, prepareExtractContext } from '../../../render/src/render-system-extract';
|
|
17
14
|
|
|
18
15
|
describe('extractFrame PostProcessParams snapshot collection', () => {
|
|
19
16
|
it('should contain postProcessParams empty map when no PostProcessParams entities exist', () => {
|
|
@@ -18,15 +18,12 @@
|
|
|
18
18
|
// requirements AC-05/06
|
|
19
19
|
|
|
20
20
|
import { World } from '@forgeax/engine-ecs';
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
Camera,
|
|
24
|
-
extractFrame,
|
|
25
|
-
PostProcessParams,
|
|
26
|
-
prepareExtractContext,
|
|
27
|
-
} from '@forgeax/engine-render/internal';
|
|
21
|
+
import { Camera, PostProcessParams } from '@forgeax/engine-render';
|
|
28
22
|
import { Transform } from '@forgeax/engine-scene';
|
|
29
23
|
import { describe, expect, it } from 'vitest';
|
|
24
|
+
import type { CameraSnapshot } from '../../../render/src/render-contract';
|
|
25
|
+
import type { ExtractedFrame } from '../../../render/src/render-system-extract';
|
|
26
|
+
import { extractFrame, prepareExtractContext } from '../../../render/src/render-system-extract';
|
|
30
27
|
|
|
31
28
|
// ── Helpers ─────────────────────────────────────────────────────────────────
|
|
32
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { createProfiler } from '@forgeax/engine-profiler';
|
|
4
|
-
import type { RendererOptions } from '@forgeax/engine-render
|
|
4
|
+
import type { RendererOptions } from '@forgeax/engine-render';
|
|
5
5
|
import { describe, expect, it } from 'vitest';
|
|
6
6
|
|
|
7
7
|
describe('runtime profiler assembly', () => {
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
|
|
24
24
|
import type { EntityHandle } from '@forgeax/engine-ecs';
|
|
25
25
|
import { World } from '@forgeax/engine-ecs';
|
|
26
|
-
import {
|
|
26
|
+
import { readRenderArrayView } from '@forgeax/engine-ecs/projection';
|
|
27
27
|
import { ChildOf, propagateTransforms, Transform } from '@forgeax/engine-scene';
|
|
28
28
|
import { describe, expect, it } from 'vitest';
|
|
29
|
+
import { TileLayer, Tilemap } from '../../../render/src/components';
|
|
29
30
|
|
|
30
31
|
function identityTransformData() {
|
|
31
32
|
return {
|
|
@@ -38,9 +39,9 @@ function identityTransformData() {
|
|
|
38
39
|
// Read the resolved world mat4 (column-major 16 floats) from the Transform
|
|
39
40
|
// world column array view. Translation lives in column 3 (m[12,13,14]).
|
|
40
41
|
function worldOf(world: World, entity: EntityHandle): Float32Array {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
42
|
+
const view = readRenderArrayView(world, entity, Transform, 'world');
|
|
43
|
+
if (view === undefined) throw new Error('Transform.world view missing');
|
|
44
|
+
return view as Float32Array;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
describe('propagate-transforms.dawn - root-down DFS + stale ChildOf fail-fast (AC-04)', () => {
|
|
@@ -166,6 +167,9 @@ describe('propagate-transforms.dawn - root-down DFS + stale ChildOf fail-fast (A
|
|
|
166
167
|
// default case.
|
|
167
168
|
it('AC-07: identity TileLayer middle node -> Transform.world byte-identical to Tilemap parent', () => {
|
|
168
169
|
const world = new World();
|
|
170
|
+
for (const component of [ChildOf, TileLayer, Tilemap, Transform]) {
|
|
171
|
+
world.components.register(component).unwrap();
|
|
172
|
+
}
|
|
169
173
|
// Parent Tilemap carries a non-identity translation so that the identity /
|
|
170
174
|
// non-identity distinction is observable in the low three translation
|
|
171
175
|
// slots of the 16-float world mat4.
|
|
@@ -185,9 +189,9 @@ describe('propagate-transforms.dawn - root-down DFS + stale ChildOf fail-fast (A
|
|
|
185
189
|
},
|
|
186
190
|
)
|
|
187
191
|
.unwrap();
|
|
188
|
-
// TileLayer
|
|
189
|
-
//
|
|
190
|
-
//
|
|
192
|
+
// TileLayer carries an explicit identity Transform in the current ECS
|
|
193
|
+
// component vocabulary. This mirrors the demo spawn pattern in
|
|
194
|
+
// apps/hello/tilemap/** and keeps the hierarchy contract explicit.
|
|
191
195
|
const layer = world
|
|
192
196
|
.spawn(
|
|
193
197
|
{
|
|
@@ -199,11 +203,8 @@ describe('propagate-transforms.dawn - root-down DFS + stale ChildOf fail-fast (A
|
|
|
199
203
|
sortScope: 0,
|
|
200
204
|
},
|
|
201
205
|
},
|
|
202
|
-
{
|
|
203
|
-
component: Transform,
|
|
204
|
-
data: identityTransformData(),
|
|
205
|
-
},
|
|
206
206
|
{ component: ChildOf, data: { parent: tilemap } },
|
|
207
|
+
{ component: Transform, data: identityTransformData() },
|
|
207
208
|
)
|
|
208
209
|
.unwrap();
|
|
209
210
|
const r = propagateTransforms(world);
|
|
@@ -186,19 +186,13 @@ describe('production-path shadow instanceBuffers worldEntityKey', () => {
|
|
|
186
186
|
);
|
|
187
187
|
});
|
|
188
188
|
|
|
189
|
-
it('shadow
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
it('shadow spot read-side inst.cacheKey get uses worldEntityKey', () => {
|
|
198
|
-
expectWorldEntityKeyAt(
|
|
199
|
-
SHADOW_FILE,
|
|
200
|
-
findLine(SHADOW_FILE, 'frameState.instanceBuffers.get(', 1),
|
|
201
|
-
'shadow-pass spot instanceBuffers.get',
|
|
189
|
+
it('spot shadow uses the shared world-aware caster recorder', () => {
|
|
190
|
+
const src = readFileSync(SHADOW_FILE, 'utf8');
|
|
191
|
+
const start = src.indexOf('export function encodeSpotShadowPass(');
|
|
192
|
+
expect(start).toBeGreaterThanOrEqual(0);
|
|
193
|
+
expect(src.slice(start)).toContain('recordShadowCasterDraws(');
|
|
194
|
+
expect(src.slice(start)).toContain(
|
|
195
|
+
"buildMatchedRenderableIndices(c.dispatch, { LightMode: ['ShadowCaster'] })",
|
|
202
196
|
);
|
|
203
197
|
});
|
|
204
198
|
});
|
|
@@ -213,22 +207,6 @@ describe('production-path shadow instancesBgPerEntity worldEntityKey', () => {
|
|
|
213
207
|
'shadow-pass instancesBgPerEntity write',
|
|
214
208
|
);
|
|
215
209
|
});
|
|
216
|
-
|
|
217
|
-
it('shadow dir read-side instancesBgPerEntity.get uses worldEntityKey', () => {
|
|
218
|
-
expectWorldEntityKeyAt(
|
|
219
|
-
SHADOW_FILE,
|
|
220
|
-
findLine(SHADOW_FILE, '.get(worldEntityKey(', 0),
|
|
221
|
-
'shadow-pass directional instancesBgPerEntity read',
|
|
222
|
-
);
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
it('shadow spot read-side instancesBgPerEntity.get uses worldEntityKey', () => {
|
|
226
|
-
expectWorldEntityKeyAt(
|
|
227
|
-
SHADOW_FILE,
|
|
228
|
-
findLine(SHADOW_FILE, '.get(worldEntityKey(', 1),
|
|
229
|
-
'shadow-pass spot instancesBgPerEntity read',
|
|
230
|
-
);
|
|
231
|
-
});
|
|
232
210
|
});
|
|
233
211
|
|
|
234
212
|
// ── Fold-bucket negative half NOT worldEntityKey (D-1a #1 invariant) ───────
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// header for the shared pattern rationale). RecoverError carries no .detail
|
|
4
4
|
// field, so this guard covers the RecoverErrorCode exhaustiveness only.
|
|
5
5
|
|
|
6
|
-
import type { RecoverError, RecoverErrorCode } from '
|
|
6
|
+
import type { RecoverError, RecoverErrorCode } from '../../../render/src/errors/recover';
|
|
7
7
|
|
|
8
8
|
function exhaustiveSwitchOnRecoverCode(code: RecoverErrorCode): string {
|
|
9
9
|
switch (code) {
|