@forgeax/engine-render 0.1.20 → 0.1.21
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 +215 -0
- package/dist/.tsbuildinfo +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 +21 -18
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/host-contract.d.ts +9 -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 +3 -0
- 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-4XINDLAY.mjs → chunk-5YADUCA7.mjs} +1552 -1361
- package/dist/chunk-5YADUCA7.mjs.map +1 -0
- package/dist/{chunk-TBQJOK2L.mjs → chunk-6OPXDQ2E.mjs} +364 -51
- package/dist/chunk-6OPXDQ2E.mjs.map +1 -0
- package/dist/{chunk-M2MP4ZOU.mjs → chunk-BXBQQKFQ.mjs} +3 -9
- package/dist/chunk-BXBQQKFQ.mjs.map +1 -0
- package/dist/{chunk-CDTWTHZR.mjs → chunk-FS2KNUQH.mjs} +548 -6
- package/dist/chunk-FS2KNUQH.mjs.map +1 -0
- 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 +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/light-helpers.d.ts.map +1 -1
- package/dist/components/reflection-probe.d.ts +17 -0
- package/dist/components/reflection-probe.d.ts.map +1 -0
- package/dist/construct-renderer.mjs +5826 -1003
- package/dist/construct-renderer.mjs.map +1 -1
- 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/render.d.ts +141 -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/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.map +1 -1
- package/dist/gpu-driven/production-raster.d.ts +0 -1
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +19 -17
- 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 +28 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +51 -0
- 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.mjs +1 -1
- package/dist/light-buffer-layout.d.ts +10 -1
- package/dist/light-buffer-layout.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 +14 -4
- 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-spec.d.ts +40 -7
- package/dist/pipeline-spec.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/record/frame-lighting.d.ts +27 -32
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +28 -14
- 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 +10 -4
- 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 +8 -3
- package/dist/record/gpu-timing.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +22 -1
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +2 -0
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +43 -2
- 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 +72 -4
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +7 -4
- 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/projection.d.ts +91 -0
- package/dist/reflection/projection.d.ts.map +1 -0
- package/dist/render-contract.d.ts +49 -7
- 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 +42 -2
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +58 -17
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts +17 -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/render-scene.d.ts +14 -0
- package/dist/scene/render-scene.d.ts.map +1 -1
- 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/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/index.mjs +3 -3
- package/dist/typed-render-graph-primitives.d.ts +1 -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 +2 -2
- 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 +7 -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__/device-feature-admission.unit.test.ts +73 -0
- package/src/__tests__/direct-light-snapshot.unit.test.ts +3 -3
- package/src/__tests__/docs-gate-green.unit.test.ts +38 -0
- package/src/__tests__/factory-contract.integration.test.ts +255 -29
- package/src/__tests__/fog-component.unit.test.ts +67 -0
- package/src/__tests__/fog.integration.test.ts +86 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +37 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +10 -9
- package/src/__tests__/gpu-driven-indirect-raster.dawn.test.ts +17 -1
- package/src/__tests__/gpu-driven-production.integration.test.ts +16 -17
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +12 -4
- 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__/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__/material-observation.integration.test.ts +101 -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__/public-surface.test-d.ts +10 -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-pass-encode.integration.test.ts +101 -0
- package/src/__tests__/reflection-probe-performance.perf.test.ts +60 -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 +18 -3
- package/src/__tests__/render-feature-docs.unit.test.ts +1 -1
- 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 +48 -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 +132 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +11 -2
- 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 +232 -0
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +8 -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 +377 -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__/typed-pipeline-topology.unit.test.ts +395 -14
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +2 -2
- package/src/__tests__/visibility-resolver.unit.test.ts +15 -0
- package/src/assembly/device-feature-admission.ts +73 -0
- package/src/assembly/directional-shadow-inspection.ts +122 -0
- package/src/assembly/factory.ts +877 -286
- package/src/assembly/host-contract.ts +25 -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/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 +2 -0
- package/src/components/light-helpers.ts +81 -7
- package/src/components/reflection-probe.ts +49 -0
- package/src/environment/frame.ts +6 -24
- package/src/environment/lifecycle.ts +12 -0
- package/src/errors/render.ts +286 -142
- package/src/extract/directional-shadow-projection.ts +61 -0
- package/src/extract/environment.ts +57 -0
- package/src/extract/visibility.ts +25 -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 +1 -0
- package/src/gpu-driven/production-raster.ts +1 -3
- package/src/gpu-scene.ts +8 -1
- package/src/hdrp-buffers.ts +165 -59
- package/src/ibl/IblPipelineCache.ts +11 -0
- package/src/ibl/kernel-cache.ts +88 -0
- package/src/index.ts +148 -0
- package/src/inspection-types.ts +56 -0
- package/src/instances-derived-bounds.ts +171 -0
- package/src/light-buffer-layout.ts +20 -5
- package/src/mesh-material-bindings.ts +132 -0
- package/src/pbr-pipeline.ts +106 -17
- package/src/pipeline/standard-forward-lane.ts +46 -16
- package/src/pipeline/standard-lighting/errors.ts +6 -0
- package/src/pipeline/standard-lighting/graph.ts +157 -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 +34 -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 +77 -0
- package/src/pipeline/standard-pipeline.ts +122 -193
- package/src/pipeline/standard-post.ts +26 -7
- package/src/pipeline/standard-profile.ts +17 -47
- package/src/pipeline-spec.ts +84 -21
- package/src/point-shadow-inspection.ts +55 -0
- package/src/record/__tests__/temporal-payload.unit.test.ts +42 -1
- package/src/record/__tests__/transparent-group2-selection.unit.test.ts +73 -0
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +40 -0
- package/src/record/frame-lighting.ts +367 -427
- package/src/record/frame-snapshot.ts +35 -27
- package/src/record/frame-targets.ts +17 -0
- package/src/record/frame.ts +261 -74
- 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 +21 -12
- package/src/record/main-pass-geometry.ts +120 -80
- package/src/record/main-pass-material.ts +95 -9
- package/src/record/main-pass-sprite-draws.ts +54 -25
- package/src/record/main-pass.ts +71 -15
- package/src/record/render-context.ts +72 -0
- package/src/record/shadow-pass.ts +17 -28
- package/src/record/skybox-post-pass.ts +20 -4
- package/src/record/typed-frame-graph.ts +893 -44
- package/src/record/view-ubo.ts +63 -28
- package/src/reflection/filter.ts +81 -0
- package/src/reflection/gpu-table.ts +44 -0
- package/src/reflection/projection.ts +281 -0
- package/src/render-contract.ts +76 -5
- package/src/render-graph-primitives.ts +9 -4
- package/src/render-pipeline.ts +117 -2
- package/src/render-system-extract.ts +557 -100
- package/src/render-system.ts +1095 -66
- package/src/renderer.ts +222 -0
- package/src/scene/render-scene.ts +115 -9
- package/src/shadow-atlas.ts +5 -5
- package/src/ssao-buffers.ts +9 -2
- 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/transmission/__tests__/standard-transmission.dawn.test.ts +59 -20
- package/src/typed-render-graph-primitives.ts +5 -3
- package/src/typed-shadow-passes.ts +46 -40
- package/src/volume/passes.ts +15 -9
- package/dist/chunk-4XINDLAY.mjs.map +0 -1
- package/dist/chunk-CDTWTHZR.mjs.map +0 -1
- package/dist/chunk-M2MP4ZOU.mjs.map +0 -1
- package/dist/chunk-TBQJOK2L.mjs.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inputs owned by the render extract/persistent-scene boundary. Bounds are
|
|
3
|
+
* deliberately derived here instead of being added to the author-facing
|
|
4
|
+
* `Instances` component or written back to a Pack asset.
|
|
5
|
+
*/
|
|
6
|
+
export interface DerivedInstancesUnionBoundsInput {
|
|
7
|
+
readonly meshAabb: ArrayLike<number> | undefined;
|
|
8
|
+
readonly entityWorld: ArrayLike<number>;
|
|
9
|
+
readonly transforms: ArrayLike<number> | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Renderer-owned cache key. Each generation is supplied by the owner that can
|
|
13
|
+
* observe that mutation: mesh/AABB publication, entity world transform, and
|
|
14
|
+
* the packed instance matrix array respectively.
|
|
15
|
+
*/
|
|
16
|
+
export interface InstanceBoundsCacheKey {
|
|
17
|
+
/** Optional scene/world scope for composite scenes; omitted for standalone tests. */
|
|
18
|
+
readonly worldId?: number;
|
|
19
|
+
readonly entityKey: number;
|
|
20
|
+
readonly meshGeneration: number;
|
|
21
|
+
readonly transformGeneration: number;
|
|
22
|
+
readonly matrixGeneration: number;
|
|
23
|
+
}
|
|
24
|
+
export type InstanceBoundsCacheInput = InstanceBoundsCacheKey & DerivedInstancesUnionBoundsInput;
|
|
25
|
+
/**
|
|
26
|
+
* Stable bitwise fingerprint for detached numeric facts used by the cache.
|
|
27
|
+
* Float32 bits are hashed rather than decimal text so a real matrix/AABB
|
|
28
|
+
* change invalidates the projection without keeping another mutable ledger.
|
|
29
|
+
*/
|
|
30
|
+
export declare function fingerprintNumericArray(values: ArrayLike<number>): number;
|
|
31
|
+
/**
|
|
32
|
+
* Derive the world-space AABB enclosing every instance of a mesh.
|
|
33
|
+
*
|
|
34
|
+
* `undefined` is a conservative signal: the caller must skip CPU culling
|
|
35
|
+
* when an input is missing, malformed, or empty. This prevents an empty
|
|
36
|
+
* `Instances` row from becoming a synthetic identity draw/bounds candidate.
|
|
37
|
+
*/
|
|
38
|
+
export declare function deriveInstancesUnionBounds(input: DerivedInstancesUnionBoundsInput): Float32Array | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Small renderer-owned per-entity cache. A changed generation replaces the
|
|
41
|
+
* entry atomically; packed-id reuse is safe when its owner supplies a new
|
|
42
|
+
* generation (the normal RenderScene slot generation contract).
|
|
43
|
+
*/
|
|
44
|
+
export declare class InstanceBoundsCache {
|
|
45
|
+
private readonly entries;
|
|
46
|
+
private key;
|
|
47
|
+
get(input: InstanceBoundsCacheInput): Float32Array | undefined;
|
|
48
|
+
invalidate(entityKey?: number, worldId?: number): void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=instances-derived-bounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instances-derived-bounds.d.ts","sourceRoot":"","sources":["../src/instances-derived-bounds.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACpD;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,qFAAqF;IACrF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAAG,gCAAgC,CAAC;AAEjG;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,CASzE;AAyCD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,gCAAgC,GACtC,YAAY,GAAG,SAAS,CA8B1B;AAMD;;;;GAIG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+C;IAEvE,OAAO,CAAC,GAAG;IAIX,GAAG,CAAC,KAAK,EAAE,wBAAwB,GAAG,YAAY,GAAG,SAAS;IAsB9D,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;CAOvD"}
|
package/dist/internal.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TemporalFrameCoordinator } from './chunk-PCHBPYML.mjs';
|
|
2
|
-
export { validateGraphTargetCaptureReadback } from './chunk-
|
|
2
|
+
export { validateGraphTargetCaptureReadback } from './chunk-BXBQQKFQ.mjs';
|
|
3
3
|
export { resolveTilesetRuntime } from '@forgeax/engine-assets-runtime';
|
|
4
4
|
//# sourceMappingURL=internal.mjs.map
|
|
5
5
|
//# sourceMappingURL=internal.mjs.map
|
|
@@ -70,6 +70,15 @@ export declare const SPOT_LIGHT_STD430_BYTES = 80;
|
|
|
70
70
|
export declare const SPOT_LIGHT_SHADOW_TILE_SENTINEL = -1;
|
|
71
71
|
/** Sentinel for a projector-only SpotLight with no shadow atlas tile. */
|
|
72
72
|
export declare const SPOT_LIGHT_PROJECTOR_ONLY_SENTINEL = -2;
|
|
73
|
+
/**
|
|
74
|
+
* High-bit marker carried by the shared LightSlot identity lane when this
|
|
75
|
+
* SpotLight is the one projector selected for the frame. The lower 30 bits
|
|
76
|
+
* retain the shadow-atlas tile (0..3), or zero for projector-only lights, so
|
|
77
|
+
* one 64-byte slot carries both shadow and projector identity without growing
|
|
78
|
+
* the cluster UBO or inventing a second light list.
|
|
79
|
+
*/
|
|
80
|
+
export declare const SPOT_LIGHT_PROJECTOR_FLAG = 1073741824;
|
|
81
|
+
export declare const SPOT_LIGHT_TILE_MASK: number;
|
|
73
82
|
/** Byte size of the array header (count u32 + 12 B pad to 16 B stride). */
|
|
74
83
|
export declare const LIGHT_ARRAY_HEADER_BYTES = 16;
|
|
75
84
|
/** Maximum number of slots packed in the first-slice cap layout (D-S3). */
|
|
@@ -167,6 +176,6 @@ export interface PointShadowSlotInfo {
|
|
|
167
176
|
*
|
|
168
177
|
* Returns a fresh `Float32Array(16)` per call.
|
|
169
178
|
*/
|
|
170
|
-
export declare function packLightSlot(snap: PointLightSnapshot | SpotLightSnapshot, shadow?: PointShadowSlotInfo): Float32Array;
|
|
179
|
+
export declare function packLightSlot(snap: PointLightSnapshot | SpotLightSnapshot, shadow?: PointShadowSlotInfo, projectorSelected?: boolean): Float32Array;
|
|
171
180
|
export declare function assertStorageBufferCap(cap: number): Result<boolean, RhiError>;
|
|
172
181
|
//# sourceMappingURL=light-buffer-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light-buffer-layout.d.ts","sourceRoot":"","sources":["../src/light-buffer-layout.ts"],"names":[],"mappings":"AAsDA,OAAO,EAAW,KAAK,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA4BrF,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAiBnB,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,2EAA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C3B,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,EAC5C,MAAM,CAAC,EAAE,mBAAmB,EAC5B,iBAAiB,CAAC,EAAE,OAAO,GAC1B,YAAY,CAmDd;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAkB7E"}
|
|
@@ -11,13 +11,67 @@ export interface ResolvedMeshMaterialBinding {
|
|
|
11
11
|
readonly handle: number;
|
|
12
12
|
readonly source: MeshMaterialBindingSource;
|
|
13
13
|
}
|
|
14
|
+
/** Lifecycle values projected from an already prepared resident binding. */
|
|
15
|
+
export type MeshMaterialBindingReadiness = 'ready' | 'pending' | 'failed' | 'last-known-good';
|
|
16
|
+
/** Structured producer failure retained by the renderer's bounded projection. */
|
|
17
|
+
export interface MeshMaterialBindingPreparationFailure {
|
|
18
|
+
readonly code: string;
|
|
19
|
+
readonly expected: string;
|
|
20
|
+
readonly hint: string;
|
|
21
|
+
readonly detail?: Readonly<Record<string, unknown>>;
|
|
22
|
+
}
|
|
23
|
+
export interface MeshMaterialBindingSamplerObservation {
|
|
24
|
+
readonly handle: number;
|
|
25
|
+
readonly resident: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface MeshMaterialBindingTextureObservation {
|
|
28
|
+
readonly handle: number;
|
|
29
|
+
readonly mipLevelCount: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One material-slot's bounded resident projection. The renderer reports only
|
|
33
|
+
* resources it actually resolved for the slot; Pack/AssetRegistry lifecycle
|
|
34
|
+
* records stay owned by the producer and are never copied here.
|
|
35
|
+
*/
|
|
36
|
+
export interface MeshMaterialBindingResidency {
|
|
37
|
+
readonly readiness: MeshMaterialBindingReadiness;
|
|
38
|
+
readonly samplers: readonly MeshMaterialBindingSamplerObservation[];
|
|
39
|
+
readonly textures: readonly MeshMaterialBindingTextureObservation[];
|
|
40
|
+
readonly preparationFailure?: MeshMaterialBindingPreparationFailure;
|
|
41
|
+
}
|
|
14
42
|
/** Public read-only observation of the bindings used by the last frame. */
|
|
15
43
|
export interface MeshMaterialBindingObservation {
|
|
16
44
|
readonly worldId: number;
|
|
17
45
|
readonly entityKey: number;
|
|
18
46
|
readonly bindings: readonly ResolvedMeshMaterialBinding[];
|
|
19
47
|
readonly diagnostics: readonly MeshMaterialBindingDiagnostic[];
|
|
48
|
+
/** One resident projection per resolved material slot. */
|
|
49
|
+
readonly residency: readonly MeshMaterialBindingResidency[];
|
|
20
50
|
}
|
|
51
|
+
export interface MeshMaterialBindingSummary {
|
|
52
|
+
readonly total: number;
|
|
53
|
+
readonly ready: number;
|
|
54
|
+
readonly pending: number;
|
|
55
|
+
readonly failed: number;
|
|
56
|
+
readonly lastKnownGood: number;
|
|
57
|
+
readonly textureCount: number;
|
|
58
|
+
readonly samplerCount: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Build the sole renderer observation projection from the resident seam.
|
|
62
|
+
* Missing facts remain `pending`; they are never guessed from a URL, asset
|
|
63
|
+
* name, or authoring field. Slot cardinality is normalized so aggregation is
|
|
64
|
+
* deterministic even while a preparation candidate is incomplete.
|
|
65
|
+
*/
|
|
66
|
+
export declare function projectMeshMaterialBindingObservation(input: {
|
|
67
|
+
readonly worldId: number;
|
|
68
|
+
readonly entityKey: number;
|
|
69
|
+
readonly bindings: readonly ResolvedMeshMaterialBinding[];
|
|
70
|
+
readonly diagnostics: readonly MeshMaterialBindingDiagnostic[];
|
|
71
|
+
readonly residency?: readonly MeshMaterialBindingResidency[];
|
|
72
|
+
}): MeshMaterialBindingObservation;
|
|
73
|
+
/** Recompute bounded readiness/resource counts from retained observations. */
|
|
74
|
+
export declare function summarizeMeshMaterialBindings(observations: readonly MeshMaterialBindingObservation[]): MeshMaterialBindingSummary;
|
|
21
75
|
export type ResolveMeshMaterialBindingsResult = {
|
|
22
76
|
readonly ok: true;
|
|
23
77
|
readonly bindings: readonly ResolvedMeshMaterialBinding[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-material-bindings.d.ts","sourceRoot":"","sources":["../src/mesh-material-bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEpF,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEhG,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EACT,yCAAyC,GACzC,0CAA0C,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;CAC5C;AAED,2EAA2E;AAC3E,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAC1D,QAAQ,CAAC,WAAW,EAAE,SAAS,6BAA6B,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"mesh-material-bindings.d.ts","sourceRoot":"","sources":["../src/mesh-material-bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEpF,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEhG,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EACT,yCAAyC,GACz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C;IAC1D,QAAQ,CAAC,WAAW,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAChE,GACD;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;CAC9C,GACD;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC;CACrC,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,SAAS,EACf,iBAAiB,EAAE,SAAS,CAAC,MAAM,CAAC,EACpC,IAAI,EAAE;IACJ,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACtD,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;CACtE,GACA,iCAAiC,CA8CnC"}
|
package/dist/pbr-pipeline.d.ts
CHANGED
|
@@ -171,19 +171,27 @@ export declare const SKIN_MATERIAL_SHADER_ID: "forgeax::pbr-skin";
|
|
|
171
171
|
export declare const SHADOW_CASTER_SHADER_ID: "forgeax::default-shadow-caster";
|
|
172
172
|
export declare function shadowCasterVariantSet(storageBuffer: boolean, skinned: boolean): string;
|
|
173
173
|
export declare function isSkinnedShadowCasterVariant(materialShaderId: string | undefined, variantSet: string | undefined): boolean;
|
|
174
|
+
export type PipelineGroup2Contract = 'mesh' | 'skin' | 'cluster' | 'skin-cluster';
|
|
175
|
+
/** Resolve group(2) from the composed WGSL artifact used to build the PSO. */
|
|
176
|
+
export declare function resolvePipelineGroup2Contract(source: string): PipelineGroup2Contract;
|
|
174
177
|
/** Returns true for the engine-shipped standard-PBR material shader family. */
|
|
175
178
|
export declare function isStandardPbrMaterialShader(shaderId: string | undefined): boolean;
|
|
176
179
|
/**
|
|
177
180
|
* Build the PBR skin pipeline layout (4 slots `[view, material,
|
|
178
|
-
* mesh-array(
|
|
181
|
+
* mesh-array(3-entry), instances]`). View / material / instances BGLs are
|
|
179
182
|
* shared with the standard-PBR layout (passed in via `pbr` bundle); the only
|
|
180
|
-
* new BGL is the
|
|
183
|
+
* new BGL is the 3-entry mesh-array slot for `meshes` + current/previous
|
|
184
|
+
* `palette` buffers.
|
|
181
185
|
*
|
|
182
186
|
* Throws on each `createBindGroupLayout` / `createPipelineLayout` Result
|
|
183
187
|
* failure -- the engine bootstrap path wraps the call in `runShimSyncStep`
|
|
184
188
|
* to fold the throw into the structured error pipe.
|
|
185
189
|
*/
|
|
186
190
|
export declare function buildPbrSkinLayouts(device: PbrPipelineDevice, caps: PbrCaps, pbr: PbrPipelineLayoutBundle): PbrPipelineLayoutBundle;
|
|
191
|
+
/** Project the canonical group(2) resources for a PBR skin draw. */
|
|
192
|
+
export declare function createPbrSkinMeshBindGroupEntries(meshBuffer: Buffer, meshSize: number, paletteBuffer: Buffer, paletteWindowBytes: number): BindGroupEntry[];
|
|
193
|
+
/** Project all dynamic offsets for the canonical PBR skin group(2) shape. */
|
|
194
|
+
export declare function pbrSkinMeshDynamicOffsets(meshOffset: number, paletteOffset: number): readonly [number, number, number];
|
|
187
195
|
/**
|
|
188
196
|
* Build a stand-alone 7-entry unlit material BGL. Round-4 D-5 keeps unlit
|
|
189
197
|
* material BG isolated from Skylight binding 7..13 -- unlit demos do not
|
|
@@ -259,7 +267,7 @@ export declare const SPRITE_PASS_PER_INSTANCE_REGION_VARIANT_SET = "";
|
|
|
259
267
|
* spot lightViewProj matrices moved into the View UBO)
|
|
260
268
|
* - `'pbr-mesh-array'` — 1 entry: per-entity mesh SSBO (dynamic-offset)
|
|
261
269
|
* - `'pbr-instances'` — 1 entry: per-instance SSBO (no dynamic-offset)
|
|
262
|
-
* - `'pbr-skin-mesh-array'` —
|
|
270
|
+
* - `'pbr-skin-mesh-array'` — 3 entries: meshes + current/previous palette
|
|
263
271
|
* 3. Attachment-driven (fullscreen post-process):
|
|
264
272
|
* - `'fullscreen-post'` — 2 entries: input texture + sampler. The texture
|
|
265
273
|
* `sampleType` is derived from `spec.attachments` (plan §R3 fix):
|
|
@@ -289,7 +297,9 @@ export interface BindGroupLayoutDescriptorOutput {
|
|
|
289
297
|
readonly entries: GPUBindGroupLayoutEntry[];
|
|
290
298
|
}
|
|
291
299
|
/** Build the canonical HDRP group(2) bind-group layout. */
|
|
292
|
-
export declare function createHdrpBindGroupLayoutDescriptor(
|
|
300
|
+
export declare function createHdrpBindGroupLayoutDescriptor(): BindGroupLayoutDescriptor;
|
|
301
|
+
/** Build the HDRP group(2) layout for the clustered skin variant. */
|
|
302
|
+
export declare function createHdrpSkinBindGroupLayoutDescriptor(): BindGroupLayoutDescriptor;
|
|
293
303
|
export declare function buildBindGroupLayoutDescriptor(spec: PipelineSpec, options: {
|
|
294
304
|
kind: BglKind;
|
|
295
305
|
registry?: ShaderCatalog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbr-pipeline.d.ts","sourceRoot":"","sources":["../src/pbr-pipeline.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,MAAM,EACN,cAAc,EACd,SAAS,EACT,OAAO,EACP,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAkB1D,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,uBAAuB,GAAG,sBAAsB,CAAC,CAAC;AAIlG,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,QAAQ,CAAC,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AuC,IAAI,yBAAyB,CAwBnF;AAgDD,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE;IACP,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACnD,GACA,+BAA+B,CAsMjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RenderPipeline, RenderPipelineBuildContext, RenderPipelineFrame, RenderPipelineTopology } from '../render-pipeline';
|
|
2
|
-
|
|
2
|
+
import type { StandardTopologyInputValue } from './standard-lighting/topology';
|
|
3
|
+
declare function buildUrp(context: RenderPipelineBuildContext<RenderPipelineFrame>, topology: RenderPipelineTopology, lighting: StandardTopologyInputValue): ReturnType<RenderPipeline['build']>;
|
|
3
4
|
export declare const buildStandardForwardLane: typeof buildUrp;
|
|
4
5
|
export {};
|
|
5
6
|
//# sourceMappingURL=standard-forward-lane.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-forward-lane.d.ts","sourceRoot":"","sources":["../../src/pipeline/standard-forward-lane.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"standard-forward-lane.d.ts","sourceRoot":"","sources":["../../src/pipeline/standard-forward-lane.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AA8B5B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAW/E,iBAAS,QAAQ,CACf,OAAO,EAAE,0BAA0B,CAAC,mBAAmB,CAAC,EACxD,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,0BAA0B,GACnC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAoRrC;AAED,eAAO,MAAM,wBAAwB,iBAAW,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClusterBinError } from '../../cluster-binner';
|
|
2
|
+
import { StandardClusterIndexOverflowError } from '../../errors/render';
|
|
3
|
+
export declare function fromClusterBinError(error: ClusterBinError): StandardClusterIndexOverflowError;
|
|
4
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAExE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,iCAAiC,CAE7F"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GraphAccess, GraphBuffer, RenderGraphBuilder, RenderGraphError } from '@forgeax/engine-render-graph';
|
|
2
|
+
import { type Result } from '@forgeax/engine-types';
|
|
3
|
+
import type { RenderPipelineFrame } from '../../render-pipeline';
|
|
4
|
+
import type { StandardTopologyInputValue } from './topology';
|
|
5
|
+
/** Graph resources projected from one Standard lighting topology input. */
|
|
6
|
+
export interface StandardClusterGraphBuffers {
|
|
7
|
+
readonly lightData: GraphBuffer;
|
|
8
|
+
readonly clusterGrid: GraphBuffer;
|
|
9
|
+
readonly lightIndexList: GraphBuffer;
|
|
10
|
+
readonly clusterUniform: GraphBuffer;
|
|
11
|
+
readonly lightBounds: GraphBuffer;
|
|
12
|
+
}
|
|
13
|
+
/** Resolve membership execution from the frame's current prepared payload. */
|
|
14
|
+
export declare function shouldExecuteStandardClusterMembershipPass(frame: RenderPipelineFrame): boolean;
|
|
15
|
+
/** Import the shared Standard Cluster buffers with sizes derived from layout. */
|
|
16
|
+
export declare function importStandardClusterBuffers(graph: RenderGraphBuilder<RenderPipelineFrame>, input: StandardTopologyInputValue): Result<StandardClusterGraphBuffers | null, RenderGraphError>;
|
|
17
|
+
/** Accesses used by raster consumers of the shared Cluster payload. */
|
|
18
|
+
export declare function standardClusterReadAccesses(buffers: StandardClusterGraphBuffers): readonly GraphAccess[];
|
|
19
|
+
/**
|
|
20
|
+
* Add the sole GPU membership producer. CPU membership is already materialized
|
|
21
|
+
* in PreparedStandardLighting and therefore contributes no second pass.
|
|
22
|
+
*/
|
|
23
|
+
export declare function addStandardClusterMembershipPass(graph: RenderGraphBuilder<RenderPipelineFrame>, input: StandardTopologyInputValue, buffers: StandardClusterGraphBuffers): Result<void, RenderGraphError>;
|
|
24
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAM,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,2EAA2E;AAC3E,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC;AAsBD,8EAA8E;AAC9E,wBAAgB,0CAA0C,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAO9F;AAED,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,EAC9C,KAAK,EAAE,0BAA0B,GAChC,MAAM,CAAC,2BAA2B,GAAG,IAAI,EAAE,gBAAgB,CAAC,CA0C9D;AAED,uEAAuE;AACvE,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,2BAA2B,GACnC,SAAS,WAAW,EAAE,CAOxB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,EAC9C,KAAK,EAAE,0BAA0B,EACjC,OAAO,EAAE,2BAA2B,GACnC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAgChC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StandardTopologyInputValue } from './topology';
|
|
2
|
+
import type { StandardClusterTransport } from './transport';
|
|
3
|
+
export interface StandardClusterTransportInspection {
|
|
4
|
+
readonly renderPath: 'forward' | 'deferred';
|
|
5
|
+
readonly transport: StandardClusterTransport['kind'];
|
|
6
|
+
readonly producer: StandardClusterTransport['producer'];
|
|
7
|
+
readonly requested: StandardClusterTransport['requestedLightCount'];
|
|
8
|
+
readonly admitted: StandardClusterTransport['admittedLightCount'];
|
|
9
|
+
readonly shadowed: number;
|
|
10
|
+
readonly maxLights: number;
|
|
11
|
+
readonly indexCount: StandardClusterTransport['membershipEntryCount'];
|
|
12
|
+
readonly occupied: StandardClusterTransport['occupiedClusterCount'];
|
|
13
|
+
readonly clusterGridBytes: number;
|
|
14
|
+
readonly lightIndexListBytes: number;
|
|
15
|
+
readonly lightDataBytes: number;
|
|
16
|
+
readonly lightBoundsBytes: number;
|
|
17
|
+
readonly grid: StandardClusterTransport['layout']['grid'];
|
|
18
|
+
}
|
|
19
|
+
export interface StandardNoLocalLightingInspection {
|
|
20
|
+
readonly renderPath: 'forward' | 'deferred';
|
|
21
|
+
readonly transport: 'not-required';
|
|
22
|
+
readonly producer: 'none';
|
|
23
|
+
readonly requested: 0;
|
|
24
|
+
readonly admitted: 0;
|
|
25
|
+
readonly shadowed: 0;
|
|
26
|
+
readonly maxLights: number;
|
|
27
|
+
readonly indexCount: 0;
|
|
28
|
+
readonly occupied: 0;
|
|
29
|
+
readonly clusterGridBytes: 0;
|
|
30
|
+
readonly lightIndexListBytes: 0;
|
|
31
|
+
readonly lightDataBytes: 0;
|
|
32
|
+
readonly lightBoundsBytes: 0;
|
|
33
|
+
readonly grid: StandardTopologyInputValue['prepared']['layout']['grid'];
|
|
34
|
+
}
|
|
35
|
+
export type StandardLightingInspection = StandardClusterTransportInspection | StandardNoLocalLightingInspection;
|
|
36
|
+
export declare function inspectStandardClusterTransport(transport: StandardClusterTransport, prepared: StandardTopologyInputValue['prepared']): StandardClusterTransportInspection;
|
|
37
|
+
export declare function inspectStandardLighting(input: StandardTopologyInputValue): StandardLightingInspection;
|
|
38
|
+
//# sourceMappingURL=inspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,UAAU,EAAE,SAAS,GAAG,UAAU,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IACpE,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;IACl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M,0BAA0B,GAClC,kCAAkC,GAClC,iCAAiC,CAAC;AAEtC,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,wBAAwB,EACnC,QAAQ,EAAE,0BAA0B,CAAC,UAAU,CAAC,GAC/C,kCAAkC,CAmBpC;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,0BAA0B,GAChC,0BAA0B,CAoB5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const DEFAULT_CLUSTER_GRID: {
|
|
2
|
+
readonly x: 16;
|
|
3
|
+
readonly y: 9;
|
|
4
|
+
readonly z: 24;
|
|
5
|
+
};
|
|
6
|
+
export declare const CLUSTER_GRID_STRIDE_U32: 2;
|
|
7
|
+
export declare const LIGHT_INDEX_LIST_CAPACITY: 1048576;
|
|
8
|
+
export declare const MAX_LIGHTS: 256;
|
|
9
|
+
export interface StandardClusterLayout {
|
|
10
|
+
readonly grid: {
|
|
11
|
+
readonly x: number;
|
|
12
|
+
readonly y: number;
|
|
13
|
+
readonly z: number;
|
|
14
|
+
};
|
|
15
|
+
readonly clusterCount: number;
|
|
16
|
+
readonly clusterGridStrideU32: typeof CLUSTER_GRID_STRIDE_U32;
|
|
17
|
+
readonly clusterGridU32Length: number;
|
|
18
|
+
readonly lightIndexListCapacity: typeof LIGHT_INDEX_LIST_CAPACITY;
|
|
19
|
+
readonly lightDataSlotCount: typeof MAX_LIGHTS;
|
|
20
|
+
readonly lightBoundsInt32Length: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function createStandardClusterLayout(grid?: {
|
|
23
|
+
readonly x: number;
|
|
24
|
+
readonly y: number;
|
|
25
|
+
readonly z: number;
|
|
26
|
+
}): StandardClusterLayout;
|
|
27
|
+
export declare const STANDARD_CLUSTER_LAYOUT: StandardClusterLayout;
|
|
28
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/layout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;CAAkC,CAAC;AACpE,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAC;AAClD,eAAO,MAAM,yBAAyB,EAAG,OAAgB,CAAC;AAC1D,eAAO,MAAM,UAAU,EAAG,GAAY,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,oBAAoB,EAAE,OAAO,uBAAuB,CAAC;IAC9D,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,yBAAyB,CAAC;IAClE,QAAQ,CAAC,kBAAkB,EAAE,OAAO,UAAU,CAAC;IAC/C,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACzC;AAED,wBAAgB,2BAA2B,CACzC,IAAI,GAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAyB,GAC1F,qBAAqB,CAWvB;AAED,eAAO,MAAM,uBAAuB,uBAAgC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Mat4, Vec3 } from '@forgeax/engine-math';
|
|
2
|
+
import type { DirectionalLightSnapshot, PointLightSnapshot, SpotLightSnapshot } from '../../render-system-extract';
|
|
3
|
+
import type { StandardLightCount } from '../standard-profile';
|
|
4
|
+
export interface StandardLocalLightInput {
|
|
5
|
+
readonly kind: 'point' | 'spot';
|
|
6
|
+
readonly position: Vec3;
|
|
7
|
+
readonly range: number;
|
|
8
|
+
/** Whether the shadow producer admitted this local light to its atlas. */
|
|
9
|
+
readonly shadowed: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The immutable extract snapshot used by the record payload packer. Keeping
|
|
12
|
+
* it on the POD frame prevents Forward/Deferred from rebuilding a second
|
|
13
|
+
* light list while leaving hand-authored unit fixtures source-free.
|
|
14
|
+
*/
|
|
15
|
+
readonly source?: PointLightSnapshot | SpotLightSnapshot;
|
|
16
|
+
}
|
|
17
|
+
export interface StandardLightFrame {
|
|
18
|
+
readonly directional: DirectionalLightSnapshot | undefined;
|
|
19
|
+
readonly local: readonly StandardLocalLightInput[];
|
|
20
|
+
readonly view: Mat4;
|
|
21
|
+
readonly projection: Mat4;
|
|
22
|
+
readonly near: number;
|
|
23
|
+
readonly far: number;
|
|
24
|
+
readonly grid: {
|
|
25
|
+
readonly x: number;
|
|
26
|
+
readonly y: number;
|
|
27
|
+
readonly z: number;
|
|
28
|
+
};
|
|
29
|
+
readonly lightCount: StandardLightCount;
|
|
30
|
+
/** Graph path carried into inspection from the active Standard profile. */
|
|
31
|
+
readonly renderPath: 'forward' | 'deferred';
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=light-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-frame.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/light-frame.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;CAC1D;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9E,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,SAAS,GAAG,UAAU,CAAC;CAC7C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Result } from '@forgeax/engine-types';
|
|
2
|
+
import { type ClusterBinScratch } from '../../cluster-binner';
|
|
3
|
+
import type { RenderError } from '../../errors/render';
|
|
4
|
+
import type { StandardClusterLayout } from './layout';
|
|
5
|
+
import type { StandardLightFrame } from './light-frame';
|
|
6
|
+
export interface StandardClusterMembership {
|
|
7
|
+
readonly clusterGrid: Uint32Array;
|
|
8
|
+
readonly lightIndexList: Uint32Array;
|
|
9
|
+
readonly lightBounds: Int32Array;
|
|
10
|
+
readonly membershipEntryCount: number;
|
|
11
|
+
readonly scratch: ClusterBinScratch;
|
|
12
|
+
}
|
|
13
|
+
export declare function deriveStandardMembership(frame: StandardLightFrame, layout: StandardClusterLayout, scratch?: ClusterBinScratch): Result<StandardClusterMembership, RenderError>;
|
|
14
|
+
//# sourceMappingURL=membership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"membership.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAO,KAAK,iBAAiB,EAA2B,MAAM,sBAAsB,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACrC;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,oBAA4B,GAClC,MAAM,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAuBhD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Result } from '@forgeax/engine-types';
|
|
2
|
+
import { type RenderError } from '../../errors/render';
|
|
3
|
+
import { type StandardClusterLayout } from './layout';
|
|
4
|
+
import type { StandardLightFrame } from './light-frame';
|
|
5
|
+
import { type StandardClusterMembership } from './membership';
|
|
6
|
+
export type { StandardLightFrame } from './light-frame';
|
|
7
|
+
export interface PreparedStandardLighting extends StandardClusterMembership {
|
|
8
|
+
readonly directional: StandardLightFrame['directional'];
|
|
9
|
+
readonly local: StandardLightFrame['local'];
|
|
10
|
+
readonly layout: StandardClusterLayout;
|
|
11
|
+
readonly membershipLightCount: number;
|
|
12
|
+
readonly renderPath: NonNullable<StandardLightFrame['renderPath']>;
|
|
13
|
+
readonly maxLights: StandardLightFrame['lightCount'];
|
|
14
|
+
}
|
|
15
|
+
export declare function prepareStandardLighting(frame: StandardLightFrame): Result<PreparedStandardLighting, RenderError>;
|
|
16
|
+
//# sourceMappingURL=prepare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAoC,MAAM,qBAAqB,CAAC;AAEzF,OAAO,EAA+B,KAAK,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAA4B,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAExF,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACxD,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;CACtD;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,kBAAkB,GACxB,MAAM,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAgB/C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type Result } from '@forgeax/engine-types';
|
|
2
|
+
import type { PreparedStandardLighting } from './prepare';
|
|
3
|
+
import type { StandardClusterTransport } from './transport';
|
|
4
|
+
/** A prepared frame with no local lights on a non-storage direct backend. */
|
|
5
|
+
export interface StandardNoLocalTopologyInput {
|
|
6
|
+
readonly kind: 'no-local-lights';
|
|
7
|
+
readonly prepared: PreparedStandardLighting;
|
|
8
|
+
}
|
|
9
|
+
/** A prepared frame whose Standard surface uses one proven Cluster transport. */
|
|
10
|
+
export interface StandardClusteredTopologyInput {
|
|
11
|
+
readonly kind: 'clustered';
|
|
12
|
+
readonly prepared: PreparedStandardLighting;
|
|
13
|
+
readonly transport: StandardClusterTransport;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The only lighting value accepted by a Standard topology adapter. It is a
|
|
17
|
+
* projection of one prepared frame, not a second light/config/capability
|
|
18
|
+
* input. Both Forward and Deferred keep the same object identity for a frame.
|
|
19
|
+
*/
|
|
20
|
+
export type StandardTopologyInput = StandardNoLocalTopologyInput | StandardClusteredTopologyInput;
|
|
21
|
+
export type StandardTopologyInputValue = StandardTopologyInput;
|
|
22
|
+
/**
|
|
23
|
+
* Stable identity for the graph-facing Standard lighting declaration.
|
|
24
|
+
*
|
|
25
|
+
* The prepared light payload itself is frame-local and must never be retained
|
|
26
|
+
* by a compiled graph. These are the only facts that affect the Cluster graph
|
|
27
|
+
* shape and persistent buffer contract, so the record owner can reject an old
|
|
28
|
+
* graph before uploading a payload derived from a different declaration.
|
|
29
|
+
*/
|
|
30
|
+
export declare function standardLightingTopologySignature(input: StandardTopologyInputValue | undefined): string;
|
|
31
|
+
export interface StandardTopologyInputError {
|
|
32
|
+
readonly code: 'topology-input-invalid';
|
|
33
|
+
readonly expected: 'prepared Standard lighting topology input';
|
|
34
|
+
readonly hint: 'derive topology from prepared Standard lighting';
|
|
35
|
+
readonly detail: {
|
|
36
|
+
readonly field: 'kind' | 'prepared' | 'transport' | 'lights' | 'capabilities';
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Validate that transport and prepared membership are the same derivation.
|
|
41
|
+
* The identity checks make it impossible for an adapter to silently combine
|
|
42
|
+
* one path's layout/counts with another path's prepared light corpus.
|
|
43
|
+
*/
|
|
44
|
+
export declare function deriveStandardTopologyInput(input: StandardTopologyInput): Result<StandardTopologyInputValue, StandardTopologyInputError>;
|
|
45
|
+
//# sourceMappingURL=topology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,6EAA6E;AAC7E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;CAC7C;AAED,iFAAiF;AACjF,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,GAAG,8BAA8B,CAAC;AAElG,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAE/D;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,0BAA0B,GAAG,SAAS,GAC5C,MAAM,CAaR;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,2CAA2C,CAAC;IAC/D,QAAQ,CAAC,IAAI,EAAE,iDAAiD,CAAC;IACjE,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAC;KAC/E,CAAC;CACH;AAaD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,qBAAqB,GAC3B,MAAM,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAyChE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type Result } from '@forgeax/engine-types';
|
|
2
|
+
import { type RenderError } from '../../errors/render';
|
|
3
|
+
import type { PreparedStandardLighting } from './prepare';
|
|
4
|
+
export interface StandardClusterCapabilities {
|
|
5
|
+
readonly compute: boolean;
|
|
6
|
+
readonly storageBuffer: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The graph producer is ready to encode the selected compute lane. The
|
|
9
|
+
* renderer supplies this from the actual pipeline + bind-group layout; it is
|
|
10
|
+
* required so capability admission cannot forge a GPU producer from
|
|
11
|
+
* `compute` alone.
|
|
12
|
+
*/
|
|
13
|
+
readonly membershipPipelineReady: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Only transports with storage-backed membership representation exist. */
|
|
16
|
+
export type StandardClusterTransportKind = 'compute-storage' | 'cpu-storage';
|
|
17
|
+
export type StandardClusterMembershipProducer = 'cpu' | 'gpu';
|
|
18
|
+
export interface StandardClusterTransport {
|
|
19
|
+
readonly kind: StandardClusterTransportKind;
|
|
20
|
+
readonly producer: StandardClusterMembershipProducer;
|
|
21
|
+
readonly layout: PreparedStandardLighting['layout'];
|
|
22
|
+
readonly requestedLightCount: number;
|
|
23
|
+
readonly admittedLightCount: number;
|
|
24
|
+
readonly membershipEntryCount: number;
|
|
25
|
+
readonly occupiedClusterCount: number;
|
|
26
|
+
readonly clusterGridBytes: number;
|
|
27
|
+
readonly lightIndexListBytes: number;
|
|
28
|
+
readonly lightDataBytes: number;
|
|
29
|
+
readonly lightBoundsBytes: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Select a transport from one prepared frame. Capability facts choose only a
|
|
33
|
+
* producer/storage pair; all counts and byte sizes come from that frame.
|
|
34
|
+
*/
|
|
35
|
+
export declare function selectStandardClusterTransport(capabilities: StandardClusterCapabilities, prepared: PreparedStandardLighting): Result<StandardClusterTransport, RenderError>;
|
|
36
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/pipeline/standard-lighting/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAA4C,MAAM,qBAAqB,CAAC;AACjG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAE1D,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;CAC3C;AAED,2EAA2E;AAC3E,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAC7E,MAAM,MAAM,iCAAiC,GAAG,KAAK,GAAG,KAAK,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,iCAAiC,CAAC;IACrD,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IACpD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAUD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,2BAA2B,EACzC,QAAQ,EAAE,wBAAwB,GACjC,MAAM,CAAC,wBAAwB,EAAE,WAAW,CAAC,CA2B/C"}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { type Result } from '@forgeax/engine-types';
|
|
2
|
+
import { StandardProfileInvalidError } from '../errors/render';
|
|
2
3
|
import type { FramePlan } from '../extract/environment';
|
|
3
4
|
import type { RenderPipeline } from '../render-pipeline';
|
|
4
|
-
import { STANDARD_PIPELINE_ID } from './standard-profile';
|
|
5
|
+
import { STANDARD_PIPELINE_ID, type StandardProfile } from './standard-profile';
|
|
5
6
|
/** WGSL owner for the Standard clustered membership producer. */
|
|
6
7
|
export declare const STANDARD_CLUSTER_MEMBERSHIP_WGSL = "\nstruct ClusterUniform {\n grid : vec4<u32>,\n near_far_log : vec4<f32>,\n};\n\n@group(0) @binding(0) var<storage, read> cluster_grid : array<u32>;\n@group(0) @binding(1) var<storage, read_write> light_index_list : array<u32>;\n@group(0) @binding(2) var<uniform> cluster_uniform : ClusterUniform;\n@group(0) @binding(3) var<storage, read> light_bounds : array<i32>;\n\n@compute @workgroup_size(64)\nfn cs_cluster_membership(@builtin(global_invocation_id) global_id : vec3<u32>) {\n let cluster_index = global_id.x;\n let grid_x = cluster_uniform.grid.x;\n let grid_y = cluster_uniform.grid.y;\n let grid_z = cluster_uniform.grid.z;\n let cluster_count = grid_x * grid_y * grid_z;\n if (cluster_index >= cluster_count) {\n return;\n }\n\n let cluster_x = cluster_index % grid_x;\n let cluster_yz = cluster_index / grid_x;\n let cluster_y = cluster_yz % grid_y;\n let cluster_z = cluster_yz / grid_y;\n let grid_offset = cluster_index * 2u;\n let output_offset = cluster_grid[grid_offset];\n let output_count = cluster_grid[grid_offset + 1u];\n let cluster_x_i = i32(cluster_x);\n let cluster_y_i = i32(cluster_y);\n let cluster_z_i = i32(cluster_z);\n var output_index = output_offset;\n\n var light_index = 0u;\n loop {\n if (light_index >= cluster_uniform.grid.w || light_index >= 256u) {\n break;\n }\n let bounds_offset = light_index * 6u;\n let min_x = light_bounds[bounds_offset];\n if (min_x >= 0) {\n let min_y = light_bounds[bounds_offset + 1u];\n let min_z = light_bounds[bounds_offset + 2u];\n let max_x = light_bounds[bounds_offset + 3u];\n let max_y = light_bounds[bounds_offset + 4u];\n let max_z = light_bounds[bounds_offset + 5u];\n if (\n cluster_x_i >= min_x && cluster_x_i <= max_x &&\n cluster_y_i >= min_y && cluster_y_i <= max_y &&\n cluster_z_i >= min_z && cluster_z_i <= max_z\n ) {\n if (output_index < output_offset + output_count) {\n light_index_list[output_index] = light_index;\n output_index += 1u;\n }\n }\n }\n light_index += 1u;\n }\n}\n";
|
|
7
|
-
export declare class HdrpInstallError extends Error {
|
|
8
|
-
readonly code: "hdrp-grid-invalid";
|
|
9
|
-
readonly expected = "clusterGrid.{x,y,z} each integer in [1, 64]";
|
|
10
|
-
readonly hint: string;
|
|
11
|
-
readonly detail: {
|
|
12
|
-
readonly x: number;
|
|
13
|
-
readonly y: number;
|
|
14
|
-
readonly z: number;
|
|
15
|
-
};
|
|
16
|
-
constructor(x: number, y: number, z: number);
|
|
17
|
-
}
|
|
18
8
|
export declare function validateClusterGrid(grid: {
|
|
19
9
|
x: number;
|
|
20
10
|
y: number;
|
|
@@ -23,10 +13,11 @@ export declare function validateClusterGrid(grid: {
|
|
|
23
13
|
x: number;
|
|
24
14
|
y: number;
|
|
25
15
|
z: number;
|
|
26
|
-
},
|
|
16
|
+
}, StandardProfileInvalidError>;
|
|
27
17
|
export interface StandardPipeline extends RenderPipeline {
|
|
28
18
|
readonly identity: typeof STANDARD_PIPELINE_ID;
|
|
29
19
|
}
|
|
20
|
+
export declare function standardProfileSupportsReflectionProbes(_profile: StandardProfile): boolean;
|
|
30
21
|
/** Standard graph inputs are derived once from the immutable frame plan. */
|
|
31
22
|
export type StandardFramePlan = FramePlan;
|
|
32
23
|
export declare const standardPipeline: StandardPipeline;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline/standard-pipeline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standard-pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline/standard-pipeline.ts"],"names":[],"mappings":"AAMA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAA6B,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,oBAAoB,CAAC;AAsC5B,OAAO,EAGL,oBAAoB,EACpB,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAE5B,iEAAiE;AACjE,eAAO,MAAM,gCAAgC,ykEA6D5C,CAAC;AACF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,GAAG,MAAM,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,2BAA2B,CAAC,CAkB3E;AA0SD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,QAAQ,CAAC,QAAQ,EAAE,OAAO,oBAAoB,CAAC;CAChD;AAED,wBAAgB,uCAAuC,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAE1F;AAED,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAiG1C,eAAO,MAAM,gBAAgB,EAAE,gBAG7B,CAAC;AAEH,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|