@forgeax/engine-render 0.1.28 → 0.1.29
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 +627 -124
- package/dist/assembly/atmosphere-shader-prewarm.d.ts +6 -0
- package/dist/assembly/atmosphere-shader-prewarm.d.ts.map +1 -0
- package/dist/assembly/dynamic-geometry-host.d.ts +21 -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 +8 -0
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/material/assembly.d.ts +7 -0
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- 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/failure-location.d.ts +12 -0
- package/dist/assembly/recovery/failure-location.d.ts.map +1 -0
- package/dist/assembly/recovery/renderer-recover.d.ts +6 -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 +6 -0
- 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/{chunk-JAASCMXA.mjs → chunk-33XZFTQU.mjs} +245 -39
- package/dist/chunk-33XZFTQU.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-J52NMQKR.mjs → chunk-BQVQOQJH.mjs} +1086 -838
- package/dist/chunk-BQVQOQJH.mjs.map +1 -0
- package/dist/{chunk-IQMKJLNU.mjs → chunk-BTWH7BP4.mjs} +386 -17
- package/dist/chunk-BTWH7BP4.mjs.map +1 -0
- package/dist/{chunk-MBU4ZVE7.mjs → chunk-FUODTTIA.mjs} +3921 -671
- package/dist/chunk-FUODTTIA.mjs.map +1 -0
- package/dist/{chunk-MYJ5RPJO.mjs → chunk-JQTSEI3Z.mjs} +3 -3
- package/dist/{chunk-MYJ5RPJO.mjs.map → chunk-JQTSEI3Z.mjs.map} +1 -1
- package/dist/{chunk-GE3SDD72.mjs → chunk-NICXSHAT.mjs} +16 -38
- package/dist/chunk-NICXSHAT.mjs.map +1 -0
- package/dist/{chunk-J6KACNOH.mjs → chunk-NRNXBLIJ.mjs} +577 -7
- package/dist/chunk-NRNXBLIJ.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-VSL23LZE.mjs → chunk-S4DNKQYQ.mjs} +1117 -445
- package/dist/chunk-S4DNKQYQ.mjs.map +1 -0
- package/dist/components/camera.d.ts +62 -2
- package/dist/components/camera.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -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/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/construct-renderer.mjs +12888 -7025
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/gpu-residency.d.ts +1 -12
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/environment/background.d.ts +6 -0
- package/dist/environment/background.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 +7 -4
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/extract/camera.d.ts.map +1 -1
- package/dist/extract/gpu-driven.d.ts +33 -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/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.map +1 -1
- package/dist/gpu-driven/production-raster.d.ts +144 -23
- 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-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 +6 -0
- package/dist/hdrp-buffers.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.map +1 -1
- package/dist/index.d.ts +18 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/inspection-types.d.ts +164 -0
- 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 +5 -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 +21 -5
- package/dist/pbr-pipeline.d.ts.map +1 -1
- 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-builder.d.ts +2 -1
- 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/points-lines/standard-owner.d.ts +1 -1
- package/dist/points-lines/standard-owner.d.ts.map +1 -1
- 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 +106 -5
- 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 +39 -4
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +7 -8
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +38 -1
- 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 +12 -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 +2 -9
- package/dist/record/recovery-pipeline.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +74 -26
- 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 +35 -7
- 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/record-owner.d.ts +0 -2
- package/dist/reflection/record-owner.d.ts.map +1 -1
- package/dist/render-contract.d.ts +173 -30
- 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 +64 -5
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +7 -5
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +101 -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 +29 -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/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 +2 -1
- package/dist/temporal/standard-scene-data.d.ts.map +1 -1
- package/dist/temporal/temporal-view.d.ts +2 -0
- package/dist/temporal/temporal-view.d.ts.map +1 -1
- package/dist/typed-render-graph-primitives.d.ts +35 -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/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__/detached-inspection.integration.test.ts +5 -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__/factory-contract.integration.test.ts +67 -8
- 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-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 +287 -6
- 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 +264 -0
- package/src/__tests__/gpu-driven-mesh-world-identity.unit.test.ts +349 -0
- package/src/__tests__/gpu-driven-pbr.dawn.test.ts +1417 -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 +1075 -93
- 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 +159 -52
- package/src/__tests__/gpu-pass-timing.browser.test.ts +6 -1
- 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 +559 -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 +52 -2
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +4 -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 +37 -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__/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 +35 -4
- 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 +104 -0
- package/src/__tests__/reflection-probe-record-owner.characterization.unit.test.ts +2 -1
- package/src/__tests__/render-error-code-owner.test-d.ts +4 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +22 -0
- package/src/__tests__/render-error-exhaustive.test-d.ts +15 -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 +914 -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 +60 -0
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +923 -5
- package/src/__tests__/shader-manifest-fixture.ts +39 -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 +118 -14
- package/src/__tests__/specular-environment-scale.dawn.test.ts +156 -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-format-probe-gating.integration.test.ts +82 -0
- package/src/__tests__/ssr-gpu-dispatch.browser.test.ts +91 -0
- package/src/__tests__/ssr-gpu-dispatch.dawn.test.ts +112 -0
- package/src/__tests__/ssr-gpu-dispatch.ts +946 -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 +44 -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 +38 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +320 -3
- package/src/__tests__/standard-profile-oracle.unit.test.ts +22 -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 +193 -0
- package/src/__tests__/taa-history-clipping.dawn.test.ts +328 -0
- package/src/__tests__/taa-neighborhood-equivalence.dawn.test.ts +778 -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 +341 -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__/texture-usage-surface.unit.test.ts +4 -2
- 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/assembly/atmosphere-shader-prewarm.ts +38 -0
- package/src/assembly/dynamic-geometry-host.ts +48 -0
- 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 +10 -0
- package/src/assembly/material/assembly.ts +38 -0
- package/src/assembly/material-shader-policy.ts +71 -28
- package/src/assembly/recovery/failure-location.ts +62 -0
- package/src/assembly/recovery/renderer-recover.ts +19 -17
- package/src/assembly/renderer-facade.ts +12 -0
- 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 +32 -0
- 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 +142 -121
- 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 +666 -652
- package/src/assembly/webgpu-vertex-layouts.ts +233 -87
- package/src/components/__tests__/camera-exposure.contract.unit.test.ts +153 -0
- package/src/components/camera.ts +287 -7
- package/src/components/index.ts +1 -0
- package/src/components/instances.ts +45 -18
- package/src/components/scene-instance.ts +2 -1
- package/src/components/screen-space-reflection.ts +21 -0
- package/src/components/sprite-animation.ts +2 -2
- package/src/components/sprite-instances.ts +1 -1
- package/src/device/gpu-residency.ts +34 -31
- package/src/environment/background.ts +263 -0
- package/src/errors/gpu-driven.ts +39 -5
- package/src/errors/render.ts +27 -3
- package/src/extract/camera.ts +26 -1
- package/src/extract/gpu-driven.ts +185 -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 +424 -102
- package/src/gpu-driven/pbr-program.ts +31 -0
- package/src/gpu-driven/prepared-draw.ts +29 -4
- package/src/gpu-driven/production-raster.ts +2267 -694
- package/src/gpu-driven/shadow-views.ts +539 -0
- package/src/gpu-driven/view-gpu.ts +188 -41
- package/src/gpu-scene-schema.ts +52 -11
- package/src/gpu-scene.ts +186 -99
- package/src/gpu-texture-usage.ts +1 -0
- package/src/hdrp-buffers.ts +72 -36
- package/src/ibl/frame-resources.ts +38 -0
- package/src/ibl/skylight-bind-group.ts +5 -4
- package/src/index.ts +109 -1
- package/src/inspection-types.ts +191 -0
- 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 +145 -0
- package/src/materials.ts +44 -8
- package/src/pbr-pipeline.ts +159 -17
- package/src/pipeline/standard-forward-lane.ts +52 -24
- 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 +192 -59
- package/src/pipeline/standard-post.ts +186 -27
- package/src/pipeline-builder.ts +16 -6
- package/src/pipeline-spec-types.ts +4 -0
- package/src/pipeline-spec.ts +37 -29
- package/src/points-lines/standard-owner.ts +6 -14
- package/src/prepare/prepared-graphics-resolver.ts +9 -2
- package/src/record/__tests__/material-slot-plan.unit.test.ts +48 -0
- package/src/record/__tests__/mesh-ssbo.unit.test.ts +40 -1
- package/src/record/__tests__/recovery-pipeline.unit.test.ts +2 -29
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +36 -5
- 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 +12 -11
- package/src/record/frame-snapshot.ts +133 -23
- package/src/record/frame-targets.ts +9 -0
- package/src/record/frame.ts +725 -133
- package/src/record/main-pass-geometry.ts +149 -94
- package/src/record/main-pass-material.ts +115 -26
- package/src/record/main-pass-sprite-draws.ts +16 -107
- package/src/record/main-pass.ts +78 -8
- package/src/record/material-uniforms.ts +1 -1
- package/src/record/mesh-ssbo.ts +59 -15
- package/src/record/prepared-material-bindings.ts +234 -0
- package/src/record/recovery-pipeline.ts +59 -136
- package/src/record/render-context.ts +90 -22
- package/src/record/shadow-pass.ts +1231 -209
- package/src/record/skybox-post-pass.ts +14 -3
- package/src/record/typed-frame-graph.ts +1004 -44
- package/src/record/view-ubo.ts +11 -0
- package/src/recovery/render-system-candidate.ts +90 -66
- package/src/recovery/render-system-roots.ts +113 -0
- package/src/recovery/types.ts +77 -0
- package/src/reflection/record-owner.ts +26 -54
- package/src/render-contract.ts +195 -25
- package/src/render-graph-primitives.ts +6 -2
- package/src/render-pipeline.ts +70 -1
- package/src/render-system-extract-tail.ts +409 -160
- package/src/render-system-extract.ts +376 -102
- package/src/render-system-projections.ts +241 -0
- package/src/render-system.ts +681 -822
- package/src/scene/render-scene-types.ts +13 -4
- package/src/scene/render-scene.ts +569 -355
- package/src/scene/shadow-visibility.ts +21 -0
- 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 +777 -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 +74 -12
- package/src/temporal/history.ts +3 -1
- package/src/temporal/inspection.ts +2 -1
- package/src/temporal/standard-scene-data.ts +3 -1
- package/src/temporal/temporal-view.ts +3 -0
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +204 -139
- package/src/typed-render-graph-primitives.ts +266 -74
- package/src/typed-shadow-passes.ts +122 -12
- 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-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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-topology.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/batch-topology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"batch-topology.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/batch-topology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,6BAA6B,CAAC;AAE3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,GAAG,aAAa,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ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;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,cAAc,EACtB,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC,GACpE,cAAc,CAwBhB;AAmPD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CA8BjG;AAED,mFAAmF;AACnF,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAC3D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA2C;IACjF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAqB;IAC1D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAgB;IACpD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;IAC7C,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,qBAAqB,CAAK;IAClC,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,UAAU,CAA6B;IAE/C,OAAO,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,GAAG,IAAI;IAahD,KAAK,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO;IAwH7C,IAAI,IAAI,cAAc;IAkCtB,OAAO,IAAI,uBAAuB;IAkBlC,OAAO,CAAC,GAAG;IAuCX,OAAO,CAAC,MAAM;IAqCd,OAAO,CAAC,qBAAqB;CAiB9B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ShaderModule } from '@forgeax/engine-rhi';
|
|
2
|
+
import type { MaterialShaderArtifact } from '@forgeax/engine-shader';
|
|
3
|
+
/** One producer-selected WGSL module and its matching vertex/material receipt. */
|
|
4
|
+
export interface GpuDrivenPbrProgram {
|
|
5
|
+
readonly module: ShaderModule;
|
|
6
|
+
readonly artifact: MaterialShaderArtifact;
|
|
7
|
+
}
|
|
8
|
+
export declare function standardPbrProgramKey(materialShaderId: string, vertexColorAvailable?: boolean): string | undefined;
|
|
9
|
+
export declare function resolveStandardPbrProgram(programs: ReadonlyMap<string, GpuDrivenPbrProgram> | undefined, materialShaderId: string, vertexColorAvailable?: boolean): GpuDrivenPbrProgram | undefined;
|
|
10
|
+
//# sourceMappingURL=pbr-program.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pbr-program.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/pbr-program.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;CAC3C;AAED,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,MAAM,EACxB,oBAAoB,UAAQ,GAC3B,MAAM,GAAG,SAAS,CASpB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,SAAS,EAC9D,gBAAgB,EAAE,MAAM,EACxB,oBAAoB,UAAQ,GAC3B,mBAAmB,GAAG,SAAS,CAGjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepared-draw.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/prepared-draw.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAA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
|
|
1
1
|
import type { RenderGraphBuilder, RenderGraphError } from '@forgeax/engine-render-graph';
|
|
2
|
-
import type { BindGroup, BindGroupLayout, Result, RhiDevice,
|
|
2
|
+
import type { BindGroup, BindGroupLayout, Result, RhiDevice, TextureFormat } from '@forgeax/engine-rhi';
|
|
3
3
|
import { RhiError } from '@forgeax/engine-rhi';
|
|
4
4
|
import type { MaterialShaderArtifact } from '@forgeax/engine-shader';
|
|
5
|
+
import type { MaterialRenderState } from '@forgeax/engine-types';
|
|
5
6
|
import type { DeviceScope, LifecycleResourceSpec } from '../device/device-scope';
|
|
6
7
|
import type { MeshGpuHandles } from '../device/gpu-residency';
|
|
7
|
-
import
|
|
8
|
+
import { GpuDrivenPreparationError } from '../errors/gpu-driven';
|
|
9
|
+
import type { GpuDrivenProductionInspection, GpuDrivenStructureMetrics } from '../inspection-types';
|
|
8
10
|
import type { PipelineBuilderShaderModuleFactory } from '../pipeline-builder';
|
|
11
|
+
import type { ValidatedRenderable } from '../record/frame-snapshot';
|
|
9
12
|
import type { PipelineState } from '../record/render-context';
|
|
10
13
|
import type { CameraSnapshot } from '../render-contract';
|
|
11
|
-
import type { RenderPipelineFrame, RenderPipelineGpuDrivenProjection } from '../render-pipeline';
|
|
12
|
-
import type { RenderableSnapshot } from '../render-system-extract';
|
|
14
|
+
import type { GpuDrivenStandardPbrFrameResources, RenderPipelineFrame, RenderPipelineGpuDrivenProjection } from '../render-pipeline';
|
|
15
|
+
import type { DispatchEntry, MaterialSnapshot, RenderableSnapshot, ShadowCasterMembership } from '../render-system-extract';
|
|
13
16
|
import type { PersistentGpuDrivenState } from '../scene/render-scene';
|
|
14
17
|
import type { OcclusionFrameProjection } from '../scene/visibility/occlusion-runtime';
|
|
18
|
+
import { type GpuDrivenBatch, type SubmissionPlan } from './batch-topology';
|
|
19
|
+
import { type ShadowViewIdentity, type ShadowViewProjection, ShadowViewStatePool, type ShadowViewUpdateInput } from './shadow-views';
|
|
15
20
|
import { type GpuDrivenLodSelectionInspection } from './view-gpu';
|
|
16
21
|
export interface StandardPbrSceneCandidate {
|
|
17
22
|
readonly primitiveIndex: number;
|
|
18
23
|
readonly world: Float32Array;
|
|
24
|
+
/** Optional per-instance local transform selected by BatchTopology. */
|
|
25
|
+
readonly instanceTransform?: Float32Array;
|
|
26
|
+
/** Optional GPU Scene material row carried by the shadow projection. */
|
|
27
|
+
readonly materialIndex?: number;
|
|
19
28
|
}
|
|
20
29
|
export interface StandardPbrSceneProjection {
|
|
21
30
|
readonly entryPoint: string;
|
|
@@ -24,6 +33,16 @@ export interface StandardPbrSceneProjection {
|
|
|
24
33
|
/** Packed Mesh rows: mat4 + padded mat3 + previous mat4 + temporal vec4. */
|
|
25
34
|
readonly rows: Float32Array;
|
|
26
35
|
}
|
|
36
|
+
export interface GpuDrivenShadowBatchProjection {
|
|
37
|
+
readonly mesh: MeshGpuHandles;
|
|
38
|
+
readonly meshBindGroup: BindGroup;
|
|
39
|
+
readonly visibleBindGroup: BindGroup;
|
|
40
|
+
readonly deformation: 'rigid' | 'skin';
|
|
41
|
+
/** Material snapshot used to assemble the receipt-owned alpha-mask BG. */
|
|
42
|
+
readonly material: MaterialSnapshot;
|
|
43
|
+
/** Composite entity identity used only for video-resource routing. */
|
|
44
|
+
readonly materialEntityKey: number;
|
|
45
|
+
}
|
|
27
46
|
/**
|
|
28
47
|
* Build the producer-owned Standard PBR scene-index projection. The receipt is
|
|
29
48
|
* the only source of the vertex entry and layout identity; callers cannot
|
|
@@ -69,7 +88,27 @@ export declare function adaptStandardPbrFrameResources(input: {
|
|
|
69
88
|
readonly code: 'missing-material-receipt' | 'invalid-material-receipt';
|
|
70
89
|
};
|
|
71
90
|
};
|
|
72
|
-
|
|
91
|
+
interface PreparedBatch {
|
|
92
|
+
readonly batch: GpuDrivenBatch;
|
|
93
|
+
readonly mesh: MeshGpuHandles;
|
|
94
|
+
readonly renderState: MaterialRenderState | undefined;
|
|
95
|
+
/** Stable World attachment key used to join same-submit GPU counters. */
|
|
96
|
+
readonly worldKey: number;
|
|
97
|
+
/** Stable representative slot identity for this homogeneous batch. */
|
|
98
|
+
readonly primitiveSlot: number;
|
|
99
|
+
readonly slotGeneration: number;
|
|
100
|
+
}
|
|
101
|
+
declare function filteredPlan(source: SubmissionPlan, slots: PersistentGpuDrivenState['slots'], meshBySlot: ReadonlyMap<number, MeshGpuHandles>, shadowCasterDrawKeys?: ReadonlySet<string>, skinArtifact?: MaterialShaderArtifact, shadowCasterMembership?: readonly ShadowCasterMembership[], camera?: CameraSnapshot, activeEntityKeys?: ReadonlySet<number>, worldKeys?: readonly number[]): {
|
|
102
|
+
readonly plan: SubmissionPlan;
|
|
103
|
+
readonly batches: readonly PreparedBatch[];
|
|
104
|
+
/** True only when every source draw item/instance has a main GPU candidate. */
|
|
105
|
+
readonly ownsAllDrawItems: boolean;
|
|
106
|
+
/** Concrete entity/material/draw identities claimed by this projection. */
|
|
107
|
+
readonly drawKeys: ReadonlySet<string>;
|
|
108
|
+
/** Extracted concrete ShadowCaster keys actually claimed by this plan. */
|
|
109
|
+
readonly shadowDrawKeys: ReadonlySet<string>;
|
|
110
|
+
};
|
|
111
|
+
type FilteredProductionPlan = ReturnType<typeof filteredPlan>;
|
|
73
112
|
export interface GpuDrivenWorldLodSelectionInspection {
|
|
74
113
|
readonly worldKey: number;
|
|
75
114
|
readonly primitiveSlot: number;
|
|
@@ -84,13 +123,47 @@ export interface GpuDrivenWorldLodSelectionInspection {
|
|
|
84
123
|
}
|
|
85
124
|
export interface PreparedGpuDrivenFrame {
|
|
86
125
|
readonly topologySignature: string;
|
|
87
|
-
|
|
88
|
-
readonly
|
|
126
|
+
/** True when every source draw item/instance is claimed by the GPU lane. */
|
|
127
|
+
readonly ownsAllDrawItems: boolean;
|
|
128
|
+
/** True only when the extracted ShadowCaster channel is fully represented. */
|
|
129
|
+
readonly ownsAllShadowCasters?: boolean;
|
|
130
|
+
/** Concrete main-pass draw identities claimed by the GPU projection. */
|
|
131
|
+
readonly drawKeys?: ReadonlySet<string>;
|
|
132
|
+
readonly standardPbrFrameResources: GpuDrivenStandardPbrFrameResources;
|
|
89
133
|
readonly occlusion?: OcclusionFrameProjection;
|
|
90
134
|
/** @internal Commits a replacement generation only after graph promotion. */
|
|
91
135
|
readonly _commitResourceReplacement: () => void;
|
|
136
|
+
/** @internal Retires superseded view buffers when graph compilation promotes them. */
|
|
137
|
+
readonly _commitGpuResourceReplacement?: () => void;
|
|
138
|
+
/** @internal Discards staged shadow cache publication after a failed frame. */
|
|
139
|
+
readonly _abortResourceReplacement?: () => void;
|
|
140
|
+
/** Concrete ShadowCaster keys claimed by the GPU subset for this frame. */
|
|
141
|
+
readonly shadowDrawKeys?: ReadonlySet<string>;
|
|
142
|
+
/** View-scoped ShadowCaster claims consumed by each shadow record pass. */
|
|
143
|
+
readonly shadowDrawKeysByView?: ReadonlyMap<string, ReadonlySet<string>>;
|
|
144
|
+
readonly projectShadow?: (graph: RenderGraphBuilder<RenderPipelineFrame>, identity: ShadowViewIdentity) => Result<ShadowViewProjection | undefined, RenderGraphError>;
|
|
145
|
+
readonly updateShadowViews?: (views: readonly Omit<ShadowViewUpdateInput, 'sourcePlan' | 'scene'>[]) => Result<void, RhiError>;
|
|
146
|
+
readonly shadowViewPool?: ShadowViewStatePool;
|
|
147
|
+
readonly shadowBatchProjections?: ReadonlyMap<string, ReadonlyMap<number, GpuDrivenShadowBatchProjection>>;
|
|
92
148
|
project(graph: RenderGraphBuilder<RenderPipelineFrame>, format: TextureFormat, sampleCount: 1 | 4): Result<RenderPipelineGpuDrivenProjection, RenderGraphError | RhiError>;
|
|
93
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Renderer-owned identity token for the validation that resolves renderable
|
|
152
|
+
* assets to GPU meshes. The token is deliberately narrower than a frame
|
|
153
|
+
* number: unchanged persistent scene snapshots can reuse the resolved rows,
|
|
154
|
+
* while a mesh/device/pipeline generation change forces a fresh producer read.
|
|
155
|
+
*/
|
|
156
|
+
export interface GpuDrivenResidencyValidationInput {
|
|
157
|
+
/** Opaque renderer-computed world/source identity and generation fence. */
|
|
158
|
+
readonly cacheKey: string;
|
|
159
|
+
readonly renderables: readonly RenderableSnapshot[];
|
|
160
|
+
readonly transparentDispatch: readonly DispatchEntry[];
|
|
161
|
+
readonly pipelineState: PipelineState;
|
|
162
|
+
readonly pipelineHandle: number;
|
|
163
|
+
readonly meshResidencyEpoch: number;
|
|
164
|
+
readonly deviceGeneration: number;
|
|
165
|
+
readonly assetCatalogEpoch: number;
|
|
166
|
+
}
|
|
94
167
|
export interface RecoveryCapabilityFacts {
|
|
95
168
|
readonly generation: number;
|
|
96
169
|
readonly shaderCompilation: boolean;
|
|
@@ -118,42 +191,90 @@ export declare function classifyRecoveryCapability(facts: RecoveryCapabilityFact
|
|
|
118
191
|
export declare class GpuDrivenProduction {
|
|
119
192
|
private readonly device;
|
|
120
193
|
private readonly shaderModuleFactory;
|
|
194
|
+
private readonly recoveryCount;
|
|
121
195
|
private disposed;
|
|
122
196
|
private view;
|
|
123
|
-
private raster;
|
|
124
197
|
private standardRaster;
|
|
198
|
+
private skinRaster;
|
|
125
199
|
private readonly sceneIdentities;
|
|
126
200
|
private nextSceneIdentity;
|
|
127
201
|
private filteredCache;
|
|
202
|
+
private shadowFilteredCache;
|
|
128
203
|
private gpuOwnedSnapshotsMaterialized;
|
|
129
204
|
private filteredPlanBuilds;
|
|
130
205
|
private gpuOwnedEntityCount;
|
|
131
206
|
private batchBindGroupCreates;
|
|
132
207
|
private validatedGpuOwnedRows;
|
|
133
208
|
private cpuFallbackDrawItems;
|
|
209
|
+
private cpuSemanticFallbackDrawItems;
|
|
210
|
+
private cpuDeformationFallbackDrawItems;
|
|
211
|
+
private readonly cpuDeformationReasons;
|
|
212
|
+
private blockedDrawItems;
|
|
213
|
+
private preparationFailure;
|
|
214
|
+
private encodedIndirectDraws;
|
|
134
215
|
private telemetryPrepared;
|
|
135
216
|
private telemetryCandidateCount;
|
|
136
217
|
private telemetryGeometryWork;
|
|
137
218
|
private telemetryRootGeometryWork;
|
|
219
|
+
private telemetryOverflow;
|
|
138
220
|
private indirectDrawCount;
|
|
139
|
-
private
|
|
221
|
+
private gpuOwnedDrawItems;
|
|
222
|
+
private mainTotalDrawItems;
|
|
223
|
+
private lane;
|
|
224
|
+
private laneReason;
|
|
225
|
+
private submissionState;
|
|
226
|
+
private retryCount;
|
|
227
|
+
private lastKnownGoodGeneration;
|
|
228
|
+
private overflowRecoveryRequired;
|
|
229
|
+
private shadowViews;
|
|
230
|
+
private shadowSourcePlan;
|
|
231
|
+
private shadowScene;
|
|
232
|
+
private shadowBatchProjections;
|
|
233
|
+
private shadowDrawKeysByView;
|
|
234
|
+
private shadowExpectedDrawKeys;
|
|
235
|
+
private shadowBatchProjectionSource;
|
|
236
|
+
private skinPaletteBuffer;
|
|
237
|
+
private committedPaletteContentRevision;
|
|
140
238
|
private standardPbrProjection;
|
|
239
|
+
private committedProjectionSource;
|
|
240
|
+
private validatedResidencyCache;
|
|
241
|
+
private residencyValidationCacheHits;
|
|
242
|
+
private residencyValidationScans;
|
|
243
|
+
private cpuValidationTelemetryCache;
|
|
244
|
+
private cpuValidationCacheHits;
|
|
245
|
+
private cpuValidationScans;
|
|
246
|
+
private structureMetrics;
|
|
141
247
|
private signatureCache;
|
|
142
|
-
constructor(device: RhiDevice, shaderModuleFactory: PipelineBuilderShaderModuleFactory);
|
|
248
|
+
constructor(device: RhiDevice, shaderModuleFactory: PipelineBuilderShaderModuleFactory, recoveryCount?: number);
|
|
249
|
+
/**
|
|
250
|
+
* Reuse the last producer-resolved residency rows when all source identity
|
|
251
|
+
* and generation fences still match. Renderables and dispatch entries are
|
|
252
|
+
* checked element-by-element as well as by their stable object identities so
|
|
253
|
+
* an accidental in-place mutation cannot reuse stale renderable indices.
|
|
254
|
+
*/
|
|
255
|
+
reuseResidencyValidation(input: GpuDrivenResidencyValidationInput): readonly ValidatedRenderable[] | undefined;
|
|
256
|
+
/** Publish the producer-owned rows after a completed residency validation. */
|
|
257
|
+
rememberResidencyValidation(input: GpuDrivenResidencyValidationInput, value: readonly ValidatedRenderable[]): void;
|
|
258
|
+
private applyCpuValidationTelemetry;
|
|
143
259
|
static forDevice(device: RhiDevice, shaderModuleFactory: PipelineBuilderShaderModuleFactory): GpuDrivenProduction;
|
|
144
|
-
/** Recovery has no frame retry: await generated programs before preparing the graph. */
|
|
145
|
-
static forRecoveryDevice(device: RhiDevice, factory: PipelineBuilderShaderModuleFactory, createShaderModule: (descriptor: {
|
|
146
|
-
code: string;
|
|
147
|
-
label?: string;
|
|
148
|
-
}) => Promise<Result<ShaderModule, RhiError>>): Promise<Result<GpuDrivenProduction, RhiError>>;
|
|
149
260
|
createRecoveryRoot(scope: DeviceScope): LifecycleResourceSpec<unknown>;
|
|
150
261
|
prepare(input: {
|
|
151
262
|
readonly scene: PersistentGpuDrivenState | undefined;
|
|
152
263
|
readonly camera: CameraSnapshot;
|
|
153
|
-
|
|
264
|
+
/** GPU meshes projected by retained RenderScene slot, never raw asset handle. */
|
|
265
|
+
readonly meshBySlot: ReadonlyMap<number, MeshGpuHandles>;
|
|
154
266
|
readonly viewBindGroupLayout: BindGroupLayout;
|
|
155
267
|
readonly meshResidencyEpoch: number;
|
|
156
268
|
readonly hdrp: boolean;
|
|
269
|
+
/** Cooked producer artifact selected from the frame material catalog. */
|
|
270
|
+
readonly standardPbrArtifact?: MaterialShaderArtifact;
|
|
271
|
+
/** Cooked producer artifact for the GPU skinning variant. */
|
|
272
|
+
readonly standardPbrSkinArtifact?: MaterialShaderArtifact;
|
|
273
|
+
readonly standardPbrPipelineState?: PipelineState;
|
|
274
|
+
/** Extracted ShadowCaster ownership keyed by concrete draw item and pass. */
|
|
275
|
+
readonly shadowCasterDrawKeys?: ReadonlySet<string>;
|
|
276
|
+
/** Structured ShadowCaster ownership facts for exact pass admission. */
|
|
277
|
+
readonly shadowCasterMembership?: readonly ShadowCasterMembership[];
|
|
157
278
|
/** Entity keys admitted by the persistent visibility facet for this view. */
|
|
158
279
|
readonly activeEntityKeys?: ReadonlySet<number>;
|
|
159
280
|
/** Collision-free renderer-owned revision for the active visibility set. */
|
|
@@ -161,19 +282,19 @@ export declare class GpuDrivenProduction {
|
|
|
161
282
|
/** Total extracted candidates, including facet-suppressed rows. */
|
|
162
283
|
readonly telemetryCandidateCount?: number;
|
|
163
284
|
readonly occlusion?: OcclusionFrameProjection;
|
|
164
|
-
/**
|
|
165
|
-
readonly
|
|
166
|
-
|
|
167
|
-
|
|
285
|
+
/** Per-frame deltas from the existing RenderScene/GPU Scene/palette owners. */
|
|
286
|
+
readonly structureMetrics?: GpuDrivenStructureMetrics;
|
|
287
|
+
}): Result<PreparedGpuDrivenFrame | undefined, RhiError | GpuDrivenPreparationError>;
|
|
288
|
+
updateShadowViews(views: readonly Omit<ShadowViewUpdateInput, 'sourcePlan' | 'scene'>[], artifact: MaterialShaderArtifact, skinArtifact: MaterialShaderArtifact | undefined, filtered: FilteredProductionPlan, scene: PersistentGpuDrivenState, shadowCasterDrawKeys: ReadonlySet<string> | undefined, shadowCasterMembership: readonly ShadowCasterMembership[] | undefined): Result<void, RhiError>;
|
|
289
|
+
private disableShadowViews;
|
|
168
290
|
dispose(): void;
|
|
169
|
-
/** Whether the current production topology can consume GPU Scene row updates. */
|
|
170
|
-
requiresSceneRows(): boolean;
|
|
171
291
|
inspect(): GpuDrivenProductionInspection;
|
|
172
292
|
/** Read renderer-owned LOD counters copied by the last GPU submission. */
|
|
173
293
|
readLodSelection(): Promise<GpuDrivenLodSelectionInspection | undefined>;
|
|
174
294
|
recordCpuValidation(validated: readonly {
|
|
175
295
|
readonly source: RenderableSnapshot;
|
|
176
|
-
}[],
|
|
296
|
+
}[], gpuOwnedDrawKeys: ReadonlySet<string>, cacheKey?: string): void;
|
|
177
297
|
private sceneIdentity;
|
|
178
298
|
}
|
|
299
|
+
export {};
|
|
179
300
|
//# sourceMappingURL=production-raster.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-raster.d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|
+
import type { Result, RhiDevice, RhiRenderPassEncoder } from '@forgeax/engine-rhi';
|
|
3
|
+
import { RhiError } from '@forgeax/engine-rhi';
|
|
4
|
+
import type { GpuScene } from '../gpu-scene';
|
|
5
|
+
import type { PipelineBuilderShaderModuleFactory } from '../pipeline-builder';
|
|
6
|
+
import { type SubmissionPlan } from './batch-topology';
|
|
7
|
+
import { GpuDrivenView, type GpuDrivenViewGraphResources } from './view-gpu';
|
|
8
|
+
export type ShadowViewKind = 'directional' | 'point' | 'spot';
|
|
9
|
+
export interface ShadowViewIdentity {
|
|
10
|
+
readonly kind: ShadowViewKind;
|
|
11
|
+
readonly index: number;
|
|
12
|
+
/** Optional point-light index when `index` identifies the cube face. */
|
|
13
|
+
readonly face?: number;
|
|
14
|
+
}
|
|
15
|
+
export type ShadowViewCacheState = 'hit' | 'invalidated';
|
|
16
|
+
export interface ShadowViewUpdateInput {
|
|
17
|
+
readonly identity: ShadowViewIdentity;
|
|
18
|
+
readonly sourcePlan: SubmissionPlan;
|
|
19
|
+
readonly scene: GpuScene;
|
|
20
|
+
readonly planes: Float32Array;
|
|
21
|
+
readonly cacheToken?: string;
|
|
22
|
+
readonly candidatePrimitiveIndices?: readonly number[] | ReadonlySet<number>;
|
|
23
|
+
}
|
|
24
|
+
export interface ShadowViewUpdate {
|
|
25
|
+
readonly identity: ShadowViewIdentity;
|
|
26
|
+
readonly cache: ShadowViewCacheState;
|
|
27
|
+
readonly generation: number;
|
|
28
|
+
readonly sourcePlan: SubmissionPlan;
|
|
29
|
+
readonly plan: SubmissionPlan;
|
|
30
|
+
readonly view: GpuDrivenView;
|
|
31
|
+
}
|
|
32
|
+
export interface ShadowViewProjection {
|
|
33
|
+
readonly identity: ShadowViewIdentity;
|
|
34
|
+
readonly cache: ShadowViewCacheState;
|
|
35
|
+
readonly generation: number;
|
|
36
|
+
readonly plan: SubmissionPlan;
|
|
37
|
+
readonly view: GpuDrivenView;
|
|
38
|
+
readonly passNames: readonly string[];
|
|
39
|
+
readonly graphResources: GpuDrivenViewGraphResources | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface ShadowViewSubmission {
|
|
42
|
+
readonly identity: ShadowViewIdentity;
|
|
43
|
+
readonly cache: ShadowViewCacheState;
|
|
44
|
+
readonly generation: number;
|
|
45
|
+
readonly plan: SubmissionPlan;
|
|
46
|
+
readonly view: GpuDrivenView;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The only record-side hook a capable shadow lane needs after the shared
|
|
50
|
+
* groups are bound. The callback owns material/mesh binding policy and emits
|
|
51
|
+
* the indirect draws for this view; it receives the pool projection rather
|
|
52
|
+
* than rebuilding a candidate list from the frame.
|
|
53
|
+
*/
|
|
54
|
+
export interface ShadowViewGpuRecordInput {
|
|
55
|
+
readonly identity: ShadowViewIdentity;
|
|
56
|
+
readonly projection: ShadowViewProjection;
|
|
57
|
+
readonly pass: RhiRenderPassEncoder;
|
|
58
|
+
readonly resources: GraphResourceResolver;
|
|
59
|
+
}
|
|
60
|
+
export type ShadowViewGpuRecorder = (input: ShadowViewGpuRecordInput) => void;
|
|
61
|
+
export interface ShadowViewGpuPass {
|
|
62
|
+
readonly projection: ShadowViewProjection;
|
|
63
|
+
readonly resources: GraphResourceResolver;
|
|
64
|
+
readonly record: ShadowViewGpuRecorder;
|
|
65
|
+
}
|
|
66
|
+
export interface ShadowViewInspection {
|
|
67
|
+
readonly identity: ShadowViewIdentity;
|
|
68
|
+
readonly cache: ShadowViewCacheState;
|
|
69
|
+
readonly generation: number;
|
|
70
|
+
readonly sourceRevision: number;
|
|
71
|
+
readonly candidateCount: number;
|
|
72
|
+
readonly batchCount: number;
|
|
73
|
+
readonly resourceGeneration: number;
|
|
74
|
+
}
|
|
75
|
+
export declare function shadowViewIdentityKey(identity: ShadowViewIdentity): string;
|
|
76
|
+
export declare function shadowViewLabelPrefix(identity: ShadowViewIdentity): string;
|
|
77
|
+
/**
|
|
78
|
+
* Accesses consumed by a shadow raster adapter. These are the same imported
|
|
79
|
+
* scene and view-local resources written by GpuDrivenView.addPasses(...), so
|
|
80
|
+
* the graph inserts the compute-to-raster dependency without a second graph
|
|
81
|
+
* or a manual barrier owner.
|
|
82
|
+
*/
|
|
83
|
+
export declare function shadowViewRasterAccesses(resources: GpuDrivenViewGraphResources): readonly GraphAccess[];
|
|
84
|
+
/**
|
|
85
|
+
* Renderer-owned shadow view state. The pool shares one scene/topology source;
|
|
86
|
+
* each directional, point, or spot entry owns only view constants, visibility,
|
|
87
|
+
* counters, indirect arguments, and its cache decision.
|
|
88
|
+
*/
|
|
89
|
+
export declare class ShadowViewStatePool {
|
|
90
|
+
private readonly device;
|
|
91
|
+
private readonly shaderModuleFactory;
|
|
92
|
+
private readonly records;
|
|
93
|
+
private readonly activeKeys;
|
|
94
|
+
private readonly retiring;
|
|
95
|
+
private readonly pendingPublication;
|
|
96
|
+
private constructor();
|
|
97
|
+
static create(input: {
|
|
98
|
+
readonly device: RhiDevice;
|
|
99
|
+
readonly shaderModuleFactory: PipelineBuilderShaderModuleFactory;
|
|
100
|
+
}): Result<ShadowViewStatePool, RhiError>;
|
|
101
|
+
update(input: ShadowViewUpdateInput): Result<ShadowViewUpdate, RhiError>;
|
|
102
|
+
project<FrameCtx extends RenderGraphFrame>(builder: RenderGraphBuilder<FrameCtx>, identity: ShadowViewIdentity): Result<ShadowViewProjection, RenderGraphError>;
|
|
103
|
+
invalidate(identity?: ShadowViewIdentity): void;
|
|
104
|
+
cacheState(identity: ShadowViewIdentity): ShadowViewCacheState | undefined;
|
|
105
|
+
cacheHit(identity: ShadowViewIdentity): boolean;
|
|
106
|
+
isActive(identity: ShadowViewIdentity): boolean;
|
|
107
|
+
submission(identity: ShadowViewIdentity): ShadowViewSubmission | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Keep only the active view identities for the current frame. Removed light
|
|
110
|
+
* views are disposed through their own queue-fenced resource owner instead
|
|
111
|
+
* of remaining in inspection or changing the compiled topology forever.
|
|
112
|
+
*/
|
|
113
|
+
retain(identities: readonly ShadowViewIdentity[]): void;
|
|
114
|
+
/** @internal Commit every view resource replacement after a successful submit. */
|
|
115
|
+
_commitResourceReplacement(): void;
|
|
116
|
+
/**
|
|
117
|
+
* Abort a staged frame before its queue submit barrier. A candidate view
|
|
118
|
+
* must not become a cache hit merely because graph encoding succeeded: the
|
|
119
|
+
* next frame has to rebuild it after any submit/finish failure.
|
|
120
|
+
*/
|
|
121
|
+
_abortResourceReplacement(): void;
|
|
122
|
+
inspect(): readonly ShadowViewInspection[];
|
|
123
|
+
dispose(): void;
|
|
124
|
+
}
|
|
125
|
+
export { ShadowViewStatePool as GpuDrivenShadowViewPool };
|
|
126
|
+
//# sourceMappingURL=shadow-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow-views.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/shadow-views.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAW,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE7E,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK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AAI,IAAI;IAWjC,OAAO,IAAI,SAAS,oBAAoB,EAAE;IAsB1C,OAAO,IAAI,IAAI;CAQhB;AAED,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,CAAC"}
|
|
@@ -11,7 +11,7 @@ export declare function selectGpuLodLane(caps: {
|
|
|
11
11
|
readonly storageBuffer: boolean;
|
|
12
12
|
readonly indirectDrawing: boolean;
|
|
13
13
|
}): GpuLodLane;
|
|
14
|
-
export declare const GPU_DRIVEN_VIEW_WGSL = "\nstruct PrimitiveRecord {\n generation: u32,\n flags: u32,\n transformIndex: u32,\n materialIndex: u32,\n drawTemplateIndex: u32,\n instanceStart: u32,\n instanceCount: u32,\n assetHandle: u32,\n localBoundsMin: vec4<f32>,\n localBoundsMax: vec4<f32>,\n};\n\nstruct TransformRecord {\n currentWorld: mat4x4<f32>,\n previousWorld: mat4x4<f32>,\n};\n\nstruct LodRecord {\n generation: u32,\n level: u32,\n firstIndex: u32,\n indexCount: u32,\n baseVertex: i32,\n screenCoverage: f32,\n hysteresis: f32,\n ready: u32,\n};\n\nstruct CandidateRecord {\n primitiveIndex: u32,\n generation: u32,\n instanceOrdinal: u32,\n materialSlot: u32,\n batchIndex: u32,\n visibleBase: u32,\n visibleCapacity: u32,\n //
|
|
14
|
+
export declare const GPU_DRIVEN_VIEW_WGSL = "\nstruct PrimitiveRecord {\n generation: u32,\n flags: u32,\n transformIndex: u32,\n materialIndex: u32,\n drawTemplateIndex: u32,\n instanceStart: u32,\n instanceCount: u32,\n assetHandle: u32,\n localBoundsMin: vec4<f32>,\n localBoundsMax: vec4<f32>,\n};\n\nstruct TransformRecord {\n currentWorld: mat4x4<f32>,\n previousWorld: mat4x4<f32>,\n};\n\nstruct LodRecord {\n generation: u32,\n level: u32,\n firstIndex: u32,\n indexCount: u32,\n baseVertex: i32,\n screenCoverage: f32,\n hysteresis: f32,\n ready: u32,\n};\n\nstruct CandidateRecord {\n primitiveIndex: u32,\n generation: u32,\n instanceOrdinal: u32,\n materialSlot: u32,\n batchIndex: u32,\n visibleBase: u32,\n visibleCapacity: u32,\n // Low bit is admission; upper bits carry the batch-local projected Mesh row.\n // Suppressed candidates still contribute to the all-candidate LOD histogram,\n // but never enter the compacted visible stream. Packing both facts here\n // keeps the candidate ABI single-source when visibility compacts rows.\n submitAdmission: u32,\n projectedHeight: f32,\n previousLevel: u32,\n historyValid: u32,\n lodCount: u32,\n lodRows: array<LodRecord, 8>,\n};\n\nstruct InstanceRecord {\n primitiveIndex: u32,\n transformIndex: u32,\n customDataStart: u32,\n flags: u32,\n};\n\nstruct BatchRecord {\n visibleBase: u32,\n visibleCapacity: u32,\n count: u32,\n first: u32,\n baseVertex: i32,\n indirectIndex: u32,\n indexed: u32,\n candidateBase: u32,\n};\n\nstruct ViewConstants {\n planes: array<vec4<f32>, 6>,\n candidateCount: u32,\n batchCount: u32,\n pad0: u32,\n pad1: u32,\n};\n\nfn selectLodLevel(\n projectedHeight: f32,\n previousLevel: u32,\n historyValid: bool,\n rows: array<LodRecord, 8>,\n levelCount: u32,\n) -> u32 {\n // Row zero is the implicit root and has no transition threshold. Lower\n // levels carry the absolute boundary that introduces the preceding row.\n // This mirrors the CPU selector: height >= rows[1] selects root, height\n // between rows[2] and rows[1] selects level 1, and so on.\n var selected = levelCount - 1u;\n for (var level = 1u; level < levelCount; level += 1u) {\n if (projectedHeight >= rows[level].screenCoverage) {\n selected = level - 1u;\n break;\n }\n }\n if (historyValid && previousLevel < levelCount && selected != previousLevel) {\n var boundary = rows[previousLevel + 1u].screenCoverage;\n if (selected < previousLevel) { boundary = rows[previousLevel].screenCoverage; }\n let band = boundary * rows[previousLevel].hysteresis;\n if (abs(projectedHeight - boundary) <= band) { selected = previousLevel; }\n }\n if (selected >= levelCount || rows[selected].ready == 0u) { return 0u; }\n return selected;\n}\n\n@group(0) @binding(0) var<storage, read> primitives: array<PrimitiveRecord>;\n@group(0) @binding(1) var<storage, read> instances: array<InstanceRecord>;\n@group(0) @binding(2) var<storage, read> transforms: array<TransformRecord>;\n@group(0) @binding(3) var<storage, read> candidates: array<CandidateRecord>;\n@group(0) @binding(4) var<storage, read> batches: array<BatchRecord>;\n@group(0) @binding(5) var<uniform> view: ViewConstants;\n@group(0) @binding(6) var<storage, read_write> counters: array<atomic<u32>>;\n@group(0) @binding(7) var<storage, read_write> visibleIndices: array<vec2<u32>>;\n@group(0) @binding(8) var<storage, read_write> indirectArgs: array<u32>;\n\nfn counterIndex(batchIndex: u32) -> u32 { return batchIndex * 12u; }\nfn overflowIndex(batchIndex: u32) -> u32 { return counterIndex(batchIndex) + 1u; }\nfn lodCounterIndex(batchIndex: u32, level: u32) -> u32 {\n return counterIndex(batchIndex) + 2u + level;\n}\n\nfn isVisible(primitive: PrimitiveRecord, world: mat4x4<f32>) -> bool {\n // GPU Scene bounds are optional. A producer that has not published local\n // bounds still belongs in the GPU lane; keep it conservatively visible\n // instead of silently dropping a valid draw.\n if ((primitive.flags & 5u) != 5u) { return false; }\n if ((primitive.flags & 2u) == 0u) { return true; }\n let localCenter = (primitive.localBoundsMin.xyz + primitive.localBoundsMax.xyz) * 0.5;\n let localExtent = (primitive.localBoundsMax.xyz - primitive.localBoundsMin.xyz) * 0.5;\n let worldCenter = (world * vec4<f32>(localCenter, 1.0)).xyz;\n let worldExtent =\n abs(world[0].xyz) * localExtent.x +\n abs(world[1].xyz) * localExtent.y +\n abs(world[2].xyz) * localExtent.z;\n for (var planeIndex = 0u; planeIndex < 6u; planeIndex += 1u) {\n let plane = view.planes[planeIndex];\n let radius = dot(abs(plane.xyz), worldExtent);\n if (dot(plane.xyz, worldCenter) + plane.w < -radius) { return false; }\n }\n return true;\n}\n\n@compute @workgroup_size(64)\nfn resetView(@builtin(global_invocation_id) id: vec3<u32>) {\n let batchIndex = id.x;\n if (batchIndex >= view.batchCount) { return; }\n atomicStore(&counters[counterIndex(batchIndex)], 0u);\n atomicStore(&counters[overflowIndex(batchIndex)], 0u);\n for (var level = 0u; level < 8u; level += 1u) {\n atomicStore(&counters[lodCounterIndex(batchIndex, level)], 0u);\n }\n atomicStore(&counters[counterIndex(batchIndex) + 10u], 0u);\n atomicStore(&counters[counterIndex(batchIndex) + 11u], 0u);\n}\n\n@compute @workgroup_size(64)\nfn cullView(@builtin(global_invocation_id) id: vec3<u32>) {\n let candidateIndex = id.x;\n if (candidateIndex >= view.candidateCount) { return; }\n let candidate = candidates[candidateIndex];\n let primitive = primitives[candidate.primitiveIndex];\n if (primitive.generation != candidate.generation) { return; }\n if (candidate.instanceOrdinal >= primitive.instanceCount) { return; }\n let instanceIndex = primitive.instanceStart + candidate.instanceOrdinal;\n let instance = instances[instanceIndex];\n let world = transforms[primitive.transformIndex].currentWorld * transforms[instance.transformIndex].currentWorld;\n let selectedLod = selectLodLevel(\n candidate.projectedHeight,\n candidate.previousLevel,\n candidate.historyValid != 0u,\n candidate.lodRows,\n candidate.lodCount,\n );\n if (candidate.lodRows[selectedLod].ready == 0u) { return; }\n // Selector counters describe the complete LOD population, including\n // candidates outside the frustum and candidates suppressed by the CPU\n // visibility facet. Submission counters below remain compacted draw facts.\n atomicAdd(&counters[lodCounterIndex(candidate.batchIndex, selectedLod)], 1u);\n if ((candidate.submitAdmission & 1u) == 0u) { return; }\n if (!isVisible(primitive, world)) { return; }\n atomicAdd(\n &counters[counterIndex(candidate.batchIndex) + 10u],\n candidate.lodRows[selectedLod].indexCount,\n );\n atomicAdd(\n &counters[counterIndex(candidate.batchIndex) + 11u],\n candidate.lodRows[0u].indexCount,\n );\n let localVisible = atomicAdd(&counters[counterIndex(candidate.batchIndex)], 1u);\n if (localVisible >= candidate.visibleCapacity) {\n atomicStore(&counters[overflowIndex(candidate.batchIndex)], 1u);\n return;\n }\n var materialOrPalette = primitive.materialIndex + (candidate.materialSlot & 0x7fffffffu);\n if ((candidate.materialSlot & 0x80000000u) != 0u) {\n materialOrPalette = instance.customDataStart;\n }\n visibleIndices[candidate.visibleBase + localVisible] = vec2<u32>(\n candidate.submitAdmission >> 1u,\n materialOrPalette,\n );\n}\n\n@compute @workgroup_size(64)\nfn finalizeView(@builtin(global_invocation_id) id: vec3<u32>) {\n let batchIndex = id.x;\n if (batchIndex >= view.batchCount) { return; }\n let batch = batches[batchIndex];\n var visibleCount = min(\n atomicLoad(&counters[counterIndex(batchIndex)]),\n batch.visibleCapacity,\n );\n // Overflow is a failed generation, never a partially valid draw. Keep the\n // telemetry flag for the producer retry path but emit zero instances so no\n // subset of a visible batch reaches the rasterizer.\n if (atomicLoad(&counters[overflowIndex(batchIndex)]) != 0u) {\n visibleCount = 0u;\n }\n let args = batch.indirectIndex * 5u;\n let candidate = candidates[batch.candidateBase];\n let selectedLod = selectLodLevel(candidate.projectedHeight, candidate.previousLevel, candidate.historyValid != 0u, candidate.lodRows, candidate.lodCount);\n let lod = candidate.lodRows[selectedLod];\n indirectArgs[args] = select(batch.count, lod.indexCount, candidate.lodCount > 0u);\n indirectArgs[args + 1u] = visibleCount;\n indirectArgs[args + 2u] = select(batch.first, lod.firstIndex, candidate.lodCount > 0u && batch.indexed != 0u);\n indirectArgs[args + 3u] = select(0u, bitcast<u32>(lod.baseVertex), candidate.lodCount > 0u && batch.indexed != 0u);\n indirectArgs[args + 4u] = 0u;\n}\n";
|
|
15
15
|
export interface GpuDrivenViewGraphResources {
|
|
16
16
|
readonly primitive: GraphBuffer;
|
|
17
17
|
readonly instance: GraphBuffer;
|
|
@@ -52,6 +52,8 @@ export interface GpuDrivenLodSelectionInspection {
|
|
|
52
52
|
readonly indirectDrawCount: number;
|
|
53
53
|
readonly visible: number;
|
|
54
54
|
readonly occluded: number;
|
|
55
|
+
/** True when the selector had to reject or clamp a visible candidate. */
|
|
56
|
+
readonly overflow: boolean;
|
|
55
57
|
readonly lodHistogram: readonly {
|
|
56
58
|
readonly level: number;
|
|
57
59
|
readonly count: number;
|
|
@@ -61,6 +63,7 @@ export interface GpuDrivenLodSelectionInspection {
|
|
|
61
63
|
readonly candidateCount: number;
|
|
62
64
|
readonly visible: number;
|
|
63
65
|
readonly occluded: number;
|
|
66
|
+
readonly overflow: boolean;
|
|
64
67
|
readonly lodHistogram: readonly {
|
|
65
68
|
readonly level: number;
|
|
66
69
|
readonly count: number;
|
|
@@ -96,6 +99,7 @@ export declare class GpuDrivenView {
|
|
|
96
99
|
private readonly resetPipeline;
|
|
97
100
|
private readonly cullPipeline;
|
|
98
101
|
private readonly finalizePipeline;
|
|
102
|
+
private readonly labelPrefix;
|
|
99
103
|
private buffers;
|
|
100
104
|
private supersededBuffers;
|
|
101
105
|
private bindGroup;
|
|
@@ -117,12 +121,16 @@ export declare class GpuDrivenView {
|
|
|
117
121
|
private bindGroupCreates;
|
|
118
122
|
private bufferRebuilds;
|
|
119
123
|
private resourceGeneration;
|
|
124
|
+
/** The last readback copy that was actually encoded and is not consumed. */
|
|
120
125
|
private telemetryPending;
|
|
126
|
+
/** Coalesce observers while the readback buffer is map-pending. */
|
|
127
|
+
private lodSelectionReadback;
|
|
121
128
|
private lodSelection;
|
|
122
129
|
private constructor();
|
|
123
130
|
static create(input: {
|
|
124
131
|
readonly device: RhiDevice;
|
|
125
132
|
readonly shaderModuleFactory: PipelineBuilderShaderModuleFactory;
|
|
133
|
+
readonly labelPrefix?: string;
|
|
126
134
|
}): Result<GpuDrivenView, RhiError>;
|
|
127
135
|
update(plan: SubmissionPlan, scene: GpuScene, planes: Float32Array): Result<void, RhiError>;
|
|
128
136
|
inspect(): GpuDrivenViewInspection;
|
|
@@ -132,7 +140,8 @@ export declare class GpuDrivenView {
|
|
|
132
140
|
get overflowByteOffset(): number;
|
|
133
141
|
/** Read selected levels written by the GPU cull pass for the last submit. */
|
|
134
142
|
readLodSelection(): Promise<GpuDrivenLodSelectionInspection | undefined>;
|
|
135
|
-
|
|
143
|
+
private readLodSelectionCopy;
|
|
144
|
+
addPasses<FrameCtx extends RenderGraphFrame>(builder: RenderGraphBuilder<FrameCtx>, labelPrefix?: string, includeCompute?: boolean): Result<GpuDrivenViewGraphResources, RenderGraphError>;
|
|
136
145
|
dispose(): void;
|
|
137
146
|
/**
|
|
138
147
|
* @internal
|
|
@@ -141,6 +150,13 @@ export declare class GpuDrivenView {
|
|
|
141
150
|
* executable, then retire behind the queue fence only after promotion.
|
|
142
151
|
*/
|
|
143
152
|
_commitResourceReplacement(): void;
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
* Grow every view buffer after a GPU overflow was observed. The next
|
|
156
|
+
* `update` rewrites the same plan into the replacement generation, so the
|
|
157
|
+
* failed generation cannot be reused even when topology identity is stable.
|
|
158
|
+
*/
|
|
159
|
+
_recoverFromOverflow(): Result<void, RhiError>;
|
|
144
160
|
private rebuildBuffers;
|
|
145
161
|
private destroyAfterSubmittedWork;
|
|
146
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-gpu.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/view-gpu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAGV,MAAM,EAGN,MAAM,EACN,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAW,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAU7C,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"view-gpu.d.ts","sourceRoot":"","sources":["../../src/gpu-driven/view-gpu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,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