@forgeax/engine-render 0.1.20 → 0.1.23
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 +365 -29
- package/dist/assembly/backend-contract.d.ts +13 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -1
- package/dist/assembly/device-feature-admission.d.ts +18 -0
- package/dist/assembly/device-feature-admission.d.ts.map +1 -0
- package/dist/assembly/directional-shadow-inspection.d.ts +38 -0
- package/dist/assembly/directional-shadow-inspection.d.ts.map +1 -0
- package/dist/assembly/factory.d.ts +30 -19
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/host-contract.d.ts +19 -0
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/render-target-host.d.ts +46 -0
- package/dist/assembly/render-target-host.d.ts.map +1 -0
- package/dist/assets/render-asset-port.d.ts.map +1 -1
- package/dist/authoring.mjs +4 -1
- package/dist/authoring.mjs.map +1 -1
- package/dist/capture/cube-views.d.ts +21 -0
- package/dist/capture/cube-views.d.ts.map +1 -0
- package/dist/capture/scheduler.d.ts +54 -0
- package/dist/capture/scheduler.d.ts.map +1 -0
- package/dist/{chunk-PCHBPYML.mjs → chunk-4L3P6DT5.mjs} +2 -2
- package/dist/chunk-4L3P6DT5.mjs.map +1 -0
- package/dist/{chunk-VFPLTKCU.mjs → chunk-4NPUASZR.mjs} +15 -4
- package/dist/chunk-4NPUASZR.mjs.map +1 -0
- package/dist/chunk-DIYW3M5D.mjs +5085 -0
- package/dist/chunk-DIYW3M5D.mjs.map +1 -0
- package/dist/chunk-FBC4R44J.mjs +1003 -0
- package/dist/chunk-FBC4R44J.mjs.map +1 -0
- package/dist/{chunk-CDTWTHZR.mjs → chunk-FF7K3FSO.mjs} +474 -168
- package/dist/chunk-FF7K3FSO.mjs.map +1 -0
- package/dist/chunk-HZUPSYW7.mjs +1104 -0
- package/dist/chunk-HZUPSYW7.mjs.map +1 -0
- package/dist/{chunk-TBQJOK2L.mjs → chunk-QODA5UKU.mjs} +321 -269
- package/dist/chunk-QODA5UKU.mjs.map +1 -0
- package/dist/chunk-YALPS44A.mjs +296 -0
- package/dist/chunk-YALPS44A.mjs.map +1 -0
- package/dist/{chunk-4XINDLAY.mjs → chunk-ZUWKAZ2I.mjs} +1963 -2178
- package/dist/chunk-ZUWKAZ2I.mjs.map +1 -0
- package/dist/cluster-binner.d.ts +5 -0
- package/dist/cluster-binner.d.ts.map +1 -1
- package/dist/components/camera.d.ts +1 -0
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/cube-camera.d.ts +20 -0
- package/dist/components/cube-camera.d.ts.map +1 -0
- package/dist/components/directional-light.d.ts +11 -2
- package/dist/components/directional-light.d.ts.map +1 -1
- package/dist/components/directional-shadow-filter.d.ts +25 -0
- package/dist/components/directional-shadow-filter.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/light-helpers.d.ts +4 -0
- package/dist/components/light-helpers.d.ts.map +1 -1
- package/dist/components/light-probe.d.ts +9 -0
- package/dist/components/light-probe.d.ts.map +1 -0
- package/dist/components/rect-area-light.d.ts +12 -0
- package/dist/components/rect-area-light.d.ts.map +1 -0
- package/dist/components/reflection-probe.d.ts +17 -0
- package/dist/components/reflection-probe.d.ts.map +1 -0
- package/dist/components/scene-instance.d.ts +4 -0
- package/dist/components/scene-instance.d.ts.map +1 -1
- package/dist/components/spot-light.d.ts +3 -0
- package/dist/components/spot-light.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +14836 -9620
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/gpu-residency.d.ts +8 -1
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/device/lifecycle-transaction.d.ts +2 -0
- package/dist/device/lifecycle-transaction.d.ts.map +1 -0
- package/dist/environment/frame.d.ts.map +1 -1
- package/dist/environment/lifecycle.d.ts +5 -0
- package/dist/environment/lifecycle.d.ts.map +1 -1
- package/dist/errors/gpu-driven.d.ts +26 -0
- package/dist/errors/gpu-driven.d.ts.map +1 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/recover.d.ts +9 -1
- package/dist/errors/recover.d.ts.map +1 -1
- package/dist/errors/render.d.ts +166 -93
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/extract/directional-shadow-projection.d.ts +23 -0
- package/dist/extract/directional-shadow-projection.d.ts.map +1 -0
- package/dist/extract/environment.d.ts +14 -0
- package/dist/extract/environment.d.ts.map +1 -1
- package/dist/extract/gpu-driven.d.ts +50 -0
- package/dist/extract/gpu-driven.d.ts.map +1 -0
- package/dist/extract/visibility.d.ts.map +1 -1
- package/dist/features/fullscreen.d.ts.map +1 -1
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +10 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +13 -2
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/gpu-driven/batch-topology.d.ts +34 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
- package/dist/gpu-driven/prepared-draw.d.ts +63 -0
- package/dist/gpu-driven/prepared-draw.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +97 -2
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-driven/view-gpu.d.ts +64 -1
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-scene-schema.d.ts +14 -0
- package/dist/gpu-scene-schema.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +8 -1
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/gpu-usage.d.ts +0 -1
- package/dist/gpu-usage.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +21 -19
- package/dist/hdrp-buffers.d.ts.map +1 -1
- package/dist/ibl/IblPipelineCache.d.ts +4 -0
- package/dist/ibl/IblPipelineCache.d.ts.map +1 -1
- package/dist/ibl/kernel-cache.d.ts +36 -0
- package/dist/ibl/kernel-cache.d.ts.map +1 -0
- package/dist/index.d.ts +39 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +91 -6
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +214 -1
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/instances-derived-bounds.d.ts +50 -0
- package/dist/instances-derived-bounds.d.ts.map +1 -0
- package/dist/internal.d.ts +9 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.mjs +23 -2
- package/dist/internal.mjs.map +1 -1
- package/dist/light-buffer-layout.d.ts +58 -140
- package/dist/light-buffer-layout.d.ts.map +1 -1
- package/dist/materials.d.ts.map +1 -1
- package/dist/mesh-material-bindings.d.ts +54 -0
- package/dist/mesh-material-bindings.d.ts.map +1 -1
- package/dist/pbr-pipeline.d.ts +38 -14
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-forward-lane.d.ts +2 -1
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-lighting/errors.d.ts +4 -0
- package/dist/pipeline/standard-lighting/errors.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/graph.d.ts +24 -0
- package/dist/pipeline/standard-lighting/graph.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/inspection.d.ts +38 -0
- package/dist/pipeline/standard-lighting/inspection.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/layout.d.ts +28 -0
- package/dist/pipeline/standard-lighting/layout.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/light-frame.d.ts +33 -0
- package/dist/pipeline/standard-lighting/light-frame.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/membership.d.ts +14 -0
- package/dist/pipeline/standard-lighting/membership.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/prepare.d.ts +16 -0
- package/dist/pipeline/standard-lighting/prepare.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/topology.d.ts +45 -0
- package/dist/pipeline/standard-lighting/topology.d.ts.map +1 -0
- package/dist/pipeline/standard-lighting/transport.d.ts +36 -0
- package/dist/pipeline/standard-lighting/transport.d.ts.map +1 -0
- package/dist/pipeline/standard-pipeline.d.ts +4 -13
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts.map +1 -1
- package/dist/pipeline/standard-profile.d.ts +5 -26
- package/dist/pipeline/standard-profile.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +2 -0
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts +40 -7
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/point-shadow-inspection.d.ts +21 -0
- package/dist/point-shadow-inspection.d.ts.map +1 -0
- package/dist/prepare/extended-lighting/ltc-resources.d.ts +31 -0
- package/dist/prepare/extended-lighting/ltc-resources.d.ts.map +1 -0
- package/dist/prepare/extended-lighting/resources.d.ts +72 -0
- package/dist/prepare/extended-lighting/resources.d.ts.map +1 -0
- package/dist/prepare/extended-lighting/spot-modifiers.d.ts +42 -0
- package/dist/prepare/extended-lighting/spot-modifiers.d.ts.map +1 -0
- package/dist/prepare/extended-lighting/state.d.ts +24 -0
- package/dist/prepare/extended-lighting/state.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +33 -36
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +78 -24
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame-targets.d.ts +5 -0
- package/dist/record/frame-targets.d.ts.map +1 -1
- package/dist/record/frame.d.ts +16 -6
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/gpu-pass-timing/contract.d.ts +96 -0
- package/dist/record/gpu-pass-timing/contract.d.ts.map +1 -0
- package/dist/record/gpu-pass-timing/errors.d.ts +18 -0
- package/dist/record/gpu-pass-timing/errors.d.ts.map +1 -0
- package/dist/record/gpu-pass-timing/index.d.ts +8 -0
- package/dist/record/gpu-pass-timing/index.d.ts.map +1 -0
- package/dist/record/gpu-pass-timing/parser.d.ts +11 -0
- package/dist/record/gpu-pass-timing/parser.d.ts.map +1 -0
- package/dist/record/gpu-pass-timing/session.d.ts +43 -0
- package/dist/record/gpu-pass-timing/session.d.ts.map +1 -0
- package/dist/record/gpu-timing.d.ts +20 -3
- package/dist/record/gpu-timing.d.ts.map +1 -1
- package/dist/record/helpers.d.ts +0 -20
- package/dist/record/helpers.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +6 -1
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +25 -2
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +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 +98 -6
- 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.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +119 -4
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +7 -5
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/reflection/filter.d.ts +22 -0
- package/dist/reflection/filter.d.ts.map +1 -0
- package/dist/reflection/gpu-table.d.ts +25 -0
- package/dist/reflection/gpu-table.d.ts.map +1 -0
- package/dist/reflection/inspection.d.ts +10 -0
- package/dist/reflection/inspection.d.ts.map +1 -0
- package/dist/reflection/projection.d.ts +140 -0
- package/dist/reflection/projection.d.ts.map +1 -0
- package/dist/reflection/record-owner.d.ts +60 -0
- package/dist/reflection/record-owner.d.ts.map +1 -0
- package/dist/render-contract.d.ts +62 -14
- 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 +49 -2
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +160 -31
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts +28 -2
- package/dist/render-system.d.ts.map +1 -1
- package/dist/renderer.d.ts +43 -0
- package/dist/renderer.d.ts.map +1 -0
- package/dist/scene/probe-blend-record.d.ts +22 -0
- package/dist/scene/probe-blend-record.d.ts.map +1 -0
- package/dist/scene/probe-blend.d.ts +142 -0
- package/dist/scene/probe-blend.d.ts.map +1 -0
- package/dist/scene/render-scene-types.d.ts +0 -6
- package/dist/scene/render-scene-types.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +117 -9
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/scene/visibility/bounds.d.ts +20 -0
- package/dist/scene/visibility/bounds.d.ts.map +1 -0
- package/dist/scene/visibility/budget.d.ts +16 -0
- package/dist/scene/visibility/budget.d.ts.map +1 -0
- package/dist/scene/visibility/facet.d.ts +73 -0
- package/dist/scene/visibility/facet.d.ts.map +1 -0
- package/dist/scene/visibility/gpu-frame-timing.d.ts +41 -0
- package/dist/scene/visibility/gpu-frame-timing.d.ts.map +1 -0
- package/dist/scene/visibility/gpu-lod.d.ts +46 -0
- package/dist/scene/visibility/gpu-lod.d.ts.map +1 -0
- package/dist/scene/visibility/inspection.d.ts +132 -0
- package/dist/scene/visibility/inspection.d.ts.map +1 -0
- package/dist/scene/visibility/lod-selector.d.ts +25 -0
- package/dist/scene/visibility/lod-selector.d.ts.map +1 -0
- package/dist/scene/visibility/occlusion-confidence.d.ts +81 -0
- package/dist/scene/visibility/occlusion-confidence.d.ts.map +1 -0
- package/dist/scene/visibility/occlusion-pass.d.ts +57 -0
- package/dist/scene/visibility/occlusion-pass.d.ts.map +1 -0
- package/dist/scene/visibility/occlusion-query-pool.d.ts +57 -0
- package/dist/scene/visibility/occlusion-query-pool.d.ts.map +1 -0
- package/dist/scene/visibility/occlusion-runtime.d.ts +96 -0
- package/dist/scene/visibility/occlusion-runtime.d.ts.map +1 -0
- package/dist/scene/visibility/types.d.ts +34 -0
- package/dist/scene/visibility/types.d.ts.map +1 -0
- package/dist/shadow-atlas.d.ts +3 -3
- package/dist/shadow-atlas.d.ts.map +1 -1
- package/dist/ssao-buffers.d.ts +3 -0
- package/dist/ssao-buffers.d.ts.map +1 -1
- package/dist/ssr/admission.d.ts +122 -0
- package/dist/ssr/admission.d.ts.map +1 -0
- package/dist/ssr/composition.d.ts +32 -0
- package/dist/ssr/composition.d.ts.map +1 -0
- package/dist/ssr/errors.d.ts +39 -0
- package/dist/ssr/errors.d.ts.map +1 -0
- package/dist/ssr/identity.d.ts +13 -0
- package/dist/ssr/identity.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts +1 -1
- package/dist/targets/contracts.d.ts +66 -0
- package/dist/targets/contracts.d.ts.map +1 -0
- package/dist/targets/graph-projection.d.ts +29 -0
- package/dist/targets/graph-projection.d.ts.map +1 -0
- package/dist/targets/material-source.d.ts +34 -0
- package/dist/targets/material-source.d.ts.map +1 -0
- package/dist/targets/owner.d.ts +32 -0
- package/dist/targets/owner.d.ts.map +1 -0
- package/dist/targets/physical.d.ts +18 -0
- package/dist/targets/physical.d.ts.map +1 -0
- package/dist/targets/readback.d.ts +39 -0
- package/dist/targets/readback.d.ts.map +1 -0
- package/dist/temporal/frame-coordinator.d.ts +13 -0
- package/dist/temporal/frame-coordinator.d.ts.map +1 -1
- package/dist/temporal/frame.d.ts +2 -0
- package/dist/temporal/frame.d.ts.map +1 -1
- package/dist/temporal/index.mjs +6 -5
- package/dist/temporal/view.d.ts +7 -0
- package/dist/temporal/view.d.ts.map +1 -1
- package/dist/tilemap-chunk-extract-system.d.ts +1 -1
- package/dist/typed-render-graph-primitives.d.ts +5 -1
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/typed-shadow-passes.d.ts +1 -1
- package/dist/typed-shadow-passes.d.ts.map +1 -1
- package/dist/volume/passes.d.ts +9 -5
- package/dist/volume/passes.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/__tests__/bloom-exact-zero.unit.test.ts +48 -19
- package/src/__tests__/bloom-lifecycle.integration.test.ts +41 -13
- package/src/__tests__/camera-target-consumption.unit.test.ts +53 -0
- package/src/__tests__/cluster-binner.unit.test.ts +35 -0
- package/src/__tests__/cluster-grid-default-surface.unit.test.ts +12 -2
- package/src/__tests__/cube-camera-scheduler.unit.test.ts +70 -0
- package/src/__tests__/cube-camera-single-submit.perf.test.ts +75 -0
- package/src/__tests__/cube-camera-view-matrices.unit.test.ts +41 -0
- package/src/__tests__/cube-camera-vocabulary.unit.test.ts +47 -0
- package/src/__tests__/cube-camera.integration.test.ts +42 -0
- package/src/__tests__/detached-inspection.integration.test.ts +6 -0
- package/src/__tests__/device-feature-admission.unit.test.ts +85 -0
- package/src/__tests__/direct-light-snapshot.unit.test.ts +62 -6
- package/src/__tests__/docs-gate-green.unit.test.ts +38 -0
- package/src/__tests__/environment-generation.integration.test.ts +16 -0
- package/src/__tests__/evidence-identity.ts +13 -0
- package/src/__tests__/evidence-identity.unit.test.ts +24 -0
- package/src/__tests__/extended-lighting-recovery.browser.test.ts +14 -0
- package/src/__tests__/extended-lighting-recovery.dawn.test.ts +14 -0
- package/src/__tests__/extended-lighting-recovery.integration.test.ts +81 -0
- package/src/__tests__/extended-lighting-resources.unit.test.ts +51 -0
- package/src/__tests__/extended-lighting-zero-feature.integration.test.ts +52 -0
- package/src/__tests__/factory-contract.integration.test.ts +288 -29
- package/src/__tests__/fog-component.unit.test.ts +67 -0
- package/src/__tests__/fog.integration.test.ts +86 -0
- package/src/__tests__/frame-observation.contract.test.ts +15 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +37 -0
- package/src/__tests__/gpu-driven-batch-topology-pbr.unit.test.ts +146 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +10 -8
- package/src/__tests__/gpu-driven-indirect-raster.dawn.test.ts +18 -1
- package/src/__tests__/gpu-driven-production.integration.test.ts +579 -17
- package/src/__tests__/gpu-driven-scaling.unit.test.ts +66 -2
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +26 -1
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +101 -6
- package/src/__tests__/gpu-driven-view.browser.test.ts +3 -3
- package/src/__tests__/gpu-driven-view.dawn.test.ts +3 -3
- package/src/__tests__/gpu-driven-view.unit.test.ts +50 -0
- package/src/__tests__/gpu-lod-evidence.ts +188 -0
- package/src/__tests__/gpu-lod-fallback.integration.test.ts +10 -0
- package/src/__tests__/gpu-lod-indirect.integration.test.ts +40 -0
- package/src/__tests__/gpu-lod-parity.dawn.test.ts +29 -0
- package/src/__tests__/gpu-lod-readiness.integration.test.ts +52 -0
- package/src/__tests__/gpu-lod-schema.unit.test.ts +66 -0
- package/src/__tests__/gpu-lod-selector.unit.test.ts +28 -0
- package/src/__tests__/gpu-lod-silhouette.browser.test.ts +13 -0
- package/src/__tests__/gpu-pass-timing-browser-runner.ts +281 -0
- package/src/__tests__/gpu-pass-timing-coexistence.integration.test.ts +80 -0
- package/src/__tests__/gpu-pass-timing-contract.unit.test.ts +243 -0
- package/src/__tests__/gpu-pass-timing-exact-zero.unit.test.ts +131 -0
- package/src/__tests__/gpu-pass-timing-lifecycle.integration.test.ts +230 -0
- package/src/__tests__/gpu-pass-timing-observation.unit.test.ts +233 -0
- package/src/__tests__/gpu-pass-timing-session.unit.test.ts +438 -0
- package/src/__tests__/gpu-pass-timing.browser.test.ts +26 -0
- package/src/__tests__/gpu-pass-timing.rhi-null.unit.test.ts +125 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +66 -1
- package/src/__tests__/gpu-scene.dawn.test.ts +8 -1
- package/src/__tests__/gpu-scene.unit.test.ts +49 -3
- package/src/__tests__/hdrp-group2-visibility.unit.test.ts +24 -0
- package/src/__tests__/instances-culling.integration.test.ts +94 -0
- package/src/__tests__/instances-derived-bounds.unit.test.ts +118 -0
- package/src/__tests__/light-buffer-layout.unit.test.ts +113 -3
- package/src/__tests__/light-inspection.unit.test.ts +55 -0
- package/src/__tests__/light-resource-error.unit.test.ts +43 -0
- package/src/__tests__/lighting-scene-roundtrip.integration.test.ts +109 -0
- package/src/__tests__/lod-bounds.unit.test.ts +42 -0
- package/src/__tests__/lod-cpu-lane.integration.test.ts +55 -0
- package/src/__tests__/lod-cpu-no-change.perf.test.ts +19 -0
- package/src/__tests__/lod-gpu-frame-timing.unit.test.ts +49 -0
- package/src/__tests__/lod-multi-view.integration.test.ts +63 -0
- package/src/__tests__/lod-occlusion-device-loss.integration.test.ts +27 -0
- package/src/__tests__/lod-occlusion-final-decision.integration.test.ts +47 -0
- package/src/__tests__/lod-occlusion-inspection.integration.test.ts +217 -0
- package/src/__tests__/lod-occlusion-inspection.schema.test-d.ts +14 -0
- package/src/__tests__/lod-occlusion-inspection.unit.test.ts +72 -0
- package/src/__tests__/lod-occlusion-visual-evidence.ts +91 -0
- package/src/__tests__/lod-occlusion.browser.test.ts +15 -0
- package/src/__tests__/lod-occlusion.dawn.test.ts +20 -0
- package/src/__tests__/lod-selector.profile.test.ts +35 -0
- package/src/__tests__/lod-selector.unit.test.ts +68 -0
- package/src/__tests__/lod-visibility-identity.unit.test.ts +198 -0
- package/src/__tests__/lod-visibility-lifecycle.integration.test.ts +132 -0
- package/src/__tests__/ltc-resources.unit.test.ts +32 -0
- package/src/__tests__/material-contract-inventory.unit.test.ts +17 -0
- package/src/__tests__/material-observation.integration.test.ts +101 -0
- package/src/__tests__/occlusion-confidence.unit.test.ts +168 -0
- package/src/__tests__/occlusion-invalidation.integration.test.ts +37 -0
- package/src/__tests__/occlusion-pass-routing.unit.test.ts +16 -0
- package/src/__tests__/occlusion-pass.dawn.test.ts +20 -0
- package/src/__tests__/occlusion-pass.integration.test.ts +43 -0
- package/src/__tests__/occlusion-pass.rhi-null.test.ts +22 -0
- package/src/__tests__/occlusion-query-pool.rhi-null.test.ts +21 -0
- package/src/__tests__/occlusion-query-pool.unit.test.ts +95 -0
- package/src/__tests__/occlusion-query-ticket.integration.test.ts +47 -0
- package/src/__tests__/occlusion-query.dawn.test.ts +16 -0
- package/src/__tests__/occlusion-query.evidence.ts +178 -0
- package/src/__tests__/occlusion-query.rhi-null.test.ts +31 -0
- package/src/__tests__/occlusion-runtime.unit.test.ts +120 -0
- package/src/__tests__/pbr-view-layout.unit.test.ts +16 -0
- package/src/__tests__/point-shadow-inspection.unit.test.ts +60 -0
- package/src/__tests__/prepared-gpu-driven-pbr.integration.test.ts +196 -0
- package/src/__tests__/probe-bindings.unit.test.ts +200 -0
- package/src/__tests__/probe-blend-numeric.unit.test.ts +67 -0
- package/src/__tests__/probe-blend-oracle.unit.test.ts +136 -0
- package/src/__tests__/probe-capacity.integration.test.ts +97 -0
- package/src/__tests__/probe-recovery.integration.test.ts +104 -0
- package/src/__tests__/probe-scene-dirty.integration.test.ts +211 -0
- package/src/__tests__/profiler-phase-catalog.test.ts +4 -1
- package/src/__tests__/profiler-phase-token.test.ts +1 -0
- package/src/__tests__/public-surface.test-d.ts +10 -0
- package/src/__tests__/rect-area-boundary.unit.test.ts +24 -0
- package/src/__tests__/reflection-fallback-graph.unit.test.ts +67 -0
- package/src/__tests__/reflection-fallback-inspection.unit.test.ts +77 -0
- package/src/__tests__/reflection-fallback-lifecycle.integration.test.ts +21 -0
- package/src/__tests__/reflection-fallback-projection.unit.test.ts +90 -0
- package/src/__tests__/reflection-fallback-source.unit.test.ts +32 -0
- package/src/__tests__/reflection-probe-authoring.unit.test.ts +71 -0
- package/src/__tests__/reflection-probe-filter.unit.test.ts +54 -0
- package/src/__tests__/reflection-probe-ibl-topology.unit.test.ts +45 -0
- package/src/__tests__/reflection-probe-owner-placement.unit.test.ts +39 -0
- package/src/__tests__/reflection-probe-pass-encode.integration.test.ts +101 -0
- package/src/__tests__/reflection-probe-performance.perf.test.ts +60 -0
- package/src/__tests__/reflection-probe-record-owner.characterization.unit.test.ts +120 -0
- package/src/__tests__/reflection-probe-recovery.integration.test.ts +55 -0
- package/src/__tests__/reflection-probe-selection.unit.test.ts +46 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +19 -3
- package/src/__tests__/render-feature-docs.unit.test.ts +12 -7
- package/src/__tests__/render-graph-fallback.integration.test.ts +24 -0
- package/src/__tests__/render-perf/extended-lighting.bench.test.ts +66 -0
- package/src/__tests__/render-scene-projection.unit.test.ts +447 -18
- package/src/__tests__/render-target-admission.unit.test.ts +80 -0
- package/src/__tests__/render-target-graph-projection.unit.test.ts +102 -0
- package/src/__tests__/render-target-inspection.unit.test.ts +52 -0
- package/src/__tests__/render-target-material-source.test-d.ts +30 -0
- package/src/__tests__/render-target-material-source.unit.test.ts +97 -0
- package/src/__tests__/render-target-owner-placement.unit.test.ts +203 -0
- package/src/__tests__/render-target-owner.unit.test.ts +122 -0
- package/src/__tests__/render-target-probe-soak.perf.test.ts +94 -0
- package/src/__tests__/render-target-public-schema.json +107 -0
- package/src/__tests__/render-target-public-schema.unit.test.ts +91 -0
- package/src/__tests__/render-target-public-surface.test-d.ts +83 -0
- package/src/__tests__/render-target-readback.integration.test.ts +90 -0
- package/src/__tests__/render-target-recovery.integration.test.ts +85 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +124 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +14 -0
- package/src/__tests__/shader-stage-surface.unit.test.ts +19 -4
- package/src/__tests__/skin-motion-regression.unit.test.ts +154 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +13 -4
- package/src/__tests__/spot-modifier-projection.unit.test.ts +70 -0
- package/src/__tests__/ssr-admission-matrix.integration.test.ts +206 -0
- package/src/__tests__/ssr-composition.unit.test.ts +46 -0
- package/src/__tests__/ssr-fallback-zero-work.bench.test.ts +94 -0
- package/src/__tests__/ssr-recovery-errors.unit.test.ts +58 -0
- package/src/__tests__/standard-cluster-capability.integration.test.ts +63 -0
- package/src/__tests__/standard-cluster-transport.unit.test.ts +121 -0
- package/src/__tests__/standard-cluster-variant-resolution.unit.test.ts +299 -0
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +15 -5
- package/src/__tests__/standard-lighting-inspection.integration.test.ts +138 -0
- package/src/__tests__/standard-lighting-ssot.unit.test.ts +18 -0
- package/src/__tests__/standard-lighting-write.unit.test.ts +441 -0
- package/src/__tests__/standard-lighting.integration.test.ts +67 -0
- package/src/__tests__/standard-pipeline.dawn.test.ts +206 -5
- package/src/__tests__/standard-pipeline.integration.test.ts +181 -150
- package/src/__tests__/standard-probe-binding.unit.test.ts +25 -0
- package/src/__tests__/standard-profile-oracle.unit.test.ts +23 -38
- package/src/__tests__/temporal-fallback-generation.integration.test.ts +16 -0
- package/src/__tests__/temporal-view.unit.test.ts +3 -3
- package/src/__tests__/transmission-prewarm.unit.test.ts +69 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +395 -14
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +2 -2
- package/src/__tests__/visibility-budget.integration.test.ts +140 -0
- package/src/__tests__/visibility-budget.unit.test.ts +70 -0
- package/src/__tests__/visibility-extract.integration.test.ts +11 -6
- package/src/__tests__/visibility-resolver.unit.test.ts +15 -0
- package/src/__tests__/volumetric-fog-point-spot-accumulation.integration.test.ts +6 -3
- package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +31 -28
- package/src/assembly/backend-contract.ts +13 -0
- package/src/assembly/device-feature-admission.ts +80 -0
- package/src/assembly/directional-shadow-inspection.ts +122 -0
- package/src/assembly/factory.ts +1411 -366
- package/src/assembly/host-contract.ts +35 -0
- package/src/assembly/render-target-host.ts +847 -0
- package/src/assets/asset-decoders.ts +1 -1
- package/src/assets/render-asset-port.ts +7 -1
- package/src/capture/cube-views.ts +69 -0
- package/src/capture/scheduler.ts +265 -0
- package/src/cluster-binner.ts +31 -0
- package/src/components/__tests__/lighting-authoring.unit.test.ts +39 -0
- package/src/components/__tests__/rect-area-light.unit.test.ts +33 -0
- package/src/components/__tests__/schema-contract.unit.test.ts +12 -0
- package/src/components/__tests__/schema-parity.unit.test.ts +9 -0
- package/src/components/camera.ts +4 -0
- package/src/components/cube-camera.ts +52 -0
- package/src/components/directional-light.ts +22 -2
- package/src/components/directional-shadow-filter.ts +57 -0
- package/src/components/index.ts +5 -0
- package/src/components/light-helpers.ts +133 -8
- package/src/components/light-probe.ts +13 -0
- package/src/components/rect-area-light.ts +15 -0
- package/src/components/reflection-probe.ts +49 -0
- package/src/components/scene-instance.ts +6 -0
- package/src/components/spot-light.ts +3 -0
- package/src/device/__tests__/extended-lighting-recovery.unit.test.ts +24 -0
- package/src/device/gpu-residency.ts +140 -9
- package/src/device/lifecycle-transaction.ts +12 -0
- package/src/environment/frame.ts +6 -24
- package/src/environment/lifecycle.ts +20 -1
- package/src/errors/gpu-driven.ts +92 -0
- package/src/errors/index.ts +1 -0
- package/src/errors/recover.ts +32 -0
- package/src/errors/render.ts +341 -143
- package/src/extract/camera.ts +3 -3
- package/src/extract/directional-shadow-projection.ts +61 -0
- package/src/extract/environment.ts +57 -0
- package/src/extract/gpu-driven.ts +108 -0
- package/src/extract/visibility.ts +2 -1
- package/src/features/fullscreen.ts +3 -0
- package/src/features/targets.ts +4 -1
- package/src/features/types.ts +10 -0
- package/src/fullscreen-post-process-pass.ts +43 -2
- package/src/gpu-driven/batch-topology.ts +207 -28
- package/src/gpu-driven/prepared-draw.ts +208 -0
- package/src/gpu-driven/production-raster.ts +953 -43
- package/src/gpu-driven/view-gpu.ts +411 -29
- package/src/gpu-scene-schema.ts +13 -0
- package/src/gpu-scene.ts +140 -64
- package/src/gpu-usage.ts +0 -1
- package/src/hdrp-buffers.ts +169 -63
- package/src/ibl/IblPipelineCache.ts +11 -0
- package/src/ibl/kernel-cache.ts +88 -0
- package/src/index.ts +222 -0
- package/src/inspection-types.ts +276 -1
- package/src/instances-derived-bounds.ts +171 -0
- package/src/internal.ts +38 -0
- package/src/light-buffer-layout.ts +155 -310
- package/src/materials.ts +16 -2
- package/src/mesh-material-bindings.ts +132 -0
- package/src/pbr-pipeline.ts +255 -60
- package/src/pipeline/standard-forward-lane.ts +93 -16
- package/src/pipeline/standard-lighting/errors.ts +6 -0
- package/src/pipeline/standard-lighting/graph.ts +158 -0
- package/src/pipeline/standard-lighting/inspection.ts +88 -0
- package/src/pipeline/standard-lighting/layout.ts +31 -0
- package/src/pipeline/standard-lighting/light-frame.ts +35 -0
- package/src/pipeline/standard-lighting/membership.ts +43 -0
- package/src/pipeline/standard-lighting/prepare.ts +37 -0
- package/src/pipeline/standard-lighting/topology.ts +120 -0
- package/src/pipeline/standard-lighting/transport.ts +78 -0
- package/src/pipeline/standard-pipeline.ts +124 -193
- package/src/pipeline/standard-post.ts +26 -7
- package/src/pipeline/standard-profile.ts +17 -47
- package/src/pipeline-builder.ts +5 -2
- package/src/pipeline-spec.ts +95 -21
- package/src/plugin.ts +4 -0
- package/src/point-shadow-inspection.ts +55 -0
- package/src/prepare/__tests__/extended-lighting-capability.unit.test.ts +56 -0
- package/src/prepare/extended-lighting/ltc-resources.ts +136 -0
- package/src/prepare/extended-lighting/resources.ts +389 -0
- package/src/prepare/extended-lighting/spot-modifiers.ts +194 -0
- package/src/prepare/extended-lighting/state.ts +92 -0
- package/src/record/__tests__/gpu-timing.unit.test.ts +177 -0
- package/src/record/__tests__/temporal-payload.unit.test.ts +64 -1
- package/src/record/__tests__/transparent-group2-selection.unit.test.ts +73 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +20 -1
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +40 -0
- package/src/record/frame-lighting.ts +591 -452
- package/src/record/frame-snapshot.ts +92 -39
- package/src/record/frame-targets.ts +17 -0
- package/src/record/frame.ts +662 -158
- package/src/record/gpu-pass-timing/contract.ts +180 -0
- package/src/record/gpu-pass-timing/errors.ts +34 -0
- package/src/record/gpu-pass-timing/index.ts +37 -0
- package/src/record/gpu-pass-timing/parser.ts +97 -0
- package/src/record/gpu-pass-timing/session.ts +938 -0
- package/src/record/gpu-timing.ts +112 -39
- package/src/record/helpers.ts +0 -58
- package/src/record/main-pass-geometry.ts +324 -119
- package/src/record/main-pass-material.ts +103 -10
- package/src/record/main-pass-sprite-draws.ts +99 -103
- package/src/record/main-pass.ts +71 -15
- package/src/record/mesh-ssbo.ts +47 -36
- package/src/record/render-context.ts +136 -3
- package/src/record/shadow-pass.ts +83 -68
- package/src/record/skybox-post-pass.ts +20 -4
- package/src/record/typed-frame-graph.ts +1034 -43
- package/src/record/view-ubo.ts +72 -47
- package/src/reflection/filter.ts +81 -0
- package/src/reflection/gpu-table.ts +44 -0
- package/src/reflection/inspection.ts +67 -0
- package/src/reflection/projection.ts +476 -0
- package/src/reflection/record-owner.ts +1283 -0
- package/src/render-contract.ts +93 -10
- package/src/render-graph-primitives.ts +9 -4
- package/src/render-pipeline.ts +122 -2
- package/src/render-system-extract.ts +1041 -225
- package/src/render-system.ts +1310 -85
- package/src/renderer.ts +222 -0
- package/src/scene/__tests__/changed-block-summary.candidate.test.ts +36 -0
- package/src/scene/probe-blend-record.ts +54 -0
- package/src/scene/probe-blend.ts +813 -0
- package/src/scene/render-scene-types.ts +0 -7
- package/src/scene/render-scene.ts +942 -171
- package/src/scene/visibility/bounds.ts +57 -0
- package/src/scene/visibility/budget.ts +40 -0
- package/src/scene/visibility/facet.ts +400 -0
- package/src/scene/visibility/gpu-frame-timing.ts +101 -0
- package/src/scene/visibility/gpu-lod.ts +119 -0
- package/src/scene/visibility/inspection.ts +313 -0
- package/src/scene/visibility/lod-selector.ts +84 -0
- package/src/scene/visibility/occlusion-confidence.ts +478 -0
- package/src/scene/visibility/occlusion-pass.ts +165 -0
- package/src/scene/visibility/occlusion-query-pool.ts +178 -0
- package/src/scene/visibility/occlusion-runtime.ts +672 -0
- package/src/scene/visibility/types.ts +50 -0
- package/src/shadow-atlas.ts +5 -5
- package/src/ssao-buffers.ts +9 -2
- package/src/ssr/admission.ts +451 -0
- package/src/ssr/composition.ts +73 -0
- package/src/ssr/errors.ts +76 -0
- package/src/ssr/identity.ts +12 -0
- package/src/systems/skin-palette-allocator.ts +1 -1
- package/src/targets/contracts.ts +182 -0
- package/src/targets/graph-projection.ts +169 -0
- package/src/targets/material-source.ts +143 -0
- package/src/targets/owner.ts +214 -0
- package/src/targets/physical.ts +18 -0
- package/src/targets/readback.ts +153 -0
- package/src/temporal/frame-coordinator.ts +26 -0
- package/src/temporal/frame.ts +14 -1
- package/src/temporal/view.ts +11 -0
- package/src/tilemap-chunk-extract-system.ts +4 -4
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +59 -20
- package/src/typed-render-graph-primitives.ts +53 -3
- package/src/typed-shadow-passes.ts +46 -40
- package/src/volume/passes.ts +61 -58
- package/dist/.tsbuildinfo +0 -1
- package/dist/chunk-4XINDLAY.mjs.map +0 -1
- package/dist/chunk-CDTWTHZR.mjs.map +0 -1
- package/dist/chunk-M2MP4ZOU.mjs +0 -73
- package/dist/chunk-M2MP4ZOU.mjs.map +0 -1
- package/dist/chunk-PCHBPYML.mjs.map +0 -1
- package/dist/chunk-TBQJOK2L.mjs.map +0 -1
- package/dist/chunk-VFPLTKCU.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/budget.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,OAAO,CAAC;AACpD,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,0BAA0B,SAAU,CAAC;AAClD,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,6EAA6E;AAC7E,wBAAgB,sBAAsB,CACpC,qBAAqB,SAAkC,GACtD,gBAAgB,CAiBlB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type VisibilityBudget } from './budget';
|
|
2
|
+
import { type ConfidenceEvent, type ConfidenceState } from './occlusion-confidence';
|
|
3
|
+
import { type PrimitiveKey, type ViewKey, type VisibilityCandidate, type VisibilityFacetInspection } from './types';
|
|
4
|
+
interface QueryEntry {
|
|
5
|
+
readonly view: ViewKey;
|
|
6
|
+
readonly primitive: PrimitiveKey;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Renderer-owned CPU visibility state indexed by ViewKey x PrimitiveKey.
|
|
10
|
+
*
|
|
11
|
+
* Attachment order is intentionally not part of the key. This keeps world
|
|
12
|
+
* reorder, detach, and slot ABA recovery generation-safe without a second
|
|
13
|
+
* lane-specific visibility map.
|
|
14
|
+
*/
|
|
15
|
+
export declare class VisibilityFacetStore {
|
|
16
|
+
private readonly budget;
|
|
17
|
+
private readonly views;
|
|
18
|
+
private readonly confidence;
|
|
19
|
+
private visibilityRevision;
|
|
20
|
+
private drawRevision;
|
|
21
|
+
private queryRevision;
|
|
22
|
+
private readonly queryEntries;
|
|
23
|
+
private readonly readyQueryKeys;
|
|
24
|
+
private readonly inFlightQueryKeys;
|
|
25
|
+
private readonly queryQueues;
|
|
26
|
+
/** Intrusive FIFO nodes make removal/requeue O(1), so dequeue never walks stale rows. */
|
|
27
|
+
private readonly queryNodes;
|
|
28
|
+
constructor(budget?: VisibilityBudget);
|
|
29
|
+
visibilityBudget(): VisibilityBudget;
|
|
30
|
+
/** Monotonic token for confidence changes that can alter draw admission. */
|
|
31
|
+
get revision(): number;
|
|
32
|
+
/** Revision for the bounded query-candidate admission set only. */
|
|
33
|
+
get queryRevisionValue(): number;
|
|
34
|
+
/** Revision for the active draw admission set (status/queryable identity). */
|
|
35
|
+
get drawRevisionValue(): number;
|
|
36
|
+
activateView(key: ViewKey): void;
|
|
37
|
+
retireView(key: ViewKey): void;
|
|
38
|
+
detachAttachment(attachmentId: string): void;
|
|
39
|
+
/** Drop every view/row when a composition owner is detached. */
|
|
40
|
+
clear(): void;
|
|
41
|
+
reorderAttachments(_attachmentIds: readonly string[]): void;
|
|
42
|
+
setCandidate(view: ViewKey, primitive: PrimitiveKey, candidate: VisibilityCandidate): boolean;
|
|
43
|
+
/** Remove rows that are no longer queryable in the extracted frame. */
|
|
44
|
+
pruneCandidates(view: ViewKey, activePrimitives: ReadonlySet<string>): void;
|
|
45
|
+
applyConfidence(view: ViewKey, primitive: PrimitiveKey, event: ConfidenceEvent): ConfidenceState;
|
|
46
|
+
/** Advance hidden rows on a successful frame, excluding rows queried now. */
|
|
47
|
+
advanceSuccessfulSubmits(submissionGeneration: number, excluded?: readonly {
|
|
48
|
+
readonly view: ViewKey;
|
|
49
|
+
readonly primitive: PrimitiveKey;
|
|
50
|
+
}[]): void;
|
|
51
|
+
getConfidence(view: ViewKey, primitive: PrimitiveKey): ConfidenceState;
|
|
52
|
+
/** Whether this candidate needs a bounded query this frame. */
|
|
53
|
+
shouldQuery(view: ViewKey, primitive: PrimitiveKey): boolean;
|
|
54
|
+
drainConfidenceRetests(limit: number): string[];
|
|
55
|
+
/**
|
|
56
|
+
* Remove a bounded page of ready query work for one view. Queue entries are
|
|
57
|
+
* identity keyed, so confidence completion and resource failure can safely
|
|
58
|
+
* requeue the same primitive without scanning the scene.
|
|
59
|
+
*/
|
|
60
|
+
dequeueQueryCandidates(view: ViewKey, limit: number): readonly QueryEntry[];
|
|
61
|
+
/** Put a candidate back after a query page could not be reserved. */
|
|
62
|
+
requeueQueryCandidate(view: ViewKey, primitive: PrimitiveKey): void;
|
|
63
|
+
getCandidate(view: ViewKey, primitive: PrimitiveKey): VisibilityCandidate | undefined;
|
|
64
|
+
beginViewEpoch(view: ViewKey): number;
|
|
65
|
+
applyCompletion(view: ViewKey, primitive: PrimitiveKey, epoch: number, candidate: VisibilityCandidate): boolean;
|
|
66
|
+
inspect(): VisibilityFacetInspection;
|
|
67
|
+
private syncQueryKey;
|
|
68
|
+
private removeQueryKey;
|
|
69
|
+
private removeQueuedKey;
|
|
70
|
+
}
|
|
71
|
+
export type { PrimitiveKey, ViewKey, VisibilityCandidate, VisibilityFacetInspection, } from './types';
|
|
72
|
+
export { primitiveKey, primitiveKeyId, viewKey, viewKeyId } from './types';
|
|
73
|
+
//# sourceMappingURL=facet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/facet.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EAGrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAE/B,MAAM,SAAS,CAAC;AAQjB,UAAU,UAAU;IAClB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;CAClC;AAcD;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAanB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAZnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiC;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAqB;IACpD,OAAO,CAAC,QAAQ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,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO;IAK5D,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAI/C;;;;OAIG;IACH,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE;IAkB3E,qEAAqE;IACrE,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,GAAG,IAAI;IAMnE,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,GAAG,mBAAmB,GAAG,SAAS;IAOrF,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;IAcrC,eAAe,CACb,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,mBAAmB,GAC7B,OAAO;IA0BV,OAAO,IAAI,yBAAyB;IAMpC,OAAO,CAAC,YAAY;IAiCpB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,eAAe;CAkBxB;AAED,YAAY,EACV,YAAY,EACZ,OAAO,EACP,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Renderer-owned timestamp facts spanning one graph and one queue submit. */
|
|
2
|
+
export interface GpuFrameTimingProtocol {
|
|
3
|
+
readonly firstMarker: 'frame.first-pass';
|
|
4
|
+
readonly terminalMarker: 'occlusion.resolve-copy';
|
|
5
|
+
readonly sameGraph: true;
|
|
6
|
+
readonly sameSubmit: true;
|
|
7
|
+
}
|
|
8
|
+
export interface GpuFrameTiming {
|
|
9
|
+
readonly frameId: number;
|
|
10
|
+
readonly deviceGeneration: number;
|
|
11
|
+
readonly protocol: GpuFrameTimingProtocol;
|
|
12
|
+
aborted: boolean;
|
|
13
|
+
submitId: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface GpuFrameTimingRecord {
|
|
16
|
+
readonly firstPassTimestampNs: number;
|
|
17
|
+
readonly occlusionResolveTimestampNs: number;
|
|
18
|
+
readonly submitted: boolean;
|
|
19
|
+
readonly graphGeneration: number;
|
|
20
|
+
readonly submitId: number;
|
|
21
|
+
}
|
|
22
|
+
export interface GpuFrameTimingSample {
|
|
23
|
+
readonly frameId: number;
|
|
24
|
+
readonly deviceGeneration: number;
|
|
25
|
+
readonly durationUs: number;
|
|
26
|
+
readonly protocol: GpuFrameTimingProtocol;
|
|
27
|
+
readonly graphGeneration: number;
|
|
28
|
+
readonly submitId: number;
|
|
29
|
+
}
|
|
30
|
+
export interface GpuFrameTimingSummary {
|
|
31
|
+
readonly medianUs: number;
|
|
32
|
+
readonly p95Us: number;
|
|
33
|
+
readonly samples: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function createGpuFrameTiming(input: {
|
|
36
|
+
readonly frameId: number;
|
|
37
|
+
readonly deviceGeneration: number;
|
|
38
|
+
}): GpuFrameTiming;
|
|
39
|
+
export declare function recordGpuFrameTiming(timing: GpuFrameTiming, record: GpuFrameTimingRecord): GpuFrameTimingSample;
|
|
40
|
+
export declare function summarizeGpuFrameTiming(samples: readonly GpuFrameTimingSample[]): GpuFrameTimingSummary;
|
|
41
|
+
//# sourceMappingURL=gpu-frame-timing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpu-frame-timing.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/gpu-frame-timing.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,wBAAwB,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;C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AAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,oBAAoB,EAAE,GACvC,qBAAqB,CAOvB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type LodSelection } from './lod-selector';
|
|
2
|
+
export declare const GPU_LOD_ROW_SCHEMA: {
|
|
3
|
+
name: string;
|
|
4
|
+
fields: ({
|
|
5
|
+
name: string;
|
|
6
|
+
type: "u32";
|
|
7
|
+
} | {
|
|
8
|
+
name: string;
|
|
9
|
+
type: "i32";
|
|
10
|
+
} | {
|
|
11
|
+
name: string;
|
|
12
|
+
type: "f32";
|
|
13
|
+
})[];
|
|
14
|
+
};
|
|
15
|
+
export declare const GPU_LOD_ROW_LAYOUT: import("../../gpu-scene-schema").GpuSceneTableLayout;
|
|
16
|
+
export interface LodDrawRange {
|
|
17
|
+
readonly firstIndex: number;
|
|
18
|
+
readonly indexCount: number;
|
|
19
|
+
readonly baseVertex: number;
|
|
20
|
+
}
|
|
21
|
+
export interface GpuLodRowsInput {
|
|
22
|
+
readonly generation: number;
|
|
23
|
+
readonly hysteresis: number;
|
|
24
|
+
readonly ranges: readonly LodDrawRange[];
|
|
25
|
+
/** Absolute projected-height thresholds, including root at index zero. */
|
|
26
|
+
readonly coverages: readonly number[];
|
|
27
|
+
readonly ready: readonly boolean[];
|
|
28
|
+
}
|
|
29
|
+
export interface GpuLodRow extends LodDrawRange {
|
|
30
|
+
readonly generation: number;
|
|
31
|
+
readonly level: number;
|
|
32
|
+
readonly screenCoverage: number;
|
|
33
|
+
readonly hysteresis: number;
|
|
34
|
+
readonly ready: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** Projects one stable row per draw range; it never contains a per-view choice. */
|
|
37
|
+
export declare function buildGpuLodRows(input: GpuLodRowsInput): readonly GpuLodRow[];
|
|
38
|
+
export declare function encodeGpuLodRows(rows: readonly GpuLodRow[]): Uint8Array;
|
|
39
|
+
export interface GpuLodSelectionInput {
|
|
40
|
+
readonly projectedHeight: number;
|
|
41
|
+
readonly previousLevel: number;
|
|
42
|
+
readonly historyValid: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** CPU reference used by both the GPU selector contract and unsupported fallback. */
|
|
45
|
+
export declare function selectGpuLod(rows: readonly GpuLodRow[], input: GpuLodSelectionInput): LodSelection;
|
|
46
|
+
//# sourceMappingURL=gpu-lod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpu-lod.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/gpu-lod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,gBAAgB,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;CAAwB,CAAC;AACxD,eAAO,MAAM,kBAAkB,sDAAwB,CAAC;AAExD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAgBD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,SAAS,EAAE,CAkC5E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,GAAG,UAAU,CAevE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED,qFAAqF;AACrF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,KAAK,EAAE,oBAAoB,GAC1B,YAAY,CAWd"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/** Detached, bounded LOD/occlusion facts for renderer inspection consumers. */
|
|
2
|
+
export declare const LOD_OCCLUSION_INSPECTION_SCHEMA: "forgeax::lod-occlusion-inspection::v2";
|
|
3
|
+
export declare const LOD_OCCLUSION_INSPECTION_MAX_BYTES: number;
|
|
4
|
+
export type LodOcclusionInspectionError = {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly expected: string;
|
|
7
|
+
readonly hint: string;
|
|
8
|
+
readonly detail?: Readonly<Record<string, string | number | boolean>>;
|
|
9
|
+
};
|
|
10
|
+
export type LodOcclusionFallback = {
|
|
11
|
+
readonly active: false;
|
|
12
|
+
} | {
|
|
13
|
+
readonly active: true;
|
|
14
|
+
readonly reason: 'producer-failed' | 'page-exhausted' | 'query-failed' | 'device-loss';
|
|
15
|
+
readonly error: LodOcclusionInspectionError;
|
|
16
|
+
};
|
|
17
|
+
export type LodOcclusionDegradation = {
|
|
18
|
+
readonly active: false;
|
|
19
|
+
} | {
|
|
20
|
+
readonly active: true;
|
|
21
|
+
readonly reason: 'all-visible' | 'query-unavailable';
|
|
22
|
+
};
|
|
23
|
+
export interface LodOcclusionInspectionSample {
|
|
24
|
+
readonly primitiveSlot: number;
|
|
25
|
+
readonly level: number;
|
|
26
|
+
readonly visible: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface LodOcclusionInspectionRow {
|
|
29
|
+
readonly root: {
|
|
30
|
+
readonly guid: string;
|
|
31
|
+
readonly sourceKey: string;
|
|
32
|
+
};
|
|
33
|
+
readonly view: {
|
|
34
|
+
readonly attachmentId: string;
|
|
35
|
+
readonly cameraEntity: number;
|
|
36
|
+
readonly viewRole: 'main' | 'shadow' | 'reflection' | 'probe';
|
|
37
|
+
readonly viewGeneration: number;
|
|
38
|
+
};
|
|
39
|
+
readonly slot: {
|
|
40
|
+
readonly primitiveSlot: number;
|
|
41
|
+
readonly slotGeneration: number;
|
|
42
|
+
};
|
|
43
|
+
readonly generation: number;
|
|
44
|
+
readonly count: {
|
|
45
|
+
readonly candidates: number;
|
|
46
|
+
readonly visible: number;
|
|
47
|
+
readonly occluded: number;
|
|
48
|
+
};
|
|
49
|
+
readonly lodHistogram: readonly {
|
|
50
|
+
readonly level: number;
|
|
51
|
+
readonly count: number;
|
|
52
|
+
}[];
|
|
53
|
+
/** Map latency for the most recently completed query page (bounded POD). */
|
|
54
|
+
readonly queryLatencyUs: {
|
|
55
|
+
readonly median: number;
|
|
56
|
+
readonly p95: number;
|
|
57
|
+
readonly last: number;
|
|
58
|
+
};
|
|
59
|
+
readonly pagePressure: {
|
|
60
|
+
readonly used: number;
|
|
61
|
+
readonly capacity: number;
|
|
62
|
+
};
|
|
63
|
+
readonly fallback: LodOcclusionFallback;
|
|
64
|
+
readonly degradation: LodOcclusionDegradation;
|
|
65
|
+
readonly samples: readonly LodOcclusionInspectionSample[];
|
|
66
|
+
}
|
|
67
|
+
export interface LodOcclusionInspectionSubmit {
|
|
68
|
+
readonly frameId: number;
|
|
69
|
+
readonly build: string;
|
|
70
|
+
readonly deviceGeneration: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Per-World attribution is only authoritative when the renderer publishes
|
|
74
|
+
* the GPU facts from the same submit that owns the parent inspection. The
|
|
75
|
+
* normal projection path remains useful diagnostics, but it must not be used
|
|
76
|
+
* as evidence for a World-reorder or per-World LOD claim.
|
|
77
|
+
*/
|
|
78
|
+
export type LodOcclusionWorldAttribution = {
|
|
79
|
+
readonly status: 'unavailable';
|
|
80
|
+
readonly reason: 'projection-only';
|
|
81
|
+
} | {
|
|
82
|
+
readonly status: 'same-submit';
|
|
83
|
+
readonly submit: LodOcclusionInspectionSubmit;
|
|
84
|
+
};
|
|
85
|
+
export interface LodOcclusionWorldInspection {
|
|
86
|
+
readonly attachmentId: string;
|
|
87
|
+
readonly rows: readonly LodOcclusionInspectionRow[];
|
|
88
|
+
readonly attribution: LodOcclusionWorldAttribution;
|
|
89
|
+
}
|
|
90
|
+
export interface LodOcclusionInspectionBudget {
|
|
91
|
+
readonly configuredQueryBudget: number;
|
|
92
|
+
readonly effectiveQueryBudget: number;
|
|
93
|
+
readonly settleSubmits: number;
|
|
94
|
+
readonly retestSubmits: number;
|
|
95
|
+
readonly expirySubmits: number;
|
|
96
|
+
}
|
|
97
|
+
export interface LodOcclusionInspection extends LodOcclusionInspectionRow {
|
|
98
|
+
readonly schema: typeof LOD_OCCLUSION_INSPECTION_SCHEMA;
|
|
99
|
+
/** Atomic identity for the submit that produced every row below. */
|
|
100
|
+
readonly submit: LodOcclusionInspectionSubmit;
|
|
101
|
+
/** Immutable budget values used by the query and confidence owners. */
|
|
102
|
+
readonly budget: LodOcclusionInspectionBudget;
|
|
103
|
+
/** Stable attachment identity; array order is never an attribution key. */
|
|
104
|
+
readonly worlds: readonly LodOcclusionWorldInspection[];
|
|
105
|
+
}
|
|
106
|
+
export type LodOcclusionInspectionInput = Omit<LodOcclusionInspection, 'schema' | 'submit' | 'budget' | 'worlds'> & {
|
|
107
|
+
readonly submit?: LodOcclusionInspectionSubmit;
|
|
108
|
+
readonly budget?: LodOcclusionInspectionBudget;
|
|
109
|
+
readonly worlds?: readonly LodOcclusionWorldInspectionInput[];
|
|
110
|
+
};
|
|
111
|
+
export type LodOcclusionWorldInspectionInput = Omit<LodOcclusionWorldInspection, 'attribution'> & {
|
|
112
|
+
readonly attribution?: LodOcclusionWorldAttribution;
|
|
113
|
+
};
|
|
114
|
+
export type LodOcclusionInspectionAction = {
|
|
115
|
+
readonly action: 'none';
|
|
116
|
+
} | {
|
|
117
|
+
readonly action: 'rebuild';
|
|
118
|
+
readonly sourceKey: string;
|
|
119
|
+
readonly reason: string;
|
|
120
|
+
} | {
|
|
121
|
+
readonly action: 'cold-cook';
|
|
122
|
+
readonly sourceKey: string;
|
|
123
|
+
readonly reason: string;
|
|
124
|
+
} | {
|
|
125
|
+
readonly action: 'retry';
|
|
126
|
+
readonly sourceKey: string;
|
|
127
|
+
readonly reason: string;
|
|
128
|
+
};
|
|
129
|
+
export declare function inspectLodOcclusion(input: LodOcclusionInspectionInput): LodOcclusionInspection;
|
|
130
|
+
export declare function serializeLodOcclusionInspection(inspection: LodOcclusionInspection): string;
|
|
131
|
+
export declare function consumeLodOcclusionInspection(inspection: LodOcclusionInspection): LodOcclusionInspectionAction;
|
|
132
|
+
//# sourceMappingURL=inspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/inspection.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAE/E,eAAO,MAAM,+BAA+B,EAAG,uCAAgD,CAAC;AAChG,eAAO,MAAM,kCAAkC,QAAY,CAAC;AAG5D,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CACvE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAA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AS,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnF;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrF;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAgItF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,2BAA2B,GAAG,sBAAsB,CA4C9F;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,sBAAsB,GAAG,MAAM,CAM1F;AAED,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,sBAAsB,GACjC,4BAA4B,CAU9B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MeshLodLevel } from '@forgeax/engine-types';
|
|
2
|
+
export interface ProjectedHeightInput {
|
|
3
|
+
readonly radius: number;
|
|
4
|
+
readonly depth: number;
|
|
5
|
+
readonly projection: 'perspective' | 'orthographic';
|
|
6
|
+
readonly fov?: number;
|
|
7
|
+
readonly orthoHeight?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface LodSelectorInput {
|
|
10
|
+
/** Lower-detail levels in ascending detail order; LOD0 is implicit. */
|
|
11
|
+
readonly levels: readonly Pick<MeshLodLevel, 'screenCoverage'>[];
|
|
12
|
+
readonly projectedHeight: number;
|
|
13
|
+
readonly previousLevel: number;
|
|
14
|
+
readonly hysteresis: number;
|
|
15
|
+
/** Index zero is the root and must remain the safe fallback. */
|
|
16
|
+
readonly ready: readonly boolean[];
|
|
17
|
+
readonly historyValid: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface LodSelection {
|
|
20
|
+
readonly level: number;
|
|
21
|
+
readonly confidence: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function projectedHeight(input: ProjectedHeightInput): number;
|
|
24
|
+
export declare function selectLod(input: LodSelectorInput): LodSelection;
|
|
25
|
+
//# sourceMappingURL=lod-selector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lod-selector.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/lod-selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,aAAa,GAAG,cAAc,CAAC;IACpD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAE,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAUnE;AAmCD,wBAAgB,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAY/D"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type VisibilityBudget } from './budget';
|
|
2
|
+
export type InvalidationReason = 'cut' | 'teleport' | 'resize' | 'projection' | 'primitive' | 'bounds' | 'topology' | 'world-reorder' | 'detach' | 'failed-submit' | 'device-loss' | 'transparent';
|
|
3
|
+
export interface ConfidenceState {
|
|
4
|
+
readonly status: 'visible' | 'hidden';
|
|
5
|
+
readonly zeroStreak: number;
|
|
6
|
+
readonly successfulSubmits: number;
|
|
7
|
+
readonly queryable: boolean;
|
|
8
|
+
readonly dirty: boolean;
|
|
9
|
+
readonly lastResultGeneration: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export type ConfidenceEvent = {
|
|
12
|
+
readonly type: 'result';
|
|
13
|
+
readonly samples: number;
|
|
14
|
+
readonly submissionGeneration: number;
|
|
15
|
+
} | {
|
|
16
|
+
readonly type: 'submit';
|
|
17
|
+
readonly submissionGeneration: number;
|
|
18
|
+
} | {
|
|
19
|
+
readonly type: 'failure';
|
|
20
|
+
readonly submissionGeneration: number;
|
|
21
|
+
} | {
|
|
22
|
+
readonly type: 'invalidate';
|
|
23
|
+
readonly reason: InvalidationReason;
|
|
24
|
+
};
|
|
25
|
+
export declare function createConfidenceState(): ConfidenceState;
|
|
26
|
+
export declare function applyConfidenceEvent(state: ConfidenceState, event: ConfidenceEvent, budget?: VisibilityBudget): ConfidenceState;
|
|
27
|
+
export declare function shouldIssueRetest(state: ConfidenceState, budget?: VisibilityBudget): boolean;
|
|
28
|
+
export declare class OcclusionConfidenceScheduler {
|
|
29
|
+
private readonly budget;
|
|
30
|
+
private readonly states;
|
|
31
|
+
private readonly wakeByGeneration;
|
|
32
|
+
private readonly expireByGeneration;
|
|
33
|
+
private readonly wakeHeap;
|
|
34
|
+
private readonly expireHeap;
|
|
35
|
+
private readonly wakeHeapMembers;
|
|
36
|
+
private readonly expireHeapMembers;
|
|
37
|
+
private readonly retestKeys;
|
|
38
|
+
private readonly scheduleByKey;
|
|
39
|
+
constructor(budget?: VisibilityBudget);
|
|
40
|
+
ensure(key: string): ConfidenceState;
|
|
41
|
+
apply(key: string, event: ConfidenceEvent): ConfidenceState;
|
|
42
|
+
/** Apply an in-flight query submit without scheduling a same-generation wake. */
|
|
43
|
+
applyInFlightSubmit(key: string, event: Extract<ConfidenceEvent, {
|
|
44
|
+
readonly type: 'submit';
|
|
45
|
+
}>): ConfidenceState;
|
|
46
|
+
drainRetests(limit: number): string[];
|
|
47
|
+
get(key: string): ConfidenceState | undefined;
|
|
48
|
+
remove(key: string): void;
|
|
49
|
+
/** Advance hidden evidence on a successful frame even when no query was issued for it. */
|
|
50
|
+
advanceSuccessfulSubmits(submissionGeneration: number, excludedKeys?: ReadonlySet<string>): {
|
|
51
|
+
readonly changed: boolean;
|
|
52
|
+
readonly drawChangedKeys: readonly string[];
|
|
53
|
+
readonly queryChangedKeys: readonly string[];
|
|
54
|
+
};
|
|
55
|
+
clear(): void;
|
|
56
|
+
private schedule;
|
|
57
|
+
private scheduleExpiry;
|
|
58
|
+
private scheduleExpiryOnly;
|
|
59
|
+
private unschedule;
|
|
60
|
+
private takeDue;
|
|
61
|
+
private addDue;
|
|
62
|
+
private refreshRetestKey;
|
|
63
|
+
}
|
|
64
|
+
export interface VisibilityDecisionInput {
|
|
65
|
+
readonly authorVisible: boolean;
|
|
66
|
+
readonly validBounds: boolean;
|
|
67
|
+
readonly frustumVisible: boolean;
|
|
68
|
+
readonly lodReady: boolean;
|
|
69
|
+
readonly occlusion: Pick<ConfidenceState, 'status' | 'queryable'>;
|
|
70
|
+
readonly lane?: 'cpu' | 'gpu';
|
|
71
|
+
}
|
|
72
|
+
export interface VisibilityDecision {
|
|
73
|
+
readonly draw: boolean;
|
|
74
|
+
readonly stage: 'author' | 'bounds' | 'frustum' | 'lod' | 'occlusion';
|
|
75
|
+
}
|
|
76
|
+
export declare function decideVisibility(input: VisibilityDecisionInput): VisibilityDecision;
|
|
77
|
+
export interface RecoveredVisibilityState extends ConfidenceState {
|
|
78
|
+
readonly retryCount: 1;
|
|
79
|
+
}
|
|
80
|
+
export declare function recoverVisibilityAfterDeviceLoss(_state: ConfidenceState, _deviceGeneration: number): RecoveredVisibilityState;
|
|
81
|
+
//# sourceMappingURL=occlusion-confidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"occlusion-confidence.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/occlusion-confidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAC1B,KAAK,GACL,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,eAAe,GACf,aAAa,GACb,aAAa,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;CACnD;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,GAC5F;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,GACnE;IA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CAAC,CAAC;CACxB;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,eAAe,EACvB,iBAAiB,EAAE,MAAM,GACxB,wBAAwB,CAU1B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface OcclusionBounds {
|
|
2
|
+
readonly min: readonly [number, number, number];
|
|
3
|
+
readonly max: readonly [number, number, number];
|
|
4
|
+
}
|
|
5
|
+
export interface OcclusionPassIdentity {
|
|
6
|
+
readonly primitiveSlot: number;
|
|
7
|
+
readonly slotGeneration: number;
|
|
8
|
+
}
|
|
9
|
+
export interface OcclusionPassPlan {
|
|
10
|
+
readonly after: string;
|
|
11
|
+
readonly depth: {
|
|
12
|
+
readonly resource: string;
|
|
13
|
+
readonly usage: 'depth-read-only';
|
|
14
|
+
};
|
|
15
|
+
readonly color: {
|
|
16
|
+
readonly resource: string;
|
|
17
|
+
readonly usage: 'not-written';
|
|
18
|
+
};
|
|
19
|
+
readonly proxyBounds: OcclusionBounds;
|
|
20
|
+
readonly queryIndex: number;
|
|
21
|
+
readonly identity?: OcclusionPassIdentity;
|
|
22
|
+
readonly resolve: {
|
|
23
|
+
readonly queryIndex: number;
|
|
24
|
+
readonly bytes: number;
|
|
25
|
+
};
|
|
26
|
+
readonly copy: {
|
|
27
|
+
readonly asynchronous: true;
|
|
28
|
+
readonly bytes: number;
|
|
29
|
+
};
|
|
30
|
+
readonly writesColor: false;
|
|
31
|
+
readonly writesDepth: false;
|
|
32
|
+
readonly submitCount: 1;
|
|
33
|
+
readonly mapSameFrame: false;
|
|
34
|
+
}
|
|
35
|
+
export interface OcclusionPassInput {
|
|
36
|
+
readonly opaquePass: string;
|
|
37
|
+
readonly depthResource: string;
|
|
38
|
+
readonly colorResource: string;
|
|
39
|
+
readonly bounds: OcclusionBounds | undefined;
|
|
40
|
+
readonly queryIndex: number;
|
|
41
|
+
readonly identity?: OcclusionPassIdentity;
|
|
42
|
+
readonly transparent?: boolean;
|
|
43
|
+
readonly deformed?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface OcclusionQueryResources {
|
|
46
|
+
readonly pageIndex: number;
|
|
47
|
+
readonly querySet: QuerySet;
|
|
48
|
+
readonly resolveBuffer: Buffer;
|
|
49
|
+
readonly stagingBuffer: Buffer;
|
|
50
|
+
}
|
|
51
|
+
export declare function createOcclusionQueryResources(device: RhiDevice, pageIndex: number): Result<OcclusionQueryResources, RhiError>;
|
|
52
|
+
/** Records resolve and copy only; caller owns one shared encoder and submit. */
|
|
53
|
+
export declare function recordOcclusionResolve(encoder: RhiCommandEncoder, resources: OcclusionQueryResources, firstQuery: number, queryCount: number): Result<void, RhiError>;
|
|
54
|
+
/** Creates only the transport plan; confidence remains owned by visibility facet/M4. */
|
|
55
|
+
export declare function buildOcclusionPassPlan(input: OcclusionPassInput): OcclusionPassPlan | undefined;
|
|
56
|
+
import type { Buffer, QuerySet, Result, RhiCommandEncoder, RhiDevice, RhiError } from '@forgeax/engine-rhi';
|
|
57
|
+
//# sourceMappingURL=occlusion-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"occlusion-pass.d.ts","sourceRoot":"","sources":["../../../src/scene/visibility/occlusion-pass.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,Q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AC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAgC3C;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,uBAAuB,EAClC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CA0BxB;AAOD,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,SAAS,CAwB/F;AAED,OAAO,KAAK,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const OCCLUSION_QUERY_PAGE_COUNT = 3;
|
|
2
|
+
export declare const OCCLUSION_QUERY_PAGE_INDEX_LIMIT = 4096;
|
|
3
|
+
export declare const OCCLUSION_QUERY_RESULT_BYTES = 8;
|
|
4
|
+
export declare const OCCLUSION_QUERY_PAGE_BYTES: number;
|
|
5
|
+
export interface OcclusionQueryIdentity {
|
|
6
|
+
readonly viewKey: string;
|
|
7
|
+
readonly attachmentId: string;
|
|
8
|
+
readonly deviceGeneration: number;
|
|
9
|
+
readonly worldGeneration: number;
|
|
10
|
+
readonly primitiveSlot: number;
|
|
11
|
+
readonly slotGeneration: number;
|
|
12
|
+
}
|
|
13
|
+
export interface OcclusionQueryReservation extends OcclusionQueryIdentity {
|
|
14
|
+
readonly pageIndex: number;
|
|
15
|
+
readonly queryIndex: number;
|
|
16
|
+
readonly reservationId: number;
|
|
17
|
+
}
|
|
18
|
+
export interface OcclusionQueryTicket extends OcclusionQueryIdentity {
|
|
19
|
+
readonly pageIndex: number;
|
|
20
|
+
readonly queryIndex: number;
|
|
21
|
+
readonly reservationId: number;
|
|
22
|
+
readonly submissionGeneration: number;
|
|
23
|
+
}
|
|
24
|
+
export interface OcclusionQueryPoolInspection {
|
|
25
|
+
readonly pageCount: number;
|
|
26
|
+
readonly pageIndexLimit: number;
|
|
27
|
+
readonly resolveBytes: number;
|
|
28
|
+
readonly stagingBytes: number;
|
|
29
|
+
readonly availablePages: number;
|
|
30
|
+
readonly inFlight: number;
|
|
31
|
+
readonly disposed: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface OcclusionQueryCompletion {
|
|
34
|
+
readonly status: 'accepted' | 'stale';
|
|
35
|
+
/** M3 transport never suppresses a draw; M4 owns confidence policy. */
|
|
36
|
+
readonly visible: true;
|
|
37
|
+
}
|
|
38
|
+
/** Renderer-owned bounded query transport; it contains no visibility policy. */
|
|
39
|
+
export declare class OcclusionQueryPool {
|
|
40
|
+
private readonly pages;
|
|
41
|
+
private readonly pending;
|
|
42
|
+
private readonly tickets;
|
|
43
|
+
private nextReservationId;
|
|
44
|
+
private disposed;
|
|
45
|
+
reserve(identity: OcclusionQueryIdentity): OcclusionQueryReservation | undefined;
|
|
46
|
+
publish(reservation: OcclusionQueryReservation, result: {
|
|
47
|
+
readonly submitted: boolean;
|
|
48
|
+
readonly submissionGeneration: number;
|
|
49
|
+
}): OcclusionQueryTicket | undefined;
|
|
50
|
+
/** Return an unsubmitted reservation to its bounded page. */
|
|
51
|
+
cancel(reservation: OcclusionQueryReservation): boolean;
|
|
52
|
+
complete(ticket: OcclusionQueryTicket, _samples: number): OcclusionQueryCompletion;
|
|
53
|
+
inspect(): OcclusionQueryPoolInspection;
|
|
54
|
+
dispose(): void;
|
|
55
|
+
private releasePage;
|
|
56
|
+
}
|
|
57
|
+
//# source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