@forgeax/engine-render 0.1.32 → 0.1.34
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 +1374 -142
- package/dist/assembly/analytic-fog-registration.d.ts +3 -0
- package/dist/assembly/analytic-fog-registration.d.ts.map +1 -0
- package/dist/assembly/backend-contract.d.ts +2 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -1
- package/dist/assembly/barrel-distortion-inspection.d.ts +3 -0
- package/dist/assembly/barrel-distortion-inspection.d.ts.map +1 -0
- package/dist/assembly/canvas-draw-guard.d.ts +3 -0
- package/dist/assembly/canvas-draw-guard.d.ts.map +1 -0
- package/dist/assembly/cloud-shadow-entry.d.ts +4 -0
- package/dist/assembly/cloud-shadow-entry.d.ts.map +1 -0
- package/dist/assembly/dynamic-geometry-host.d.ts +4 -1
- package/dist/assembly/dynamic-geometry-host.d.ts.map +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts.map +1 -1
- package/dist/assembly/factory.d.ts +1 -1
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/fxaa-registration.d.ts +4 -0
- package/dist/assembly/fxaa-registration.d.ts.map +1 -0
- package/dist/assembly/host-contract.d.ts +3 -3
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/lod-observation.d.ts +4 -0
- package/dist/assembly/lod-observation.d.ts.map +1 -0
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/pipeline-helpers.d.ts +5 -0
- package/dist/assembly/material/pipeline-helpers.d.ts.map +1 -1
- package/dist/assembly/material-shader-policy.d.ts +16 -2
- package/dist/assembly/material-shader-policy.d.ts.map +1 -1
- package/dist/assembly/material-shader-prewarm.d.ts.map +1 -1
- package/dist/assembly/motion-blur-registration.d.ts +3 -0
- package/dist/assembly/motion-blur-registration.d.ts.map +1 -0
- package/dist/assembly/recovery/device-loss-fanout.d.ts.map +1 -1
- package/dist/assembly/recovery/renderer-recover.d.ts +2 -0
- package/dist/assembly/recovery/renderer-recover.d.ts.map +1 -1
- package/dist/assembly/render-feature-post-processes.d.ts +6 -0
- package/dist/assembly/render-feature-post-processes.d.ts.map +1 -0
- package/dist/assembly/renderer-facade.d.ts.map +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts.map +1 -1
- package/dist/assembly/renderer-frame-transaction.d.ts +12 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -1
- package/dist/assembly/renderer-inspection.d.ts +11 -0
- package/dist/assembly/renderer-inspection.d.ts.map +1 -1
- package/dist/assembly/temporal-post-process-prewarm.d.ts +13 -0
- package/dist/assembly/temporal-post-process-prewarm.d.ts.map +1 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts +1 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-ready-contract.d.ts +4 -3
- package/dist/assembly/webgpu-ready-contract.d.ts.map +1 -1
- package/dist/assembly/webgpu-ready-per-pass.d.ts +39 -0
- package/dist/assembly/webgpu-ready-per-pass.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready.d.ts +2 -2
- package/dist/assembly/webgpu-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-bootstrap.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-observation-owner.d.ts +35 -0
- package/dist/assembly/webgpu-renderer-observation-owner.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer.d.ts +1 -1
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
- package/dist/authoring.mjs +1 -1
- package/dist/barrel-distortion.d.ts +47 -0
- package/dist/barrel-distortion.d.ts.map +1 -0
- package/dist/bloom-admission.d.ts +13 -0
- package/dist/bloom-admission.d.ts.map +1 -0
- package/dist/{chunk-PA5DRJNI.mjs → chunk-ELJFJ2BU.mjs} +2 -2
- package/dist/chunk-ELJFJ2BU.mjs.map +1 -0
- package/dist/{chunk-JCIRYQ4V.mjs → chunk-HEB564WF.mjs} +10 -4
- package/dist/chunk-HEB564WF.mjs.map +1 -0
- package/dist/{chunk-JRIPCMYC.mjs → chunk-MKDIT2EM.mjs} +1584 -375
- package/dist/chunk-MKDIT2EM.mjs.map +1 -0
- package/dist/{chunk-S665NJNF.mjs → chunk-OCDLEI6I.mjs} +3 -3
- package/dist/{chunk-S665NJNF.mjs.map → chunk-OCDLEI6I.mjs.map} +1 -1
- package/dist/chunk-ODZWR6JQ.mjs +4927 -0
- package/dist/chunk-ODZWR6JQ.mjs.map +1 -0
- package/dist/{chunk-DRR7D3KX.mjs → chunk-SHFUFJ5N.mjs} +192 -18
- package/dist/chunk-SHFUFJ5N.mjs.map +1 -0
- package/dist/{chunk-4NNZQCL3.mjs → chunk-UI5SFODX.mjs} +223 -277
- package/dist/chunk-UI5SFODX.mjs.map +1 -0
- package/dist/{chunk-GWCEMDVR.mjs → chunk-UINHLCZA.mjs} +787 -80
- package/dist/chunk-UINHLCZA.mjs.map +1 -0
- package/dist/{chunk-6TFBXLRJ.mjs → chunk-WEX45HKH.mjs} +222 -337
- package/dist/chunk-WEX45HKH.mjs.map +1 -0
- package/dist/cloud/density.d.ts +55 -0
- package/dist/cloud/density.d.ts.map +1 -0
- package/dist/cloud/extract.d.ts +25 -0
- package/dist/cloud/extract.d.ts.map +1 -0
- package/dist/cloud/feature.d.ts +57 -0
- package/dist/cloud/feature.d.ts.map +1 -0
- package/dist/cloud/frame-context.d.ts +8 -0
- package/dist/cloud/frame-context.d.ts.map +1 -0
- package/dist/cloud/inspection.d.ts +59 -0
- package/dist/cloud/inspection.d.ts.map +1 -0
- package/dist/cloud/optics.d.ts +56 -0
- package/dist/cloud/optics.d.ts.map +1 -0
- package/dist/cloud/parameters.d.ts +73 -0
- package/dist/cloud/parameters.d.ts.map +1 -0
- package/dist/cloud/resources.d.ts +60 -0
- package/dist/cloud/resources.d.ts.map +1 -0
- package/dist/cloud/shadow.d.ts +42 -0
- package/dist/cloud/shadow.d.ts.map +1 -0
- package/dist/cloud/temporal.d.ts +74 -0
- package/dist/cloud/temporal.d.ts.map +1 -0
- package/dist/components/atmosphere.d.ts +2 -0
- package/dist/components/atmosphere.d.ts.map +1 -1
- package/dist/components/barrel-distortion.d.ts +13 -0
- package/dist/components/barrel-distortion.d.ts.map +1 -0
- package/dist/components/camera.d.ts +20 -4
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/cloud-layer.d.ts +29 -0
- package/dist/components/cloud-layer.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/instances.d.ts +20 -6
- package/dist/components/instances.d.ts.map +1 -1
- package/dist/components/mesh-filter.d.ts +6 -5
- package/dist/components/mesh-filter.d.ts.map +1 -1
- package/dist/components/motion-blur.d.ts +1 -0
- package/dist/components/motion-blur.d.ts.map +1 -1
- package/dist/construct-renderer.d.ts +1 -1
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +9751 -3528
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/gpu-residency.d.ts +6 -0
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/dynamic-geometry.d.ts +5 -1
- package/dist/dynamic-geometry.d.ts.map +1 -1
- package/dist/environment/analytic-fog.d.ts +6 -0
- package/dist/environment/analytic-fog.d.ts.map +1 -0
- package/dist/errors/cloud.d.ts +59 -0
- package/dist/errors/cloud.d.ts.map +1 -0
- package/dist/errors/render.d.ts +23 -5
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/examples/single-layer-medium-surface.d.ts +47 -0
- package/dist/examples/single-layer-medium-surface.d.ts.map +1 -0
- package/dist/extract/camera.d.ts.map +1 -1
- package/dist/extract/contracts.d.ts +12 -1
- package/dist/extract/contracts.d.ts.map +1 -1
- package/dist/extract/environment.d.ts +2 -0
- package/dist/extract/environment.d.ts.map +1 -1
- package/dist/features/barrel-distortion.d.ts +29 -0
- package/dist/features/barrel-distortion.d.ts.map +1 -0
- package/dist/features/error-reporting.d.ts +17 -0
- package/dist/features/error-reporting.d.ts.map +1 -0
- package/dist/features/host.d.ts +15 -0
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-feature.d.ts +20 -2
- package/dist/features/motion-blur/motion-blur-feature.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-params.d.ts +21 -0
- package/dist/features/motion-blur/motion-blur-params.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-runtime.d.ts +54 -0
- package/dist/features/motion-blur/motion-blur-runtime.d.ts.map +1 -0
- package/dist/features/plan.d.ts +15 -4
- package/dist/features/plan.d.ts.map +1 -1
- package/dist/features/prepared-gpu-work.d.ts +9 -5
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/render-graph-compute.d.ts.map +1 -1
- package/dist/features/render-graph-contribution.d.ts +5 -0
- package/dist/features/render-graph-contribution.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +1 -0
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/targets.d.ts +2 -0
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +44 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +15 -7
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/gpu-dirty-ranges.d.ts +11 -0
- package/dist/gpu-dirty-ranges.d.ts.map +1 -0
- package/dist/gpu-driven/batch-topology.d.ts +17 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
- package/dist/gpu-driven/material-artifacts.d.ts +6 -0
- package/dist/gpu-driven/material-artifacts.d.ts.map +1 -1
- package/dist/gpu-driven/prepared-draw.d.ts +7 -0
- package/dist/gpu-driven/prepared-draw.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster-material.d.ts +178 -0
- package/dist/gpu-driven/production-raster-material.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +50 -4
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-driven/resource-allocation.d.ts +31 -0
- package/dist/gpu-driven/resource-allocation.d.ts.map +1 -0
- package/dist/gpu-driven/shadow-ownership.d.ts +14 -0
- package/dist/gpu-driven/shadow-ownership.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +35 -2
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +11 -1
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +2 -2
- package/dist/hdrp-buffers.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +10 -1
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +31 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +258 -8
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +178 -3
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/instance-buffer-cache.d.ts +4 -4
- package/dist/instance-buffer-cache.d.ts.map +1 -1
- package/dist/instances.d.ts +49 -94
- package/dist/instances.d.ts.map +1 -1
- package/dist/internal.mjs +7 -7
- package/dist/pbr-pipeline.d.ts +19 -1
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/single-layer-medium-passes.d.ts +73 -0
- package/dist/pipeline/single-layer-medium-passes.d.ts.map +1 -0
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-output/graph.d.ts.map +1 -1
- package/dist/pipeline/standard-output/types.d.ts +4 -2
- package/dist/pipeline/standard-output/types.d.ts.map +1 -1
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts +28 -19
- package/dist/pipeline/standard-post.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +1 -1
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/prepare/prepared-graphics-resolver.d.ts +2 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -1
- package/dist/record/barrel-distortion-frame.d.ts +15 -0
- package/dist/record/barrel-distortion-frame.d.ts.map +1 -0
- package/dist/record/dynamic-geometry-consumption.d.ts +10 -2
- package/dist/record/dynamic-geometry-consumption.d.ts.map +1 -1
- package/dist/record/fold-buckets.d.ts +95 -0
- package/dist/record/fold-buckets.d.ts.map +1 -0
- package/dist/record/fold-instance-buffer.d.ts +6 -0
- package/dist/record/fold-instance-buffer.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +1 -0
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +40 -3
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame-targets.d.ts.map +1 -1
- package/dist/record/frame.d.ts +14 -62
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/gpu-draw-receipts.d.ts +11 -0
- package/dist/record/gpu-draw-receipts.d.ts.map +1 -0
- package/dist/record/gpu-timing.d.ts +8 -0
- package/dist/record/gpu-timing.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +21 -5
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +7 -1
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +13 -2
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts +6 -5
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/motion-blur-receipt.d.ts +11 -0
- package/dist/record/motion-blur-receipt.d.ts.map +1 -0
- package/dist/record/probe-blend-buffer.d.ts +16 -0
- package/dist/record/probe-blend-buffer.d.ts.map +1 -0
- package/dist/record/recovery-pipeline.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +34 -31
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts +2 -0
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/skybox-post-pass.d.ts +6 -4
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +22 -2
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +11 -3
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/record/volume-params.d.ts +9 -0
- package/dist/record/volume-params.d.ts.map +1 -0
- package/dist/recovery/render-system-candidate.d.ts +10 -0
- package/dist/recovery/render-system-candidate.d.ts.map +1 -1
- package/dist/reflection/record-owner.d.ts.map +1 -1
- package/dist/render-contract.d.ts +66 -8
- package/dist/render-contract.d.ts.map +1 -1
- package/dist/render-graph-primitives.d.ts.map +1 -1
- package/dist/render-pipeline.d.ts +106 -3
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +3 -2
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +24 -10
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system-presentation.d.ts +23 -0
- package/dist/render-system-presentation.d.ts.map +1 -0
- package/dist/render-system-producer-roots.d.ts +10 -0
- package/dist/render-system-producer-roots.d.ts.map +1 -0
- package/dist/render-system-residency.d.ts +12 -0
- package/dist/render-system-residency.d.ts.map +1 -0
- package/dist/render-system.d.ts +26 -15
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/probe-blend.d.ts +27 -0
- package/dist/scene/probe-blend.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +14 -5
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/ssao-buffers.d.ts +9 -0
- package/dist/ssao-buffers.d.ts.map +1 -1
- package/dist/surface/dynamic-input.d.ts +133 -0
- package/dist/surface/dynamic-input.d.ts.map +1 -0
- package/dist/surface/gpu-driven.d.ts +41 -0
- package/dist/surface/gpu-driven.d.ts.map +1 -0
- package/dist/surface/submission-observation.d.ts +136 -0
- package/dist/surface/submission-observation.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -1
- package/dist/temporal/frame-coordinator.d.ts.map +1 -1
- package/dist/temporal/frame.d.ts +7 -0
- package/dist/temporal/frame.d.ts.map +1 -1
- package/dist/temporal/gpu.d.ts +13 -1
- package/dist/temporal/gpu.d.ts.map +1 -1
- package/dist/temporal/index.mjs +5 -5
- package/dist/temporal/inspection.d.ts.map +1 -1
- package/dist/temporal/standard-scene-data.d.ts.map +1 -1
- package/dist/temporal/target-coverage-attachment.d.ts.map +1 -1
- package/dist/temporal/view.d.ts +6 -1
- package/dist/temporal/view.d.ts.map +1 -1
- package/dist/transmission/single-layer-medium.d.ts +89 -0
- package/dist/transmission/single-layer-medium.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +24 -9
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/volume/component.d.ts +9 -5
- package/dist/volume/component.d.ts.map +1 -1
- package/dist/volume/extract.d.ts +1 -1
- package/dist/volume/extract.d.ts.map +1 -1
- package/dist/volume/inspection.d.ts +2 -0
- package/dist/volume/inspection.d.ts.map +1 -1
- package/dist/volume/passes.d.ts +4 -1
- package/dist/volume/passes.d.ts.map +1 -1
- package/dist/volume/resources.d.ts.map +1 -1
- package/dist/volume/temporal.d.ts +3 -1
- package/dist/volume/temporal.d.ts.map +1 -1
- package/package.json +22 -21
- package/src/__tests__/analytic-fog-graph.unit.test.ts +199 -0
- package/src/__tests__/analytic-fog-optics.unit.test.ts +38 -0
- package/src/__tests__/atmosphere-daylight.dawn.test.ts +72 -0
- package/src/__tests__/barrel-distortion-lkg.integration.test.ts +353 -0
- package/src/__tests__/barrel-distortion.dawn.test.ts +41 -0
- package/src/__tests__/barrel-distortion.unit.test.ts +364 -0
- package/src/__tests__/bloom-exact-zero.unit.test.ts +112 -18
- package/src/__tests__/bloom-lifecycle.integration.test.ts +17 -4
- package/src/__tests__/construct-renderer-identity.unit.test.ts +49 -0
- package/src/__tests__/detached-recovery-graph.unit.test.ts +277 -0
- package/src/__tests__/device-loss-fanout.unit.test.ts +36 -1
- package/src/__tests__/docs-gate-green.unit.test.ts +112 -1
- package/src/__tests__/dynamic-resolution-plugin.integration.test.ts +20 -0
- package/src/__tests__/environment-fog-lanes.integration.test.ts +14 -0
- package/src/__tests__/environment-selection.unit.test.ts +12 -0
- package/src/__tests__/factory-contract.integration.test.ts +626 -113
- package/src/__tests__/feature-depth-input.dawn.test.ts +129 -2
- package/src/__tests__/frame-camera-selection.unit.test.ts +39 -1
- package/src/__tests__/frame-plan-contract.unit.test.ts +2 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +14 -3
- package/src/__tests__/gpu-dirty-ranges.unit.test.ts +22 -0
- package/src/__tests__/gpu-driven-baseline.characterization.test.ts +16 -3
- package/src/__tests__/gpu-driven-batch-topology-pbr.unit.test.ts +12 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +2 -1
- package/src/__tests__/gpu-driven-material-artifacts.unit.test.ts +143 -0
- package/src/__tests__/gpu-driven-pbr.dawn.test.ts +2 -2
- package/src/__tests__/gpu-driven-production.integration.test.ts +482 -3
- package/src/__tests__/gpu-driven-shadow-views.dawn.test.ts +7 -6
- package/src/__tests__/gpu-driven-shadow-views.integration.test.ts +1 -1
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +103 -4
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +18 -2
- package/src/__tests__/gpu-driven-view.browser.test.ts +5 -8
- package/src/__tests__/gpu-driven-view.dawn.test.ts +6 -2
- package/src/__tests__/gpu-driven-view.unit.test.ts +1 -1
- package/src/__tests__/gpu-pass-timing-lifecycle.integration.test.ts +1 -0
- package/src/__tests__/gpu-pass-timing.browser.test.ts +6 -4
- package/src/__tests__/gpu-pass-timing.rhi-null.unit.test.ts +1 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +12 -0
- package/src/__tests__/gpu-scene.unit.test.ts +210 -9
- package/src/__tests__/instance-allocation-failure.unit.test.ts +57 -0
- package/src/__tests__/instances-culling.integration.test.ts +10 -36
- package/src/__tests__/instances-store.unit.test.ts +105 -238
- package/src/__tests__/instances-world-ownership.integration.test.ts +62 -0
- package/src/__tests__/main-pass-material-medium-selection.unit.test.ts +146 -0
- package/src/__tests__/material-shader-prewarm.unit.test.ts +59 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +39 -1
- package/src/__tests__/mesh-submission-lifetime.unit.test.ts +31 -0
- package/src/__tests__/morph-culling-reentry.dawn.test.ts +5 -5
- package/src/__tests__/morph-visual-evidence.integration.test.ts +8 -7
- package/src/__tests__/motion-blur-compute.dawn.test.ts +589 -0
- package/src/__tests__/motion-blur.pixel.integration.test.ts +2 -2
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +4 -4
- package/src/__tests__/pbr-view-layout.unit.test.ts +9 -0
- package/src/__tests__/physical-clearcoat.integration.test.ts +58 -0
- package/src/__tests__/prepared-gpu-driven-pbr.integration.test.ts +21 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +66 -2
- package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +86 -0
- package/src/__tests__/probe-bindings.unit.test.ts +582 -1
- package/src/__tests__/probe-scene-dirty.integration.test.ts +28 -1
- package/src/__tests__/public-surface.test-d.ts +8 -0
- package/src/__tests__/receipt-observation-retirement.unit.test.ts +65 -0
- package/src/__tests__/recovery-candidate-prepare.contract.test.ts +69 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +9 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +15 -2
- package/src/__tests__/render-feature-error-reporting.unit.test.ts +44 -0
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +10 -1
- package/src/__tests__/render-feature-retry.unit.test.ts +12 -1
- package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +23 -0
- package/src/__tests__/render-scene-mixed-updates.integration.test.ts +145 -19
- package/src/__tests__/render-scene-projection.unit.test.ts +36 -11
- package/src/__tests__/render-scene-temporal-retry.unit.test.ts +37 -6
- package/src/__tests__/render-target-probe-soak.perf.test.ts +2 -2
- package/src/__tests__/render-temporal-environment-consumer.browser.test.ts +3 -3
- package/src/__tests__/render-temporal-environment-consumer.dawn.test.ts +5 -2
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +41 -7
- package/src/__tests__/renderer-frame-generation-fence.integration.test.ts +16 -0
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +33 -11
- package/src/__tests__/resource-allocation.unit.test.ts +123 -0
- package/src/__tests__/shader-manifest-fixture.ts +4 -4
- package/src/__tests__/single-layer-medium-passes.unit.test.ts +275 -0
- package/src/__tests__/skin-motion-regression.unit.test.ts +70 -1
- package/src/__tests__/skin-palette-recycling.dawn.test.ts +97 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +17 -0
- package/src/__tests__/ssr-carrier-public-contract.unit.test.ts +21 -0
- package/src/__tests__/ssr-gpu-dispatch.browser.test.ts +4 -4
- package/src/__tests__/ssr-gpu-dispatch.dawn.test.ts +2 -2
- package/src/__tests__/ssr-gpu-dispatch.ts +1 -1
- package/src/__tests__/ssr-receiver-coverage.dawn.test.ts +6 -2
- package/src/__tests__/standard-lighting-write.unit.test.ts +2 -1
- package/src/__tests__/standard-output-chain-contract.unit.test.ts +28 -0
- package/src/__tests__/standard-pbr-artifact-assembly.unit.test.ts +46 -1
- package/src/__tests__/standard-pipeline.dawn.test.ts +1 -1
- package/src/__tests__/standard-pipeline.integration.test.ts +200 -9
- package/src/__tests__/surface-dynamic-buffer-lifecycle.unit.test.ts +506 -0
- package/src/__tests__/surface-submission-observation.unit.test.ts +812 -0
- package/src/__tests__/temporal-history-lifecycle.unit.test.ts +32 -0
- package/src/__tests__/temporal-performance.integration.test.ts +3 -3
- package/src/__tests__/temporal-reset-matrix.unit.test.ts +10 -0
- package/src/__tests__/temporal-view.unit.test.ts +2 -1
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +20 -4
- package/src/__tests__/visibility-instances.integration.test.ts +7 -19
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +9 -20
- package/src/__tests__/volume-optics-oracle.unit.test.ts +7 -3
- package/src/__tests__/volumetric-fog-budget-recovery.integration.test.ts +189 -15
- package/src/__tests__/volumetric-fog-errors.unit.test.ts +4 -3
- package/src/__tests__/volumetric-fog-multiple.unit.test.ts +55 -0
- package/src/__tests__/volumetric-fog-spot-frame-optics.integration.test.ts +1 -1
- package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +558 -68
- package/src/__tests__/volumetric-fog-temporal.unit.test.ts +27 -0
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +23 -5
- package/src/assembly/analytic-fog-registration.ts +14 -0
- package/src/assembly/backend-contract.ts +30 -0
- package/src/assembly/barrel-distortion-inspection.ts +22 -0
- package/src/assembly/canvas-draw-guard.ts +11 -0
- package/src/assembly/cloud-shadow-entry.ts +22 -0
- package/src/assembly/dynamic-geometry-host.ts +65 -37
- package/src/assembly/dynamic-geometry-runtime.ts +7 -1
- package/src/assembly/factory.ts +2 -30
- package/src/assembly/fxaa-registration.ts +17 -0
- package/src/assembly/host-contract.ts +3 -3
- package/src/assembly/lod-observation.ts +12 -0
- package/src/assembly/material/assembly.ts +25 -13
- package/src/assembly/material/pipeline-helpers.ts +53 -12
- package/src/assembly/material-shader-policy.ts +55 -0
- package/src/assembly/material-shader-prewarm.ts +21 -10
- package/src/assembly/motion-blur-registration.ts +17 -0
- package/src/assembly/recovery/device-loss-fanout.ts +13 -0
- package/src/assembly/recovery/renderer-recover.ts +41 -18
- package/src/assembly/render-feature-post-processes.ts +54 -0
- package/src/assembly/renderer-facade.ts +6 -1
- package/src/assembly/renderer-feature-inspection.ts +8 -2
- package/src/assembly/renderer-frame-transaction.ts +23 -0
- package/src/assembly/renderer-inspection.ts +28 -0
- package/src/assembly/skin-palette-owner.ts +1 -1
- package/src/assembly/temporal-post-process-prewarm.ts +40 -0
- package/src/assembly/webgpu-pbr-ready.ts +9 -1
- package/src/assembly/webgpu-ready-contract.ts +8 -3
- package/src/assembly/webgpu-ready-per-pass.ts +104 -0
- package/src/assembly/webgpu-ready.ts +296 -306
- package/src/assembly/webgpu-renderer-bootstrap.ts +0 -12
- package/src/assembly/webgpu-renderer-observation-owner.ts +222 -0
- package/src/assembly/webgpu-renderer.ts +228 -281
- package/src/assembly/webgpu-vertex-layouts.ts +1 -1
- package/src/barrel-distortion.ts +247 -0
- package/src/bloom-admission.ts +21 -0
- package/src/cloud/__tests__/cloud-density-parity.dawn.test.ts +173 -0
- package/src/cloud/__tests__/cloud-layer-framebuffer-y.dawn.test.ts +265 -0
- package/src/cloud/__tests__/cloud-layer.browser.test.ts +432 -0
- package/src/cloud/__tests__/cloud-layer.unit.test.ts +634 -0
- package/src/cloud/density.ts +600 -0
- package/src/cloud/extract.ts +110 -0
- package/src/cloud/feature.ts +1810 -0
- package/src/cloud/frame-context.ts +42 -0
- package/src/cloud/inspection.ts +130 -0
- package/src/cloud/optics.ts +285 -0
- package/src/cloud/parameters.ts +255 -0
- package/src/cloud/resources.ts +122 -0
- package/src/cloud/shadow.ts +167 -0
- package/src/cloud/temporal.ts +226 -0
- package/src/components/__tests__/motion-blur.unit.test.ts +1 -0
- package/src/components/atmosphere.ts +4 -0
- package/src/components/barrel-distortion.ts +46 -0
- package/src/components/camera.ts +66 -10
- package/src/components/cloud-layer.ts +47 -0
- package/src/components/index.ts +2 -0
- package/src/components/instances.ts +18 -45
- package/src/components/mesh-filter.ts +11 -9
- package/src/components/motion-blur.ts +1 -0
- package/src/components/sprite-instances.ts +1 -1
- package/src/construct-renderer.ts +1 -1
- package/src/device/gpu-residency.ts +56 -12
- package/src/dynamic-geometry.ts +12 -1
- package/src/environment/analytic-fog.ts +44 -0
- package/src/environment/background.ts +2 -2
- package/src/errors/cloud.ts +103 -0
- package/src/errors/render.ts +58 -8
- package/src/examples/single-layer-medium-surface.ts +59 -0
- package/src/extract/camera.ts +35 -8
- package/src/extract/contracts.ts +12 -0
- package/src/extract/environment.ts +4 -0
- package/src/features/barrel-distortion.ts +172 -0
- package/src/features/error-reporting.ts +98 -0
- package/src/features/host.ts +138 -24
- package/src/features/motion-blur/__tests__/motion-blur-feature.unit.test.ts +111 -1
- package/src/features/motion-blur/__tests__/motion-blur-params.unit.test.ts +58 -3
- package/src/features/motion-blur/motion-blur-feature.ts +1519 -15
- package/src/features/motion-blur/motion-blur-params.ts +70 -2
- package/src/features/motion-blur/motion-blur-runtime.ts +176 -0
- package/src/features/plan.ts +33 -8
- package/src/features/prepared-gpu-work.ts +86 -35
- package/src/features/render-graph-compute.ts +13 -5
- package/src/features/render-graph-contribution.ts +11 -0
- package/src/features/render-graph-raster.ts +45 -3
- package/src/features/targets.ts +66 -0
- package/src/features/types.ts +47 -0
- package/src/fullscreen-post-process-pass.ts +41 -9
- package/src/gpu-dirty-ranges.ts +48 -0
- package/src/gpu-driven/batch-topology.ts +53 -0
- package/src/gpu-driven/material-artifacts.ts +35 -32
- package/src/gpu-driven/prepared-draw.ts +27 -14
- package/src/gpu-driven/production-raster-material.ts +1894 -0
- package/src/gpu-driven/production-raster.ts +904 -787
- package/src/gpu-driven/resource-allocation.ts +142 -0
- package/src/gpu-driven/shadow-ownership.ts +71 -0
- package/src/gpu-driven/view-gpu.ts +181 -10
- package/src/gpu-scene.ts +259 -101
- package/src/hdrp-buffers.ts +4 -3
- package/src/ibl/skylight-bind-group.ts +49 -7
- package/src/index.ts +228 -9
- package/src/inspection-types.ts +222 -2
- package/src/instance-buffer-cache.ts +4 -4
- package/src/instances.ts +151 -492
- package/src/pbr-pipeline.ts +219 -13
- package/src/pipeline/single-layer-medium-passes.ts +267 -0
- package/src/pipeline/standard-forward-lane.ts +313 -57
- package/src/pipeline/standard-output/graph.ts +8 -2
- package/src/pipeline/standard-output/types.ts +12 -1
- package/src/pipeline/standard-pipeline.ts +291 -18
- package/src/pipeline/standard-post.ts +397 -102
- package/src/pipeline-builder.ts +1 -1
- package/src/pipeline-spec.ts +5 -5
- package/src/plugin.ts +4 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +17 -8
- package/src/points-lines/__tests__/view-ubo.unit.test.ts +2 -1
- package/src/prepare/prepared-graphics-resolver.ts +2 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +30 -0
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +1 -1
- package/src/record/__tests__/temporal-payload.unit.test.ts +3 -2
- package/src/record/__tests__/transparent-group2-selection.unit.test.ts +11 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +1 -0
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +4 -3
- package/src/record/barrel-distortion-frame.ts +110 -0
- package/src/record/dynamic-geometry-consumption.ts +39 -9
- package/src/record/fold-buckets.ts +852 -0
- package/src/record/fold-instance-buffer.ts +51 -0
- package/src/record/frame-lighting.ts +36 -2
- package/src/record/frame-snapshot.ts +44 -4
- package/src/record/frame-targets.ts +10 -6
- package/src/record/frame.ts +373 -1099
- package/src/record/gpu-draw-receipts.ts +38 -0
- package/src/record/gpu-timing.ts +48 -5
- package/src/record/main-pass-geometry.ts +281 -83
- package/src/record/main-pass-material.ts +66 -4
- package/src/record/main-pass-sprite-draws.ts +13 -66
- package/src/record/main-pass.ts +156 -20
- package/src/record/mesh-ssbo.ts +43 -6
- package/src/record/motion-blur-receipt.ts +91 -0
- package/src/record/probe-blend-buffer.ts +180 -0
- package/src/record/recovery-pipeline.ts +35 -3
- package/src/record/render-context.ts +51 -31
- package/src/record/shadow-pass.ts +36 -2
- package/src/record/skybox-post-pass.ts +150 -200
- package/src/record/typed-frame-graph.ts +824 -44
- package/src/record/view-ubo.ts +26 -3
- package/src/record/volume-params.ts +225 -0
- package/src/recovery/render-system-candidate.ts +257 -52
- package/src/reflection/record-owner.ts +7 -3
- package/src/render-contract.ts +71 -8
- package/src/render-graph-primitives.ts +7 -1
- package/src/render-pipeline.ts +136 -1
- package/src/render-system-extract-tail.ts +72 -60
- package/src/render-system-extract.ts +117 -87
- package/src/render-system-presentation.ts +56 -0
- package/src/render-system-producer-roots.ts +96 -0
- package/src/render-system-residency.ts +159 -0
- package/src/render-system.ts +601 -482
- package/src/scene/probe-blend.ts +96 -4
- package/src/scene/render-scene.ts +431 -281
- package/src/ssao-buffers.ts +95 -2
- package/src/surface/__tests__/dynamic-input.unit.test.ts +374 -0
- package/src/surface/__tests__/gpu-driven.unit.test.ts +87 -0
- package/src/surface/dynamic-input.ts +658 -0
- package/src/surface/gpu-driven.ts +147 -0
- package/src/surface/submission-observation.ts +517 -0
- package/src/systems/skin-palette-allocator.ts +4 -1
- package/src/temporal/__tests__/temporal-frame-transaction.unit.test.ts +36 -0
- package/src/temporal/frame-coordinator.ts +8 -1
- package/src/temporal/frame.ts +20 -0
- package/src/temporal/gpu.ts +101 -17
- package/src/temporal/inspection.ts +7 -1
- package/src/temporal/standard-scene-data.ts +5 -0
- package/src/temporal/target-coverage-attachment.ts +4 -0
- package/src/temporal/view.ts +13 -2
- package/src/transmission/__tests__/single-layer-medium.unit.test.ts +149 -0
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +12 -11
- package/src/transmission/single-layer-medium.ts +322 -0
- package/src/typed-render-graph-primitives.ts +191 -50
- package/src/volume/component.ts +10 -10
- package/src/volume/extract.ts +11 -5
- package/src/volume/inspection.ts +3 -0
- package/src/volume/passes.ts +95 -8
- package/src/volume/resources.ts +2 -1
- package/src/volume/temporal.ts +11 -0
- package/dist/chunk-4NNZQCL3.mjs.map +0 -1
- package/dist/chunk-6TFBXLRJ.mjs.map +0 -1
- package/dist/chunk-DRR7D3KX.mjs.map +0 -1
- package/dist/chunk-GWCEMDVR.mjs.map +0 -1
- package/dist/chunk-JCIRYQ4V.mjs.map +0 -1
- package/dist/chunk-JRIPCMYC.mjs.map +0 -1
- package/dist/chunk-LULCA3OF.mjs +0 -1713
- package/dist/chunk-LULCA3OF.mjs.map +0 -1
- package/dist/chunk-PA5DRJNI.mjs.map +0 -1
|
@@ -8,6 +8,7 @@ const signature: VolumeTemporalSignature = {
|
|
|
8
8
|
densityGeneration: 3,
|
|
9
9
|
width: 1280,
|
|
10
10
|
height: 720,
|
|
11
|
+
worldTimeSeconds: 4,
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
describe('volumetric fog temporal contract', () => {
|
|
@@ -23,11 +24,37 @@ describe('volumetric fog temporal contract', () => {
|
|
|
23
24
|
['fog-revision', { ...signature, fogRevision: 3 }],
|
|
24
25
|
['light-revision', { ...signature, lightRevision: 8 }],
|
|
25
26
|
['density-generation', { ...signature, densityGeneration: 4 }],
|
|
27
|
+
['simulation-time', { ...signature, worldTimeSeconds: 4.5 }],
|
|
26
28
|
['resize', { ...signature, width: 640, height: 360 }],
|
|
27
29
|
] as const)('resets history for %s', (reason, next) => {
|
|
28
30
|
expect(resolveVolumeTemporalReset(signature, next)).toEqual({ reset: true, reason });
|
|
29
31
|
});
|
|
30
32
|
|
|
33
|
+
it.each([1 / 144, 1 / 60, 1 / 30, 1 / 15])('retains animated history at dt=%s', (delta) => {
|
|
34
|
+
expect(
|
|
35
|
+
resolveVolumeTemporalReset(signature, { ...signature, worldTimeSeconds: 4 + delta }),
|
|
36
|
+
).toEqual({ reset: false });
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it.each([3.9, 4.101, NaN, Infinity])('rejects discontinuous time %s', (worldTimeSeconds) => {
|
|
40
|
+
expect(resolveVolumeTemporalReset(signature, { ...signature, worldTimeSeconds })).toEqual({
|
|
41
|
+
reset: true,
|
|
42
|
+
reason: 'simulation-time',
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('rejects changed clock availability', () => {
|
|
47
|
+
const { worldTimeSeconds: _time, ...withoutTime } = signature;
|
|
48
|
+
expect(resolveVolumeTemporalReset(signature, withoutTime)).toEqual({
|
|
49
|
+
reset: true,
|
|
50
|
+
reason: 'simulation-time',
|
|
51
|
+
});
|
|
52
|
+
expect(resolveVolumeTemporalReset(withoutTime, signature)).toEqual({
|
|
53
|
+
reset: true,
|
|
54
|
+
reason: 'simulation-time',
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
31
58
|
it('rejects out-of-screen reprojection and depth discontinuity without NaN', () => {
|
|
32
59
|
expect(
|
|
33
60
|
resolveVolumeTemporalReset(signature, signature, { reprojection: 'out-of-screen' }),
|
|
@@ -8,6 +8,10 @@ const pipelineSource = readFileSync(
|
|
|
8
8
|
fileURLToPath(new URL('../pipeline/standard-pipeline.ts', import.meta.url)),
|
|
9
9
|
'utf8',
|
|
10
10
|
);
|
|
11
|
+
const forwardPipelineSource = readFileSync(
|
|
12
|
+
fileURLToPath(new URL('../pipeline/standard-forward-lane.ts', import.meta.url)),
|
|
13
|
+
'utf8',
|
|
14
|
+
);
|
|
11
15
|
const shaderSource = (name: string): string =>
|
|
12
16
|
readFileSync(
|
|
13
17
|
fileURLToPath(new URL(`../../../shader/src/volume/${name}`, import.meta.url)),
|
|
@@ -34,17 +38,16 @@ describe('volumetric fog RenderGraph topology', () => {
|
|
|
34
38
|
expect(composite).toContain('abs(neighbor.a - center.a) * 6.0');
|
|
35
39
|
});
|
|
36
40
|
|
|
37
|
-
it('
|
|
41
|
+
it('integrates the ray independently of packed visibility depth', () => {
|
|
38
42
|
const integrate = shaderSource('volume-integrate.wgsl');
|
|
39
|
-
expect(integrate).toContain('let ray_step_count = visibility_depth;');
|
|
40
43
|
expect(integrate).toContain('for (var step = 0u; step < ray_step_count; step = step + 1u)');
|
|
41
|
-
expect(integrate).toContain('let visibility_depth = max(
|
|
44
|
+
expect(integrate).toContain('let visibility_depth = max(owner_layers * 4u, 1u);');
|
|
42
45
|
});
|
|
43
46
|
|
|
44
47
|
it('keeps the Beer-Lambert extinction input physically non-negative', () => {
|
|
45
48
|
const integrate = shaderSource('volume-integrate.wgsl');
|
|
46
49
|
expect(integrate).toContain(
|
|
47
|
-
'let density_value = max(volume_scattering_density(world_position), 0.0);',
|
|
50
|
+
'let density_value = max(volume_scattering_density(world_position, volume_params.simulation.x), 0.0);',
|
|
48
51
|
);
|
|
49
52
|
});
|
|
50
53
|
|
|
@@ -114,6 +117,15 @@ describe('volumetric fog RenderGraph topology', () => {
|
|
|
114
117
|
);
|
|
115
118
|
});
|
|
116
119
|
|
|
120
|
+
it('keeps mesh CSM visibility on the shared volume owner in both Standard lanes', () => {
|
|
121
|
+
for (const source of [pipelineSource, forwardPipelineSource]) {
|
|
122
|
+
expect(source).toContain('addAuthoredVolumetricFogPasses');
|
|
123
|
+
expect(source).toContain('shadows.value.directional?.view');
|
|
124
|
+
}
|
|
125
|
+
expect(shaderSource('volume-inject.wgsl')).toContain('fn volume_cascade');
|
|
126
|
+
expect(shaderSource('volume-inject.wgsl')).toContain('sample_shadow_2d_kernel');
|
|
127
|
+
});
|
|
128
|
+
|
|
117
129
|
it('encodes real volume work and non-constant optical semantics', () => {
|
|
118
130
|
const passes = readFileSync(
|
|
119
131
|
fileURLToPath(new URL('../volume/passes.ts', import.meta.url)),
|
|
@@ -132,7 +144,7 @@ describe('volumetric fog RenderGraph topology', () => {
|
|
|
132
144
|
expect(shaderSource('volume-inject.wgsl')).not.toContain('textureSampleLevel(density');
|
|
133
145
|
expect(shaderSource('volume-inject.wgsl')).not.toContain('stratified32');
|
|
134
146
|
expect(shaderSource('volume-inject.wgsl')).not.toContain('dither_unorm8');
|
|
135
|
-
expect(shaderSource('volume-integrate.wgsl')).toContain('exp(-
|
|
147
|
+
expect(shaderSource('volume-integrate.wgsl')).toContain('exp(-extinction * sample_length)');
|
|
136
148
|
expect(shaderSource('volume-integrate.wgsl')).toContain('textureSampleLevel(froxel');
|
|
137
149
|
expect(shaderSource('volume-integrate.wgsl')).toContain('textureStore(resolved');
|
|
138
150
|
expect(shaderSource('volume-temporal.wgsl')).toContain('var lower');
|
|
@@ -182,6 +194,12 @@ describe('volumetric fog RenderGraph topology', () => {
|
|
|
182
194
|
expect(frameSource).toContain('volumetricFogHistorySlot');
|
|
183
195
|
expect(frameSource).toContain('volumetricFogHistorySignature');
|
|
184
196
|
expect(frameSource).toContain('activeVolumetricFogSignature');
|
|
197
|
+
expect(
|
|
198
|
+
readFileSync(fileURLToPath(new URL('../record/volume-params.ts', import.meta.url)), 'utf8'),
|
|
199
|
+
).toContain('params[32] = fog.worldTimeSeconds ?? 0');
|
|
200
|
+
expect(
|
|
201
|
+
readFileSync(fileURLToPath(new URL('../volume/temporal.ts', import.meta.url)), 'utf8'),
|
|
202
|
+
).toContain("reason: 'simulation-time'");
|
|
185
203
|
});
|
|
186
204
|
|
|
187
205
|
it('advances temporal history only after the accepted queue submit', () => {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RenderSystem } from '../render-system';
|
|
2
|
+
|
|
3
|
+
export function registerAnalyticFogPostProcess(
|
|
4
|
+
renderSystem: Pick<RenderSystem, 'registerBuiltinPostProcess'>,
|
|
5
|
+
source: string,
|
|
6
|
+
candidate: boolean,
|
|
7
|
+
): void {
|
|
8
|
+
if (candidate) return;
|
|
9
|
+
renderSystem.registerBuiltinPostProcess('forgeax.analytic-fog', {
|
|
10
|
+
source,
|
|
11
|
+
params: { byteSize: 112, defaultValue: new Uint8Array(112) },
|
|
12
|
+
reads: ['scene-color', { key: 'scene-depth', sampleType: 'depth' }],
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -60,6 +60,36 @@ export interface RhiBackendPack {
|
|
|
60
60
|
readonly instrumentation?: RhiBackendInstrumentation;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
/** Project a backend module into the Render-owned injected pack contract. */
|
|
64
|
+
export function loadRhiPack(
|
|
65
|
+
mod: Record<string, unknown>,
|
|
66
|
+
instrumentation?: RhiBackendPack['instrumentation'],
|
|
67
|
+
): RhiBackendPack {
|
|
68
|
+
const rhi = mod.rhi as unknown as RhiBackendPack['rhi'];
|
|
69
|
+
const createShaderModule = mod.createShaderModule as
|
|
70
|
+
| RhiBackendPack['createShaderModule']
|
|
71
|
+
| undefined;
|
|
72
|
+
const createShaderModuleImmediate = mod.createShaderModuleImmediate as
|
|
73
|
+
| RhiBackendPack['createShaderModuleImmediate']
|
|
74
|
+
| undefined;
|
|
75
|
+
const translateErrorEventToRhiError = mod.translateErrorEventToRhiError as
|
|
76
|
+
| RhiBackendPack['translateErrorEventToRhiError']
|
|
77
|
+
| undefined;
|
|
78
|
+
const backendHandleAccessor = mod._internal_getRawDevice as unknown as
|
|
79
|
+
| RhiBackendPack['_internal_getRawDevice']
|
|
80
|
+
| undefined;
|
|
81
|
+
return {
|
|
82
|
+
rhi,
|
|
83
|
+
...(createShaderModule === undefined ? {} : { createShaderModule }),
|
|
84
|
+
...(createShaderModuleImmediate === undefined ? {} : { createShaderModuleImmediate }),
|
|
85
|
+
...(translateErrorEventToRhiError === undefined ? {} : { translateErrorEventToRhiError }),
|
|
86
|
+
...(backendHandleAccessor === undefined
|
|
87
|
+
? {}
|
|
88
|
+
: { _internal_getRawDevice: backendHandleAccessor }),
|
|
89
|
+
...(instrumentation === undefined ? {} : { instrumentation }),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
63
93
|
export interface EngineEnvironmentErrorDetail {
|
|
64
94
|
readonly webgpuError?: RhiError | Error | undefined;
|
|
65
95
|
readonly wgpuError?: RhiError | Error | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BarrelDistortionInspection } from '../inspection-types';
|
|
2
|
+
import { projectBarrelDistortionInspection } from '../inspection-types';
|
|
3
|
+
|
|
4
|
+
export function inspectBarrelDistortion(
|
|
5
|
+
disposed: boolean,
|
|
6
|
+
deviceLost: boolean,
|
|
7
|
+
surfaceReleased: boolean,
|
|
8
|
+
frameId: number,
|
|
9
|
+
deviceGeneration: number,
|
|
10
|
+
inspection: BarrelDistortionInspection,
|
|
11
|
+
): BarrelDistortionInspection {
|
|
12
|
+
if (disposed || deviceLost || surfaceReleased) {
|
|
13
|
+
return projectBarrelDistortionInspection({
|
|
14
|
+
effectiveMapping: undefined,
|
|
15
|
+
frameId,
|
|
16
|
+
deviceGeneration,
|
|
17
|
+
graphGeneration: 0,
|
|
18
|
+
lastKnownGood: false,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return projectBarrelDistortionInspection({ ...inspection, frameId });
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RhiError } from '@forgeax/engine-rhi';
|
|
2
|
+
|
|
3
|
+
export function rejectZeroCanvasSize(width: number, height: number): RhiError | undefined {
|
|
4
|
+
return width > 0 && height > 0
|
|
5
|
+
? undefined
|
|
6
|
+
: new RhiError({
|
|
7
|
+
code: 'rhi-not-available',
|
|
8
|
+
expected: 'canvas drawing buffer has positive width and height before drawing',
|
|
9
|
+
hint: 'restore a positive canvas width and height before retrying renderer.draw',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MaterialShaderManifestEntry } from '@forgeax/engine-shader';
|
|
2
|
+
import type { ManifestEntry } from '@forgeax/engine-types';
|
|
3
|
+
|
|
4
|
+
/** Keep the cloud-shadow shader and View layout on one capability branch. */
|
|
5
|
+
function hasCloudShadowViewBindings(wgsl: string): boolean {
|
|
6
|
+
return /@group\(0\)\s*@binding\((?:16|17)\)\s/.test(wgsl);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function selectCloudShadowCompatibleEntry(
|
|
10
|
+
entry: ManifestEntry,
|
|
11
|
+
materialEntry: MaterialShaderManifestEntry | undefined,
|
|
12
|
+
projectorAvailable: boolean,
|
|
13
|
+
): ManifestEntry {
|
|
14
|
+
if (projectorAvailable || !hasCloudShadowViewBindings(entry.wgsl)) return entry;
|
|
15
|
+
const fallback = materialEntry?.variants.find(
|
|
16
|
+
(variant) =>
|
|
17
|
+
(!('PROJECTOR_AVAILABLE' in variant.defines) ||
|
|
18
|
+
variant.defines.PROJECTOR_AVAILABLE === false) &&
|
|
19
|
+
!hasCloudShadowViewBindings(variant.composedWgsl),
|
|
20
|
+
);
|
|
21
|
+
return fallback === undefined ? entry : { ...entry, wgsl: fallback.composedWgsl };
|
|
22
|
+
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
type DynamicGeometryOrdering,
|
|
16
16
|
type DynamicGeometryPrepareInput,
|
|
17
17
|
type DynamicGeometryReceipt,
|
|
18
|
+
type DynamicGeometryRecordStageLane,
|
|
18
19
|
sameCandidateCredential,
|
|
19
20
|
} from '../dynamic-geometry';
|
|
20
21
|
|
|
@@ -191,11 +192,21 @@ export function createDynamicGeometryHost(options: {
|
|
|
191
192
|
readonly currentGeneration: () => number;
|
|
192
193
|
/** Renderer record-stage proof for the most recently submitted frame. */
|
|
193
194
|
readonly isConsumedByRenderFrame: (candidate: DynamicGeometryCandidate) => boolean;
|
|
195
|
+
/** Renderer-owned lane fact for the most recently submitted frame. */
|
|
196
|
+
readonly recordStageLane?: (
|
|
197
|
+
candidate: DynamicGeometryCandidate,
|
|
198
|
+
) => DynamicGeometryRecordStageLane | undefined;
|
|
194
199
|
/** Existing temporal owner discards the old surface history after an ECS swap. */
|
|
195
200
|
readonly onTopologyChanged?: () => void;
|
|
196
201
|
}): DynamicGeometryHostImplementation {
|
|
197
|
-
const {
|
|
198
|
-
|
|
202
|
+
const {
|
|
203
|
+
lifecycle,
|
|
204
|
+
attachedWorlds,
|
|
205
|
+
getGpuStore,
|
|
206
|
+
currentGeneration,
|
|
207
|
+
isConsumedByRenderFrame,
|
|
208
|
+
recordStageLane = () => undefined,
|
|
209
|
+
} = options;
|
|
199
210
|
const hostCandidates = new Map<string, HostCandidateRecord>();
|
|
200
211
|
let observedGeneration = -1;
|
|
201
212
|
const releaseMeshLease = (record: HostCandidateRecord): DynamicGeometryError | undefined => {
|
|
@@ -858,44 +869,50 @@ export function createDynamicGeometryHost(options: {
|
|
|
858
869
|
// instead of silently producing zero receipts.
|
|
859
870
|
const publicationFixedStep = fixedStep ?? worldFixedStep;
|
|
860
871
|
receipts.push(
|
|
861
|
-
...lifecycle.publishFrame(
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
!
|
|
868
|
-
|
|
869
|
-
meshHandleOf(candidateWorld, candidate.entity) !== candidate.meshHandle ||
|
|
870
|
-
!hasMaterialIdentity(
|
|
871
|
-
candidateWorld,
|
|
872
|
-
candidate.entity,
|
|
873
|
-
candidate.mesh,
|
|
874
|
-
candidate.materialIdentity,
|
|
875
|
-
)
|
|
876
|
-
)
|
|
877
|
-
return false;
|
|
878
|
-
if (!isConsumedByRenderFrame(candidate)) return false;
|
|
879
|
-
const actualFixedStep = fixedStep ?? worldFixedStep;
|
|
880
|
-
if (candidate.fixedStep === undefined || actualFixedStep === undefined) return false;
|
|
881
|
-
// RenderFrameInput.fixedStep is an assertion from the host, not a
|
|
882
|
-
// second clock. It may name a later World tick in a multi-fixed-step
|
|
883
|
-
// host frame, but it cannot manufacture a step the attached World
|
|
884
|
-
// has not actually published. An explicit mismatch remains a hard
|
|
885
|
-
// rejection; omission uses the World-derived value above.
|
|
886
|
-
if (worldFixedStep !== actualFixedStep || actualFixedStep < candidate.fixedStep)
|
|
887
|
-
return false;
|
|
888
|
-
if (candidate.physicsEntity !== undefined) {
|
|
889
|
-
const publication = physicsPublicationOf(candidateWorld, candidate.physicsEntity);
|
|
872
|
+
...lifecycle.publishFrame(
|
|
873
|
+
frame,
|
|
874
|
+
[world],
|
|
875
|
+
publicationFixedStep,
|
|
876
|
+
(candidate) => {
|
|
877
|
+
const candidateWorld = candidate.world as World;
|
|
878
|
+
if (candidateWorld !== world || !attachedWorlds.has(candidateWorld)) return false;
|
|
879
|
+
const hostRecord = candidateRecord(candidate);
|
|
890
880
|
if (
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
881
|
+
hostRecord === undefined ||
|
|
882
|
+
!hostRecord.accepted ||
|
|
883
|
+
!hasRenderableBinding(candidateWorld, candidate.entity) ||
|
|
884
|
+
meshHandleOf(candidateWorld, candidate.entity) !== candidate.meshHandle ||
|
|
885
|
+
!hasMaterialIdentity(
|
|
886
|
+
candidateWorld,
|
|
887
|
+
candidate.entity,
|
|
888
|
+
candidate.mesh,
|
|
889
|
+
candidate.materialIdentity,
|
|
890
|
+
)
|
|
894
891
|
)
|
|
895
892
|
return false;
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
893
|
+
if (!isConsumedByRenderFrame(candidate)) return false;
|
|
894
|
+
const actualFixedStep = fixedStep ?? worldFixedStep;
|
|
895
|
+
if (candidate.fixedStep === undefined || actualFixedStep === undefined) return false;
|
|
896
|
+
// RenderFrameInput.fixedStep is an assertion from the host, not a
|
|
897
|
+
// second clock. It may name a later World tick in a multi-fixed-step
|
|
898
|
+
// host frame, but it cannot manufacture a step the attached World
|
|
899
|
+
// has not actually published. An explicit mismatch remains a hard
|
|
900
|
+
// rejection; omission uses the World-derived value above.
|
|
901
|
+
if (worldFixedStep !== actualFixedStep || actualFixedStep < candidate.fixedStep)
|
|
902
|
+
return false;
|
|
903
|
+
if (candidate.physicsEntity !== undefined) {
|
|
904
|
+
const publication = physicsPublicationOf(candidateWorld, candidate.physicsEntity);
|
|
905
|
+
if (
|
|
906
|
+
publication === undefined ||
|
|
907
|
+
publication.fixedStep < candidate.fixedStep ||
|
|
908
|
+
publication.revision !== candidate.revision
|
|
909
|
+
)
|
|
910
|
+
return false;
|
|
911
|
+
}
|
|
912
|
+
return true;
|
|
913
|
+
},
|
|
914
|
+
recordStageLane,
|
|
915
|
+
),
|
|
899
916
|
);
|
|
900
917
|
}
|
|
901
918
|
for (const receipt of receipts) {
|
|
@@ -931,6 +948,11 @@ export function createRendererDynamicGeometryHost(options: {
|
|
|
931
948
|
entity: number,
|
|
932
949
|
meshHandle: DynamicGeometryCandidate['meshHandle'],
|
|
933
950
|
) => boolean;
|
|
951
|
+
readonly dynamicGeometryRecordStageLane: (
|
|
952
|
+
world: World,
|
|
953
|
+
entity: number,
|
|
954
|
+
meshHandle: DynamicGeometryCandidate['meshHandle'],
|
|
955
|
+
) => DynamicGeometryRecordStageLane | undefined;
|
|
934
956
|
};
|
|
935
957
|
}): DynamicGeometryHostImplementation {
|
|
936
958
|
const { renderSystem, ...hostOptions } = options;
|
|
@@ -943,6 +965,12 @@ export function createRendererDynamicGeometryHost(options: {
|
|
|
943
965
|
candidate.entity ?? -1,
|
|
944
966
|
candidate.meshHandle,
|
|
945
967
|
),
|
|
968
|
+
recordStageLane: (candidate) =>
|
|
969
|
+
renderSystem.dynamicGeometryRecordStageLane(
|
|
970
|
+
candidate.world as World,
|
|
971
|
+
candidate.entity ?? -1,
|
|
972
|
+
candidate.meshHandle,
|
|
973
|
+
),
|
|
946
974
|
});
|
|
947
975
|
}
|
|
948
976
|
|
|
@@ -24,7 +24,7 @@ export function createDynamicGeometryRuntime(options: {
|
|
|
24
24
|
readonly currentGeneration: () => number;
|
|
25
25
|
readonly renderSystem: Pick<
|
|
26
26
|
RenderSystem,
|
|
27
|
-
'invalidateGeometryHistory' | 'isDynamicGeometryConsumed'
|
|
27
|
+
'invalidateGeometryHistory' | 'isDynamicGeometryConsumed' | 'dynamicGeometryRecordStageLane'
|
|
28
28
|
>;
|
|
29
29
|
}): DynamicGeometryRuntime {
|
|
30
30
|
const lifecycle = createDynamicGeometryLifecycle();
|
|
@@ -40,6 +40,12 @@ export function createDynamicGeometryRuntime(options: {
|
|
|
40
40
|
candidate.entity ?? -1,
|
|
41
41
|
candidate.meshHandle,
|
|
42
42
|
),
|
|
43
|
+
recordStageLane: (candidate) =>
|
|
44
|
+
options.renderSystem.dynamicGeometryRecordStageLane(
|
|
45
|
+
candidate.world as World,
|
|
46
|
+
candidate.entity ?? -1,
|
|
47
|
+
candidate.meshHandle,
|
|
48
|
+
),
|
|
43
49
|
});
|
|
44
50
|
return { lifecycle, host };
|
|
45
51
|
}
|
package/src/assembly/factory.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// and frame work live in webgpu-renderer.ts.
|
|
4
4
|
|
|
5
5
|
import type { RendererOptions } from '../render-contract';
|
|
6
|
-
import { EngineEnvironmentError, type RhiBackendPack } from './backend-contract';
|
|
6
|
+
import { EngineEnvironmentError, loadRhiPack, type RhiBackendPack } from './backend-contract';
|
|
7
7
|
import type { BundlerOptions } from './bundler-contract';
|
|
8
8
|
import type { RendererAssemblyImplementation } from './host-contract';
|
|
9
9
|
import { toError } from './renderer-facade';
|
|
@@ -80,6 +80,7 @@ export {
|
|
|
80
80
|
selectSkinPrewarmVariants,
|
|
81
81
|
selectStandardPbrTransmissionPrewarmVariants,
|
|
82
82
|
shouldDeferMissingPreparedMaterialShader,
|
|
83
|
+
stripCloudShadowBindingsForLowLimit,
|
|
83
84
|
} from './webgpu-renderer';
|
|
84
85
|
|
|
85
86
|
const GPU_ENVIRONMENT_ERROR_CODES = new Set([
|
|
@@ -104,35 +105,6 @@ function classifyEnvErrorReason(
|
|
|
104
105
|
: `engine init failed (${name})`;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
function loadRhiPack(
|
|
108
|
-
mod: Record<string, unknown>,
|
|
109
|
-
instrumentation?: RhiBackendPack['instrumentation'],
|
|
110
|
-
): RhiBackendPack {
|
|
111
|
-
const rhi = mod.rhi as unknown as RhiBackendPack['rhi'];
|
|
112
|
-
const createShaderModule = mod.createShaderModule as
|
|
113
|
-
| RhiBackendPack['createShaderModule']
|
|
114
|
-
| undefined;
|
|
115
|
-
const createShaderModuleImmediate = mod.createShaderModuleImmediate as
|
|
116
|
-
| RhiBackendPack['createShaderModuleImmediate']
|
|
117
|
-
| undefined;
|
|
118
|
-
const translateErrorEventToRhiError = mod.translateErrorEventToRhiError as
|
|
119
|
-
| RhiBackendPack['translateErrorEventToRhiError']
|
|
120
|
-
| undefined;
|
|
121
|
-
const backendHandleAccessor = mod._internal_getRawDevice as unknown as
|
|
122
|
-
| RhiBackendPack['_internal_getRawDevice']
|
|
123
|
-
| undefined;
|
|
124
|
-
return {
|
|
125
|
-
rhi,
|
|
126
|
-
...(createShaderModule === undefined ? {} : { createShaderModule }),
|
|
127
|
-
...(createShaderModuleImmediate === undefined ? {} : { createShaderModuleImmediate }),
|
|
128
|
-
...(translateErrorEventToRhiError === undefined ? {} : { translateErrorEventToRhiError }),
|
|
129
|
-
...(backendHandleAccessor === undefined
|
|
130
|
-
? {}
|
|
131
|
-
: { _internal_getRawDevice: backendHandleAccessor }),
|
|
132
|
-
...(instrumentation === undefined ? {} : { instrumentation }),
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
108
|
/** Build a renderer after selecting the host-supplied backend pack. */
|
|
137
109
|
export async function createRenderer(
|
|
138
110
|
canvas: unknown,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FXAA_POST_PROCESS_ID } from '../render-contract';
|
|
2
|
+
import type { RenderSystem } from '../render-system';
|
|
3
|
+
|
|
4
|
+
/** Register the built-in FXAA post-process once for the active generation. */
|
|
5
|
+
export function registerFxaaPostProcess(
|
|
6
|
+
renderSystem: Pick<RenderSystem, 'registerBuiltinPostProcess'>,
|
|
7
|
+
source: string,
|
|
8
|
+
registered: boolean,
|
|
9
|
+
): boolean {
|
|
10
|
+
if (registered) return true;
|
|
11
|
+
renderSystem.registerBuiltinPostProcess(FXAA_POST_PROCESS_ID, {
|
|
12
|
+
source,
|
|
13
|
+
params: { byteSize: 16, defaultValue: new Uint8Array(16) },
|
|
14
|
+
reads: ['ldrColor'],
|
|
15
|
+
});
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
@@ -13,7 +13,6 @@ import type { RecoverFailure } from '../errors/recover';
|
|
|
13
13
|
import type { ObservationUnavailableError, RenderError } from '../errors/render';
|
|
14
14
|
import type { RenderFeature, RenderFeatureDiagnostics } from '../features/types';
|
|
15
15
|
import type { GpuDrivenProductionInspection, LodOcclusionInspection } from '../inspection-types';
|
|
16
|
-
import type { InstanceCollectionStore } from '../instances';
|
|
17
16
|
import type { MeshMaterialBindingObservation } from '../mesh-material-bindings';
|
|
18
17
|
import type { FrameObservation, FrameObservationOptions } from '../record/frame';
|
|
19
18
|
import type { CurrentGraphTarget, GraphTargetCaptureRequest } from '../record/frame-snapshot';
|
|
@@ -35,6 +34,7 @@ import type {
|
|
|
35
34
|
} from '../render-contract';
|
|
36
35
|
import type { RenderSceneInspection } from '../render-system';
|
|
37
36
|
import type { RenderSceneBounds } from '../scene/render-scene-types';
|
|
37
|
+
import type { SurfaceDynamicInputFrame } from '../surface/dynamic-input';
|
|
38
38
|
import type {
|
|
39
39
|
RenderTarget,
|
|
40
40
|
RenderTargetDescriptor,
|
|
@@ -62,8 +62,8 @@ export type RendererHostEventListener = (event: RendererHostEvent) => void;
|
|
|
62
62
|
* the public Renderer type.
|
|
63
63
|
*/
|
|
64
64
|
export interface RendererHostImplementation {
|
|
65
|
-
/**
|
|
66
|
-
|
|
65
|
+
/** Publish one renderer-owned read-only Surface dynamic page for the next frame. */
|
|
66
|
+
setSurfaceDynamicInput(frame: SurfaceDynamicInputFrame | undefined): void;
|
|
67
67
|
attach(world: World): RenderResult<RenderWorldLease, RenderError>;
|
|
68
68
|
prepareDynamicGeometry(
|
|
69
69
|
input: DynamicGeometryPrepareInput,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FrameReceipt } from '../render-contract';
|
|
2
|
+
import type { RenderSystem } from '../render-system';
|
|
3
|
+
|
|
4
|
+
export function observeLodOcclusionForReceipt(
|
|
5
|
+
renderSystem: Pick<RenderSystem, 'observeLodOcclusion'>,
|
|
6
|
+
receipt: Pick<FrameReceipt, 'frameId' | 'deviceGeneration'>,
|
|
7
|
+
): Promise<void> {
|
|
8
|
+
return renderSystem.observeLodOcclusion({
|
|
9
|
+
frameId: receipt.frameId,
|
|
10
|
+
deviceGeneration: receipt.deviceGeneration,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -245,7 +245,17 @@ function selectPublishedVariant(
|
|
|
245
245
|
withColor = withColor.filter((variant) => variant.defines.COVERAGE_ONLY !== true);
|
|
246
246
|
}
|
|
247
247
|
if (options.variantSet !== undefined) {
|
|
248
|
-
|
|
248
|
+
const requestedAxes = new Map(
|
|
249
|
+
options.variantSet.length === 0
|
|
250
|
+
? []
|
|
251
|
+
: options.variantSet.split('+').map((entry) => {
|
|
252
|
+
const [name, value] = entry.split('=');
|
|
253
|
+
return [name ?? '', value === 'true'] as const;
|
|
254
|
+
}),
|
|
255
|
+
);
|
|
256
|
+
withColor = withColor.filter((variant) =>
|
|
257
|
+
[...requestedAxes].every(([name, value]) => variant.defines[name] === value),
|
|
258
|
+
);
|
|
249
259
|
}
|
|
250
260
|
// GPU-driven Standard owns the storage-backed scene-index variant. Prefer that exact family, then fall back to the closest variant
|
|
251
261
|
// carrying the requested COLOR_0 fact. This keeps the selection deterministic
|
|
@@ -296,12 +306,13 @@ export function resolveStandardPbrArtifact(
|
|
|
296
306
|
for (const lookupId of lookupIds) {
|
|
297
307
|
const lookup = shader.findMaterialArtifact(lookupId);
|
|
298
308
|
if (!lookup.ok) continue;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
309
|
+
let manifestEntry: MaterialShaderManifestEntry | undefined;
|
|
310
|
+
for (const entry of shader.materialShaderManifestEntries?.() ?? []) {
|
|
311
|
+
if (entry.identifier === lookupId) {
|
|
312
|
+
manifestEntry = entry;
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
305
316
|
const selected =
|
|
306
317
|
manifestEntry === undefined || manifestEntry.variants.length === 0
|
|
307
318
|
? undefined
|
|
@@ -356,12 +367,13 @@ export function resolveMaterialShaderArtifact(
|
|
|
356
367
|
for (const lookupId of lookupIds) {
|
|
357
368
|
const lookup = shader.findMaterialArtifact(lookupId);
|
|
358
369
|
if (!lookup.ok) continue;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
370
|
+
let manifestEntry: MaterialShaderManifestEntry | undefined;
|
|
371
|
+
for (const entry of shader.materialShaderManifestEntries?.() ?? []) {
|
|
372
|
+
if (entry.identifier === lookupId) {
|
|
373
|
+
manifestEntry = entry;
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
365
377
|
let cache = publishedArtifacts.get(lookup.value);
|
|
366
378
|
if (cache === undefined || cache.manifest !== manifestEntry) {
|
|
367
379
|
cache = { manifest: manifestEntry, requests: new Map() };
|