@forgeax/engine-render 0.1.7 → 0.1.20
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 +140 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/assembly/backend-contract.d.ts +12 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -1
- package/dist/assembly/factory.d.ts +26 -5
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/host-contract.d.ts +4 -0
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/renderer-frame-transaction.d.ts +39 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -0
- package/dist/assembly/renderer-inspection.d.ts +22 -0
- package/dist/assembly/renderer-inspection.d.ts.map +1 -0
- package/dist/assembly/renderer-lifecycle.d.ts +4 -0
- package/dist/assembly/renderer-lifecycle.d.ts.map +1 -0
- package/dist/authoring.mjs +4 -2
- package/dist/authoring.mjs.map +1 -1
- package/dist/chunk-4XINDLAY.mjs +9404 -0
- package/dist/chunk-4XINDLAY.mjs.map +1 -0
- package/dist/chunk-CDTWTHZR.mjs +752 -0
- package/dist/chunk-CDTWTHZR.mjs.map +1 -0
- package/dist/chunk-FJ6P52EE.mjs +46 -0
- package/dist/chunk-FJ6P52EE.mjs.map +1 -0
- package/dist/chunk-JDWARUOI.mjs +44 -0
- package/dist/chunk-JDWARUOI.mjs.map +1 -0
- package/dist/chunk-M2MP4ZOU.mjs +73 -0
- package/dist/chunk-M2MP4ZOU.mjs.map +1 -0
- package/dist/chunk-PCHBPYML.mjs +385 -0
- package/dist/chunk-PCHBPYML.mjs.map +1 -0
- package/dist/chunk-RXZ3RGOU.mjs +53 -0
- package/dist/chunk-RXZ3RGOU.mjs.map +1 -0
- package/dist/{chunk-YEJIUW7D.mjs → chunk-TBQJOK2L.mjs} +356 -543
- package/dist/chunk-TBQJOK2L.mjs.map +1 -0
- package/dist/{chunk-CQXZC5XI.mjs → chunk-VFPLTKCU.mjs} +79 -69
- package/dist/chunk-VFPLTKCU.mjs.map +1 -0
- package/dist/components/atmosphere.d.ts +9 -0
- package/dist/components/atmosphere.d.ts.map +1 -0
- package/dist/components/camera.d.ts +2 -1
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/fog.d.ts +8 -0
- package/dist/components/fog.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/light-helpers.d.ts.map +1 -1
- package/dist/components/motion-blur.d.ts +7 -0
- package/dist/components/motion-blur.d.ts.map +1 -0
- package/dist/components/spot-light.d.ts +12 -0
- package/dist/components/spot-light.d.ts.map +1 -1
- package/dist/construct-renderer.d.ts +2 -2
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +11146 -14507
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/device-scope.d.ts +4 -0
- package/dist/device/device-scope.d.ts.map +1 -1
- package/dist/device/gpu-residency.d.ts +19 -2
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/environment/frame.d.ts +60 -0
- package/dist/environment/frame.d.ts.map +1 -0
- package/dist/environment/generation.d.ts +21 -0
- package/dist/environment/generation.d.ts.map +1 -0
- package/dist/environment/graph.d.ts +4 -0
- package/dist/environment/graph.d.ts.map +1 -0
- package/dist/environment/inspection.d.ts +48 -0
- package/dist/environment/inspection.d.ts.map +1 -0
- package/dist/environment/lifecycle.d.ts +39 -0
- package/dist/environment/lifecycle.d.ts.map +1 -0
- package/dist/environment/signature.d.ts +25 -0
- package/dist/environment/signature.d.ts.map +1 -0
- package/dist/errors/render.d.ts +204 -1
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/extract/camera.d.ts +5 -0
- package/dist/extract/camera.d.ts.map +1 -0
- package/dist/extract/environment.d.ts +74 -0
- package/dist/extract/environment.d.ts.map +1 -0
- package/dist/extract/visibility.d.ts +1 -1
- package/dist/extract/visibility.d.ts.map +1 -1
- package/dist/features/host.d.ts +9 -2
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/motion-blur/motion-blur-feature.d.ts +16 -0
- package/dist/features/motion-blur/motion-blur-feature.d.ts.map +1 -0
- package/dist/features/motion-blur/motion-blur-params.d.ts +25 -0
- package/dist/features/motion-blur/motion-blur-params.d.ts.map +1 -0
- package/dist/features/plan.d.ts +17 -2
- package/dist/features/plan.d.ts.map +1 -1
- package/dist/features/prepared-gpu-work.d.ts +3 -1
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/prepared-graphics.d.ts +2 -1
- package/dist/features/prepared-graphics.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +2 -1
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/targets.d.ts +3 -0
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +12 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +7 -1
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +2 -0
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/gpu-usage.d.ts +2 -0
- package/dist/gpu-usage.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +5 -6
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +24 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +43 -1
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.mjs +2 -0
- package/dist/light-buffer-layout.d.ts +20 -12
- package/dist/light-buffer-layout.d.ts.map +1 -1
- package/dist/materials.d.ts +22 -0
- package/dist/materials.d.ts.map +1 -1
- package/dist/pbr-pipeline.d.ts +16 -9
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-pipeline.d.ts +3 -0
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts +48 -0
- package/dist/pipeline/standard-post.d.ts.map +1 -0
- package/dist/pipeline/standard-profile.d.ts +12 -2
- package/dist/pipeline/standard-profile.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +18 -0
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/record/frame-lighting.d.ts +2 -0
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +137 -6
- 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 +6 -3
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/gpu-timing.d.ts +32 -0
- package/dist/record/gpu-timing.d.ts.map +1 -0
- package/dist/record/main-pass-geometry.d.ts +11 -0
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +9 -6
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +8 -1
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +2 -0
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +81 -19
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/skybox-post-pass.d.ts +1 -11
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +36 -4
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +4 -1
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/render-contract.d.ts +157 -8
- package/dist/render-contract.d.ts.map +1 -1
- package/dist/render-data.d.ts +10 -6
- package/dist/render-data.d.ts.map +1 -1
- package/dist/render-graph-primitives.d.ts.map +1 -1
- package/dist/render-pipeline.d.ts +86 -6
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +84 -8
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts +30 -5
- package/dist/render-system.d.ts.map +1 -1
- package/dist/renderer-inspect.d.ts +29 -0
- package/dist/renderer-inspect.d.ts.map +1 -0
- package/dist/scene/render-scene.d.ts +36 -2
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/temporal/coverage.d.ts +42 -0
- package/dist/temporal/coverage.d.ts.map +1 -0
- package/dist/temporal/frame-coordinator.d.ts +99 -0
- package/dist/temporal/frame-coordinator.d.ts.map +1 -0
- package/dist/temporal/frame.d.ts +44 -0
- package/dist/temporal/frame.d.ts.map +1 -0
- package/dist/temporal/gpu.d.ts +39 -0
- package/dist/temporal/gpu.d.ts.map +1 -0
- package/dist/temporal/history.d.ts +37 -0
- package/dist/temporal/history.d.ts.map +1 -0
- package/dist/temporal/index.d.ts +7 -0
- package/dist/temporal/index.d.ts.map +1 -0
- package/dist/temporal/index.mjs +8 -0
- package/dist/temporal/index.mjs.map +1 -0
- package/dist/temporal/inspection.d.ts +36 -0
- package/dist/temporal/inspection.d.ts.map +1 -0
- package/dist/temporal/scene-data-catalog.d.ts +48 -0
- package/dist/temporal/scene-data-catalog.d.ts.map +1 -0
- package/dist/temporal/scene-data.d.ts +43 -0
- package/dist/temporal/scene-data.d.ts.map +1 -0
- package/dist/temporal/standard-scene-data.d.ts +61 -0
- package/dist/temporal/standard-scene-data.d.ts.map +1 -0
- package/dist/temporal/taa-history-resources.d.ts +22 -0
- package/dist/temporal/taa-history-resources.d.ts.map +1 -0
- package/dist/temporal/taa-history-store.d.ts +27 -0
- package/dist/temporal/taa-history-store.d.ts.map +1 -0
- package/dist/temporal/taa-resolve.d.ts +15 -0
- package/dist/temporal/taa-resolve.d.ts.map +1 -0
- package/dist/temporal/temporal-view.d.ts +40 -0
- package/dist/temporal/temporal-view.d.ts.map +1 -0
- package/dist/temporal/transaction.d.ts +9 -0
- package/dist/temporal/transaction.d.ts.map +1 -0
- package/dist/temporal/view.d.ts +56 -0
- package/dist/temporal/view.d.ts.map +1 -0
- package/dist/transmission/backdrop.d.ts +147 -0
- package/dist/transmission/backdrop.d.ts.map +1 -0
- package/dist/transmission/inspection.d.ts +57 -0
- package/dist/transmission/inspection.d.ts.map +1 -0
- package/dist/transmission/oracle.d.ts +42 -0
- package/dist/transmission/oracle.d.ts.map +1 -0
- package/dist/transmission/projection.d.ts +37 -0
- package/dist/transmission/projection.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +30 -2
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/typed-shadow-atlas.d.ts +10 -0
- package/dist/typed-shadow-atlas.d.ts.map +1 -0
- package/dist/typed-shadow-passes.d.ts.map +1 -1
- package/dist/volume/capability.d.ts +57 -0
- package/dist/volume/capability.d.ts.map +1 -0
- package/dist/volume/component.d.ts +61 -0
- package/dist/volume/component.d.ts.map +1 -0
- package/dist/volume/extract.d.ts +11 -0
- package/dist/volume/extract.d.ts.map +1 -0
- package/dist/volume/inspection.d.ts +38 -0
- package/dist/volume/inspection.d.ts.map +1 -0
- package/dist/volume/passes.d.ts +38 -0
- package/dist/volume/passes.d.ts.map +1 -0
- package/dist/volume/recovery.d.ts +38 -0
- package/dist/volume/recovery.d.ts.map +1 -0
- package/dist/volume/resources.d.ts +57 -0
- package/dist/volume/resources.d.ts.map +1 -0
- package/dist/volume/temporal.d.ts +35 -0
- package/dist/volume/temporal.d.ts.map +1 -0
- package/package.json +24 -19
- package/src/__tests__/ai-user-cold-start.integration.test.ts +59 -0
- package/src/__tests__/ai-user-public-surface.test-d.ts +45 -0
- package/src/__tests__/bloom-exact-zero.unit.test.ts +202 -0
- package/src/__tests__/bloom-lifecycle.integration.test.ts +125 -0
- package/src/__tests__/construct-renderer-identity.unit.test.ts +4 -3
- package/src/__tests__/detached-inspection.integration.test.ts +177 -0
- package/src/__tests__/environment-fog-lanes.integration.test.ts +219 -0
- package/src/__tests__/environment-generation.integration.test.ts +141 -0
- package/src/__tests__/environment-selection.unit.test.ts +245 -0
- package/src/__tests__/factory-contract.integration.test.ts +1380 -9
- package/src/__tests__/frame-plan-contract.unit.test.ts +90 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +7 -0
- package/src/__tests__/gpu-driven-production.integration.test.ts +74 -22
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +37 -0
- package/src/__tests__/gpu-scene.unit.test.ts +10 -0
- package/src/__tests__/injection-kind-owner.test-d.ts +2 -1
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +14 -14
- package/src/__tests__/material-contract-inventory.unit.test.ts +62 -0
- package/src/__tests__/material-cooked-projection.unit.test.ts +18 -146
- package/src/__tests__/materials-transmission-validation.unit.test.ts +36 -0
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +1 -1
- package/src/__tests__/morph-feature-plan.unit.test.ts +7 -0
- package/src/__tests__/motion-blur.pixel.integration.test.ts +121 -0
- package/src/__tests__/public-surface.test-d.ts +15 -1
- package/src/__tests__/render-error-code-owner.test-d.ts +14 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +11 -2
- package/src/__tests__/render-error-exhaustive.test-d.ts +3 -0
- package/src/__tests__/render-feature-errors.unit.test.ts +33 -3
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +44 -0
- package/src/__tests__/render-feature-plan.test-d.ts +22 -89
- package/src/__tests__/render-scene-projection.unit.test.ts +28 -0
- package/src/__tests__/render-temporal-environment-consumer.browser.test.ts +26 -0
- package/src/__tests__/render-temporal-environment-consumer.dawn.test.ts +21 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +423 -1
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +405 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +22 -0
- package/src/__tests__/scene-data-catalog.unit.test.ts +59 -0
- package/src/__tests__/scene-data-consumer.integration.test.ts +67 -0
- package/src/__tests__/scene-data-contract.test-d.ts +35 -0
- package/src/__tests__/scene-data-inspection.unit.test.ts +41 -0
- package/src/__tests__/scene-data-public-surface.test-d.ts +34 -0
- package/src/__tests__/shader-manifest-fixture.ts +111 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +123 -0
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +24 -3
- package/src/__tests__/standard-pipeline.dawn.test.ts +15 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +543 -1
- package/src/__tests__/standard-profile-oracle.unit.test.ts +12 -2
- package/src/__tests__/standard-temporal-producer.integration.test.ts +35 -0
- package/src/__tests__/surface-configuration.unit.test.ts +211 -12
- package/src/__tests__/taa-transaction.integration.test.ts +30 -0
- package/src/__tests__/temporal-admission.integration.test.ts +40 -0
- package/src/__tests__/temporal-coverage.unit.test.ts +35 -0
- package/src/__tests__/temporal-demand.unit.test.ts +44 -0
- package/src/__tests__/temporal-frame-coordinator.unit.test.ts +64 -0
- package/src/__tests__/temporal-graph-topology.unit.test.ts +51 -0
- package/src/__tests__/temporal-history-lifecycle.unit.test.ts +170 -0
- package/src/__tests__/temporal-performance.integration.test.ts +615 -0
- package/src/__tests__/temporal-reset-matrix.unit.test.ts +97 -0
- package/src/__tests__/temporal-transaction.integration.test.ts +60 -0
- package/src/__tests__/temporal-view.unit.test.ts +152 -0
- package/src/__tests__/transmission-prewarm.unit.test.ts +93 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +230 -1
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +25 -1
- package/src/__tests__/urp-pipeline.unit.test.ts +4 -3
- package/src/__tests__/visibility-extract.integration.test.ts +27 -1
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +10 -0
- package/src/__tests__/volume-optics-oracle.unit.test.ts +85 -0
- package/src/__tests__/volumetric-fog-budget-recovery.integration.test.ts +655 -0
- package/src/__tests__/volumetric-fog-component.unit.test.ts +71 -0
- package/src/__tests__/volumetric-fog-composite-stage-readback.dawn.test.ts +376 -0
- package/src/__tests__/volumetric-fog-errors.unit.test.ts +51 -0
- package/src/__tests__/volumetric-fog-inspection.unit.test.ts +77 -0
- package/src/__tests__/volumetric-fog-light-capability.unit.test.ts +19 -0
- package/src/__tests__/volumetric-fog-light-consumers.integration.test.ts +18 -0
- package/src/__tests__/volumetric-fog-light-errors.unit.test.ts +17 -0
- package/src/__tests__/volumetric-fog-light-topology.unit.test.ts +21 -0
- package/src/__tests__/volumetric-fog-light-transaction.integration.test.ts +53 -0
- package/src/__tests__/volumetric-fog-m9-watcher.integration.test.ts +27 -0
- package/src/__tests__/volumetric-fog-point-light-owner.integration.test.ts +44 -0
- package/src/__tests__/volumetric-fog-point-spot-accumulation.integration.test.ts +49 -0
- package/src/__tests__/volumetric-fog-point-spot-contract.unit.test.ts +28 -0
- package/src/__tests__/volumetric-fog-point-spot-lkg.integration.test.ts +65 -0
- package/src/__tests__/volumetric-fog-point-spot-selection.integration.test.ts +49 -0
- package/src/__tests__/volumetric-fog-point-spot-temporal.unit.test.ts +55 -0
- package/src/__tests__/volumetric-fog-projector-contract.unit.test.ts +22 -0
- package/src/__tests__/volumetric-fog-projector-inspection.unit.test.ts +12 -0
- package/src/__tests__/volumetric-fog-projector-surface-volume.integration.test.ts +11 -0
- package/src/__tests__/volumetric-fog-projector-transaction.integration.test.ts +26 -0
- package/src/__tests__/volumetric-fog-recovery.integration.test.ts +47 -0
- package/src/__tests__/volumetric-fog-selected-light-resolution.integration.test.ts +63 -0
- package/src/__tests__/volumetric-fog-spot-closure.integration.test.ts +26 -0
- package/src/__tests__/volumetric-fog-spot-contract.test-d.ts +21 -0
- package/src/__tests__/volumetric-fog-spot-contract.unit.test.ts +27 -0
- package/src/__tests__/volumetric-fog-spot-frame-optics.integration.test.ts +14 -0
- package/src/__tests__/volumetric-fog-spot-optics.integration.test.ts +29 -0
- package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +550 -0
- package/src/__tests__/volumetric-fog-temporal-selected-light.unit.test.ts +33 -0
- package/src/__tests__/volumetric-fog-temporal.unit.test.ts +45 -0
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +237 -0
- package/src/__tests__/volumetric-fog-transparent.integration.test.ts +27 -0
- package/src/assembly/backend-contract.ts +47 -1
- package/src/assembly/factory.ts +1480 -505
- package/src/assembly/host-contract.ts +4 -0
- package/src/assembly/renderer-frame-transaction.ts +75 -0
- package/src/assembly/renderer-inspection.ts +112 -0
- package/src/assembly/renderer-lifecycle.ts +6 -0
- package/src/components/__tests__/motion-blur.unit.test.ts +14 -0
- package/src/components/__tests__/schema-contract.unit.test.ts +6 -1
- package/src/components/atmosphere.ts +10 -0
- package/src/components/camera.ts +2 -1
- package/src/components/fog.ts +9 -0
- package/src/components/index.ts +3 -0
- package/src/components/light-helpers.ts +4 -0
- package/src/components/motion-blur.ts +8 -0
- package/src/components/spot-light.ts +22 -3
- package/src/construct-renderer.ts +40 -3
- package/src/device/device-scope.ts +15 -1
- package/src/device/gpu-residency.ts +168 -58
- package/src/environment/frame.ts +185 -0
- package/src/environment/generation.ts +23 -0
- package/src/environment/graph.ts +9 -0
- package/src/environment/inspection.ts +87 -0
- package/src/environment/lifecycle.ts +250 -0
- package/src/environment/signature.ts +55 -0
- package/src/errors/render.ts +404 -1
- package/src/extract/camera.ts +78 -0
- package/src/extract/environment.ts +171 -0
- package/src/extract/visibility.ts +38 -19
- package/src/features/host.ts +36 -5
- package/src/features/motion-blur/__tests__/motion-blur-feature.unit.test.ts +67 -0
- package/src/features/motion-blur/__tests__/motion-blur-params.unit.test.ts +53 -0
- package/src/features/motion-blur/motion-blur-feature.ts +119 -0
- package/src/features/motion-blur/motion-blur-params.ts +89 -0
- package/src/features/plan.ts +32 -3
- package/src/features/prepared-gpu-work.ts +21 -6
- package/src/features/prepared-graphics.ts +2 -1
- package/src/features/render-graph-raster.ts +2 -1
- package/src/features/targets.ts +24 -2
- package/src/features/types.ts +13 -0
- package/src/fullscreen-post-process-pass.ts +34 -4
- package/src/gpu-scene.ts +24 -0
- package/src/gpu-usage.ts +2 -0
- package/src/ibl/skylight-bind-group.ts +30 -38
- package/src/index.ts +104 -7
- package/src/inspection-types.ts +48 -0
- package/src/internal.ts +5 -0
- package/src/light-buffer-layout.ts +59 -26
- package/src/materials.ts +119 -24
- package/src/pbr-pipeline.ts +91 -29
- package/src/pipeline/standard-forward-lane.ts +178 -101
- package/src/pipeline/standard-pipeline.ts +176 -105
- package/src/pipeline/standard-post.ts +373 -0
- package/src/pipeline/standard-profile.ts +26 -3
- package/src/pipeline-builder.ts +102 -12
- package/src/pipeline-spec.ts +9 -0
- package/src/plugin.ts +2 -0
- package/src/record/__tests__/fullscreen-temporal-routing.unit.test.ts +25 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +47 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +12 -1
- package/src/record/__tests__/material-pipeline-pending-cache.unit.test.ts +22 -0
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +75 -0
- package/src/record/__tests__/standard-pbr-ubo-layout.unit.test.ts +67 -0
- package/src/record/__tests__/temporal-payload.unit.test.ts +164 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +127 -0
- package/src/record/frame-lighting.ts +103 -89
- package/src/record/frame-snapshot.ts +170 -6
- package/src/record/frame-targets.ts +21 -8
- package/src/record/frame.ts +1014 -7
- package/src/record/gpu-timing.ts +224 -0
- package/src/record/main-pass-geometry.ts +86 -40
- package/src/record/main-pass-material.ts +120 -68
- package/src/record/main-pass-sprite-draws.ts +78 -101
- package/src/record/main-pass.ts +77 -4
- package/src/record/mesh-ssbo.ts +22 -3
- package/src/record/render-context.ts +194 -23
- package/src/record/shadow-pass.ts +197 -58
- package/src/record/skybox-post-pass.ts +97 -41
- package/src/record/typed-frame-graph.ts +704 -30
- package/src/record/view-ubo.ts +52 -4
- package/src/render-contract.ts +181 -6
- package/src/render-data.ts +50 -22
- package/src/render-graph-primitives.ts +18 -1
- package/src/render-pipeline.ts +144 -27
- package/src/render-system-extract.ts +522 -72
- package/src/render-system.ts +561 -41
- package/src/renderer-inspect.ts +66 -0
- package/src/scene/render-scene.ts +252 -7
- package/src/temporal/__tests__/taa-history-resources.unit.test.ts +45 -0
- package/src/temporal/coverage.ts +76 -0
- package/src/temporal/frame-coordinator.ts +311 -0
- package/src/temporal/frame.ts +128 -0
- package/src/temporal/gpu.ts +287 -0
- package/src/temporal/history.ts +92 -0
- package/src/temporal/index.ts +6 -0
- package/src/temporal/inspection.ts +97 -0
- package/src/temporal/scene-data-catalog.ts +200 -0
- package/src/temporal/scene-data.ts +149 -0
- package/src/temporal/standard-scene-data.ts +182 -0
- package/src/temporal/taa-history-resources.ts +128 -0
- package/src/temporal/taa-history-store.ts +79 -0
- package/src/temporal/taa-resolve.ts +34 -0
- package/src/temporal/temporal-view.ts +169 -0
- package/src/temporal/transaction.ts +17 -0
- package/src/temporal/view.ts +161 -0
- package/src/transmission/__tests__/capability.unit.test.ts +83 -0
- package/src/transmission/__tests__/composition.integration.test.ts +161 -0
- package/src/transmission/__tests__/inspection.unit.test.ts +241 -0
- package/src/transmission/__tests__/lifecycle.integration.test.ts +96 -0
- package/src/transmission/__tests__/oracle.unit.test.ts +131 -0
- package/src/transmission/__tests__/projection.unit.test.ts +71 -0
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +437 -0
- package/src/transmission/__tests__/transmission-backdrop-topology.unit.test.ts +109 -0
- package/src/transmission/__tests__/transmission-backdrop.dawn.test.ts +105 -0
- package/src/transmission/backdrop.ts +572 -0
- package/src/transmission/inspection.ts +190 -0
- package/src/transmission/oracle.ts +141 -0
- package/src/transmission/projection.ts +83 -0
- package/src/typed-render-graph-primitives.ts +194 -11
- package/src/typed-shadow-atlas.ts +17 -0
- package/src/typed-shadow-passes.ts +6 -5
- package/src/volume/capability.ts +173 -0
- package/src/volume/component.ts +110 -0
- package/src/volume/extract.ts +21 -0
- package/src/volume/inspection.ts +78 -0
- package/src/volume/passes.ts +680 -0
- package/src/volume/recovery.ts +86 -0
- package/src/volume/resources.ts +236 -0
- package/src/volume/temporal.ts +89 -0
- package/dist/__tests__/authoring-path.unit.test.d.ts +0 -2
- package/dist/__tests__/authoring-path.unit.test.d.ts.map +0 -1
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts +0 -2
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts.map +0 -1
- package/dist/__tests__/callback-inference.test-d.d.ts +0 -2
- package/dist/__tests__/callback-inference.test-d.d.ts.map +0 -1
- package/dist/__tests__/cluster-binner.test.d.ts +0 -2
- package/dist/__tests__/cluster-binner.test.d.ts.map +0 -1
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts +0 -2
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts.map +0 -1
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts +0 -2
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +0 -1
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +0 -2
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +0 -1
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts +0 -2
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts.map +0 -1
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts +0 -2
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts.map +0 -1
- package/dist/__tests__/factory-contract.integration.test.d.ts +0 -2
- package/dist/__tests__/factory-contract.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/frame-observation.contract.test.d.ts +0 -2
- package/dist/__tests__/frame-observation.contract.test.d.ts.map +0 -1
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +0 -2
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +0 -1
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts +0 -2
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts +0 -6
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +0 -18
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view-reference.d.ts +0 -15
- package/dist/__tests__/gpu-driven-view-reference.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts +0 -7
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene.dawn.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene.unit.test.d.ts +0 -2
- package/dist/__tests__/gpu-scene.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts +0 -2
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +0 -1
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts +0 -2
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts.map +0 -1
- package/dist/__tests__/injection-kind-owner.test-d.d.ts +0 -2
- package/dist/__tests__/injection-kind-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts +0 -2
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts +0 -2
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts +0 -2
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts +0 -2
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts.map +0 -1
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts +0 -2
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-stride-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/material-stride-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts +0 -2
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts +0 -2
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts.map +0 -1
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts +0 -2
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts.map +0 -1
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts +0 -2
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts +0 -2
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-default-off.test.d.ts +0 -2
- package/dist/__tests__/profiler-default-off.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-phase-catalog.test.d.ts +0 -2
- package/dist/__tests__/profiler-phase-catalog.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-phase-integration.test.d.ts +0 -2
- package/dist/__tests__/profiler-phase-integration.test.d.ts.map +0 -1
- package/dist/__tests__/profiler-phase-token.test.d.ts +0 -2
- package/dist/__tests__/profiler-phase-token.test.d.ts.map +0 -1
- package/dist/__tests__/public-surface.test-d.d.ts +0 -2
- package/dist/__tests__/public-surface.test-d.d.ts.map +0 -1
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-error-code-owner.test-d.d.ts +0 -2
- package/dist/__tests__/render-error-code-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts +0 -2
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts +0 -2
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-assembly.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-context.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-context.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-contract.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-contract.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-docs.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-docs.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-errors.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-errors.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts +0 -2
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-plan.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-plan.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-plan.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-retry.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-retry.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts +0 -7
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts.map +0 -1
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts +0 -2
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-hzb-gpu.d.ts +0 -7
- package/dist/__tests__/render-graph-hzb-gpu.d.ts.map +0 -1
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts +0 -2
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts +0 -2
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts +0 -12
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts.map +0 -1
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts +0 -2
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts.map +0 -1
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts +0 -2
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/render-scene-projection.unit.test.d.ts +0 -2
- package/dist/__tests__/render-scene-projection.unit.test.d.ts.map +0 -1
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts +0 -2
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts.map +0 -1
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +0 -2
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +0 -1
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts +0 -2
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts +0 -2
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts.map +0 -1
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ssao-config.unit.test.d.ts +0 -2
- package/dist/__tests__/ssao-config.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/standard-descriptors.test-d.d.ts +0 -2
- package/dist/__tests__/standard-descriptors.test-d.d.ts.map +0 -1
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts +0 -2
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +0 -1
- package/dist/__tests__/standard-pipeline.integration.test.d.ts +0 -2
- package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +0 -1
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +0 -2
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +0 -1
- package/dist/__tests__/surface-configuration.unit.test.d.ts +0 -2
- package/dist/__tests__/surface-configuration.unit.test.d.ts.map +0 -1
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts +0 -2
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts.map +0 -1
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts +0 -2
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts.map +0 -1
- package/dist/__tests__/urp-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/urp-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts +0 -2
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-extract.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-extract.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-extract.perf.test.d.ts +0 -2
- package/dist/__tests__/visibility-extract.perf.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-instances.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-instances.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts +0 -2
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-public-surface.test-d.d.ts +0 -2
- package/dist/__tests__/visibility-public-surface.test-d.d.ts.map +0 -1
- package/dist/__tests__/visibility-resolver.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-resolver.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +0 -1
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts +0 -2
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts.map +0 -1
- package/dist/__tests__/vocabulary.unit.test.d.ts +0 -2
- package/dist/__tests__/vocabulary.unit.test.d.ts.map +0 -1
- package/dist/chunk-CQXZC5XI.mjs.map +0 -1
- package/dist/chunk-HCOGPHKS.mjs +0 -93
- package/dist/chunk-HCOGPHKS.mjs.map +0 -1
- package/dist/chunk-YEJIUW7D.mjs.map +0 -1
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts +0 -2
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts.map +0 -1
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts +0 -2
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts.map +0 -1
- package/dist/components/__tests__/schema-contract.unit.test.d.ts +0 -2
- package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +0 -1
- package/dist/components/__tests__/schema-parity.unit.test.d.ts +0 -2
- package/dist/components/__tests__/schema-parity.unit.test.d.ts.map +0 -1
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts +0 -2
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts +0 -2
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts +0 -2
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts +0 -2
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts +0 -2
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts +0 -2
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/points-lines.bench.d.ts +0 -2
- package/dist/points-lines/__tests__/points-lines.bench.d.ts.map +0 -1
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts +0 -2
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts +0 -2
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts.map +0 -1
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts +0 -2
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts +0 -2
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts +0 -2
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts +0 -2
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts +0 -2
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts.map +0 -1
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_MSDF_TEXT_PARAM_SCHEMA,
|
|
22
22
|
DEFAULT_SPRITE_PARAM_SCHEMA,
|
|
23
|
+
DEFAULT_STANDARD_PBR_PARAM_SCHEMA,
|
|
23
24
|
DEFAULT_UNLIT_PARAM_SCHEMA,
|
|
24
25
|
} from '@forgeax/engine-shader';
|
|
25
26
|
import type {
|
|
@@ -36,8 +37,8 @@ import type { GpuResidencyCache } from '../device/gpu-residency';
|
|
|
36
37
|
import { VideoUploadUnsupportedError } from '../errors/render';
|
|
37
38
|
import {
|
|
38
39
|
assembleMaterialWithSkylightEntries,
|
|
39
|
-
type EmissiveAoBindGroupResources,
|
|
40
40
|
type SkylightBindGroupResources,
|
|
41
|
+
type TransmissionBindGroupResources,
|
|
41
42
|
} from '../ibl/skylight-bind-group';
|
|
42
43
|
import { isStandardPbrMaterialShader } from '../pbr-pipeline';
|
|
43
44
|
import { deriveTextureExtent } from '../render-data';
|
|
@@ -376,10 +377,16 @@ export const BUILTIN_USER_REGION_TEXTURE_FIELDS: readonly string[] = [
|
|
|
376
377
|
'specularTintTexture',
|
|
377
378
|
'emissiveTexture',
|
|
378
379
|
'occlusionTexture',
|
|
380
|
+
'transmissionTexture',
|
|
381
|
+
'thicknessTexture',
|
|
379
382
|
];
|
|
380
383
|
|
|
381
384
|
const LEGACY_MATERIAL_TEXTURE_SCALE_OFFSET = 80;
|
|
382
|
-
|
|
385
|
+
// The Standard schema owns five transmission numeric fields between
|
|
386
|
+
// normalScale and the engine-owned coordinate records. Keep this fallback
|
|
387
|
+
// aligned with derive(DEFAULT_STANDARD_PBR_PARAM_SCHEMA): the first record is
|
|
388
|
+
// at byte 128, not the pre-transmission byte 96.
|
|
389
|
+
const STANDARD_PBR_TEXTURE_SCALE_OFFSET = 128;
|
|
383
390
|
const MATERIAL_TEXTURE_SCALE_FIELDS = [
|
|
384
391
|
'baseColorTexture',
|
|
385
392
|
'metallicRoughnessTexture',
|
|
@@ -387,6 +394,8 @@ const MATERIAL_TEXTURE_SCALE_FIELDS = [
|
|
|
387
394
|
'specularTintTexture',
|
|
388
395
|
'emissiveTexture',
|
|
389
396
|
'occlusionTexture',
|
|
397
|
+
'transmissionTexture',
|
|
398
|
+
'thicknessTexture',
|
|
390
399
|
] as const;
|
|
391
400
|
const LEGACY_MATERIAL_TEXTURE_SCALE_FIELDS = [
|
|
392
401
|
'baseColorTexture',
|
|
@@ -395,20 +404,24 @@ const LEGACY_MATERIAL_TEXTURE_SCALE_FIELDS = [
|
|
|
395
404
|
'emissiveTexture',
|
|
396
405
|
'occlusionTexture',
|
|
397
406
|
] as const;
|
|
398
|
-
const STANDARD_PBR_TEXTURE_COORDINATE_OFFSET =
|
|
407
|
+
const STANDARD_PBR_TEXTURE_COORDINATE_OFFSET = 128;
|
|
399
408
|
const STANDARD_PBR_TEXTURE_COORDINATE_STRIDE = 8;
|
|
400
409
|
const DEFAULT_LEGACY_TEXTURE_SCALES = new Float32Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]);
|
|
401
410
|
const DEFAULT_STANDARD_TEXTURE_COORDINATES = new Float32Array([
|
|
402
411
|
0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0,
|
|
403
|
-
0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1,
|
|
412
|
+
0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1,
|
|
404
413
|
]);
|
|
405
414
|
|
|
406
415
|
/** Derives the logical-content UV scale for an uploaded material texture. */
|
|
407
416
|
export function materialTextureUvScale(
|
|
408
|
-
texture: Pick<TextureAsset, '
|
|
417
|
+
texture: Pick<TextureAsset, 'shape' | 'format'> | undefined,
|
|
409
418
|
): readonly [number, number] {
|
|
410
419
|
if (texture === undefined) return [1, 1];
|
|
411
|
-
return deriveTextureExtent(
|
|
420
|
+
return deriveTextureExtent(
|
|
421
|
+
texture.format,
|
|
422
|
+
texture.shape.extent.width,
|
|
423
|
+
texture.shape.extent.height,
|
|
424
|
+
).uvScale;
|
|
412
425
|
}
|
|
413
426
|
|
|
414
427
|
function materialTextureForField(
|
|
@@ -465,9 +478,9 @@ export function applyMaterialTextureUvScales(
|
|
|
465
478
|
}
|
|
466
479
|
return;
|
|
467
480
|
}
|
|
468
|
-
// Standard PBR
|
|
469
|
-
//
|
|
470
|
-
//
|
|
481
|
+
// Standard PBR has a schema-derived 128-byte authored region before the
|
|
482
|
+
// engine-owned UV records. Sprite, sprite-lit, unlit, and text keep their
|
|
483
|
+
// own legacy tail positions because their WGSL layouts differ.
|
|
471
484
|
const textureScaleOffset = isStandardPbrMaterialShader(material.materialShaderId)
|
|
472
485
|
? STANDARD_PBR_TEXTURE_SCALE_OFFSET
|
|
473
486
|
: LEGACY_MATERIAL_TEXTURE_SCALE_OFFSET;
|
|
@@ -523,6 +536,12 @@ export function applyMaterialTextureUvScales(
|
|
|
523
536
|
function materialCoordinateSchema(
|
|
524
537
|
material: MaterialSnapshot,
|
|
525
538
|
): readonly ParamSchemaEntry[] | undefined {
|
|
539
|
+
if (
|
|
540
|
+
isStandardPbrMaterialShader(material.materialShaderId) &&
|
|
541
|
+
material.paramSnapshot !== undefined
|
|
542
|
+
) {
|
|
543
|
+
return DEFAULT_STANDARD_PBR_PARAM_SCHEMA;
|
|
544
|
+
}
|
|
526
545
|
if (material.materialParamSchema !== undefined && material.materialParamSchema.length > 0) {
|
|
527
546
|
return material.materialParamSchema;
|
|
528
547
|
}
|
|
@@ -543,15 +562,16 @@ function materialCoordinateSchema(
|
|
|
543
562
|
* feat-20260621-learn-render-5-5-parallax M2 / w8 (D-3): ordered user-region
|
|
544
563
|
* texture field names for a material's bind-group assembly, derived from the
|
|
545
564
|
* shader's paramSchema via the `derive()` SSOT (insertion order = sampler/
|
|
546
|
-
* texture pair order in derive().bglEntries). Falls back to the built-in
|
|
547
|
-
* fields when the schema is unavailable
|
|
565
|
+
* texture pair order in derive().bglEntries). Falls back to the built-in
|
|
566
|
+
* fields only when the schema is unavailable; an explicit empty schema means
|
|
567
|
+
* the authored material has no user-region textures.
|
|
548
568
|
*/
|
|
549
569
|
export function userRegionTextureFieldOrder(
|
|
550
570
|
schema: Parameters<typeof derive>[0] | undefined,
|
|
551
571
|
): readonly string[] {
|
|
552
|
-
if (schema === undefined
|
|
572
|
+
if (schema === undefined) return BUILTIN_USER_REGION_TEXTURE_FIELDS;
|
|
553
573
|
const fields = [...derivedParamSchema(schema).textureFieldNames];
|
|
554
|
-
return fields
|
|
574
|
+
return fields;
|
|
555
575
|
}
|
|
556
576
|
|
|
557
577
|
/**
|
|
@@ -613,7 +633,7 @@ export function detectNineSliceScaleTooSmall(
|
|
|
613
633
|
}
|
|
614
634
|
|
|
615
635
|
/**
|
|
616
|
-
* Build the
|
|
636
|
+
* Build the 384-byte Material UBO payload for a PBR / unlit material entry
|
|
617
637
|
* (feat-20260527-sprite-nineslice M2 / w11; D-7 regression-net helper).
|
|
618
638
|
*
|
|
619
639
|
* Byte-for-byte equivalent to the legacy hard-coded PBR write path; each
|
|
@@ -634,7 +654,7 @@ export function buildPbrMaterialUboPayload(material: MaterialSnapshot): Uint8Arr
|
|
|
634
654
|
*
|
|
635
655
|
* The allocating wrapper above remains the byte-stable test/helper surface,
|
|
636
656
|
* while the frame recorder reuses one scratch slot for all materials. A
|
|
637
|
-
* scene with thousands of submeshes otherwise allocates one
|
|
657
|
+
* scene with thousands of submeshes otherwise allocates one 384-byte
|
|
638
658
|
* Uint8Array per material per frame, creating avoidable GC pressure without
|
|
639
659
|
* changing GPU-visible bytes.
|
|
640
660
|
*/
|
|
@@ -667,9 +687,13 @@ export function writePbrMaterialUboPayload(
|
|
|
667
687
|
// f32[18] clearcoat (offset 72)
|
|
668
688
|
// f32[19] clearcoatRoughness (offset 76)
|
|
669
689
|
// f32[20..22] specularTint (offset 80, vec3)
|
|
670
|
-
//
|
|
671
|
-
// f32[24
|
|
672
|
-
// f32[
|
|
690
|
+
// f32[23] normalScale (offset 92)
|
|
691
|
+
// f32[24] transmission (offset 96)
|
|
692
|
+
// f32[25] ior (offset 100)
|
|
693
|
+
// f32[26] thickness (offset 104)
|
|
694
|
+
// f32[28..30] attenuationColor (offset 112, vec3)
|
|
695
|
+
// f32[31] attenuationDistance(offset 124)
|
|
696
|
+
// f32[32..95] engine-owned texture coordinate records (offset 128)
|
|
673
697
|
f32[0] = material.baseColor[0] ?? 0;
|
|
674
698
|
f32[1] = material.baseColor[1] ?? 0;
|
|
675
699
|
f32[2] = material.baseColor[2] ?? 0;
|
|
@@ -700,7 +724,28 @@ export function writePbrMaterialUboPayload(
|
|
|
700
724
|
f32[20] = specularTint?.[0] ?? 1;
|
|
701
725
|
f32[21] = specularTint?.[1] ?? 1;
|
|
702
726
|
f32[22] = specularTint?.[2] ?? 1;
|
|
703
|
-
|
|
727
|
+
const snapshotNumber = (name: string, fallback: number): number => {
|
|
728
|
+
const value = material.paramSnapshot?.[name];
|
|
729
|
+
return typeof value === 'number' ? value : fallback;
|
|
730
|
+
};
|
|
731
|
+
const snapshotVec3 = (
|
|
732
|
+
name: string,
|
|
733
|
+
fallback: readonly [number, number, number],
|
|
734
|
+
): readonly [number, number, number] => {
|
|
735
|
+
const value = material.paramSnapshot?.[name];
|
|
736
|
+
return Array.isArray(value)
|
|
737
|
+
? [value[0] ?? fallback[0], value[1] ?? fallback[1], value[2] ?? fallback[2]]
|
|
738
|
+
: fallback;
|
|
739
|
+
};
|
|
740
|
+
f32[23] = material.normalScale ?? snapshotNumber('normalScale', 1);
|
|
741
|
+
f32[24] = snapshotNumber('transmission', 0);
|
|
742
|
+
f32[25] = snapshotNumber('ior', 1.5);
|
|
743
|
+
f32[26] = snapshotNumber('thickness', 0);
|
|
744
|
+
const attenuationColor = snapshotVec3('attenuationColor', [1, 1, 1]);
|
|
745
|
+
f32[28] = attenuationColor[0];
|
|
746
|
+
f32[29] = attenuationColor[1];
|
|
747
|
+
f32[30] = attenuationColor[2];
|
|
748
|
+
f32[31] = snapshotNumber('attenuationDistance', 0);
|
|
704
749
|
// Schema-driven paramSnapshot overlay (feat-20260523 M9-T05, AC-14):
|
|
705
750
|
// for user-shaders with a paramSnapshot, project the first vec4/color
|
|
706
751
|
// entry onto slot 0 and the first two f32 entries onto slot 1's first
|
|
@@ -780,7 +825,13 @@ export function applyParamSnapshotToUbo(
|
|
|
780
825
|
if (paramSchema === undefined) return;
|
|
781
826
|
if (paramSnapshot === undefined) return;
|
|
782
827
|
const f32 = materialUboFloatView(payload);
|
|
783
|
-
const
|
|
828
|
+
const effectiveSchema =
|
|
829
|
+
Object.hasOwn(paramSnapshot, 'transmission') &&
|
|
830
|
+
Object.hasOwn(paramSnapshot, 'ior') &&
|
|
831
|
+
Object.hasOwn(paramSnapshot, 'thickness')
|
|
832
|
+
? DEFAULT_STANDARD_PBR_PARAM_SCHEMA
|
|
833
|
+
: paramSchema;
|
|
834
|
+
const { uboLayout } = derivedParamSchema(effectiveSchema);
|
|
784
835
|
for (const entry of uboLayout.entries) {
|
|
785
836
|
const value = paramSnapshot[entry.name];
|
|
786
837
|
if (value === undefined) continue;
|
|
@@ -837,6 +888,8 @@ export interface PerSubmeshMaterialBgDeps {
|
|
|
837
888
|
readonly materialBgShared: Map<string, WeakMap<object, unknown>>;
|
|
838
889
|
/** Cross-frame final BG reuse keyed by the stable source material handle. */
|
|
839
890
|
readonly materialBgAssemblyCache: Map<string, MaterialBgAssemblyCacheEntry>;
|
|
891
|
+
/** Active transmission backdrop; undefined/null means layout placeholder. */
|
|
892
|
+
readonly transmissionBackdropView?: TextureView | null;
|
|
840
893
|
readonly bindGroupCounts: BindGroupCounts;
|
|
841
894
|
}
|
|
842
895
|
|
|
@@ -848,7 +901,9 @@ export function isMaterialBgAssemblyCacheHit(
|
|
|
848
901
|
materialBuffer: Buffer,
|
|
849
902
|
skylightResources: SkylightBindGroupResources,
|
|
850
903
|
materialResourceEpoch: number,
|
|
904
|
+
transmissionBackdropView?: TextureView | null,
|
|
851
905
|
): cached is MaterialBgAssemblyCacheEntry {
|
|
906
|
+
if (transmissionBackdropView != null) return false;
|
|
852
907
|
return (
|
|
853
908
|
cached?.material === material &&
|
|
854
909
|
cached.materialResourceEpoch === materialResourceEpoch &&
|
|
@@ -879,6 +934,7 @@ export function buildPerSubmeshMaterialBg(
|
|
|
879
934
|
skylightResources,
|
|
880
935
|
materialBgShared,
|
|
881
936
|
materialBgAssemblyCache,
|
|
937
|
+
transmissionBackdropView,
|
|
882
938
|
bindGroupCounts,
|
|
883
939
|
} = deps;
|
|
884
940
|
const smMaterialHandle = submeshMaterial.materialHandle;
|
|
@@ -889,7 +945,8 @@ export function buildPerSubmeshMaterialBg(
|
|
|
889
945
|
const smPerShaderBgl =
|
|
890
946
|
smShaderId !== undefined ? runtime.getMaterialBindGroupLayout?.(smShaderId) : undefined;
|
|
891
947
|
const smMaterialBgl = smPerShaderBgl ?? pipelineState.materialBindGroupLayout;
|
|
892
|
-
|
|
948
|
+
const hasActiveTransmissionBackdrop = transmissionBackdropView != null;
|
|
949
|
+
if (smMaterialHandle !== undefined && !smHasVideoFields && !hasActiveTransmissionBackdrop) {
|
|
893
950
|
const cached =
|
|
894
951
|
materialCacheKey === undefined ? undefined : materialBgAssemblyCache.get(materialCacheKey);
|
|
895
952
|
if (
|
|
@@ -900,6 +957,7 @@ export function buildPerSubmeshMaterialBg(
|
|
|
900
957
|
pipelineState.materialUniformBuffer.buffer,
|
|
901
958
|
skylightResources,
|
|
902
959
|
store.materialResourceEpoch,
|
|
960
|
+
transmissionBackdropView,
|
|
903
961
|
)
|
|
904
962
|
) {
|
|
905
963
|
return cached.bindGroup;
|
|
@@ -908,12 +966,11 @@ export function buildPerSubmeshMaterialBg(
|
|
|
908
966
|
const smSchema =
|
|
909
967
|
submeshMaterial.materialParamSchema ??
|
|
910
968
|
(smShaderId !== undefined ? runtime.getParamSchema?.(smShaderId) : undefined);
|
|
911
|
-
// The shipped PBR shaders always own the
|
|
912
|
-
// standard shader artifact.
|
|
913
|
-
//
|
|
914
|
-
//
|
|
915
|
-
//
|
|
916
|
-
// starts at binding 13 rather than colliding with emissiveSampler.
|
|
969
|
+
// The shipped PBR shaders always own the eight texture pairs declared by the
|
|
970
|
+
// standard shader artifact. The runtime PBR BGL exposes those pairs directly;
|
|
971
|
+
// emissive and occlusion are not duplicated in an engine injection region.
|
|
972
|
+
// Keep the record projection on the shader-owned layout so IBL starts at
|
|
973
|
+
// binding 17 rather than colliding with transmissionSampler.
|
|
917
974
|
const smUserRegionFields =
|
|
918
975
|
smPerShaderBgl === undefined || isStandardPbrMaterialShader(smShaderId)
|
|
919
976
|
? BUILTIN_USER_REGION_TEXTURE_FIELDS
|
|
@@ -986,48 +1043,43 @@ export function buildPerSubmeshMaterialBg(
|
|
|
986
1043
|
},
|
|
987
1044
|
);
|
|
988
1045
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1046
|
+
// The backdrop is a full mip-chain view owned by the pipeline. Reuse the
|
|
1047
|
+
// pipeline's existing filtering/clamp sampler for screen-space sampling;
|
|
1048
|
+
// the material default sampler intentionally keeps repeat addressing for
|
|
1049
|
+
// authored UV textures and is not a backdrop sampler.
|
|
1050
|
+
const transmissionSampler =
|
|
1051
|
+
transmissionBackdropView != null
|
|
1052
|
+
? skylightResources.prefilterSampler
|
|
1053
|
+
: pipelineState.defaultSampler;
|
|
1054
|
+
const smMergedEntries = assembleMaterialWithSkylightEntries(smBaseEntries, skylightResources, {
|
|
1055
|
+
sampler: transmissionSampler,
|
|
1056
|
+
...(transmissionBackdropView === undefined ? {} : { backdropView: transmissionBackdropView }),
|
|
1057
|
+
} satisfies TransmissionBindGroupResources);
|
|
1058
|
+
const createBindGroup = (): BindGroup => {
|
|
1059
|
+
const result = runtime.device.createBindGroup({
|
|
1060
|
+
label: 'pbr-material-skylight-bg',
|
|
1061
|
+
layout: smMaterialBgl,
|
|
1062
|
+
entries: smMergedEntries,
|
|
1063
|
+
});
|
|
1064
|
+
if (!result.ok) throw result.error;
|
|
1065
|
+
return result.value;
|
|
1008
1066
|
};
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
if (!result.ok) throw result.error;
|
|
1026
|
-
return result.value;
|
|
1027
|
-
},
|
|
1028
|
-
bindGroupCounts,
|
|
1029
|
-
);
|
|
1030
|
-
if (smMaterialHandle !== undefined && !smHasVideoFields && materialResourcesResident) {
|
|
1067
|
+
const smBindGroup = hasActiveTransmissionBackdrop
|
|
1068
|
+
? createBindGroup()
|
|
1069
|
+
: getOrCreatePerEntity(
|
|
1070
|
+
materialBgShared,
|
|
1071
|
+
smShaderId ?? '',
|
|
1072
|
+
smMergedEntries.map((e) => extractEntryResourceHandle(e)),
|
|
1073
|
+
'material-shared',
|
|
1074
|
+
createBindGroup,
|
|
1075
|
+
bindGroupCounts,
|
|
1076
|
+
);
|
|
1077
|
+
if (
|
|
1078
|
+
smMaterialHandle !== undefined &&
|
|
1079
|
+
!smHasVideoFields &&
|
|
1080
|
+
materialResourcesResident &&
|
|
1081
|
+
!hasActiveTransmissionBackdrop
|
|
1082
|
+
) {
|
|
1031
1083
|
if (materialCacheKey !== undefined) {
|
|
1032
1084
|
materialBgAssemblyCache.set(materialCacheKey, {
|
|
1033
1085
|
material: submeshMaterial,
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
import type { World } from '@forgeax/engine-ecs';
|
|
6
6
|
import {
|
|
7
7
|
type BindGroup,
|
|
8
|
+
type BindGroupEntry,
|
|
8
9
|
type Buffer,
|
|
9
10
|
type RenderPipeline,
|
|
10
11
|
RhiError,
|
|
11
12
|
type RhiRenderPassEncoder,
|
|
13
|
+
type TextureView,
|
|
12
14
|
} from '@forgeax/engine-rhi';
|
|
13
15
|
import type { Handle, MaterialRenderState } from '@forgeax/engine-types';
|
|
14
16
|
import { GpuBuffer } from '../gpu-resource';
|
|
@@ -19,7 +21,6 @@ import {
|
|
|
19
21
|
} from '../gpu-usage';
|
|
20
22
|
import {
|
|
21
23
|
assembleMaterialWithSkylightEntries,
|
|
22
|
-
type EmissiveAoBindGroupResources,
|
|
23
24
|
type SkylightBindGroupResources,
|
|
24
25
|
} from '../ibl/skylight-bind-group';
|
|
25
26
|
import type { InstanceBufferCacheEntry } from '../instance-buffer-cache';
|
|
@@ -31,7 +32,12 @@ import {
|
|
|
31
32
|
} from '../pipeline-spec';
|
|
32
33
|
import type { MaterialSnapshot, SpriteInstancesSnapshot } from '../render-system-extract';
|
|
33
34
|
import { worldEntityKey } from './frame-snapshot';
|
|
34
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
BUILTIN_USER_REGION_TEXTURE_FIELDS,
|
|
37
|
+
defaultViewForUserRegionField,
|
|
38
|
+
entityHasTransparentSubmesh,
|
|
39
|
+
residentTextureView,
|
|
40
|
+
} from './main-pass-material';
|
|
35
41
|
import {
|
|
36
42
|
extractEntryResourceHandle,
|
|
37
43
|
getOrCreatePerEntity,
|
|
@@ -44,6 +50,51 @@ import { MATERIAL_PER_ENTITY_STRIDE, STANDARD_PBR_UBO_SIZE } from './render-cont
|
|
|
44
50
|
|
|
45
51
|
export type { SpriteInstancesSnapshot };
|
|
46
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Build the sprite material's Standard user-region from the shared field-order
|
|
55
|
+
* owner. The sprite shader uses the same Standard material bind-group layout;
|
|
56
|
+
* keeping this projection derived from the shared list prevents IBL injection
|
|
57
|
+
* from moving ahead of newly added material texture pairs.
|
|
58
|
+
*/
|
|
59
|
+
export function buildSpritePassBaseMaterialEntries(
|
|
60
|
+
pipelineState: _InternalRenderPipelineContext['pipelineState'],
|
|
61
|
+
spriteTexView: TextureView,
|
|
62
|
+
): BindGroupEntry[] {
|
|
63
|
+
const entries: BindGroupEntry[] = [
|
|
64
|
+
{
|
|
65
|
+
binding: 0,
|
|
66
|
+
resource: {
|
|
67
|
+
kind: 'buffer' as const,
|
|
68
|
+
value: {
|
|
69
|
+
buffer: pipelineState.materialUniformBuffer.buffer,
|
|
70
|
+
offset: 0,
|
|
71
|
+
size: STANDARD_PBR_UBO_SIZE,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
for (const [index, field] of BUILTIN_USER_REGION_TEXTURE_FIELDS.entries()) {
|
|
77
|
+
const view =
|
|
78
|
+
field === 'baseColorTexture'
|
|
79
|
+
? spriteTexView
|
|
80
|
+
: defaultViewForUserRegionField(field, pipelineState);
|
|
81
|
+
entries.push(
|
|
82
|
+
{
|
|
83
|
+
binding: 1 + index * 2,
|
|
84
|
+
resource: {
|
|
85
|
+
kind: 'sampler' as const,
|
|
86
|
+
value: index === 0 ? pipelineState.nearestSampler : pipelineState.defaultSampler,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
binding: 2 + index * 2,
|
|
91
|
+
resource: { kind: 'textureView' as const, value: view },
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
return entries;
|
|
96
|
+
}
|
|
97
|
+
|
|
47
98
|
/**
|
|
48
99
|
* Build the interleaved sprite instance payload consumed by this record owner.
|
|
49
100
|
* The extract stage validates the two packed arrays before they reach this
|
|
@@ -159,6 +210,12 @@ export function recordSpritePass(
|
|
|
159
210
|
viewBindGroup,
|
|
160
211
|
splitLdrSprite,
|
|
161
212
|
} = c;
|
|
213
|
+
// The split pass is also used by the no-tone linear-LDR route. That route
|
|
214
|
+
// keeps transparent draws in the graph-owned rgba16float attachment, so
|
|
215
|
+
// sprite shaders must use their linear/HDR fragment entry point even though
|
|
216
|
+
// the camera itself has no tone map enabled.
|
|
217
|
+
const spriteIsHdr =
|
|
218
|
+
c.tonemapActive || transparentPassColorFormat(c, pipelineState) === 'rgba16float';
|
|
162
219
|
let geometryPassEnded = false;
|
|
163
220
|
if (splitLdrSprite && (graphPass !== undefined || ldrSpritePassView !== null)) {
|
|
164
221
|
if (graphPass === undefined) {
|
|
@@ -253,7 +310,7 @@ export function recordSpritePass(
|
|
|
253
310
|
const spritePH =
|
|
254
311
|
runtime.getMaterialShaderPipeline?.(
|
|
255
312
|
'forgeax::sprite',
|
|
256
|
-
|
|
313
|
+
spriteIsHdr,
|
|
257
314
|
spritePremulBlend,
|
|
258
315
|
'triangle-list',
|
|
259
316
|
undefined,
|
|
@@ -273,7 +330,7 @@ export function recordSpritePass(
|
|
|
273
330
|
const spritePH_withRegion =
|
|
274
331
|
runtime.getMaterialShaderPipeline?.(
|
|
275
332
|
'forgeax::sprite',
|
|
276
|
-
|
|
333
|
+
spriteIsHdr,
|
|
277
334
|
spritePremulBlend,
|
|
278
335
|
'triangle-list',
|
|
279
336
|
undefined,
|
|
@@ -296,7 +353,6 @@ export function recordSpritePass(
|
|
|
296
353
|
// present), then fall through to the PBR loop. A PBR-only transparent
|
|
297
354
|
// scene (e.g. a glTF BLEND decal, no sprites) renders regardless of
|
|
298
355
|
// whether sprite.wgsl is in the manifest.
|
|
299
|
-
const spriteUnavailable = spritePH === null;
|
|
300
356
|
let spriteUnavailableReported = false;
|
|
301
357
|
const reportSpriteUnavailable = (): void => {
|
|
302
358
|
if (spriteUnavailableReported) return;
|
|
@@ -316,7 +372,7 @@ export function recordSpritePass(
|
|
|
316
372
|
const spriteLitPH =
|
|
317
373
|
runtime.getMaterialShaderPipeline?.(
|
|
318
374
|
'forgeax::sprite-lit',
|
|
319
|
-
|
|
375
|
+
spriteIsHdr,
|
|
320
376
|
spritePremulBlend,
|
|
321
377
|
'triangle-list',
|
|
322
378
|
undefined,
|
|
@@ -326,7 +382,6 @@ export function recordSpritePass(
|
|
|
326
382
|
msaaActive ? 4 : 1,
|
|
327
383
|
transparentPassColorFormat(c) as GPUTextureFormat,
|
|
328
384
|
) ?? null;
|
|
329
|
-
|
|
330
385
|
recordSpriteEntityDraws(
|
|
331
386
|
c,
|
|
332
387
|
spritePass,
|
|
@@ -335,7 +390,6 @@ export function recordSpritePass(
|
|
|
335
390
|
spritePH,
|
|
336
391
|
spritePH_withRegion,
|
|
337
392
|
spriteLitPH,
|
|
338
|
-
spriteUnavailable,
|
|
339
393
|
reportSpriteUnavailable,
|
|
340
394
|
);
|
|
341
395
|
|
|
@@ -397,6 +451,8 @@ function recordSpriteTransparentPbrDraws(
|
|
|
397
451
|
): void {
|
|
398
452
|
const { runtime, pipelineState, frameState, bindGroupCounts, validatedOrdered, meshBindGroup } =
|
|
399
453
|
c;
|
|
454
|
+
const isHdrTarget =
|
|
455
|
+
c.tonemapActive || transparentPassColorFormat(c, pipelineState) === 'rgba16float';
|
|
400
456
|
let lastPbrSubPipelineHandle: typeof pipelineState.unlitPipeline = null;
|
|
401
457
|
let lastPbrSubVertexBuffer: GpuBuffer | null = null;
|
|
402
458
|
let lastPbrSubIndexBuffer: GpuBuffer | null = null;
|
|
@@ -495,7 +551,7 @@ function recordSpriteTransparentPbrDraws(
|
|
|
495
551
|
const subPipeline =
|
|
496
552
|
runtime.getMaterialShaderPipeline?.(
|
|
497
553
|
smShaderId,
|
|
498
|
-
|
|
554
|
+
isHdrTarget,
|
|
499
555
|
submeshMaterial.renderState,
|
|
500
556
|
sm.topology,
|
|
501
557
|
entry.mesh.indexFormat,
|
|
@@ -546,7 +602,6 @@ function recordSpriteEntityDraws(
|
|
|
546
602
|
spritePH: RenderPipeline | null,
|
|
547
603
|
spritePH_withRegion: RenderPipeline | null,
|
|
548
604
|
spriteLitPH: RenderPipeline | null,
|
|
549
|
-
spriteUnavailable: boolean,
|
|
550
605
|
reportSpriteUnavailable: () => void,
|
|
551
606
|
): void {
|
|
552
607
|
const {
|
|
@@ -582,22 +637,18 @@ function recordSpriteEntityDraws(
|
|
|
582
637
|
const isSpriteShader = sid === 'forgeax::sprite' || sid === 'forgeax::sprite-lit';
|
|
583
638
|
if (!isSpriteShader) continue;
|
|
584
639
|
}
|
|
585
|
-
// Sprite PSO unavailable (sprite.wgsl absent / still compiling): skip
|
|
586
|
-
// sprite entities and report once, but do NOT abort the sub-pass — the
|
|
587
|
-
// PBR transparent loop below is independent of the sprite shader.
|
|
588
|
-
if (spriteUnavailable) {
|
|
589
|
-
reportSpriteUnavailable();
|
|
590
|
-
continue;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
640
|
// feat-20260622-chunk-gpu-instancing-sprite-tilemap M1 / w4-record-swap
|
|
594
641
|
// (D-1): fold-bucket non-head member — skip; the bucket head emits one
|
|
595
642
|
// instanced drawIndexed covering all members.
|
|
596
|
-
if (foldDispatchPlan?.skipIndices.has(i) === true)
|
|
643
|
+
if (foldDispatchPlan?.skipIndices.has(i) === true) {
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
597
646
|
const foldHeadBucket = foldDispatchPlan?.headBuckets.get(i);
|
|
598
647
|
|
|
599
648
|
// feat-20260609 M2: skip entities that don't match the pass selector.
|
|
600
|
-
if (matchedIndices !== null && !matchedIndices.has(spriteEntry.renderableIndex))
|
|
649
|
+
if (matchedIndices !== null && !matchedIndices.has(spriteEntry.renderableIndex)) {
|
|
650
|
+
continue;
|
|
651
|
+
}
|
|
601
652
|
|
|
602
653
|
// feat-20260624 M1' / t7: select sprite vs sprite-lit PSO per
|
|
603
654
|
// entity. Both paths share the LDR sub-pass + the same UBO
|
|
@@ -629,7 +680,9 @@ function recordSpriteEntityDraws(
|
|
|
629
680
|
// way fail-safe-skip is the closest the renderer can get to
|
|
630
681
|
// "show nothing visibly wrong" without ending the sprite pass
|
|
631
682
|
// (which would drop remaining sprite entities for the frame).
|
|
632
|
-
if (entityShaderId === 'forgeax::sprite
|
|
683
|
+
if (entityShaderId === 'forgeax::sprite') {
|
|
684
|
+
reportSpriteUnavailable();
|
|
685
|
+
} else if (entityShaderId === 'forgeax::sprite-lit') {
|
|
633
686
|
runtime.errorRegistry.fire(
|
|
634
687
|
new RhiError({
|
|
635
688
|
code: 'shader-compile-failed',
|
|
@@ -919,89 +972,13 @@ function recordSpriteEntityDraws(
|
|
|
919
972
|
const tv = residentTextureView(spriteEntry.world ?? world, store, runtime, spriteTexHandle);
|
|
920
973
|
if (tv !== undefined) spriteTexView = tv as never;
|
|
921
974
|
}
|
|
922
|
-
const spritePassBaseMaterialEntries =
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
kind: 'buffer' as const,
|
|
927
|
-
value: {
|
|
928
|
-
buffer: pipelineState.materialUniformBuffer.buffer,
|
|
929
|
-
offset: 0,
|
|
930
|
-
size: STANDARD_PBR_UBO_SIZE,
|
|
931
|
-
},
|
|
932
|
-
},
|
|
933
|
-
},
|
|
934
|
-
{
|
|
935
|
-
binding: 1,
|
|
936
|
-
resource: { kind: 'sampler' as const, value: pipelineState.nearestSampler },
|
|
937
|
-
},
|
|
938
|
-
{ binding: 2, resource: { kind: 'textureView' as const, value: spriteTexView } },
|
|
939
|
-
{
|
|
940
|
-
binding: 3,
|
|
941
|
-
resource: { kind: 'sampler' as const, value: pipelineState.defaultSampler },
|
|
942
|
-
},
|
|
943
|
-
{
|
|
944
|
-
binding: 4,
|
|
945
|
-
resource: {
|
|
946
|
-
kind: 'textureView' as const,
|
|
947
|
-
value: pipelineState.defaultWhiteTextureView,
|
|
948
|
-
},
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
binding: 5,
|
|
952
|
-
resource: { kind: 'sampler' as const, value: pipelineState.defaultSampler },
|
|
953
|
-
},
|
|
954
|
-
{
|
|
955
|
-
binding: 6,
|
|
956
|
-
resource: {
|
|
957
|
-
kind: 'textureView' as const,
|
|
958
|
-
value: pipelineState.defaultNormalTextureView,
|
|
959
|
-
},
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
binding: 7,
|
|
963
|
-
resource: { kind: 'sampler' as const, value: pipelineState.defaultSampler },
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
binding: 8,
|
|
967
|
-
resource: {
|
|
968
|
-
kind: 'textureView' as const,
|
|
969
|
-
value: pipelineState.defaultWhiteTextureView,
|
|
970
|
-
},
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
binding: 9,
|
|
974
|
-
resource: { kind: 'sampler' as const, value: pipelineState.defaultSampler },
|
|
975
|
-
},
|
|
976
|
-
{
|
|
977
|
-
binding: 10,
|
|
978
|
-
resource: {
|
|
979
|
-
kind: 'textureView' as const,
|
|
980
|
-
value: pipelineState.defaultWhiteTextureView,
|
|
981
|
-
},
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
binding: 11,
|
|
985
|
-
resource: { kind: 'sampler' as const, value: pipelineState.defaultSampler },
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
binding: 12,
|
|
989
|
-
resource: {
|
|
990
|
-
kind: 'textureView' as const,
|
|
991
|
-
value: pipelineState.defaultWhiteTextureView,
|
|
992
|
-
},
|
|
993
|
-
},
|
|
994
|
-
];
|
|
995
|
-
const spritePassEmissiveAo: EmissiveAoBindGroupResources = {
|
|
996
|
-
emissiveSampler: pipelineState.defaultSampler,
|
|
997
|
-
emissiveView: pipelineState.defaultWhiteTextureView,
|
|
998
|
-
occlusionSampler: pipelineState.defaultSampler,
|
|
999
|
-
occlusionView: pipelineState.defaultWhiteTextureView,
|
|
1000
|
-
};
|
|
975
|
+
const spritePassBaseMaterialEntries = buildSpritePassBaseMaterialEntries(
|
|
976
|
+
pipelineState,
|
|
977
|
+
spriteTexView,
|
|
978
|
+
);
|
|
1001
979
|
const spritePassMergedEntries = assembleMaterialWithSkylightEntries(
|
|
1002
980
|
spritePassBaseMaterialEntries,
|
|
1003
981
|
skylightResources,
|
|
1004
|
-
spritePassEmissiveAo,
|
|
1005
982
|
);
|
|
1006
983
|
|
|
1007
984
|
// Sprite-pass material BG cache: keyed on shader id (shared across all
|