@forgeax/engine-runtime 0.1.23 → 0.1.24
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 +15 -6
- package/dist/__tests__/advance-animation-player.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/advance-animation-player.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-aabb.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-aabb.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-bootstrap.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-bootstrap.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-builtin-nineslice.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-builtin-nineslice.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-d9-tile-sampler-soft-warn.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-d9-tile-sampler-soft-warn.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-guid.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-guid.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-material-validate.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-material-validate.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-mesh-fail-fast.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-mesh-fail-fast.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-scene.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-scene.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-registry-sprite-slices-validate.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-registry-sprite-slices-validate.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset-renderer-assembly.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset-renderer-assembly.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/asset.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/asset.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/bloom-gating.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/bloom-gating.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/builtin-guid-ssot.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/builtin-guid-ssot.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/builtin-pack.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/builtin-pack.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/camera-antialias.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/camera-antialias.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/camera-bloom.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/camera-bloom.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/camera-clear-schema.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/camera-clear-schema.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/camera-ortho.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/camera-ortho.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/cluster-binner.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/cluster-binner.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/create-renderer-fallback-shader-manifest.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/create-renderer-fallback-shader-manifest.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/create-renderer-uniform-fallback.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/create-renderer-uniform-fallback.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/cubemap-upload.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/cubemap-upload.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/dev-import-transport.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/dev-import-transport.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/engine-metrics.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/engine-metrics.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/equirect-projection-error.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/equirect-projection-error.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/font-asset-load.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/font-asset-load.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/fxaa-intermediate-texture.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/fxaa-intermediate-texture.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/fxaa-pipeline.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/fxaa-pipeline.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-residency.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-residency.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-resource-release.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-resource-release.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/handle-quad.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/handle-quad.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/hdrp-bgl-slots.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/hdrp-bgl-slots.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/hdrp-grid-invalid.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/hdrp-grid-invalid.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/hdrp-index-list-overflow-once.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/hdrp-index-list-overflow-once.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/hdrp-light-budget.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/hdrp-light-budget.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/hdrp-pipeline-asset-config.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/hdrp-pipeline-asset-config.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/helpers/renderer-device-loss-dawn.d.ts +25 -0
- package/dist/__tests__/helpers/renderer-device-loss-dawn.d.ts.map +1 -0
- package/dist/__tests__/helpers/standard-material-manifest.d.ts +0 -1
- package/dist/__tests__/helpers/standard-material-manifest.d.ts.map +1 -1
- package/dist/__tests__/ibl-pipeline-cache.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/ibl-pipeline-cache.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/lazy-catalog.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/lazy-catalog.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/load-by-guid-hdr.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/load-by-guid-hdr.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/load-by-guid-prod-material-parent.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/load-by-guid-prod-material-parent.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/load-by-guid-prod.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/load-by-guid-prod.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/loader-registry.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/loader-registry.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/m7-hdrp-demo-shape.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/m7-hdrp-demo-shape.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mipmap-formula.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/mipmap-formula.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mipmap-pipeline-cache.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/mipmap-pipeline-cache.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/parse-asset-payload-material.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/parse-asset-payload-material.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/parse-asset-payload-texture.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/parse-asset-payload-texture.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/parse-scene-payload-refs.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/parse-scene-payload-refs.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pass-selector.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/pass-selector.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-builder.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/pipeline-builder.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-cache-key-topology.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/pipeline-cache-key-topology.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-vertex-stride-branch.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/pipeline-vertex-stride-branch.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/pipeline.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/post-process-register.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/post-process-register.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/propagate-transforms.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/propagate-transforms.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/record-all-topology.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/record-all-topology.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/record-draw-branch.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/record-draw-branch.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/record-strip-index-format.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/record-strip-index-format.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/register-with-guid-rgba16float.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/register-with-guid-rgba16float.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-data.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/render-data.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -1
- package/dist/__tests__/render-query-regression.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/render-query-regression.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-system-record-submesh.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/render-system-record-submesh.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-system-record-warn-once.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/render-system-record-warn-once.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-device-loss-multi-world.integration.test.d.ts +2 -0
- package/dist/__tests__/renderer-device-loss-multi-world.integration.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-device-loss-provider-feasibility.dawn.test.d.ts +2 -0
- package/dist/__tests__/renderer-device-loss-provider-feasibility.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-device-loss-recovery.dawn.test.d.ts +2 -0
- package/dist/__tests__/renderer-device-loss-recovery.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-draw-world.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/renderer-draw-world.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-recovery-consumer.integration.test.d.ts +2 -0
- package/dist/__tests__/renderer-recovery-consumer.integration.test.d.ts.map +1 -0
- package/dist/__tests__/renderstate-pipeline-cache.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/renderstate-pipeline-cache.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/resolve-scene-guids.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/resolve-scene-guids.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/shadow-skip-non-triangle.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/shadow-skip-non-triangle.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-errors-kebab-case.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-errors-kebab-case.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-instances-coexist.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-instances-coexist.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-m2-extract-happy.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-m2-extract-happy.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-m2-extract-joint-error.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-m2-extract-joint-error.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-m2-extract-null-assets.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-m2-extract-null-assets.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-m2-extract-skeleton-error.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-m2-extract-skeleton-error.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-m3-record-cache.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-m3-record-cache.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-palette-extract.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-palette-extract.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin-pipeline-routing.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin-pipeline-routing.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skin.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skin.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skybox-extract.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skybox-extract.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skybox-shader-compile.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skybox-shader-compile.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skylight-bind-group.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skylight-bind-group.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skylight-component.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skylight-component.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skylight-fallback-path.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skylight-fallback-path.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skylight-pipeline-layout.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skylight-pipeline-layout.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/skylight-solid-color-extract.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/skylight-solid-color-extract.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-boundary.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-boundary.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-clamp.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-clamp.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-frame-duration-negative.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-frame-duration-negative.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-frame-duration-zero.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-frame-duration-zero.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-loop.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-loop.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-override-probe.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-override-probe.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sprite-animation-tick-regions-mismatch.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/sprite-animation-tick-regions-mismatch.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/storage-buffer-caps.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/storage-buffer-caps.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/systems.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/systems.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/tonemap-hdr-target.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/tonemap-hdr-target.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/tonemap-pipeline-split.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/tonemap-pipeline-split.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/tonemap.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/tonemap.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/transparent-sort-config-get.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/transparent-sort-config-get.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/transparent-sort-config-set.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/transparent-sort-config-set.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/transparent-sort.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/transparent-sort.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/upload-texture-consistency.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/upload-texture-consistency.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/verify-revisions.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/verify-revisions.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/wire-default-loaders.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/wire-default-loaders.cases.unit.test.d.ts.map +1 -0
- package/dist/__tests__/zero-camera-clear-fallback.cases.unit.test.d.ts +2 -0
- package/dist/__tests__/zero-camera-clear-fallback.cases.unit.test.d.ts.map +1 -0
- package/dist/dev-import-transport.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +30 -30
- package/src/__tests__/advance-animation-player.cases.unit.test.ts +1666 -0
- package/src/__tests__/asset-registry-aabb.cases.unit.test.ts +676 -0
- package/src/__tests__/asset-registry-bootstrap.cases.unit.test.ts +472 -0
- package/src/__tests__/asset-registry-builtin-nineslice.cases.unit.test.ts +481 -0
- package/src/__tests__/asset-registry-d9-tile-sampler-soft-warn.cases.unit.test.ts +568 -0
- package/src/__tests__/asset-registry-guid.cases.unit.test.ts +500 -0
- package/src/__tests__/asset-registry-material-validate.cases.unit.test.ts +756 -0
- package/src/__tests__/asset-registry-mesh-fail-fast.cases.unit.test.ts +591 -0
- package/src/__tests__/asset-registry-scene.cases.unit.test.ts +501 -0
- package/src/__tests__/asset-registry-sprite-slices-validate.cases.unit.test.ts +536 -0
- package/src/__tests__/asset-renderer-assembly.cases.unit.test.ts +496 -0
- package/src/__tests__/asset.cases.unit.test.ts +439 -0
- package/src/__tests__/bind-group-cache-keying.test.ts +6 -2
- package/src/__tests__/bloom-gating.cases.unit.test.ts +428 -0
- package/src/__tests__/builtin-guid-ssot.cases.unit.test.ts +472 -0
- package/src/__tests__/builtin-pack.cases.unit.test.ts +639 -0
- package/src/__tests__/builtin-shader-register-e2e.test.ts +1 -1
- package/src/__tests__/camera-antialias.cases.unit.test.ts +372 -0
- package/src/__tests__/camera-bloom.cases.unit.test.ts +396 -0
- package/src/__tests__/camera-clear-schema.cases.unit.test.ts +391 -0
- package/src/__tests__/camera-ortho.cases.unit.test.ts +484 -0
- package/src/__tests__/cluster-binner.cases.unit.test.ts +817 -0
- package/src/__tests__/collect-scene-mount-collapse.test.ts +5 -1
- package/src/__tests__/create-renderer-fallback-shader-manifest.cases.unit.test.ts +345 -0
- package/src/__tests__/create-renderer-uniform-fallback.cases.unit.test.ts +445 -0
- package/src/__tests__/cubemap-upload.cases.unit.test.ts +593 -0
- package/src/__tests__/dawn/ibl-precompute-readback.dawn.test.ts +184 -17
- package/src/__tests__/dawn/material-alpha.dawn.test.ts +17 -4
- package/src/__tests__/derive-bgl-integration.test.ts +8 -8
- package/src/__tests__/dev-import-transport.cases.unit.test.ts +503 -0
- package/src/__tests__/engine-metrics.cases.unit.test.ts +371 -0
- package/src/__tests__/equirect-projection-error.cases.unit.test.ts +416 -0
- package/src/__tests__/font-asset-load.cases.unit.test.ts +510 -0
- package/src/__tests__/fxaa-intermediate-texture.cases.unit.test.ts +690 -0
- package/src/__tests__/fxaa-pipeline.cases.unit.test.ts +546 -0
- package/src/__tests__/gpu-residency.cases.unit.test.ts +479 -0
- package/src/__tests__/gpu-resource-release.cases.unit.test.ts +929 -0
- package/src/__tests__/handle-quad.cases.unit.test.ts +491 -0
- package/src/__tests__/hdrp-bgl-slots.cases.unit.test.ts +451 -0
- package/src/__tests__/hdrp-grid-invalid.cases.unit.test.ts +408 -0
- package/src/__tests__/hdrp-index-list-overflow-once.cases.unit.test.ts +405 -0
- package/src/__tests__/hdrp-light-budget.cases.unit.test.ts +483 -0
- package/src/__tests__/hdrp-pipeline-asset-config.cases.unit.test.ts +441 -0
- package/src/__tests__/helpers/renderer-device-loss-dawn.ts +69 -0
- package/src/__tests__/helpers/standard-material-manifest.ts +11 -15
- package/src/__tests__/ibl-pipeline-cache.cases.unit.test.ts +415 -0
- package/src/__tests__/lazy-catalog.cases.unit.test.ts +848 -0
- package/src/__tests__/light-gpu-byte-neutral.unit.test.ts +6 -5
- package/src/__tests__/load-by-guid-hdr.cases.unit.test.ts +582 -0
- package/src/__tests__/load-by-guid-prod-material-parent.cases.unit.test.ts +1514 -0
- package/src/__tests__/load-by-guid-prod.cases.unit.test.ts +557 -0
- package/src/__tests__/loader-registry.cases.unit.test.ts +767 -0
- package/src/__tests__/m7-hdrp-demo-shape.cases.unit.test.ts +361 -0
- package/src/__tests__/material-texture-uv-scale.unit.test.ts +2 -2
- package/src/__tests__/materials.unit.test.ts +29 -10
- package/src/__tests__/mipmap-formula.cases.unit.test.ts +434 -0
- package/src/__tests__/mipmap-pipeline-cache.cases.unit.test.ts +490 -0
- package/src/__tests__/parse-asset-payload-material.cases.unit.test.ts +565 -0
- package/src/__tests__/parse-asset-payload-texture.cases.unit.test.ts +720 -0
- package/src/__tests__/parse-scene-payload-refs.cases.unit.test.ts +767 -0
- package/src/__tests__/pass-selector.cases.unit.test.ts +376 -0
- package/src/__tests__/pbr-pipeline.unit.test.ts +23 -5
- package/src/__tests__/pipeline-builder.cases.unit.test.ts +624 -0
- package/src/__tests__/pipeline-cache-key-topology.cases.unit.test.ts +807 -0
- package/src/__tests__/pipeline-vertex-stride-branch.cases.unit.test.ts +379 -0
- package/src/__tests__/pipeline.cases.unit.test.ts +370 -0
- package/src/__tests__/post-process-register.cases.unit.test.ts +405 -0
- package/src/__tests__/propagate-transforms.cases.unit.test.ts +502 -0
- package/src/__tests__/propagate-transforms.dawn.test.ts +19 -2
- package/src/__tests__/record-all-topology.cases.unit.test.ts +608 -0
- package/src/__tests__/record-draw-branch.cases.unit.test.ts +621 -0
- package/src/__tests__/record-strip-index-format.cases.unit.test.ts +419 -0
- package/src/__tests__/register-with-guid-rgba16float.cases.unit.test.ts +469 -0
- package/src/__tests__/render-data.cases.unit.test.ts +553 -0
- package/src/__tests__/render-error-exhaustive.test-d.ts +1 -0
- package/src/__tests__/render-query-regression.cases.unit.test.ts +531 -0
- package/src/__tests__/render-system-record-submesh.cases.unit.test.ts +740 -0
- package/src/__tests__/render-system-record-warn-once.cases.unit.test.ts +418 -0
- package/src/__tests__/render-system-record.test.ts +15 -33
- package/src/__tests__/renderer-device-loss-multi-world.integration.test.ts +103 -0
- package/src/__tests__/renderer-device-loss-provider-feasibility.dawn.test.ts +124 -0
- package/src/__tests__/renderer-device-loss-recovery.dawn.test.ts +50 -0
- package/src/__tests__/renderer-draw-world.cases.unit.test.ts +514 -0
- package/src/__tests__/renderer-recovery-consumer.integration.test.ts +96 -0
- package/src/__tests__/renderstate-pipeline-cache.cases.unit.test.ts +631 -0
- package/src/__tests__/resolve-scene-guids.cases.unit.test.ts +1123 -0
- package/src/__tests__/shadow-caster-empty-schema.test.ts +1 -1
- package/src/__tests__/shadow-fields-observable.dawn.test.ts +2 -2
- package/src/__tests__/shadow-m1.dawn.test.ts +1 -1
- package/src/__tests__/shadow-skip-non-triangle.cases.unit.test.ts +681 -0
- package/src/__tests__/skin-errors-kebab-case.cases.unit.test.ts +475 -0
- package/src/__tests__/skin-extract-getarrayview-count.unit.test.ts +5 -4
- package/src/__tests__/skin-instances-coexist.cases.unit.test.ts +375 -0
- package/src/__tests__/skin-m2-extract-happy.cases.unit.test.ts +592 -0
- package/src/__tests__/skin-m2-extract-joint-error.cases.unit.test.ts +619 -0
- package/src/__tests__/skin-m2-extract-null-assets.cases.unit.test.ts +569 -0
- package/src/__tests__/skin-m2-extract-skeleton-error.cases.unit.test.ts +585 -0
- package/src/__tests__/skin-m3-record-cache.cases.unit.test.ts +457 -0
- package/src/__tests__/skin-palette-extract.cases.unit.test.ts +635 -0
- package/src/__tests__/skin-pipeline-routing.cases.unit.test.ts +411 -0
- package/src/__tests__/skin.cases.unit.test.ts +421 -0
- package/src/__tests__/skybox-extract.cases.unit.test.ts +511 -0
- package/src/__tests__/skybox-shader-compile.cases.unit.test.ts +437 -0
- package/src/__tests__/skylight-bind-group.cases.unit.test.ts +642 -0
- package/src/__tests__/skylight-component.cases.unit.test.ts +386 -0
- package/src/__tests__/skylight-fallback-path.cases.unit.test.ts +566 -0
- package/src/__tests__/skylight-lazy-projection.test.ts +35 -20
- package/src/__tests__/skylight-pipeline-layout.cases.unit.test.ts +506 -0
- package/src/__tests__/skylight-solid-color-extract.cases.unit.test.ts +399 -0
- package/src/__tests__/sprite-animation-tick-boundary.cases.unit.test.ts +521 -0
- package/src/__tests__/sprite-animation-tick-clamp.cases.unit.test.ts +453 -0
- package/src/__tests__/sprite-animation-tick-frame-duration-negative.cases.unit.test.ts +447 -0
- package/src/__tests__/sprite-animation-tick-frame-duration-zero.cases.unit.test.ts +395 -0
- package/src/__tests__/sprite-animation-tick-loop.cases.unit.test.ts +494 -0
- package/src/__tests__/sprite-animation-tick-override-probe.cases.unit.test.ts +439 -0
- package/src/__tests__/sprite-animation-tick-regions-mismatch.cases.unit.test.ts +466 -0
- package/src/__tests__/sprite-lit-bgl-byte-identical.test.ts +5 -5
- package/src/__tests__/sprite-lit-pipeline-cache-key.test.ts +1 -1
- package/src/__tests__/ssao-pipelines.test.ts +1 -1
- package/src/__tests__/storage-buffer-caps.cases.unit.test.ts +373 -0
- package/src/__tests__/systems.cases.unit.test.ts +425 -0
- package/src/__tests__/tilemap-chunk-extract.overhang-bounds.test.ts +1 -1
- package/src/__tests__/tonemap-hdr-target.cases.unit.test.ts +670 -0
- package/src/__tests__/tonemap-pipeline-split.cases.unit.test.ts +867 -0
- package/src/__tests__/tonemap.cases.unit.test.ts +446 -0
- package/src/__tests__/transparent-sort-config-get.cases.unit.test.ts +395 -0
- package/src/__tests__/transparent-sort-config-set.cases.unit.test.ts +424 -0
- package/src/__tests__/transparent-sort.cases.unit.test.ts +684 -0
- package/src/__tests__/upload-texture-consistency.cases.unit.test.ts +478 -0
- package/src/__tests__/verify-revisions.cases.unit.test.ts +619 -0
- package/src/__tests__/wire-default-loaders.cases.unit.test.ts +461 -0
- package/src/__tests__/zero-camera-clear-fallback.cases.unit.test.ts +374 -0
- package/src/dev-import-transport.ts +2 -1
- package/dist/__tests__/asset.unit.test.d.ts +0 -2
- package/dist/__tests__/asset.unit.test.d.ts.map +0 -1
- package/dist/__tests__/pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/systems.unit.test.d.ts +0 -2
- package/dist/__tests__/systems.unit.test.d.ts.map +0 -1
- package/src/__tests__/asset.unit.test.ts +0 -7113
- package/src/__tests__/pipeline.unit.test.ts +0 -5279
- package/src/__tests__/systems.unit.test.ts +0 -9061
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// - caps insufficient (rgba16floatRenderable=false) -> project through the
|
|
9
9
|
// renderable rgba8 precompute output (the WebKit path)
|
|
10
10
|
// - first sight (status undefined) + caps OK -> fire-and-forget launch; the
|
|
11
|
-
// store records status:'pending' synchronously, then 'ready'
|
|
12
|
-
//
|
|
11
|
+
// store records status:'pending' synchronously, then 'ready' after the
|
|
12
|
+
// IBL queue completion fence
|
|
13
13
|
// - pending -> a re-entry while in flight does NOT relaunch (store dedup,
|
|
14
14
|
// idempotent per source; D-4)
|
|
15
15
|
// - failed -> EquirectProjectionFailedError fired EXACTLY ONCE per handle;
|
|
@@ -56,8 +56,9 @@ const capsNotRenderable: RhiCaps = {
|
|
|
56
56
|
} as unknown as RhiCaps;
|
|
57
57
|
|
|
58
58
|
// ── mock GPU device: createTexture / view / queue succeed so the upload runs to
|
|
59
|
-
// a 'ready' entry; a counter tracks texture creation
|
|
60
|
-
// pending" assertion can prove a second drive does
|
|
59
|
+
// a 'ready' entry after the submission fence; a counter tracks texture creation
|
|
60
|
+
// so the "no relaunch while pending" assertion can prove a second drive does
|
|
61
|
+
// not mint a second texture. ──
|
|
61
62
|
|
|
62
63
|
interface DeviceProbe {
|
|
63
64
|
textures: number;
|
|
@@ -99,6 +100,7 @@ function makeReadyDevice(probe: DeviceProbe): any {
|
|
|
99
100
|
writeTexture: () => okShim(undefined),
|
|
100
101
|
writeBuffer: () => okShim(undefined),
|
|
101
102
|
submit: () => okShim(undefined),
|
|
103
|
+
onSubmittedWorkDone: async () => undefined,
|
|
102
104
|
},
|
|
103
105
|
};
|
|
104
106
|
}
|
|
@@ -130,15 +132,12 @@ function equirectPod(width = 4, height = 2): EquirectAsset {
|
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
// Build a store wired to a device (no shader factory -> the optional async IBL
|
|
133
|
-
// precompute render-pass block is skipped).
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
// by recordMainPass off the global cache views (out of scope for this unit test,
|
|
140
|
-
// covered by the dawn IBL readback test). This unit test asserts the lazy
|
|
141
|
-
// trigger's launch / dedup / caps-gate / fail-once-and-no-retry bookkeeping.
|
|
135
|
+
// precompute render-pass block is skipped). The cube-projection entry remains
|
|
136
|
+
// pending until the IBL queue completion fence resolves; the white-vs-real-IBL
|
|
137
|
+
// binding decision is made by recordMainPass off the global cache views (out of
|
|
138
|
+
// scope for this unit test, covered by the dawn IBL readback test). This unit
|
|
139
|
+
// test asserts the lazy trigger's launch / dedup / caps-gate /
|
|
140
|
+
// fail-once-and-no-retry bookkeeping.
|
|
142
141
|
function configuredStore(device: unknown, caps: RhiCaps): GpuResidencyCache {
|
|
143
142
|
const store = new GpuResidencyCache();
|
|
144
143
|
let next = 9000;
|
|
@@ -176,6 +175,13 @@ function makeFrameState() {
|
|
|
176
175
|
return { firedEquirectProjectionFailedHandles: new Set<number>() };
|
|
177
176
|
}
|
|
178
177
|
|
|
178
|
+
async function flushProjection(): Promise<void> {
|
|
179
|
+
// The precompute now fences each irradiance face separately before the
|
|
180
|
+
// single prefilter/BRDF submissions are promoted. Let every fence turn
|
|
181
|
+
// settle instead of assuming the old one-submit path.
|
|
182
|
+
for (let i = 0; i < 128; i += 1) await Promise.resolve();
|
|
183
|
+
}
|
|
184
|
+
|
|
179
185
|
// Catalogue an equirect POD into the world's user-tier shared-ref store so
|
|
180
186
|
// resolveAssetHandle<EquirectAsset>(world, handle) returns it (record path).
|
|
181
187
|
function catalogEquirect(world: WorldType, pod: EquirectAsset): Handle<'EquirectAsset', 'shared'> {
|
|
@@ -187,7 +193,7 @@ describe('driveLazyEquirectProjection — lazy projection state machine (M3 / w2
|
|
|
187
193
|
vi.restoreAllMocks();
|
|
188
194
|
});
|
|
189
195
|
|
|
190
|
-
it('caps insufficient (rgba16floatRenderable=false) -> projects through rgba8 output', () => {
|
|
196
|
+
it('caps insufficient (rgba16floatRenderable=false) -> projects through rgba8 output', async () => {
|
|
191
197
|
const probe: DeviceProbe = { textures: 0 };
|
|
192
198
|
const store = configuredStore(makeReadyDevice(probe), capsNotRenderable);
|
|
193
199
|
const world = new World();
|
|
@@ -204,12 +210,14 @@ describe('driveLazyEquirectProjection — lazy projection state machine (M3 / w2
|
|
|
204
210
|
handle as unknown as number,
|
|
205
211
|
);
|
|
206
212
|
|
|
213
|
+
expect(store.getCubemapStatus(handle)).toBe('pending');
|
|
214
|
+
await flushProjection();
|
|
207
215
|
expect(probe.textures).toBeGreaterThan(0);
|
|
208
216
|
expect(store.getCubemapStatus(handle)).toBe('ready');
|
|
209
217
|
expect(seen).toEqual([]);
|
|
210
218
|
});
|
|
211
219
|
|
|
212
|
-
it('first sight + caps OK -> fire-and-forget launch projects the equirect (
|
|
220
|
+
it('first sight + caps OK -> fire-and-forget launch projects the equirect (pending then ready) (AC-05)', async () => {
|
|
213
221
|
const probe: DeviceProbe = { textures: 0 };
|
|
214
222
|
const store = configuredStore(makeReadyDevice(probe), capsRenderable);
|
|
215
223
|
const world = new World();
|
|
@@ -227,14 +235,15 @@ describe('driveLazyEquirectProjection — lazy projection state machine (M3 / w2
|
|
|
227
235
|
handle as unknown as number,
|
|
228
236
|
);
|
|
229
237
|
|
|
230
|
-
// The cube projection entry
|
|
231
|
-
//
|
|
232
|
-
|
|
238
|
+
// The cube projection entry is pending until the IBL command submission
|
|
239
|
+
// completion fence resolves; only then is it published as ready.
|
|
240
|
+
expect(store.getCubemapStatus(handle)).toBe('pending');
|
|
241
|
+
await flushProjection();
|
|
233
242
|
expect(store.getCubemapStatus(handle)).toBe('ready');
|
|
234
243
|
expect(probe.textures).toBeGreaterThan(0);
|
|
235
244
|
});
|
|
236
245
|
|
|
237
|
-
it('re-entry does NOT relaunch the projection (idempotent per source, D-4)', () => {
|
|
246
|
+
it('re-entry does NOT relaunch the projection (idempotent per source, D-4)', async () => {
|
|
238
247
|
const probe: DeviceProbe = { textures: 0 };
|
|
239
248
|
const store = configuredStore(makeReadyDevice(probe), capsRenderable);
|
|
240
249
|
const world = new World();
|
|
@@ -244,9 +253,15 @@ describe('driveLazyEquirectProjection — lazy projection state machine (M3 / w2
|
|
|
244
253
|
const internals = makeInternals(store, reg, capsRenderable);
|
|
245
254
|
|
|
246
255
|
driveLazyEquirectProjection(internals, world, frameState, handle as unknown as number);
|
|
256
|
+
const texturesWhilePending = probe.textures;
|
|
257
|
+
expect(store.getCubemapStatus(handle)).toBe('pending');
|
|
258
|
+
driveLazyEquirectProjection(internals, world, frameState, handle as unknown as number);
|
|
259
|
+
expect(store.getCubemapStatus(handle)).toBe('pending');
|
|
260
|
+
expect(probe.textures).toBe(texturesWhilePending);
|
|
261
|
+
await flushProjection();
|
|
262
|
+
expect(store.getCubemapStatus(handle)).toBe('ready');
|
|
247
263
|
const texturesAfterFirst = probe.textures;
|
|
248
264
|
expect(texturesAfterFirst).toBeGreaterThan(0);
|
|
249
|
-
expect(store.getCubemapStatus(handle)).toBe('ready');
|
|
250
265
|
|
|
251
266
|
// Subsequent frames: the existing entry (status !== undefined) short-circuits
|
|
252
267
|
// the lazy trigger, so no second projection / texture is minted.
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
// @ts-nocheck — merged file: indexed-access checks cascade across noUncheckedIndexedAccess for blocks originally outside src/ rootDir
|
|
2
|
+
// Consolidated by feat-20260609-test-pool-startup-reduction-merge-tiny-test-files
|
|
3
|
+
// biome-ignore-all lint/complexity/noUselessLoneBlockStatements: block-scope isolation between merged source files (consolidation paradigm)
|
|
4
|
+
//
|
|
5
|
+
// Source files (N=44):
|
|
6
|
+
// - packages/runtime/__tests__/antialias-from-f32.test.ts
|
|
7
|
+
// - packages/runtime/src/__tests__/bloom-gating.test.ts
|
|
8
|
+
// - packages/runtime/src/__tests__/camera-antialias.test.ts
|
|
9
|
+
// - packages/runtime/src/__tests__/camera-bloom.test.ts
|
|
10
|
+
// - packages/runtime/src/__tests__/camera-clear-schema.test.ts
|
|
11
|
+
// - packages/runtime/src/__tests__/camera-ortho.test.ts
|
|
12
|
+
// - packages/runtime/src/__tests__/fxaa-intermediate-texture.test.ts
|
|
13
|
+
// - packages/runtime/src/__tests__/fxaa-pipeline.test.ts
|
|
14
|
+
// - packages/runtime/src/__tests__/ibl-pipeline-cache.test.ts
|
|
15
|
+
// - packages/runtime/src/__tests__/ibl-runtime-probe.test.ts
|
|
16
|
+
// - packages/runtime/src/__tests__/render-system-record-warn-once.test.ts
|
|
17
|
+
// - packages/runtime/src/__tests__/shadow-skip-non-triangle.test.ts
|
|
18
|
+
// - packages/runtime/src/__tests__/skin-errors-kebab-case.test.ts
|
|
19
|
+
// - packages/runtime/src/__tests__/skybox-error.test.ts
|
|
20
|
+
// - packages/runtime/src/__tests__/skybox-shader-compile.test.ts
|
|
21
|
+
// - packages/runtime/src/__tests__/skylight-bind-group.test.ts
|
|
22
|
+
// - packages/runtime/src/__tests__/skylight-component.test.ts
|
|
23
|
+
// - packages/runtime/src/__tests__/skylight-fallback-path.test.ts
|
|
24
|
+
// - packages/runtime/src/__tests__/skylight-pipeline-layout.test.ts
|
|
25
|
+
// - packages/runtime/src/__tests__/tonemap-hdr-target.test.ts
|
|
26
|
+
// - packages/runtime/src/__tests__/tonemap-pipeline-split.test.ts
|
|
27
|
+
// - packages/runtime/src/__tests__/zero-camera-clear-fallback.test.ts
|
|
28
|
+
// - packages/runtime/src/components/__tests__/skin.test.ts
|
|
29
|
+
// - packages/runtime/src/systems/__tests__/advance-animation-player.test.ts
|
|
30
|
+
// - packages/runtime/src/systems/__tests__/graph-skybox.test.ts
|
|
31
|
+
// - packages/runtime/src/systems/__tests__/propagate-transforms.test.ts
|
|
32
|
+
// - packages/runtime/src/systems/__tests__/skin-cap-gate.test.ts
|
|
33
|
+
// - packages/runtime/src/systems/__tests__/skin-instances-coexist.test.ts
|
|
34
|
+
// - packages/runtime/src/systems/__tests__/skin-palette-extract.test.ts
|
|
35
|
+
// - packages/runtime/src/systems/__tests__/skin-pipeline-routing.test.ts
|
|
36
|
+
// - packages/runtime/src/systems/__tests__/skybox-extract.test.ts
|
|
37
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-boundary.test.ts
|
|
38
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-clamp.test.ts
|
|
39
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-frame-duration-negative.test.ts
|
|
40
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-frame-duration-zero.test.ts
|
|
41
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-loop.test.ts
|
|
42
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-override-probe.test.ts
|
|
43
|
+
// - packages/runtime/src/systems/__tests__/sprite-animation-tick-regions-mismatch.test.ts
|
|
44
|
+
// - packages/runtime/src/systems/__tests__/tonemap.test.ts
|
|
45
|
+
// - packages/runtime/src/systems/__tests__/transparent-sort-config-get.test.ts
|
|
46
|
+
// - packages/runtime/src/systems/__tests__/transparent-sort-config-set.test.ts
|
|
47
|
+
// - packages/runtime/src/systems/__tests__/transparent-sort.test.ts
|
|
48
|
+
// - packages/runtime/src/__tests__/render-system-multi-material.test.ts
|
|
49
|
+
// - packages/runtime/src/__tests__/render-system-record-submesh.test.ts
|
|
50
|
+
//
|
|
51
|
+
// Paradigm: each block-scope wraps a source file. ancestorTitles[0] is the
|
|
52
|
+
// source-preserved inner describe (NOT the source filename for these 3 files
|
|
53
|
+
// — recovery path: vitest report ancestorTitles -> grep this file -> upstream
|
|
54
|
+
// `// ─── from <name>.test.ts ───` block separator -> source filename).
|
|
55
|
+
// Top-level imports merged + deduped.
|
|
56
|
+
|
|
57
|
+
import { readFileSync } from 'node:fs';
|
|
58
|
+
import { resolve } from 'node:path';
|
|
59
|
+
import { fileURLToPath } from 'node:url';
|
|
60
|
+
import { AnimationPlayer } from '@forgeax/engine-animation';
|
|
61
|
+
import type { AssetRuntimeErrorCode } from '@forgeax/engine-assets-runtime';
|
|
62
|
+
import { AssetRegistry } from '@forgeax/engine-assets-runtime';
|
|
63
|
+
import type { EntityHandle, World as WorldType } from '@forgeax/engine-ecs';
|
|
64
|
+
import { ENTITY_NULL_RAW, World } from '@forgeax/engine-ecs';
|
|
65
|
+
import { SpriteAnimationInvalidError } from '@forgeax/engine-ecs/projection';
|
|
66
|
+
import { mat4, vec3 } from '@forgeax/engine-math';
|
|
67
|
+
import type { RenderErrorCode, Renderer as RendererType } from '@forgeax/engine-render';
|
|
68
|
+
import {
|
|
69
|
+
ANTIALIAS_FXAA,
|
|
70
|
+
ANTIALIAS_NONE,
|
|
71
|
+
BLOOM_DISABLED,
|
|
72
|
+
BLOOM_ENABLED,
|
|
73
|
+
CAMERA_PROJECTION_ORTHOGRAPHIC,
|
|
74
|
+
CAMERA_PROJECTION_PERSPECTIVE,
|
|
75
|
+
Camera,
|
|
76
|
+
MeshFilter,
|
|
77
|
+
MeshRenderer,
|
|
78
|
+
SkyboxBackground,
|
|
79
|
+
Skylight,
|
|
80
|
+
} from '@forgeax/engine-render';
|
|
81
|
+
import type { BindGroupEntry, Buffer, Sampler, Texture, TextureView } from '@forgeax/engine-rhi';
|
|
82
|
+
import { ok as rhiOk } from '@forgeax/engine-rhi';
|
|
83
|
+
import { ChildOf, Name, propagateTransforms, Transform } from '@forgeax/engine-scene';
|
|
84
|
+
import { TONEMAP_LUMINANCE_EPSILON } from '@forgeax/engine-shader';
|
|
85
|
+
import type { SkinErrorCode } from '@forgeax/engine-skinning';
|
|
86
|
+
import {
|
|
87
|
+
Skin,
|
|
88
|
+
SkinInstancesCoexistForbiddenError,
|
|
89
|
+
SkinJointCountExceededError,
|
|
90
|
+
SkinJointDespawnedError,
|
|
91
|
+
SkinJointPathUnresolvedError,
|
|
92
|
+
} from '@forgeax/engine-skinning';
|
|
93
|
+
import type {
|
|
94
|
+
Handle,
|
|
95
|
+
MaterialAsset,
|
|
96
|
+
MeshAsset,
|
|
97
|
+
SkeletonAsset,
|
|
98
|
+
TextureFormat,
|
|
99
|
+
} from '@forgeax/engine-types';
|
|
100
|
+
import { toShared } from '@forgeax/engine-types';
|
|
101
|
+
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
102
|
+
import { worldInternal } from '../../../ecs/src/world-internal';
|
|
103
|
+
import {
|
|
104
|
+
SPRITE_PLAYBACK_MODE_CLAMP,
|
|
105
|
+
SPRITE_PLAYBACK_MODE_LOOP,
|
|
106
|
+
SpriteAnimation,
|
|
107
|
+
SpriteRegionOverride,
|
|
108
|
+
} from '../../../render/src/components';
|
|
109
|
+
import {
|
|
110
|
+
type CameraProjection,
|
|
111
|
+
cameraProjectionFromF32,
|
|
112
|
+
} from '../../../render/src/components/camera';
|
|
113
|
+
import {
|
|
114
|
+
assembleMaterialWithSkylightEntries,
|
|
115
|
+
createSkylightFallback,
|
|
116
|
+
mergeSkylightIntoMaterialBgl,
|
|
117
|
+
} from '../../../render/src/ibl/skylight-bind-group';
|
|
118
|
+
import { buildPbrPipelineLayouts, buildUnlitMaterialBgl } from '../../../render/src/pbr-pipeline';
|
|
119
|
+
import { INSTANCE_STORAGE_STRIDE_FLOATS } from '../../../render/src/record/mesh-ssbo';
|
|
120
|
+
import { selectSwapChainFormat } from '../../../render/src/render-system';
|
|
121
|
+
import { createSkinPaletteAllocator } from '../../../render/src/systems/skin-palette-allocator';
|
|
122
|
+
import type { TransparentEntry } from '../../../render/src/systems/transparent-sort-config';
|
|
123
|
+
import { standardMaterialShaderVariants } from './helpers/standard-material-manifest';
|
|
124
|
+
import { drawWithOwners } from './renderer-test-utils';
|
|
125
|
+
|
|
126
|
+
function componentFieldType(component: { fields: Record<string, { type: string }> }, name: string) {
|
|
127
|
+
return component.fields[name]?.type;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function componentFieldDefault(
|
|
131
|
+
component: { fields: Record<string, { default?: unknown }> },
|
|
132
|
+
name: string,
|
|
133
|
+
) {
|
|
134
|
+
return component.fields[name]?.default;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function componentSchemaTypes(component: { fields: Record<string, { type: string }> }) {
|
|
138
|
+
return Object.fromEntries(
|
|
139
|
+
Object.entries(component.fields).map(([name, field]) => [name, field.type]),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
afterEach(() => vi.restoreAllMocks());
|
|
144
|
+
|
|
145
|
+
type RendererErrorObservation = {
|
|
146
|
+
readonly code: string;
|
|
147
|
+
readonly detail?: unknown;
|
|
148
|
+
readonly hint?: string;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
function unwrapRendererError(value: unknown): RendererErrorObservation {
|
|
152
|
+
let current = value as RendererErrorObservation;
|
|
153
|
+
while (
|
|
154
|
+
current.detail !== undefined &&
|
|
155
|
+
typeof current.detail === 'object' &&
|
|
156
|
+
current.detail !== null
|
|
157
|
+
) {
|
|
158
|
+
const cause = (current.detail as { cause?: unknown }).cause;
|
|
159
|
+
if (
|
|
160
|
+
cause === undefined ||
|
|
161
|
+
typeof cause !== 'object' ||
|
|
162
|
+
cause === null ||
|
|
163
|
+
typeof (cause as { code?: unknown }).code !== 'string'
|
|
164
|
+
) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
current = cause as RendererErrorObservation;
|
|
168
|
+
}
|
|
169
|
+
return current;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function subscribeRendererErrors(
|
|
173
|
+
renderer: RendererType,
|
|
174
|
+
listener: (error: RendererErrorObservation) => void,
|
|
175
|
+
): () => void {
|
|
176
|
+
return renderer.subscribe((event) => {
|
|
177
|
+
if (event.kind === 'error') listener(unwrapRendererError(event.error));
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function drawPublished(renderer: RendererType, world: WorldType) {
|
|
182
|
+
const attached = renderer.attach(world);
|
|
183
|
+
if (!attached.ok) throw attached.error;
|
|
184
|
+
world.update().unwrap();
|
|
185
|
+
return drawWithOwners(renderer, world);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// feat-20260704-runtime-tier1-decomposition M2 / w12: reconstitute the
|
|
189
|
+
// eliminated top-level RuntimeErrorCode aggregate union (D-3) as a test-local
|
|
190
|
+
// alias so the exhaustive-switch bodies below stay byte-identical (AC-09).
|
|
191
|
+
type RuntimeLayerErrorCode = RenderErrorCode | AssetRuntimeErrorCode | SkinErrorCode;
|
|
192
|
+
|
|
193
|
+
import {
|
|
194
|
+
AnimationTargetId,
|
|
195
|
+
bindAnimationTargets,
|
|
196
|
+
advanceAnimationPlayer as canonicalAdvanceAnimationPlayer,
|
|
197
|
+
} from '@forgeax/engine-animation';
|
|
198
|
+
import { deriveAnimationTargetId } from '@forgeax/engine-animation/target-id';
|
|
199
|
+
import { DeviceScope } from '../../../render/src/device/device-scope';
|
|
200
|
+
import { GpuBuffer } from '../../../render/src/gpu-resource';
|
|
201
|
+
import { getOrCreateIblCache, hasIblCache } from '../../../render/src/ibl/IblPipelineCache';
|
|
202
|
+
import {
|
|
203
|
+
disposeInstanceBuffers,
|
|
204
|
+
type InstanceBufferCacheEntry,
|
|
205
|
+
} from '../../../render/src/instance-buffer-cache';
|
|
206
|
+
import { standardPipeline as urpPipeline } from '../../../render/src/pipeline/standard-pipeline';
|
|
207
|
+
import { ZERO_CAMERA_CLEAR_FALLBACK } from '../../../render/src/record/frame-snapshot';
|
|
208
|
+
import {
|
|
209
|
+
warnMultiLightDirectional,
|
|
210
|
+
warnMultiLightPoint,
|
|
211
|
+
warnMultiLightSpot,
|
|
212
|
+
} from '../../../render/src/record/helpers';
|
|
213
|
+
import type { CameraSnapshot } from '../../../render/src/render-contract';
|
|
214
|
+
import {
|
|
215
|
+
type ExtractedLights,
|
|
216
|
+
extractFrame,
|
|
217
|
+
extractFrames,
|
|
218
|
+
prepareExtractContext,
|
|
219
|
+
} from '../../../render/src/render-system-extract';
|
|
220
|
+
import {
|
|
221
|
+
getTransparentSortConfig,
|
|
222
|
+
setTransparentSortConfig,
|
|
223
|
+
TRANSPARENT_SORT_CONFIG_KEY,
|
|
224
|
+
TRANSPARENT_SORT_MODE_LAYER_Y,
|
|
225
|
+
TRANSPARENT_SORT_MODE_LAYER_YZ,
|
|
226
|
+
TRANSPARENT_SORT_MODE_LAYER_Z,
|
|
227
|
+
} from '../../../render/src/systems/transparent-sort-config';
|
|
228
|
+
import { spriteAnimationTickSystem } from '../systems/sprite-animation-tick';
|
|
229
|
+
import { REC709_LUMA_WEIGHTS, tonemapReinhardLuminance } from '../systems/tonemap';
|
|
230
|
+
import { transparentSortEntries } from '../systems/transparent-sort';
|
|
231
|
+
import { makeMockShaderRegistry } from './helpers/mock-shader-registry';
|
|
232
|
+
|
|
233
|
+
void [
|
|
234
|
+
ANTIALIAS_FXAA,
|
|
235
|
+
ANTIALIAS_NONE,
|
|
236
|
+
AnimationPlayer,
|
|
237
|
+
AnimationTargetId,
|
|
238
|
+
AssetRegistry,
|
|
239
|
+
BLOOM_DISABLED,
|
|
240
|
+
BLOOM_ENABLED,
|
|
241
|
+
CAMERA_PROJECTION_ORTHOGRAPHIC,
|
|
242
|
+
CAMERA_PROJECTION_PERSPECTIVE,
|
|
243
|
+
Camera,
|
|
244
|
+
ChildOf,
|
|
245
|
+
DeviceScope,
|
|
246
|
+
ENTITY_NULL_RAW,
|
|
247
|
+
GpuBuffer,
|
|
248
|
+
INSTANCE_STORAGE_STRIDE_FLOATS,
|
|
249
|
+
MeshFilter,
|
|
250
|
+
MeshRenderer,
|
|
251
|
+
Name,
|
|
252
|
+
REC709_LUMA_WEIGHTS,
|
|
253
|
+
SPRITE_PLAYBACK_MODE_CLAMP,
|
|
254
|
+
SPRITE_PLAYBACK_MODE_LOOP,
|
|
255
|
+
Skin,
|
|
256
|
+
SkinInstancesCoexistForbiddenError,
|
|
257
|
+
SkinJointCountExceededError,
|
|
258
|
+
SkinJointDespawnedError,
|
|
259
|
+
SkinJointPathUnresolvedError,
|
|
260
|
+
SkyboxBackground,
|
|
261
|
+
Skylight,
|
|
262
|
+
SpriteAnimation,
|
|
263
|
+
SpriteAnimationInvalidError,
|
|
264
|
+
SpriteRegionOverride,
|
|
265
|
+
TONEMAP_LUMINANCE_EPSILON,
|
|
266
|
+
TRANSPARENT_SORT_CONFIG_KEY,
|
|
267
|
+
TRANSPARENT_SORT_MODE_LAYER_Y,
|
|
268
|
+
TRANSPARENT_SORT_MODE_LAYER_YZ,
|
|
269
|
+
TRANSPARENT_SORT_MODE_LAYER_Z,
|
|
270
|
+
Transform,
|
|
271
|
+
World,
|
|
272
|
+
ZERO_CAMERA_CLEAR_FALLBACK,
|
|
273
|
+
afterEach,
|
|
274
|
+
assembleMaterialWithSkylightEntries,
|
|
275
|
+
beforeAll,
|
|
276
|
+
beforeEach,
|
|
277
|
+
bindAnimationTargets,
|
|
278
|
+
buildPbrPipelineLayouts,
|
|
279
|
+
buildUnlitMaterialBgl,
|
|
280
|
+
cameraProjectionFromF32,
|
|
281
|
+
canonicalAdvanceAnimationPlayer,
|
|
282
|
+
componentFieldDefault,
|
|
283
|
+
componentFieldType,
|
|
284
|
+
componentSchemaTypes,
|
|
285
|
+
createSkinPaletteAllocator,
|
|
286
|
+
createSkylightFallback,
|
|
287
|
+
deriveAnimationTargetId,
|
|
288
|
+
describe,
|
|
289
|
+
disposeInstanceBuffers,
|
|
290
|
+
drawPublished,
|
|
291
|
+
drawWithOwners,
|
|
292
|
+
expect,
|
|
293
|
+
extractFrame,
|
|
294
|
+
extractFrames,
|
|
295
|
+
fileURLToPath,
|
|
296
|
+
getOrCreateIblCache,
|
|
297
|
+
getTransparentSortConfig,
|
|
298
|
+
hasIblCache,
|
|
299
|
+
it,
|
|
300
|
+
makeMockShaderRegistry,
|
|
301
|
+
mat4,
|
|
302
|
+
mergeSkylightIntoMaterialBgl,
|
|
303
|
+
prepareExtractContext,
|
|
304
|
+
propagateTransforms,
|
|
305
|
+
readFileSync,
|
|
306
|
+
resolve,
|
|
307
|
+
rhiOk,
|
|
308
|
+
selectSwapChainFormat,
|
|
309
|
+
setTransparentSortConfig,
|
|
310
|
+
spriteAnimationTickSystem,
|
|
311
|
+
standardMaterialShaderVariants,
|
|
312
|
+
subscribeRendererErrors,
|
|
313
|
+
toShared,
|
|
314
|
+
tonemapReinhardLuminance,
|
|
315
|
+
transparentSortEntries,
|
|
316
|
+
unwrapRendererError,
|
|
317
|
+
urpPipeline,
|
|
318
|
+
vec3,
|
|
319
|
+
vi,
|
|
320
|
+
warnMultiLightDirectional,
|
|
321
|
+
warnMultiLightPoint,
|
|
322
|
+
warnMultiLightSpot,
|
|
323
|
+
worldInternal,
|
|
324
|
+
];
|
|
325
|
+
type __MergedKeep =
|
|
326
|
+
| AssetRuntimeErrorCode
|
|
327
|
+
| BindGroupEntry
|
|
328
|
+
| Buffer
|
|
329
|
+
| CameraProjection
|
|
330
|
+
| CameraSnapshot
|
|
331
|
+
| EntityHandle
|
|
332
|
+
| ExtractedLights
|
|
333
|
+
| Handle
|
|
334
|
+
| InstanceBufferCacheEntry
|
|
335
|
+
| MaterialAsset
|
|
336
|
+
| MeshAsset
|
|
337
|
+
| RenderErrorCode
|
|
338
|
+
| RendererErrorObservation
|
|
339
|
+
| RendererType
|
|
340
|
+
| RuntimeLayerErrorCode
|
|
341
|
+
| Sampler
|
|
342
|
+
| SkeletonAsset
|
|
343
|
+
| SkinErrorCode
|
|
344
|
+
| Texture
|
|
345
|
+
| TextureFormat
|
|
346
|
+
| TextureView
|
|
347
|
+
| TransparentEntry
|
|
348
|
+
| WorldType;
|
|
349
|
+
|
|
350
|
+
{
|
|
351
|
+
// --- from skylight-pipeline-layout.test.ts ---
|
|
352
|
+
|
|
353
|
+
const STORAGE_CAPS: PbrCaps = { storageBuffer: true };
|
|
354
|
+
|
|
355
|
+
// ─── Mock device ────────────────────────────────────────────────────────────
|
|
356
|
+
//
|
|
357
|
+
// Captures every descriptor passed to createBindGroupLayout / createPipelineLayout
|
|
358
|
+
// so the test inspects the final pipeline-layout shape without standing up a
|
|
359
|
+
// real GPU.
|
|
360
|
+
|
|
361
|
+
interface CapturedBgl {
|
|
362
|
+
readonly label: string | undefined;
|
|
363
|
+
readonly entries: readonly GPUBindGroupLayoutEntry[];
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
interface CapturedPipelineLayout {
|
|
367
|
+
readonly label: string | undefined;
|
|
368
|
+
readonly bindGroupLayouts: readonly unknown[];
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
interface MockDevice {
|
|
372
|
+
readonly createBindGroupLayout: ReturnType<typeof vi.fn>;
|
|
373
|
+
readonly createPipelineLayout: ReturnType<typeof vi.fn>;
|
|
374
|
+
readonly capturedBgls: CapturedBgl[];
|
|
375
|
+
readonly capturedPipelineLayouts: CapturedPipelineLayout[];
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function makeMockDevice(): MockDevice {
|
|
379
|
+
const capturedBgls: CapturedBgl[] = [];
|
|
380
|
+
const capturedPipelineLayouts: CapturedPipelineLayout[] = [];
|
|
381
|
+
const createBindGroupLayout = vi.fn(
|
|
382
|
+
(desc: { label?: string; entries: readonly GPUBindGroupLayoutEntry[] }) => {
|
|
383
|
+
const captured: CapturedBgl = { label: desc.label, entries: desc.entries };
|
|
384
|
+
capturedBgls.push(captured);
|
|
385
|
+
// Return an opaque BindGroupLayout handle (the captured descriptor) so
|
|
386
|
+
// downstream `createPipelineLayout` calls can refer to it by identity.
|
|
387
|
+
return { ok: true, value: captured };
|
|
388
|
+
},
|
|
389
|
+
);
|
|
390
|
+
const createPipelineLayout = vi.fn(
|
|
391
|
+
(desc: { label?: string; bindGroupLayouts: readonly unknown[] }) => {
|
|
392
|
+
const captured: CapturedPipelineLayout = {
|
|
393
|
+
label: desc.label,
|
|
394
|
+
bindGroupLayouts: desc.bindGroupLayouts,
|
|
395
|
+
};
|
|
396
|
+
capturedPipelineLayouts.push(captured);
|
|
397
|
+
return { ok: true, value: captured };
|
|
398
|
+
},
|
|
399
|
+
);
|
|
400
|
+
return {
|
|
401
|
+
createBindGroupLayout,
|
|
402
|
+
createPipelineLayout,
|
|
403
|
+
capturedBgls,
|
|
404
|
+
capturedPipelineLayouts,
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// ─── (a)..(d) PBR pipeline layout shape ─────────────────────────────────────
|
|
409
|
+
|
|
410
|
+
describe('t57 (M4 round-4) -- standardPipeline pipeline-layout shape', () => {
|
|
411
|
+
it('(a) buildPbrPipelineLayouts returns bindGroupLayouts.length === 4 (no @group(4))', () => {
|
|
412
|
+
const device = makeMockDevice();
|
|
413
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
414
|
+
const result = buildPbrPipelineLayouts(device as any, STORAGE_CAPS);
|
|
415
|
+
expect(result.bindGroupLayouts).toHaveLength(4);
|
|
416
|
+
// And the captured pipeline layout descriptor matches.
|
|
417
|
+
expect(device.capturedPipelineLayouts).toHaveLength(2);
|
|
418
|
+
const layout = device.capturedPipelineLayouts.find((entry) => entry.label === 'pbr-pl');
|
|
419
|
+
expect(layout?.bindGroupLayouts).toHaveLength(4);
|
|
420
|
+
expect(layout?.label).toBe('pbr-pl');
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
it('(b) PBR material BGL entry count === 24 (user region 0..14 + Skylight 15..21 + transmission 22..23)', () => {
|
|
424
|
+
const device = makeMockDevice();
|
|
425
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
426
|
+
buildPbrPipelineLayouts(device as any, STORAGE_CAPS);
|
|
427
|
+
const materialBgl = device.capturedBgls.find((b) => b.label === 'pbr-material-skylight-bgl');
|
|
428
|
+
expect(materialBgl).toBeDefined();
|
|
429
|
+
expect(materialBgl?.entries).toHaveLength(24);
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
it('(c) binding indices 0..23 in order; 15..21 resource types in D-5 round-4 order; 22..23 transmission', () => {
|
|
433
|
+
const device = makeMockDevice();
|
|
434
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
435
|
+
buildPbrPipelineLayouts(device as any, STORAGE_CAPS);
|
|
436
|
+
const materialBgl = device.capturedBgls.find((b) => b.label === 'pbr-material-skylight-bgl');
|
|
437
|
+
expect(materialBgl).toBeDefined();
|
|
438
|
+
const entries = materialBgl?.entries ?? [];
|
|
439
|
+
// binding indices 0..23 in order
|
|
440
|
+
for (let i = 0; i < 24; i++) {
|
|
441
|
+
expect(entries[i]?.binding).toBe(i);
|
|
442
|
+
}
|
|
443
|
+
// 15..21 resource types
|
|
444
|
+
expect((entries[15] as { texture?: { viewDimension: string } }).texture?.viewDimension).toBe(
|
|
445
|
+
'cube',
|
|
446
|
+
);
|
|
447
|
+
expect((entries[16] as { sampler?: { type: string } }).sampler?.type).toBe('filtering');
|
|
448
|
+
expect((entries[17] as { texture?: { viewDimension: string } }).texture?.viewDimension).toBe(
|
|
449
|
+
'cube',
|
|
450
|
+
);
|
|
451
|
+
expect((entries[18] as { sampler?: { type: string } }).sampler?.type).toBe('filtering');
|
|
452
|
+
expect((entries[19] as { texture?: { viewDimension: string } }).texture?.viewDimension).toBe(
|
|
453
|
+
'2d',
|
|
454
|
+
);
|
|
455
|
+
expect((entries[20] as { sampler?: { type: string } }).sampler?.type).toBe('filtering');
|
|
456
|
+
expect((entries[21] as { buffer?: { type: string } }).buffer?.type).toBe('uniform');
|
|
457
|
+
// 22..23 transmission resource types
|
|
458
|
+
expect((entries[22] as { sampler?: { type: string } }).sampler?.type).toBe('filtering');
|
|
459
|
+
expect((entries[23] as { texture?: { viewDimension: string } }).texture?.viewDimension).toBe(
|
|
460
|
+
'2d',
|
|
461
|
+
);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
it('(d) bindGroupLayouts[0..3] order matches [view, material, meshArray, instances]', () => {
|
|
465
|
+
const device = makeMockDevice();
|
|
466
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
467
|
+
const result = buildPbrPipelineLayouts(device as any, STORAGE_CAPS);
|
|
468
|
+
expect(result.bindGroupLayouts[0]).toBe(result.viewBgl);
|
|
469
|
+
expect(result.bindGroupLayouts[1]).toBe(result.materialBgl);
|
|
470
|
+
expect(result.bindGroupLayouts[2]).toBe(result.meshArrayBgl);
|
|
471
|
+
expect(result.bindGroupLayouts[3]).toBe(result.instancesBgl);
|
|
472
|
+
// Labels confirm slot identity.
|
|
473
|
+
const view = device.capturedBgls.find((b) => b.label === 'pbr-view-bgl');
|
|
474
|
+
const mesh = device.capturedBgls.find((b) => b.label === 'pbr-mesh-array-bgl');
|
|
475
|
+
const instances = device.capturedBgls.find((b) => b.label === 'pbr-instances-bgl');
|
|
476
|
+
expect(view).toBeDefined();
|
|
477
|
+
expect(mesh).toBeDefined();
|
|
478
|
+
expect(instances).toBeDefined();
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
// ─── (e)(f) Unlit material BGL shape + name ─────────────────────────────────
|
|
483
|
+
|
|
484
|
+
describe('t57 (M4 round-4) -- unlitPipeline material BGL shape', () => {
|
|
485
|
+
it('(e) unlit material BGL entry count === 15 (no Skylight binding contamination)', () => {
|
|
486
|
+
const device = makeMockDevice();
|
|
487
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
488
|
+
buildUnlitMaterialBgl(device as any);
|
|
489
|
+
const unlitBgl = device.capturedBgls.find((b) => b.label === 'unlit-material-bgl');
|
|
490
|
+
expect(unlitBgl).toBeDefined();
|
|
491
|
+
expect(unlitBgl?.entries).toHaveLength(15);
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
it("(f) PBR material BGL labelled 'pbr-material-skylight-bgl'; unlit labelled 'unlit-material-bgl'", () => {
|
|
495
|
+
const device = makeMockDevice();
|
|
496
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
497
|
+
buildPbrPipelineLayouts(device as any, STORAGE_CAPS);
|
|
498
|
+
// biome-ignore lint/suspicious/noExplicitAny: structural mock
|
|
499
|
+
buildUnlitMaterialBgl(device as any);
|
|
500
|
+
const pbr = device.capturedBgls.find((b) => b.label === 'pbr-material-skylight-bgl');
|
|
501
|
+
const unlit = device.capturedBgls.find((b) => b.label === 'unlit-material-bgl');
|
|
502
|
+
expect(pbr).toBeDefined();
|
|
503
|
+
expect(unlit).toBeDefined();
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
}
|