@forgeax/engine-render 0.1.28 → 0.1.30
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 +856 -126
- package/dist/assembly/atmosphere-shader-prewarm.d.ts +6 -0
- package/dist/assembly/atmosphere-shader-prewarm.d.ts.map +1 -0
- package/dist/assembly/device-feature-admission.d.ts +4 -3
- package/dist/assembly/device-feature-admission.d.ts.map +1 -1
- package/dist/assembly/dynamic-geometry-host.d.ts +27 -0
- package/dist/assembly/dynamic-geometry-host.d.ts.map +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts +20 -0
- package/dist/assembly/dynamic-geometry-runtime.d.ts.map +1 -0
- package/dist/assembly/factory.d.ts +3 -1
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/gpu-driven-owner.d.ts +10 -0
- package/dist/assembly/gpu-driven-owner.d.ts.map +1 -0
- package/dist/assembly/host-contract.d.ts +14 -0
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/material/assembly.d.ts +31 -1
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/pipeline-helpers.d.ts +24 -0
- package/dist/assembly/material/pipeline-helpers.d.ts.map +1 -0
- package/dist/assembly/material-shader-policy.d.ts +3 -1
- package/dist/assembly/material-shader-policy.d.ts.map +1 -1
- package/dist/assembly/recovery/device-loss-fanout.d.ts.map +1 -1
- package/dist/assembly/recovery/failure-location.d.ts +12 -0
- package/dist/assembly/recovery/failure-location.d.ts.map +1 -0
- package/dist/assembly/recovery/recovery-attempt.d.ts +1 -6
- package/dist/assembly/recovery/recovery-attempt.d.ts.map +1 -1
- package/dist/assembly/recovery/renderer-recover.d.ts +7 -4
- package/dist/assembly/recovery/renderer-recover.d.ts.map +1 -1
- package/dist/assembly/renderer-facade.d.ts.map +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts +5 -0
- package/dist/assembly/renderer-feature-inspection.d.ts.map +1 -0
- package/dist/assembly/renderer-frame-transaction.d.ts +19 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -1
- package/dist/assembly/renderer-helpers.d.ts +3 -0
- package/dist/assembly/renderer-helpers.d.ts.map +1 -1
- package/dist/assembly/renderer-inspection.d.ts +4 -0
- package/dist/assembly/renderer-inspection.d.ts.map +1 -1
- package/dist/assembly/shader-prewarm-policy.d.ts +7 -1
- package/dist/assembly/shader-prewarm-policy.d.ts.map +1 -1
- package/dist/assembly/skin-palette-owner.d.ts +8 -0
- package/dist/assembly/skin-palette-owner.d.ts.map +1 -0
- package/dist/assembly/ssr-shader-prewarm.d.ts +6 -0
- package/dist/assembly/ssr-shader-prewarm.d.ts.map +1 -0
- package/dist/assembly/webgpu-device-loss.d.ts +15 -0
- package/dist/assembly/webgpu-device-loss.d.ts.map +1 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts +38 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready-mipmap.d.ts +11 -0
- package/dist/assembly/webgpu-ready-mipmap.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready.d.ts +7 -3
- package/dist/assembly/webgpu-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-bootstrap.d.ts +10 -0
- package/dist/assembly/webgpu-renderer-bootstrap.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer-contract.d.ts +62 -0
- package/dist/assembly/webgpu-renderer-contract.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer-guards.d.ts +9 -0
- package/dist/assembly/webgpu-renderer-guards.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer-observation.d.ts +6 -0
- package/dist/assembly/webgpu-renderer-observation.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer-recovery-failure.d.ts +12 -0
- package/dist/assembly/webgpu-renderer-recovery-failure.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer.d.ts +7 -141
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
- package/dist/assembly/webgpu-vertex-layouts.d.ts +28 -84
- package/dist/assembly/webgpu-vertex-layouts.d.ts.map +1 -1
- package/dist/authoring.mjs +2 -2
- package/dist/capture/scene-projection.d.ts +41 -0
- package/dist/capture/scene-projection.d.ts.map +1 -0
- package/dist/{chunk-J52NMQKR.mjs → chunk-7MQ3XBSP.mjs} +1098 -844
- package/dist/chunk-7MQ3XBSP.mjs.map +1 -0
- package/dist/{chunk-GF523LHF.mjs → chunk-BLXGONR2.mjs} +30 -12
- package/dist/chunk-BLXGONR2.mjs.map +1 -0
- package/dist/{chunk-VSL23LZE.mjs → chunk-C3DDSXYK.mjs} +1188 -463
- package/dist/chunk-C3DDSXYK.mjs.map +1 -0
- package/dist/{chunk-IQMKJLNU.mjs → chunk-FUUO4UND.mjs} +443 -30
- package/dist/chunk-FUUO4UND.mjs.map +1 -0
- package/dist/{chunk-J6KACNOH.mjs → chunk-JRBDO2KB.mjs} +617 -7
- package/dist/chunk-JRBDO2KB.mjs.map +1 -0
- package/dist/{chunk-GE3SDD72.mjs → chunk-MDQJPY3T.mjs} +20 -40
- package/dist/chunk-MDQJPY3T.mjs.map +1 -0
- package/dist/{chunk-MYJ5RPJO.mjs → chunk-NO4WZCAH.mjs} +3 -3
- package/dist/chunk-NO4WZCAH.mjs.map +1 -0
- package/dist/{chunk-RBDBZ5R7.mjs → chunk-PA5DRJNI.mjs} +2 -2
- package/dist/chunk-PA5DRJNI.mjs.map +1 -0
- package/dist/{chunk-MBU4ZVE7.mjs → chunk-PSEQ6QPH.mjs} +4655 -892
- package/dist/chunk-PSEQ6QPH.mjs.map +1 -0
- package/dist/{chunk-JAASCMXA.mjs → chunk-S5UE2T5P.mjs} +289 -41
- package/dist/chunk-S5UE2T5P.mjs.map +1 -0
- package/dist/components/camera.d.ts +62 -2
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/directional-light.d.ts +2 -2
- package/dist/components/dynamic-resolution.d.ts +15 -0
- package/dist/components/dynamic-resolution.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 +6 -20
- package/dist/components/instances.d.ts.map +1 -1
- package/dist/components/light-helpers.d.ts.map +1 -1
- package/dist/components/reflection-probe.d.ts +1 -0
- package/dist/components/reflection-probe.d.ts.map +1 -1
- package/dist/components/scene-instance.d.ts +2 -1
- package/dist/components/scene-instance.d.ts.map +1 -1
- package/dist/components/screen-space-reflection.d.ts +14 -0
- package/dist/components/screen-space-reflection.d.ts.map +1 -0
- package/dist/components/skylight.d.ts +4 -1
- package/dist/components/skylight.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +14809 -7570
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/device-scope.d.ts +2 -0
- package/dist/device/device-scope.d.ts.map +1 -1
- package/dist/device/gpu-residency.d.ts +3 -14
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/dynamic-geometry.d.ts.map +1 -1
- package/dist/environment/background.d.ts +7 -0
- package/dist/environment/background.d.ts.map +1 -0
- package/dist/environment/ibl.d.ts +11 -0
- package/dist/environment/ibl.d.ts.map +1 -0
- package/dist/environment/storage.d.ts +14 -0
- package/dist/environment/storage.d.ts.map +1 -0
- package/dist/errors/gpu-driven.d.ts +6 -3
- package/dist/errors/gpu-driven.d.ts.map +1 -1
- package/dist/errors/render.d.ts +41 -4
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/extract/camera.d.ts.map +1 -1
- package/dist/extract/contracts.d.ts +7 -0
- package/dist/extract/contracts.d.ts.map +1 -1
- package/dist/extract/gpu-driven.d.ts +50 -3
- package/dist/extract/gpu-driven.d.ts.map +1 -1
- package/dist/features/host.d.ts +23 -1
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/noise-texture.d.ts +17 -0
- package/dist/features/noise-texture.d.ts.map +1 -0
- package/dist/features/plan.d.ts +83 -2
- package/dist/features/plan.d.ts.map +1 -1
- package/dist/features/prepared-gpu-work.d.ts +37 -4
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/prepared-graphics-store.d.ts.map +1 -1
- package/dist/features/prepared-graphics.d.ts +5 -0
- package/dist/features/prepared-graphics.d.ts.map +1 -1
- package/dist/features/render-graph-compute.d.ts +5 -3
- package/dist/features/render-graph-compute.d.ts.map +1 -1
- package/dist/features/render-graph-contribution.d.ts +11 -3
- package/dist/features/render-graph-contribution.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +19 -3
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/types.d.ts +11 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +2 -0
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/gpu-driven/batch-topology.d.ts +34 -1
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
- package/dist/gpu-driven/material-artifacts.d.ts +24 -0
- package/dist/gpu-driven/material-artifacts.d.ts.map +1 -0
- package/dist/gpu-driven/material-bindings.d.ts +7 -0
- package/dist/gpu-driven/material-bindings.d.ts.map +1 -0
- package/dist/gpu-driven/pbr-program.d.ts +10 -0
- package/dist/gpu-driven/pbr-program.d.ts.map +1 -0
- package/dist/gpu-driven/prepared-draw.d.ts +2 -0
- package/dist/gpu-driven/prepared-draw.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster.d.ts +169 -27
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-driven/shadow-views.d.ts +126 -0
- package/dist/gpu-driven/shadow-views.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +18 -2
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-resource.d.ts +5 -2
- package/dist/gpu-resource.d.ts.map +1 -1
- package/dist/gpu-scene-schema.d.ts +2 -8
- package/dist/gpu-scene-schema.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +14 -0
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/gpu-texture-usage.d.ts +1 -0
- package/dist/gpu-texture-usage.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +9 -0
- package/dist/hdrp-buffers.d.ts.map +1 -1
- package/dist/ibl/IblPipelineCache.d.ts +2 -0
- package/dist/ibl/IblPipelineCache.d.ts.map +1 -1
- package/dist/ibl/frame-resources.d.ts +8 -0
- package/dist/ibl/frame-resources.d.ts.map +1 -0
- package/dist/ibl/skylight-bind-group.d.ts +3 -1
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +87 -75
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +10 -8
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +180 -1
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/instances-derived-bounds.d.ts +11 -0
- package/dist/instances-derived-bounds.d.ts.map +1 -1
- package/dist/instances.d.ts +89 -44
- package/dist/instances.d.ts.map +1 -1
- package/dist/internal.d.ts +3 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.mjs +117 -9
- package/dist/internal.mjs.map +1 -1
- package/dist/lifecycle.d.ts +2 -1
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/material-row.d.ts +15 -0
- package/dist/material-row.d.ts.map +1 -0
- package/dist/materials.d.ts +15 -0
- package/dist/materials.d.ts.map +1 -1
- package/dist/pbr-pipeline.d.ts +23 -5
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/render-extent.d.ts +51 -0
- package/dist/pipeline/render-extent.d.ts.map +1 -0
- package/dist/pipeline/standard-build-context.d.ts +7 -0
- package/dist/pipeline/standard-build-context.d.ts.map +1 -0
- package/dist/pipeline/standard-forward-lane.d.ts +3 -2
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-output/auto-exposure/capability.d.ts +12 -0
- package/dist/pipeline/standard-output/auto-exposure/capability.d.ts.map +1 -0
- package/dist/pipeline/standard-output/auto-exposure/gpu.d.ts +70 -0
- package/dist/pipeline/standard-output/auto-exposure/gpu.d.ts.map +1 -0
- package/dist/pipeline/standard-output/auto-exposure/graph.d.ts +75 -0
- package/dist/pipeline/standard-output/auto-exposure/graph.d.ts.map +1 -0
- package/dist/pipeline/standard-output/auto-exposure/inspection.d.ts +111 -0
- package/dist/pipeline/standard-output/auto-exposure/inspection.d.ts.map +1 -0
- package/dist/pipeline/standard-output/auto-exposure/oracle.d.ts +16 -0
- package/dist/pipeline/standard-output/auto-exposure/oracle.d.ts.map +1 -0
- package/dist/pipeline/standard-output/auto-exposure/preset.d.ts +14 -0
- package/dist/pipeline/standard-output/auto-exposure/preset.d.ts.map +1 -0
- package/dist/pipeline/standard-output/auto-exposure/state.d.ts +46 -0
- package/dist/pipeline/standard-output/auto-exposure/state.d.ts.map +1 -0
- package/dist/pipeline/standard-output/color-transform.d.ts +27 -0
- package/dist/pipeline/standard-output/color-transform.d.ts.map +1 -0
- package/dist/pipeline/standard-output/graph.d.ts +15 -0
- package/dist/pipeline/standard-output/graph.d.ts.map +1 -0
- package/dist/pipeline/standard-output/lut-admission.d.ts +29 -0
- package/dist/pipeline/standard-output/lut-admission.d.ts.map +1 -0
- package/dist/pipeline/standard-output/lut-gpu.d.ts +48 -0
- package/dist/pipeline/standard-output/lut-gpu.d.ts.map +1 -0
- package/dist/pipeline/standard-output/lut-state.d.ts +68 -0
- package/dist/pipeline/standard-output/lut-state.d.ts.map +1 -0
- package/dist/pipeline/standard-output/resources.d.ts +10 -0
- package/dist/pipeline/standard-output/resources.d.ts.map +1 -0
- package/dist/pipeline/standard-output/types.d.ts +39 -0
- package/dist/pipeline/standard-output/types.d.ts.map +1 -0
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts +2 -2
- package/dist/pipeline/standard-post.d.ts.map +1 -1
- package/dist/pipeline/standard-profile.d.ts +2 -1
- package/dist/pipeline/standard-profile.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +5 -2
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec-types.d.ts +4 -0
- package/dist/pipeline-spec-types.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts +1 -9
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/points-lines/standard-owner.d.ts +1 -1
- package/dist/points-lines/standard-owner.d.ts.map +1 -1
- package/dist/post-process-errors.d.ts +9 -2
- package/dist/post-process-errors.d.ts.map +1 -1
- package/dist/prepare/extended-lighting/resources.d.ts +3 -3
- package/dist/prepare/prepared-graphics-resolver.d.ts +6 -1
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -1
- package/dist/record/dynamic-geometry-consumption.d.ts +15 -0
- package/dist/record/dynamic-geometry-consumption.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +3 -3
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +109 -13
- 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 +41 -5
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +13 -9
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +43 -3
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +2 -10
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +14 -2
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts +15 -6
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/prepared-material-bindings.d.ts +19 -0
- package/dist/record/prepared-material-bindings.d.ts.map +1 -0
- package/dist/record/recovery-pipeline.d.ts +1 -0
- package/dist/record/recovery-pipeline.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +101 -22
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts +62 -7
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/skybox-post-pass.d.ts +1 -1
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +39 -8
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +1 -0
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/recovery/render-system-candidate.d.ts +10 -2
- package/dist/recovery/render-system-candidate.d.ts.map +1 -1
- package/dist/recovery/render-system-roots.d.ts +11 -0
- package/dist/recovery/render-system-roots.d.ts.map +1 -0
- package/dist/recovery/types.d.ts +76 -0
- package/dist/recovery/types.d.ts.map +1 -0
- package/dist/reflection/background.d.ts +14 -0
- package/dist/reflection/background.d.ts.map +1 -0
- package/dist/reflection/filter.d.ts.map +1 -1
- package/dist/reflection/projection.d.ts +1 -0
- package/dist/reflection/projection.d.ts.map +1 -1
- package/dist/reflection/record-owner.d.ts +4 -4
- package/dist/reflection/record-owner.d.ts.map +1 -1
- package/dist/render-contract.d.ts +211 -53
- package/dist/render-contract.d.ts.map +1 -1
- package/dist/render-graph-primitives.d.ts +1 -0
- package/dist/render-graph-primitives.d.ts.map +1 -1
- package/dist/render-pipeline.d.ts +81 -6
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +15 -6
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +128 -41
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system-projections.d.ts +22 -0
- package/dist/render-system-projections.d.ts.map +1 -0
- package/dist/render-system.d.ts +27 -77
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/render-scene-types.d.ts +14 -7
- package/dist/scene/render-scene-types.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +31 -11
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/scene/shadow-visibility.d.ts +5 -0
- package/dist/scene/shadow-visibility.d.ts.map +1 -0
- package/dist/ssao-config.d.ts +8 -6
- package/dist/ssao-config.d.ts.map +1 -1
- package/dist/ssr/admission.d.ts +70 -1
- package/dist/ssr/admission.d.ts.map +1 -1
- package/dist/ssr/compose.d.ts +13 -0
- package/dist/ssr/compose.d.ts.map +1 -0
- package/dist/ssr/errors.d.ts +35 -0
- package/dist/ssr/errors.d.ts.map +1 -1
- package/dist/ssr/graph.d.ts +60 -0
- package/dist/ssr/graph.d.ts.map +1 -0
- package/dist/ssr/history.d.ts +97 -0
- package/dist/ssr/history.d.ts.map +1 -0
- package/dist/ssr/hiz.d.ts +37 -0
- package/dist/ssr/hiz.d.ts.map +1 -0
- package/dist/ssr/inspection.d.ts +42 -0
- package/dist/ssr/inspection.d.ts.map +1 -0
- package/dist/ssr/resources.d.ts +58 -0
- package/dist/ssr/resources.d.ts.map +1 -0
- package/dist/ssr/temporal.d.ts +38 -0
- package/dist/ssr/temporal.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts +32 -10
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -1
- package/dist/systems/skin-palette-types.d.ts +15 -0
- package/dist/systems/skin-palette-types.d.ts.map +1 -1
- package/dist/systems/transparent-dispatch.d.ts +9 -0
- package/dist/systems/transparent-dispatch.d.ts.map +1 -0
- package/dist/targets/material-source.d.ts +7 -0
- package/dist/targets/material-source.d.ts.map +1 -1
- package/dist/temporal/frame-coordinator.d.ts +7 -0
- package/dist/temporal/frame-coordinator.d.ts.map +1 -1
- package/dist/temporal/gpu.d.ts +8 -0
- package/dist/temporal/gpu.d.ts.map +1 -1
- package/dist/temporal/history.d.ts.map +1 -1
- package/dist/temporal/index.mjs +6 -6
- package/dist/temporal/inspection.d.ts.map +1 -1
- package/dist/temporal/standard-scene-data.d.ts +4 -2
- package/dist/temporal/standard-scene-data.d.ts.map +1 -1
- package/dist/temporal/target-coverage-attachment.d.ts +15 -0
- package/dist/temporal/target-coverage-attachment.d.ts.map +1 -0
- package/dist/temporal/temporal-view.d.ts +6 -0
- package/dist/temporal/temporal-view.d.ts.map +1 -1
- package/dist/temporal/view.d.ts +6 -0
- package/dist/temporal/view.d.ts.map +1 -1
- package/dist/typed-render-graph-primitives.d.ts +41 -1
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/typed-shadow-passes.d.ts +3 -1
- package/dist/typed-shadow-passes.d.ts.map +1 -1
- package/dist/volume/component.d.ts +1 -0
- package/dist/volume/component.d.ts.map +1 -1
- package/dist/volume/temporal.d.ts +6 -0
- package/dist/volume/temporal.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/__tests__/auto-exposure-gpu-evidence.ts +291 -0
- package/src/__tests__/auto-exposure-inspection.unit.test.ts +80 -0
- package/src/__tests__/auto-exposure-transaction.integration.test.ts +99 -0
- package/src/__tests__/auto-exposure.browser.test.ts +33 -0
- package/src/__tests__/auto-exposure.dawn.test.ts +33 -0
- package/src/__tests__/capture-scene-projection.unit.test.ts +24 -0
- package/src/__tests__/detached-inspection.integration.test.ts +5 -0
- package/src/__tests__/device-feature-admission.unit.test.ts +15 -24
- package/src/__tests__/device-loss-fanout.unit.test.ts +43 -0
- package/src/__tests__/device-scope-lifecycle.unit.test.ts +18 -0
- package/src/__tests__/device-scope-stale-matrix.unit.test.ts +18 -0
- package/src/__tests__/docs-gate-green.unit.test.ts +3 -3
- package/src/__tests__/dynamic-geometry-batch.unit.test.ts +157 -0
- package/src/__tests__/dynamic-geometry.unit.test.ts +36 -0
- package/src/__tests__/dynamic-resolution-plugin.integration.test.ts +81 -0
- package/src/__tests__/factory-contract.integration.test.ts +231 -9
- package/src/__tests__/fallback-row-stride-surface.unit.test.ts +19 -0
- package/src/__tests__/feature-depth-input.dawn.test.ts +121 -0
- package/src/__tests__/feature-noise.unit.test.ts +38 -0
- package/src/__tests__/fixtures/taa-resolve-pinned-baseline.wgsl +301 -0
- package/src/__tests__/frame-camera-selection.unit.test.ts +131 -0
- package/src/__tests__/frame-observation.contract.test.ts +21 -0
- package/src/__tests__/frame-plan-contract.unit.test.ts +24 -0
- package/src/__tests__/frame-targets.unit.test.ts +24 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +3 -0
- package/src/__tests__/gpu-driven-baseline.characterization.test.ts +79 -0
- package/src/__tests__/gpu-driven-batch-topology-pbr.unit.test.ts +307 -7
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +122 -142
- package/src/__tests__/gpu-driven-indirect-raster.browser.test.ts +10 -1
- package/src/__tests__/gpu-driven-lod-cache.unit.test.ts +261 -0
- package/src/__tests__/gpu-driven-mesh-world-identity.unit.test.ts +346 -0
- package/src/__tests__/gpu-driven-pbr.dawn.test.ts +1422 -0
- package/src/__tests__/gpu-driven-pbr.integration.test.ts +21 -0
- package/src/__tests__/gpu-driven-production-fixture.ts +96 -0
- package/src/__tests__/gpu-driven-production.integration.test.ts +1076 -106
- package/src/__tests__/gpu-driven-scaling.unit.test.ts +1 -3
- package/src/__tests__/gpu-driven-shadow-views.browser.test.ts +63 -0
- package/src/__tests__/gpu-driven-shadow-views.dawn.test.ts +294 -0
- package/src/__tests__/gpu-driven-shadow-views.integration.test.ts +97 -0
- package/src/__tests__/gpu-driven-shadow-views.unit.test.ts +168 -0
- package/src/__tests__/gpu-driven-skin-contract.test-d.ts +11 -0
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +72 -20
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +30 -9
- package/src/__tests__/gpu-driven-view.unit.test.ts +160 -52
- package/src/__tests__/gpu-pass-timing-browser-runner.ts +15 -0
- package/src/__tests__/gpu-pass-timing.browser.test.ts +20 -2
- package/src/__tests__/gpu-resource-scope.unit.test.ts +71 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +42 -0
- package/src/__tests__/gpu-scene-render-graph-gpu.ts +19 -5
- package/src/__tests__/gpu-scene.dawn.test.ts +40 -13
- package/src/__tests__/gpu-scene.unit.test.ts +613 -33
- package/src/__tests__/instances-culling.integration.test.ts +36 -10
- package/src/__tests__/instances-derived-bounds.unit.test.ts +54 -0
- package/src/__tests__/instances-store.unit.test.ts +242 -39
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +6 -0
- package/src/__tests__/lighting-scene-roundtrip.integration.test.ts +13 -16
- package/src/__tests__/lut-lkg-transaction.integration.test.ts +122 -0
- package/src/__tests__/material-contract-inventory.unit.test.ts +5 -6
- package/src/__tests__/material-dispatch-shader-id.unit.test.ts +51 -0
- package/src/__tests__/material-lane-selection.unit.test.ts +60 -0
- package/src/__tests__/material-numeric-upload.unit.test.ts +53 -0
- package/src/__tests__/material-texture-handles.unit.test.ts +18 -0
- package/src/__tests__/material-texture-source.unit.test.ts +87 -0
- package/src/__tests__/materials-authoring-validation.unit.test.ts +41 -0
- package/src/__tests__/materials-standard-contract.unit.test.ts +57 -3
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +4 -0
- package/src/__tests__/mesh-submission-lifetime.unit.test.ts +8 -0
- package/src/__tests__/morph-neutral-admission.unit.test.ts +19 -0
- package/src/__tests__/normal-fallback.dawn.test.ts +122 -0
- package/src/__tests__/particle-material-input-layout.unit.test.ts +104 -0
- package/src/__tests__/physical-clearcoat.integration.test.ts +42 -3
- package/src/__tests__/pipeline-texture-specialization.unit.test.ts +138 -0
- package/src/__tests__/point-shadow-inspection.unit.test.ts +2 -0
- package/src/__tests__/post-process-error-policy-owner.unit.test.ts +6 -5
- package/src/__tests__/prepared-gpu-driven-pbr-contract.test-d.ts +31 -0
- package/src/__tests__/prepared-gpu-driven-pbr-contract.unit.test.ts +39 -0
- package/src/__tests__/prepared-gpu-driven-pbr.integration.test.ts +251 -9
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +21 -0
- package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +6 -2
- package/src/__tests__/profiler-phase-catalog.test.ts +5 -0
- package/src/__tests__/public-surface.test-d.ts +3 -0
- package/src/__tests__/recovery-candidate-prepare.contract.test.ts +30 -12
- package/src/__tests__/reflection-fallback-async-publication.unit.test.ts +171 -0
- package/src/__tests__/reflection-probe-authoring.unit.test.ts +12 -10
- package/src/__tests__/reflection-probe-box.dawn.test.ts +71 -0
- package/src/__tests__/reflection-probe-filter.unit.test.ts +9 -0
- package/src/__tests__/reflection-probe-orientation.dawn.test.ts +294 -0
- package/src/__tests__/reflection-probe-record-owner.characterization.unit.test.ts +5 -14
- package/src/__tests__/reflection-probe-updates.unit.test.ts +129 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +7 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +27 -1
- package/src/__tests__/render-error-exhaustive.test-d.ts +15 -0
- package/src/__tests__/render-extent.unit.test.ts +63 -0
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +285 -2
- package/src/__tests__/render-feature-plan.unit.test.ts +245 -0
- package/src/__tests__/render-feature-shadow-order.unit.test.ts +228 -0
- package/src/__tests__/render-feature-zero-work.unit.test.ts +35 -1
- package/src/__tests__/render-graph-fallback.integration.test.ts +2 -2
- package/src/__tests__/render-owner-cohesion.unit.test.ts +55 -0
- package/src/__tests__/render-scene-mixed-updates.integration.test.ts +426 -0
- package/src/__tests__/render-scene-projection.unit.test.ts +915 -23
- package/src/__tests__/render-scene-resource-updates.integration.test.ts +214 -0
- package/src/__tests__/render-scene-skin-lifecycle.integration.test.ts +173 -0
- package/src/__tests__/render-scene-temporal-retry.unit.test.ts +133 -0
- package/src/__tests__/render-target-material-source.test-d.ts +27 -3
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +233 -9
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +923 -5
- package/src/__tests__/shader-manifest-fixture.ts +45 -0
- package/src/__tests__/skin-motion-regression.unit.test.ts +0 -33
- package/src/__tests__/skin-palette-persistent.integration.test.ts +28 -0
- package/src/__tests__/skin-palette-persistent.unit.test.ts +247 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +125 -14
- package/src/__tests__/specular-environment-scale.dawn.test.ts +158 -0
- package/src/__tests__/ssao-config.unit.test.ts +7 -0
- package/src/__tests__/ssao-surface.dawn.test.ts +252 -0
- package/src/__tests__/ssr-admission-matrix.integration.test.ts +7 -1
- package/src/__tests__/ssr-confidence-compose.unit.test.ts +84 -0
- package/src/__tests__/ssr-coordinate-oracle.unit.test.ts +28 -0
- package/src/__tests__/ssr-cube-silhouette.dawn.test.ts +270 -0
- package/src/__tests__/ssr-format-probe-gating.integration.test.ts +82 -0
- package/src/__tests__/ssr-gpu-dispatch.browser.test.ts +99 -0
- package/src/__tests__/ssr-gpu-dispatch.dawn.test.ts +116 -0
- package/src/__tests__/ssr-gpu-dispatch.ts +951 -0
- package/src/__tests__/ssr-graph-topology.unit.test.ts +104 -0
- package/src/__tests__/ssr-history-filter.dawn.test.ts +198 -0
- package/src/__tests__/ssr-hit-color.dawn.test.ts +273 -0
- package/src/__tests__/ssr-hiz-odd-reduction.dawn.test.ts +569 -0
- package/src/__tests__/ssr-hiz-rescue.dawn.test.ts +279 -0
- package/src/__tests__/ssr-hiz.browser.test.ts +150 -0
- package/src/__tests__/ssr-hiz.dawn.test.ts +150 -0
- package/src/__tests__/ssr-hiz.unit.test.ts +56 -0
- package/src/__tests__/ssr-inspection.unit.test.ts +105 -0
- package/src/__tests__/ssr-memory-budget.unit.test.ts +45 -0
- package/src/__tests__/ssr-performance-sequence-aggregation.unit.test.ts +15 -0
- package/src/__tests__/ssr-public-surface.test-d.ts +37 -0
- package/src/__tests__/ssr-receiver-coverage.dawn.test.ts +387 -0
- package/src/__tests__/ssr-reflection-mip-reducer.dawn.test.ts +309 -0
- package/src/__tests__/ssr-reprojection-probe.ts +90 -0
- package/src/__tests__/ssr-roughness-mip.dawn.test.ts +163 -0
- package/src/__tests__/ssr-shader-prewarm.unit.test.ts +59 -0
- package/src/__tests__/ssr-spatial.integration.test.ts +141 -0
- package/src/__tests__/ssr-stable-lattice.dawn.test.ts +475 -0
- package/src/__tests__/ssr-temporal-history.unit.test.ts +202 -0
- package/src/__tests__/ssr-texel-crossing.dawn.test.ts +448 -0
- package/src/__tests__/ssr-zero-work.integration.test.ts +87 -0
- package/src/__tests__/standard-cluster-variant-resolution.unit.test.ts +84 -12
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +29 -0
- package/src/__tests__/standard-output-chain-contract.unit.test.ts +99 -0
- package/src/__tests__/standard-output-chain.integration.test.ts +73 -0
- package/src/__tests__/standard-output-gpu-evidence.ts +205 -0
- package/src/__tests__/standard-output.browser.test.ts +15 -0
- package/src/__tests__/standard-output.dawn.test.ts +15 -0
- package/src/__tests__/standard-pbr-artifact-assembly.unit.test.ts +275 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +320 -3
- package/src/__tests__/standard-profile-oracle.unit.test.ts +49 -0
- package/src/__tests__/standard-surface-lighting.unit.test.ts +41 -0
- package/src/__tests__/standard-texture-specialization.dawn.test.ts +141 -0
- package/src/__tests__/surface-adjacent-regressions.integration.test.ts +6 -3
- package/src/__tests__/taa-coverage-edge.dawn.test.ts +199 -0
- package/src/__tests__/taa-history-clipping.dawn.test.ts +328 -0
- package/src/__tests__/taa-neighborhood-equivalence.dawn.test.ts +782 -0
- package/src/__tests__/taa-stability-feedback.browser.test.ts +23 -0
- package/src/__tests__/taa-stability-feedback.dawn.test.ts +68 -0
- package/src/__tests__/taa-stability-feedback.ts +342 -0
- package/src/__tests__/temporal-history-lifecycle.unit.test.ts +49 -7
- package/src/__tests__/temporal-reset-matrix.unit.test.ts +9 -0
- package/src/__tests__/temporal-transaction.integration.test.ts +28 -0
- package/src/__tests__/temporal-view.unit.test.ts +17 -0
- package/src/__tests__/texture-usage-surface.unit.test.ts +4 -2
- package/src/__tests__/transmission-prewarm.unit.test.ts +57 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +109 -4
- package/src/__tests__/typed-scene-pass-material-cache.integration.test.ts +126 -0
- package/src/__tests__/vertex-layouts-ssot.unit.test.ts +47 -0
- package/src/__tests__/visibility-extract.perf.test.ts +20 -8
- package/src/__tests__/visibility-instances.integration.test.ts +19 -7
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +20 -9
- package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +62 -13
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +7 -7
- package/src/assembly/atmosphere-shader-prewarm.ts +39 -0
- package/src/assembly/device-feature-admission.ts +9 -4
- package/src/assembly/dynamic-geometry-host.ts +284 -163
- package/src/assembly/dynamic-geometry-runtime.ts +71 -0
- package/src/assembly/factory.ts +4 -0
- package/src/assembly/gpu-driven-owner.ts +29 -0
- package/src/assembly/host-contract.ts +19 -0
- package/src/assembly/material/assembly.ts +383 -1
- package/src/assembly/material/pipeline-helpers.ts +100 -0
- package/src/assembly/material-shader-policy.ts +110 -46
- package/src/assembly/recovery/device-loss-fanout.ts +5 -0
- package/src/assembly/recovery/failure-location.ts +62 -0
- package/src/assembly/recovery/recovery-attempt.ts +2 -29
- package/src/assembly/recovery/renderer-recover.ts +16 -17
- package/src/assembly/renderer-facade.ts +34 -1
- package/src/assembly/renderer-feature-inspection.ts +13 -0
- package/src/assembly/renderer-frame-transaction.ts +63 -0
- package/src/assembly/renderer-helpers.ts +26 -0
- package/src/assembly/renderer-inspection.ts +6 -0
- package/src/assembly/shader-prewarm-policy.ts +46 -1
- package/src/assembly/skin-palette-owner.ts +21 -0
- package/src/assembly/ssr-shader-prewarm.ts +41 -0
- package/src/assembly/webgpu-device-loss.ts +75 -0
- package/src/assembly/webgpu-pbr-ready.ts +232 -0
- package/src/assembly/webgpu-ready-mipmap.ts +26 -0
- package/src/assembly/webgpu-ready.ts +161 -131
- package/src/assembly/webgpu-renderer-bootstrap.ts +85 -0
- package/src/assembly/webgpu-renderer-contract.ts +69 -0
- package/src/assembly/webgpu-renderer-guards.ts +32 -0
- package/src/assembly/webgpu-renderer-observation.ts +43 -0
- package/src/assembly/webgpu-renderer-recovery-failure.ts +62 -0
- package/src/assembly/webgpu-renderer.ts +744 -730
- package/src/assembly/webgpu-vertex-layouts.ts +233 -87
- package/src/capture/scene-projection.ts +37 -0
- package/src/components/__tests__/camera-exposure.contract.unit.test.ts +153 -0
- package/src/components/__tests__/dynamic-resolution-schema.unit.test.ts +65 -0
- package/src/components/__tests__/light-radius.integration.test.ts +59 -0
- package/src/components/camera.ts +287 -7
- package/src/components/directional-light.ts +3 -3
- package/src/components/dynamic-resolution.ts +67 -0
- package/src/components/index.ts +2 -0
- package/src/components/instances.ts +45 -18
- package/src/components/light-helpers.ts +6 -1
- package/src/components/reflection-probe.ts +1 -0
- package/src/components/scene-instance.ts +2 -1
- package/src/components/screen-space-reflection.ts +21 -0
- package/src/components/skylight.ts +4 -1
- package/src/components/sprite-animation.ts +2 -2
- package/src/components/sprite-instances.ts +1 -1
- package/src/device/device-scope.ts +13 -7
- package/src/device/gpu-residency.ts +45 -42
- package/src/dynamic-geometry.ts +13 -8
- package/src/environment/background.ts +281 -0
- package/src/environment/ibl.ts +211 -0
- package/src/environment/storage.ts +63 -0
- package/src/errors/gpu-driven.ts +49 -8
- package/src/errors/render.ts +91 -3
- package/src/extract/camera.ts +37 -1
- package/src/extract/contracts.ts +10 -0
- package/src/extract/gpu-driven.ts +240 -10
- package/src/features/host.ts +237 -19
- package/src/features/noise-texture.ts +91 -0
- package/src/features/plan.ts +553 -24
- package/src/features/prepared-gpu-work.ts +631 -49
- package/src/features/prepared-graphics-store.ts +31 -0
- package/src/features/prepared-graphics.ts +5 -0
- package/src/features/render-graph-compute.ts +41 -8
- package/src/features/render-graph-contribution.ts +141 -3
- package/src/features/render-graph-raster.ts +143 -30
- package/src/features/types.ts +11 -0
- package/src/fullscreen-post-process-pass.ts +3 -0
- package/src/gpu-driven/batch-topology.ts +452 -108
- package/src/gpu-driven/material-artifacts.ts +179 -0
- package/src/gpu-driven/material-bindings.ts +41 -0
- package/src/gpu-driven/pbr-program.ts +31 -0
- package/src/gpu-driven/prepared-draw.ts +42 -6
- package/src/gpu-driven/production-raster.ts +2806 -716
- package/src/gpu-driven/shadow-views.ts +539 -0
- package/src/gpu-driven/view-gpu.ts +188 -41
- package/src/gpu-resource.ts +21 -2
- package/src/gpu-scene-schema.ts +61 -11
- package/src/gpu-scene.ts +197 -99
- package/src/gpu-texture-usage.ts +1 -0
- package/src/hdrp-buffers.ts +141 -36
- package/src/ibl/IblPipelineCache.ts +5 -0
- package/src/ibl/frame-resources.ts +38 -0
- package/src/ibl/skylight-bind-group.ts +32 -21
- package/src/index.ts +194 -75
- package/src/inspection-types.ts +207 -1
- package/src/instances-derived-bounds.ts +258 -34
- package/src/instances.ts +459 -150
- package/src/internal.ts +22 -0
- package/src/lifecycle.ts +2 -0
- package/src/material-row.ts +194 -0
- package/src/materials.ts +44 -8
- package/src/pbr-pipeline.ts +172 -19
- package/src/pipeline/render-extent.ts +111 -0
- package/src/pipeline/standard-build-context.ts +7 -0
- package/src/pipeline/standard-forward-lane.ts +74 -29
- package/src/pipeline/standard-output/__tests__/lut-admission.unit.test.ts +103 -0
- package/src/pipeline/standard-output/auto-exposure/__tests__/capability.unit.test.ts +40 -0
- package/src/pipeline/standard-output/auto-exposure/__tests__/gpu.contract.unit.test.ts +125 -0
- package/src/pipeline/standard-output/auto-exposure/__tests__/graph.contract.unit.test.ts +94 -0
- package/src/pipeline/standard-output/auto-exposure/__tests__/oracle.test.ts +108 -0
- package/src/pipeline/standard-output/auto-exposure/__tests__/preset.test.ts +26 -0
- package/src/pipeline/standard-output/auto-exposure/capability.ts +38 -0
- package/src/pipeline/standard-output/auto-exposure/gpu.ts +567 -0
- package/src/pipeline/standard-output/auto-exposure/graph.ts +221 -0
- package/src/pipeline/standard-output/auto-exposure/inspection.ts +231 -0
- package/src/pipeline/standard-output/auto-exposure/oracle.ts +291 -0
- package/src/pipeline/standard-output/auto-exposure/preset.ts +28 -0
- package/src/pipeline/standard-output/auto-exposure/state.ts +156 -0
- package/src/pipeline/standard-output/color-transform.ts +124 -0
- package/src/pipeline/standard-output/graph.ts +139 -0
- package/src/pipeline/standard-output/lut-admission.ts +121 -0
- package/src/pipeline/standard-output/lut-gpu.ts +399 -0
- package/src/pipeline/standard-output/lut-state.ts +176 -0
- package/src/pipeline/standard-output/resources.ts +121 -0
- package/src/pipeline/standard-output/types.ts +58 -0
- package/src/pipeline/standard-pipeline.ts +232 -70
- package/src/pipeline/standard-post.ts +190 -27
- package/src/pipeline/standard-profile.ts +2 -1
- package/src/pipeline-builder.ts +28 -9
- package/src/pipeline-spec-types.ts +4 -0
- package/src/pipeline-spec.ts +37 -29
- package/src/plugin.ts +4 -0
- package/src/points-lines/standard-owner.ts +6 -14
- package/src/post-process-errors.ts +26 -18
- package/src/prepare/__tests__/extended-lighting-capability.unit.test.ts +2 -2
- package/src/prepare/extended-lighting/resources.ts +3 -3
- package/src/prepare/prepared-graphics-resolver.ts +9 -2
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +68 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +45 -0
- package/src/record/__tests__/material-slot-plan.unit.test.ts +57 -0
- package/src/record/__tests__/mesh-ssbo.unit.test.ts +40 -1
- package/src/record/__tests__/recovery-pipeline.unit.test.ts +20 -1
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +41 -6
- package/src/record/__tests__/temporal-payload.unit.test.ts +2 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +45 -0
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +5 -0
- package/src/record/dynamic-geometry-consumption.ts +59 -0
- package/src/record/frame-lighting.ts +15 -12
- package/src/record/frame-snapshot.ts +146 -34
- package/src/record/frame-targets.ts +9 -0
- package/src/record/frame.ts +838 -170
- package/src/record/main-pass-geometry.ts +209 -103
- package/src/record/main-pass-material.ts +157 -40
- package/src/record/main-pass-sprite-draws.ts +16 -107
- package/src/record/main-pass.ts +141 -12
- package/src/record/material-uniforms.ts +1 -1
- package/src/record/mesh-ssbo.ts +59 -15
- package/src/record/prepared-material-bindings.ts +238 -0
- package/src/record/recovery-pipeline.ts +69 -90
- package/src/record/render-context.ts +123 -24
- package/src/record/shadow-pass.ts +1389 -230
- package/src/record/skybox-post-pass.ts +14 -3
- package/src/record/typed-frame-graph.ts +1064 -47
- package/src/record/view-ubo.ts +12 -1
- package/src/recovery/render-system-candidate.ts +135 -68
- package/src/recovery/render-system-roots.ts +113 -0
- package/src/recovery/types.ts +77 -0
- package/src/reflection/background.ts +151 -0
- package/src/reflection/filter.ts +3 -0
- package/src/reflection/projection.ts +16 -6
- package/src/reflection/record-owner.ts +308 -140
- package/src/render-contract.ts +237 -49
- package/src/render-graph-primitives.ts +34 -5
- package/src/render-pipeline.ts +90 -2
- package/src/render-system-extract-tail.ts +431 -162
- package/src/render-system-extract.ts +478 -119
- package/src/render-system-projections.ts +241 -0
- package/src/render-system.ts +715 -828
- package/src/scene/render-scene-types.ts +13 -4
- package/src/scene/render-scene.ts +577 -355
- package/src/scene/shadow-visibility.ts +21 -0
- package/src/ssao-config.ts +25 -8
- package/src/ssr/admission.ts +380 -14
- package/src/ssr/compose.ts +144 -0
- package/src/ssr/errors.ts +48 -0
- package/src/ssr/graph.ts +797 -0
- package/src/ssr/history.ts +436 -0
- package/src/ssr/hiz.ts +124 -0
- package/src/ssr/inspection.ts +124 -0
- package/src/ssr/resources.ts +202 -0
- package/src/ssr/temporal.ts +164 -0
- package/src/systems/skin-palette-allocator.ts +495 -148
- package/src/systems/skin-palette-types.ts +17 -0
- package/src/systems/transparent-dispatch.ts +90 -0
- package/src/targets/material-source.ts +34 -0
- package/src/temporal/coverage.ts +1 -1
- package/src/temporal/frame-coordinator.ts +23 -2
- package/src/temporal/gpu.ts +79 -12
- package/src/temporal/history.ts +3 -1
- package/src/temporal/inspection.ts +2 -1
- package/src/temporal/standard-scene-data.ts +10 -2
- package/src/temporal/target-coverage-attachment.ts +72 -0
- package/src/temporal/temporal-view.ts +11 -2
- package/src/temporal/view.ts +12 -2
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +219 -139
- package/src/typed-render-graph-primitives.ts +304 -74
- package/src/typed-shadow-passes.ts +122 -12
- package/src/volume/component.ts +1 -0
- package/src/volume/passes.ts +3 -3
- package/src/volume/temporal.ts +10 -0
- package/dist/chunk-GE3SDD72.mjs.map +0 -1
- package/dist/chunk-GF523LHF.mjs.map +0 -1
- package/dist/chunk-IQMKJLNU.mjs.map +0 -1
- package/dist/chunk-J52NMQKR.mjs.map +0 -1
- package/dist/chunk-J6KACNOH.mjs.map +0 -1
- package/dist/chunk-JAASCMXA.mjs.map +0 -1
- package/dist/chunk-MBU4ZVE7.mjs.map +0 -1
- package/dist/chunk-MYJ5RPJO.mjs.map +0 -1
- package/dist/chunk-RBDBZ5R7.mjs.map +0 -1
- package/dist/chunk-VSL23LZE.mjs.map +0 -1
- package/src/__tests__/instances-world-ownership.integration.test.ts +0 -62
- package/src/scene/__tests__/changed-block-summary.candidate.test.ts +0 -36
package/src/inspection-types.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { DirectionalShadowFilterLabel } from './components/directional-shadow-filter';
|
|
8
|
+
import type {
|
|
9
|
+
GpuDrivenPreparationErrorCode,
|
|
10
|
+
GpuDrivenPreparationErrorDetail,
|
|
11
|
+
} from './errors/gpu-driven';
|
|
8
12
|
import type { PointsLinesInspection } from './points-lines/inspection';
|
|
9
13
|
import type { LodOcclusionInspection } from './scene/visibility/inspection';
|
|
10
14
|
import type { SsrAdmissionIdentity } from './ssr/identity';
|
|
@@ -45,6 +49,12 @@ export type {
|
|
|
45
49
|
SsrOwnerRecoveryAction,
|
|
46
50
|
} from './ssr/errors';
|
|
47
51
|
export type { SsrAdmissionIdentity } from './ssr/identity';
|
|
52
|
+
export type {
|
|
53
|
+
SsrSpatialHistoryInspection,
|
|
54
|
+
SsrSpatialInspection,
|
|
55
|
+
SsrSpatialInspectionFailure,
|
|
56
|
+
SsrSpatialInspectionProjection,
|
|
57
|
+
} from './ssr/inspection';
|
|
48
58
|
|
|
49
59
|
export interface LightInspectionInput {
|
|
50
60
|
readonly generation: number;
|
|
@@ -101,6 +111,80 @@ export interface BatchTopologyInspection {
|
|
|
101
111
|
readonly rebuilds: number;
|
|
102
112
|
readonly patches: number;
|
|
103
113
|
readonly ineligible: number;
|
|
114
|
+
/** Payload-only candidate updates that preserved batch topology. */
|
|
115
|
+
readonly payloadPatches?: number;
|
|
116
|
+
/** Number of retained-slot descriptor comparisons. */
|
|
117
|
+
readonly membershipChecks?: number;
|
|
118
|
+
/** Candidate membership records materialized by the owner. */
|
|
119
|
+
readonly membershipAllocations?: number;
|
|
120
|
+
readonly candidateAdds?: number;
|
|
121
|
+
readonly candidateRemoves?: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Detached evidence for the declarative feature host and typed graph. These
|
|
126
|
+
* counters are diagnostic projections only; they do not alter graph admission
|
|
127
|
+
* or prepared-resource retirement semantics.
|
|
128
|
+
*/
|
|
129
|
+
export interface RenderFeatureHostInspection {
|
|
130
|
+
readonly signatures: readonly {
|
|
131
|
+
readonly featureIdentity: string;
|
|
132
|
+
readonly calls: number;
|
|
133
|
+
readonly typedArrayBytes: number;
|
|
134
|
+
readonly outputChars: number;
|
|
135
|
+
readonly cpuMs: number;
|
|
136
|
+
/** Number of exact structural comparisons that reused a detached snapshot. */
|
|
137
|
+
readonly cacheHits: number;
|
|
138
|
+
/** Number of structural changes that allocated a new signature revision. */
|
|
139
|
+
readonly cacheMisses: number;
|
|
140
|
+
}[];
|
|
141
|
+
readonly prepared: {
|
|
142
|
+
readonly retained: number;
|
|
143
|
+
readonly submitted: number;
|
|
144
|
+
readonly released: number;
|
|
145
|
+
readonly releaseFailures: number;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface RenderFeatureGraphInspection {
|
|
150
|
+
/** Monotonic revision of the last completely validated feature plan set. */
|
|
151
|
+
readonly planRevision: number;
|
|
152
|
+
readonly signatureValidationCalls: number;
|
|
153
|
+
readonly signatureValidationBytes: number;
|
|
154
|
+
readonly signatureValidationChars: number;
|
|
155
|
+
readonly signatureValidationCpuMs: number;
|
|
156
|
+
/** Number of plan validations satisfied by detached structural evidence. */
|
|
157
|
+
readonly signatureValidationCacheHits: number;
|
|
158
|
+
/** Number of plan validations that fell back to canonical serialization. */
|
|
159
|
+
readonly signatureValidationCacheMisses: number;
|
|
160
|
+
readonly ensureCalls: number;
|
|
161
|
+
readonly reuseHits: number;
|
|
162
|
+
readonly rebuildAttempts: number;
|
|
163
|
+
readonly compileAttempts: number;
|
|
164
|
+
readonly compileSuccesses: number;
|
|
165
|
+
readonly compileFailures: number;
|
|
166
|
+
readonly validationFailures: number;
|
|
167
|
+
readonly buildFailures: number;
|
|
168
|
+
readonly compileCpuMs: number;
|
|
169
|
+
readonly candidatesWithPreparedBatches: number;
|
|
170
|
+
readonly preparedKeyChanges: number;
|
|
171
|
+
readonly accepted: number;
|
|
172
|
+
readonly rejected: number;
|
|
173
|
+
readonly abandoned: number;
|
|
174
|
+
readonly last: {
|
|
175
|
+
readonly planSignature: string;
|
|
176
|
+
readonly topologyKey: string | undefined;
|
|
177
|
+
readonly preparedResourceKey: string | undefined;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** Detached material texture-source probe accounting for the last extract. */
|
|
182
|
+
export interface MaterialTextureSourceInspection {
|
|
183
|
+
readonly sourceFieldsVisited: number;
|
|
184
|
+
readonly numericSharedRefProbes: number;
|
|
185
|
+
readonly sourceCacheHits: number;
|
|
186
|
+
readonly sourceCacheMisses: number;
|
|
187
|
+
readonly producerRoutes: Readonly<Record<string, number>>;
|
|
104
188
|
}
|
|
105
189
|
|
|
106
190
|
export interface ProbeBlendRecordInspection {
|
|
@@ -177,7 +261,88 @@ export interface GpuSceneInspection {
|
|
|
177
261
|
readonly noChangeFrames: number;
|
|
178
262
|
}
|
|
179
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Closed GPU-driven execution lanes exposed by the detached inspection
|
|
266
|
+
* surface. `cpu-semantic` keeps the existing material/authoring semantics,
|
|
267
|
+
* while `cpu-deformation` is reserved for skin data that cannot be safely
|
|
268
|
+
* represented by the GPU palette contract. `blocked` means the renderer
|
|
269
|
+
* refused to promote an incomplete candidate instead of silently changing
|
|
270
|
+
* its meaning.
|
|
271
|
+
*/
|
|
272
|
+
export type GpuDrivenLane = 'gpu' | 'cpu-semantic' | 'cpu-deformation' | 'blocked';
|
|
273
|
+
|
|
274
|
+
/** Closed, machine-readable reasons for a lane decision or recovery state. */
|
|
275
|
+
export type GpuDrivenLaneReason =
|
|
276
|
+
| 'none'
|
|
277
|
+
| 'capability'
|
|
278
|
+
| 'unsupported'
|
|
279
|
+
| 'resource-not-ready'
|
|
280
|
+
| 'shadow-ownership'
|
|
281
|
+
| 'capacity'
|
|
282
|
+
| 'overflow'
|
|
283
|
+
| 'stale-generation'
|
|
284
|
+
| 'device-recovery'
|
|
285
|
+
| 'skin-bounds-missing'
|
|
286
|
+
| 'skin-address-missing';
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Detached producer failure facts carried by a blocked GPU lane. This keeps
|
|
290
|
+
* owner and recovery machine-readable at the same boundary as the lane
|
|
291
|
+
* decision; callers never need to parse an RhiError hint or shader name.
|
|
292
|
+
*/
|
|
293
|
+
export interface GpuDrivenPreparationFailureInspection {
|
|
294
|
+
readonly code: GpuDrivenPreparationErrorCode;
|
|
295
|
+
readonly expected: string;
|
|
296
|
+
readonly hint: string;
|
|
297
|
+
readonly detail: GpuDrivenPreparationErrorDetail;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* One bounded aggregate; never includes a per-draw/live renderer object.
|
|
302
|
+
* Every count uses the same concrete `(drawItem, view-pass)` key unit. `drawCount`
|
|
303
|
+
* is the count for this lane; the remaining fields make conservation explicit
|
|
304
|
+
* when a view mixes GPU-owned and CPU-residual work.
|
|
305
|
+
*/
|
|
306
|
+
export interface GpuDrivenLaneSummary {
|
|
307
|
+
readonly viewPass: 'main' | 'directional-shadow' | 'point-shadow' | 'spot-shadow';
|
|
308
|
+
readonly viewIndex: number;
|
|
309
|
+
readonly face?: number;
|
|
310
|
+
readonly lane: GpuDrivenLane;
|
|
311
|
+
readonly reason: GpuDrivenLaneReason;
|
|
312
|
+
readonly drawCount: number;
|
|
313
|
+
readonly totalDrawCount: number;
|
|
314
|
+
readonly claimedDrawCount: number;
|
|
315
|
+
readonly residualDrawCount: number;
|
|
316
|
+
/** First bounded producer failure for a blocked lane, when available. */
|
|
317
|
+
readonly failure?: GpuDrivenPreparationFailureInspection;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Per-submission structural work projected by the existing RenderScene/GPU
|
|
322
|
+
* Scene/palette owners. These are frame deltas, not lifetime totals, so a
|
|
323
|
+
* stable GPU-only frame is expected to report zero for every field.
|
|
324
|
+
*/
|
|
325
|
+
export interface GpuDrivenStructureMetrics {
|
|
326
|
+
readonly worldEntitiesScanned: number;
|
|
327
|
+
readonly sceneTableUploadBytes: number;
|
|
328
|
+
readonly paletteUploadBytes: number;
|
|
329
|
+
}
|
|
330
|
+
|
|
180
331
|
export interface GpuDrivenProductionInspection {
|
|
332
|
+
/** Lifetime count of successful producer-side residency validation scans. */
|
|
333
|
+
readonly residencyValidationScans: number;
|
|
334
|
+
/** Lifetime count of validation rows reused without a CPU residency walk. */
|
|
335
|
+
readonly residencyValidationCacheHits: number;
|
|
336
|
+
/** Lifetime count of CPU fallback telemetry traversals. */
|
|
337
|
+
readonly cpuValidationScans: number;
|
|
338
|
+
/** Lifetime count of CPU fallback telemetry cache hits. */
|
|
339
|
+
readonly cpuValidationCacheHits: number;
|
|
340
|
+
/** RenderScene candidate traversal performed for the last prepared frame. */
|
|
341
|
+
readonly worldEntitiesScanned: number;
|
|
342
|
+
/** GPU Scene table bytes uploaded for the last prepared frame. */
|
|
343
|
+
readonly sceneTableUploadBytes: number;
|
|
344
|
+
/** Skin palette bytes uploaded for the last prepared frame. */
|
|
345
|
+
readonly paletteUploadBytes: number;
|
|
181
346
|
readonly gpuOwnedSnapshotsMaterialized: number;
|
|
182
347
|
readonly filteredPlanBuilds: number;
|
|
183
348
|
readonly gpuOwnedEntityCount: number;
|
|
@@ -199,6 +364,25 @@ export interface GpuDrivenProductionInspection {
|
|
|
199
364
|
readonly batchCount: number;
|
|
200
365
|
/** Number of non-zero-capacity indirect raster commands actually encoded. */
|
|
201
366
|
readonly indirectDrawCount: number;
|
|
367
|
+
/** Legacy name retained for existing GPU-driven evidence consumers. */
|
|
368
|
+
readonly encodedIndirectDraws: number;
|
|
369
|
+
/** Bounded view-pass lane aggregates for AI-readable recovery. */
|
|
370
|
+
readonly channels: readonly GpuDrivenLaneSummary[];
|
|
371
|
+
/** GPU resource generation used by the last prepared view, when resident. */
|
|
372
|
+
readonly resourceGeneration: number | undefined;
|
|
373
|
+
readonly candidateCapacity: number;
|
|
374
|
+
readonly batchCapacity: number;
|
|
375
|
+
readonly indirectCapacity: number;
|
|
376
|
+
/** True when the last selector readback reported an incomplete result. */
|
|
377
|
+
readonly overflow: boolean;
|
|
378
|
+
/** Submission state for the current prepared candidate. */
|
|
379
|
+
readonly submitted: boolean;
|
|
380
|
+
/** Number of renderer-device recovery boundaries observed by this owner. */
|
|
381
|
+
readonly recoveryCount: number;
|
|
382
|
+
/** Number of staged candidates aborted before submit. */
|
|
383
|
+
readonly retryCount: number;
|
|
384
|
+
/** Generation of the last fully submitted GPU candidate, if any. */
|
|
385
|
+
readonly lastKnownGoodGeneration: number | undefined;
|
|
202
386
|
}
|
|
203
387
|
|
|
204
388
|
export type DirectionalShadowEffectiveProfile =
|
|
@@ -271,7 +455,9 @@ export interface ReflectionFallbackReceipt {
|
|
|
271
455
|
}
|
|
272
456
|
|
|
273
457
|
/**
|
|
274
|
-
*
|
|
458
|
+
* Completed fallback attachment proof, available only when the renderer opts
|
|
459
|
+
* into captureReflectionFallbackReadback. Normal rendering publishes source
|
|
460
|
+
* receipts after GPU completion without copying, mapping, or hashing pixels.
|
|
275
461
|
*
|
|
276
462
|
* This is an aggregate attachment fact, not a per-renderable row. Row
|
|
277
463
|
* receipts deliberately carry source/coverage identity only, so one pixel
|
|
@@ -318,6 +504,19 @@ export interface ReflectionFallbackInspection {
|
|
|
318
504
|
}
|
|
319
505
|
|
|
320
506
|
export interface ReflectionProbeInspection {
|
|
507
|
+
readonly workBudgetPerFrame?: number;
|
|
508
|
+
readonly updates?: readonly {
|
|
509
|
+
readonly worldId: number;
|
|
510
|
+
readonly entityKey: number;
|
|
511
|
+
readonly intent: 'once' | 'on-change' | 'continuous';
|
|
512
|
+
readonly activeGeneration: number;
|
|
513
|
+
readonly requestedRevision: number;
|
|
514
|
+
readonly capturedRevision: number;
|
|
515
|
+
readonly pending: boolean;
|
|
516
|
+
readonly captureStartedFrame: number;
|
|
517
|
+
readonly lastCompletedFrame: number;
|
|
518
|
+
readonly latencyFrames: number | undefined;
|
|
519
|
+
}[];
|
|
321
520
|
readonly selection: ReflectionProbeSelectionInspection;
|
|
322
521
|
readonly factCount: number;
|
|
323
522
|
readonly acceptedCount: number;
|
|
@@ -385,6 +584,13 @@ export interface PersistentRenderSceneInspection {
|
|
|
385
584
|
readonly transformUpdates: number;
|
|
386
585
|
readonly lastResyncReason: RenderSceneResyncReason | undefined;
|
|
387
586
|
readonly projectionRecords: number;
|
|
587
|
+
/** Allocation/cache evidence for instance bounds derivation. */
|
|
588
|
+
readonly instanceBoundsCache?: {
|
|
589
|
+
readonly hits: number;
|
|
590
|
+
readonly misses: number;
|
|
591
|
+
readonly derives: number;
|
|
592
|
+
readonly invalidations: number;
|
|
593
|
+
};
|
|
388
594
|
/** Numeric probe ownership facts; no GPU handles or object graph references. */
|
|
389
595
|
readonly probeBlend?: ProbeBlendInspection;
|
|
390
596
|
readonly topology: BatchTopologyInspection;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Mat4Like } from '@forgeax/engine-math';
|
|
2
|
+
|
|
3
|
+
// `fingerprintNumericArray` runs on every bounds-cache lookup. Keep the bit
|
|
4
|
+
// reinterpretation scratch outside the hot path so a cache hit does not
|
|
5
|
+
// allocate a pair of typed arrays for each retained render slot.
|
|
6
|
+
const fingerprintScalar = new Float32Array(1);
|
|
7
|
+
const fingerprintBits = new Uint32Array(fingerprintScalar.buffer);
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
* Inputs owned by the render extract/persistent-scene boundary. Bounds are
|
|
@@ -34,11 +40,9 @@ export type InstanceBoundsCacheInput = InstanceBoundsCacheKey & DerivedInstances
|
|
|
34
40
|
*/
|
|
35
41
|
export function fingerprintNumericArray(values: ArrayLike<number>): number {
|
|
36
42
|
let hash = 0x811c9dc5;
|
|
37
|
-
const scalar = new Float32Array(1);
|
|
38
|
-
const bits = new Uint32Array(scalar.buffer);
|
|
39
43
|
for (let index = 0; index < values.length; index += 1) {
|
|
40
|
-
|
|
41
|
-
hash = Math.imul(hash ^ (
|
|
44
|
+
fingerprintScalar[0] = Number(values[index]);
|
|
45
|
+
hash = Math.imul(hash ^ (fingerprintBits[0] ?? 0), 0x01000193) >>> 0;
|
|
42
46
|
}
|
|
43
47
|
return hash >>> 0;
|
|
44
48
|
}
|
|
@@ -72,14 +76,218 @@ function finiteMatrix(matrix: ArrayLike<number>): matrix is Mat4Like {
|
|
|
72
76
|
return true;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
|
-
function
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
function multiplyMat4(
|
|
80
|
+
out: Float32Array,
|
|
81
|
+
left: ArrayLike<number>,
|
|
82
|
+
right: ArrayLike<number>,
|
|
83
|
+
rightOffset = 0,
|
|
84
|
+
): void {
|
|
85
|
+
for (let column = 0; column < 4; column += 1) {
|
|
86
|
+
const rightColumn = rightOffset + column * 4;
|
|
87
|
+
const right0 = Number(right[rightColumn] ?? 0);
|
|
88
|
+
const right1 = Number(right[rightColumn + 1] ?? 0);
|
|
89
|
+
const right2 = Number(right[rightColumn + 2] ?? 0);
|
|
90
|
+
const right3 = Number(right[rightColumn + 3] ?? 0);
|
|
91
|
+
const outOffset = column * 4;
|
|
92
|
+
out[outOffset] =
|
|
93
|
+
Number(left[0] ?? 0) * right0 +
|
|
94
|
+
Number(left[4] ?? 0) * right1 +
|
|
95
|
+
Number(left[8] ?? 0) * right2 +
|
|
96
|
+
Number(left[12] ?? 0) * right3;
|
|
97
|
+
out[outOffset + 1] =
|
|
98
|
+
Number(left[1] ?? 0) * right0 +
|
|
99
|
+
Number(left[5] ?? 0) * right1 +
|
|
100
|
+
Number(left[9] ?? 0) * right2 +
|
|
101
|
+
Number(left[13] ?? 0) * right3;
|
|
102
|
+
out[outOffset + 2] =
|
|
103
|
+
Number(left[2] ?? 0) * right0 +
|
|
104
|
+
Number(left[6] ?? 0) * right1 +
|
|
105
|
+
Number(left[10] ?? 0) * right2 +
|
|
106
|
+
Number(left[14] ?? 0) * right3;
|
|
107
|
+
out[outOffset + 3] =
|
|
108
|
+
Number(left[3] ?? 0) * right0 +
|
|
109
|
+
Number(left[7] ?? 0) * right1 +
|
|
110
|
+
Number(left[11] ?? 0) * right2 +
|
|
111
|
+
Number(left[15] ?? 0) * right3;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function finiteMatrixAt(values: ArrayLike<number>, offset: number): boolean {
|
|
116
|
+
if (values.length - offset < 16) return false;
|
|
117
|
+
for (let index = 0; index < 16; index += 1) {
|
|
118
|
+
if (!Number.isFinite(values[offset + index] as number)) return false;
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function isAffine(matrix: ArrayLike<number>): boolean {
|
|
124
|
+
return (
|
|
125
|
+
(matrix[3] as number) === 0 &&
|
|
126
|
+
(matrix[7] as number) === 0 &&
|
|
127
|
+
(matrix[11] as number) === 0 &&
|
|
128
|
+
(matrix[15] as number) === 1
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function includeBox(
|
|
133
|
+
out: Float32Array,
|
|
134
|
+
candidate: ArrayLike<number>,
|
|
135
|
+
initialized: boolean,
|
|
136
|
+
): boolean {
|
|
137
|
+
const minX = candidate[0] as number;
|
|
138
|
+
const minY = candidate[1] as number;
|
|
139
|
+
const minZ = candidate[2] as number;
|
|
140
|
+
const maxX = candidate[3] as number;
|
|
141
|
+
const maxY = candidate[4] as number;
|
|
142
|
+
const maxZ = candidate[5] as number;
|
|
143
|
+
if (!initialized) {
|
|
144
|
+
out[0] = minX;
|
|
145
|
+
out[1] = minY;
|
|
146
|
+
out[2] = minZ;
|
|
147
|
+
out[3] = maxX;
|
|
148
|
+
out[4] = maxY;
|
|
149
|
+
out[5] = maxZ;
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
if (minX < (out[0] ?? Number.POSITIVE_INFINITY)) out[0] = minX;
|
|
153
|
+
if (minY < (out[1] ?? Number.POSITIVE_INFINITY)) out[1] = minY;
|
|
154
|
+
if (minZ < (out[2] ?? Number.POSITIVE_INFINITY)) out[2] = minZ;
|
|
155
|
+
if (maxX > (out[3] ?? Number.NEGATIVE_INFINITY)) out[3] = maxX;
|
|
156
|
+
if (maxY > (out[4] ?? Number.NEGATIVE_INFINITY)) out[4] = maxY;
|
|
157
|
+
if (maxZ > (out[5] ?? Number.NEGATIVE_INFINITY)) out[5] = maxZ;
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** Transform an AABB without per-instance arrays or corner tuples. */
|
|
162
|
+
function transformAabb(
|
|
163
|
+
out: Float32Array,
|
|
164
|
+
local: ArrayLike<number>,
|
|
165
|
+
matrix: ArrayLike<number>,
|
|
166
|
+
): boolean {
|
|
167
|
+
const minX = local[0] as number;
|
|
168
|
+
const minY = local[1] as number;
|
|
169
|
+
const minZ = local[2] as number;
|
|
170
|
+
const maxX = local[3] as number;
|
|
171
|
+
const maxY = local[4] as number;
|
|
172
|
+
const maxZ = local[5] as number;
|
|
173
|
+
const centerX = (minX + maxX) * 0.5;
|
|
174
|
+
const centerY = (minY + maxY) * 0.5;
|
|
175
|
+
const centerZ = (minZ + maxZ) * 0.5;
|
|
176
|
+
const extentX = (maxX - minX) * 0.5;
|
|
177
|
+
const extentY = (maxY - minY) * 0.5;
|
|
178
|
+
const extentZ = (maxZ - minZ) * 0.5;
|
|
179
|
+
|
|
180
|
+
if (isAffine(matrix)) {
|
|
181
|
+
const centerWorldX =
|
|
182
|
+
(matrix[0] as number) * centerX +
|
|
183
|
+
(matrix[4] as number) * centerY +
|
|
184
|
+
(matrix[8] as number) * centerZ +
|
|
185
|
+
(matrix[12] as number);
|
|
186
|
+
const centerWorldY =
|
|
187
|
+
(matrix[1] as number) * centerX +
|
|
188
|
+
(matrix[5] as number) * centerY +
|
|
189
|
+
(matrix[9] as number) * centerZ +
|
|
190
|
+
(matrix[13] as number);
|
|
191
|
+
const centerWorldZ =
|
|
192
|
+
(matrix[2] as number) * centerX +
|
|
193
|
+
(matrix[6] as number) * centerY +
|
|
194
|
+
(matrix[10] as number) * centerZ +
|
|
195
|
+
(matrix[14] as number);
|
|
196
|
+
const extentWorldX =
|
|
197
|
+
Math.abs(matrix[0] as number) * extentX +
|
|
198
|
+
Math.abs(matrix[4] as number) * extentY +
|
|
199
|
+
Math.abs(matrix[8] as number) * extentZ;
|
|
200
|
+
const extentWorldY =
|
|
201
|
+
Math.abs(matrix[1] as number) * extentX +
|
|
202
|
+
Math.abs(matrix[5] as number) * extentY +
|
|
203
|
+
Math.abs(matrix[9] as number) * extentZ;
|
|
204
|
+
const extentWorldZ =
|
|
205
|
+
Math.abs(matrix[2] as number) * extentX +
|
|
206
|
+
Math.abs(matrix[6] as number) * extentY +
|
|
207
|
+
Math.abs(matrix[10] as number) * extentZ;
|
|
208
|
+
out[0] = centerWorldX - extentWorldX;
|
|
209
|
+
out[1] = centerWorldY - extentWorldY;
|
|
210
|
+
out[2] = centerWorldZ - extentWorldZ;
|
|
211
|
+
out[3] = centerWorldX + extentWorldX;
|
|
212
|
+
out[4] = centerWorldY + extentWorldY;
|
|
213
|
+
out[5] = centerWorldZ + extentWorldZ;
|
|
214
|
+
return finiteAabb(out);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Projective/non-affine matrices need the reference corner route. A w
|
|
218
|
+
// interval crossing zero is unbounded, so explicitly return no-cull rather
|
|
219
|
+
// than pretending the finite corner samples enclose the volume.
|
|
220
|
+
let minimumW = Number.POSITIVE_INFINITY;
|
|
221
|
+
let maximumW = Number.NEGATIVE_INFINITY;
|
|
222
|
+
for (let corner = 0; corner < 8; corner += 1) {
|
|
223
|
+
const x = (corner & 1) === 0 ? minX : maxX;
|
|
224
|
+
const y = (corner & 2) === 0 ? minY : maxY;
|
|
225
|
+
const z = (corner & 4) === 0 ? minZ : maxZ;
|
|
226
|
+
const w =
|
|
227
|
+
(matrix[3] as number) * x +
|
|
228
|
+
(matrix[7] as number) * y +
|
|
229
|
+
(matrix[11] as number) * z +
|
|
230
|
+
(matrix[15] as number);
|
|
231
|
+
if (!Number.isFinite(w)) return false;
|
|
232
|
+
if (w < minimumW) minimumW = w;
|
|
233
|
+
if (w > maximumW) maximumW = w;
|
|
234
|
+
}
|
|
235
|
+
if (minimumW <= 0 && maximumW >= 0) return false;
|
|
236
|
+
|
|
237
|
+
let unionMinX = Number.POSITIVE_INFINITY;
|
|
238
|
+
let unionMinY = Number.POSITIVE_INFINITY;
|
|
239
|
+
let unionMinZ = Number.POSITIVE_INFINITY;
|
|
240
|
+
let unionMaxX = Number.NEGATIVE_INFINITY;
|
|
241
|
+
let unionMaxY = Number.NEGATIVE_INFINITY;
|
|
242
|
+
let unionMaxZ = Number.NEGATIVE_INFINITY;
|
|
243
|
+
for (let corner = 0; corner < 8; corner += 1) {
|
|
244
|
+
const x = (corner & 1) === 0 ? minX : maxX;
|
|
245
|
+
const y = (corner & 2) === 0 ? minY : maxY;
|
|
246
|
+
const z = (corner & 4) === 0 ? minZ : maxZ;
|
|
247
|
+
const rawX =
|
|
248
|
+
(matrix[0] as number) * x +
|
|
249
|
+
(matrix[4] as number) * y +
|
|
250
|
+
(matrix[8] as number) * z +
|
|
251
|
+
(matrix[12] as number);
|
|
252
|
+
const rawY =
|
|
253
|
+
(matrix[1] as number) * x +
|
|
254
|
+
(matrix[5] as number) * y +
|
|
255
|
+
(matrix[9] as number) * z +
|
|
256
|
+
(matrix[13] as number);
|
|
257
|
+
const rawZ =
|
|
258
|
+
(matrix[2] as number) * x +
|
|
259
|
+
(matrix[6] as number) * y +
|
|
260
|
+
(matrix[10] as number) * z +
|
|
261
|
+
(matrix[14] as number);
|
|
262
|
+
const w =
|
|
263
|
+
(matrix[3] as number) * x +
|
|
264
|
+
(matrix[7] as number) * y +
|
|
265
|
+
(matrix[11] as number) * z +
|
|
266
|
+
(matrix[15] as number);
|
|
267
|
+
const projectedX = rawX / w;
|
|
268
|
+
const projectedY = rawY / w;
|
|
269
|
+
const projectedZ = rawZ / w;
|
|
270
|
+
if (
|
|
271
|
+
!Number.isFinite(projectedX) ||
|
|
272
|
+
!Number.isFinite(projectedY) ||
|
|
273
|
+
!Number.isFinite(projectedZ)
|
|
274
|
+
) {
|
|
275
|
+
return false;
|
|
81
276
|
}
|
|
277
|
+
if (projectedX < unionMinX) unionMinX = projectedX;
|
|
278
|
+
if (projectedY < unionMinY) unionMinY = projectedY;
|
|
279
|
+
if (projectedZ < unionMinZ) unionMinZ = projectedZ;
|
|
280
|
+
if (projectedX > unionMaxX) unionMaxX = projectedX;
|
|
281
|
+
if (projectedY > unionMaxY) unionMaxY = projectedY;
|
|
282
|
+
if (projectedZ > unionMaxZ) unionMaxZ = projectedZ;
|
|
82
283
|
}
|
|
284
|
+
out[0] = unionMinX;
|
|
285
|
+
out[1] = unionMinY;
|
|
286
|
+
out[2] = unionMinZ;
|
|
287
|
+
out[3] = unionMaxX;
|
|
288
|
+
out[4] = unionMaxY;
|
|
289
|
+
out[5] = unionMaxZ;
|
|
290
|
+
return finiteAabb(out);
|
|
83
291
|
}
|
|
84
292
|
|
|
85
293
|
/**
|
|
@@ -97,36 +305,31 @@ export function deriveInstancesUnionBounds(
|
|
|
97
305
|
return undefined;
|
|
98
306
|
}
|
|
99
307
|
if (transforms.length === 0 || transforms.length % 16 !== 0) return undefined;
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
meshAabb[3] as number,
|
|
106
|
-
meshAabb[4] as number,
|
|
107
|
-
meshAabb[5] as number,
|
|
108
|
-
);
|
|
109
|
-
const union = box3.create();
|
|
110
|
-
const composed = mat4.create();
|
|
111
|
-
const transformed = box3.create();
|
|
308
|
+
const local = meshAabb;
|
|
309
|
+
const union = new Float32Array(6);
|
|
310
|
+
const composed = new Float32Array(16);
|
|
311
|
+
const transformed = new Float32Array(6);
|
|
312
|
+
let initialized = false;
|
|
112
313
|
for (let offset = 0; offset < transforms.length; offset += 16) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (!finiteMatrix(instance)) return undefined;
|
|
118
|
-
mat4.multiply(composed, entityWorld, instance);
|
|
119
|
-
box3.transformBox3(transformed, local, composed);
|
|
120
|
-
if (!finiteAabb(transformed)) return undefined;
|
|
121
|
-
includeBox(union, transformed);
|
|
314
|
+
if (!finiteMatrixAt(transforms, offset)) return undefined;
|
|
315
|
+
multiplyMat4(composed, entityWorld, transforms, offset);
|
|
316
|
+
if (!finiteMatrix(composed) || !transformAabb(transformed, local, composed)) return undefined;
|
|
317
|
+
initialized = includeBox(union, transformed, initialized);
|
|
122
318
|
}
|
|
123
|
-
return
|
|
319
|
+
return initialized && finiteAabb(union) ? union : undefined;
|
|
124
320
|
}
|
|
125
321
|
|
|
126
322
|
interface InstanceBoundsCacheEntry extends InstanceBoundsCacheKey {
|
|
127
323
|
readonly bounds: Float32Array | undefined;
|
|
128
324
|
}
|
|
129
325
|
|
|
326
|
+
export interface InstanceBoundsCacheInspection {
|
|
327
|
+
readonly hits: number;
|
|
328
|
+
readonly misses: number;
|
|
329
|
+
readonly derives: number;
|
|
330
|
+
readonly invalidations: number;
|
|
331
|
+
}
|
|
332
|
+
|
|
130
333
|
/**
|
|
131
334
|
* Small renderer-owned per-entity cache. A changed generation replaces the
|
|
132
335
|
* entry atomically; packed-id reuse is safe when its owner supplies a new
|
|
@@ -134,6 +337,10 @@ interface InstanceBoundsCacheEntry extends InstanceBoundsCacheKey {
|
|
|
134
337
|
*/
|
|
135
338
|
export class InstanceBoundsCache {
|
|
136
339
|
private readonly entries = new Map<string, InstanceBoundsCacheEntry>();
|
|
340
|
+
private hits = 0;
|
|
341
|
+
private misses = 0;
|
|
342
|
+
private derives = 0;
|
|
343
|
+
private invalidations = 0;
|
|
137
344
|
|
|
138
345
|
private key(input: Pick<InstanceBoundsCacheKey, 'worldId' | 'entityKey'>): string {
|
|
139
346
|
return `${input.worldId === undefined ? '' : `${input.worldId}:`}${input.entityKey}`;
|
|
@@ -147,8 +354,11 @@ export class InstanceBoundsCache {
|
|
|
147
354
|
previous.transformGeneration === input.transformGeneration &&
|
|
148
355
|
previous.matrixGeneration === input.matrixGeneration
|
|
149
356
|
) {
|
|
357
|
+
this.hits += 1;
|
|
150
358
|
return previous.bounds;
|
|
151
359
|
}
|
|
360
|
+
this.misses += 1;
|
|
361
|
+
this.derives += 1;
|
|
152
362
|
const bounds = deriveInstancesUnionBounds(input);
|
|
153
363
|
this.entries.set(this.key(input), {
|
|
154
364
|
...(input.worldId === undefined ? {} : { worldId: input.worldId }),
|
|
@@ -163,9 +373,23 @@ export class InstanceBoundsCache {
|
|
|
163
373
|
|
|
164
374
|
invalidate(entityKey?: number, worldId?: number): void {
|
|
165
375
|
if (entityKey === undefined) {
|
|
376
|
+
if (this.entries.size > 0) this.invalidations += this.entries.size;
|
|
166
377
|
this.entries.clear();
|
|
167
378
|
} else {
|
|
168
|
-
|
|
379
|
+
if (
|
|
380
|
+
this.entries.delete(this.key({ entityKey, ...(worldId === undefined ? {} : { worldId }) }))
|
|
381
|
+
) {
|
|
382
|
+
this.invalidations += 1;
|
|
383
|
+
}
|
|
169
384
|
}
|
|
170
385
|
}
|
|
386
|
+
|
|
387
|
+
inspect(): InstanceBoundsCacheInspection {
|
|
388
|
+
return {
|
|
389
|
+
hits: this.hits,
|
|
390
|
+
misses: this.misses,
|
|
391
|
+
derives: this.derives,
|
|
392
|
+
invalidations: this.invalidations,
|
|
393
|
+
};
|
|
394
|
+
}
|
|
171
395
|
}
|