@forgeax/engine-render 0.1.4 → 0.1.7
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 +268 -640
- package/dist/.tsbuildinfo +1 -1
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts +2 -0
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +2 -0
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +1 -0
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +1 -1
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +6 -0
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +1 -1
- package/dist/{gpu-driven/view-reference.d.ts → __tests__/gpu-driven-view-reference.d.ts} +4 -4
- package/dist/__tests__/gpu-driven-view-reference.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +1 -1
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts +2 -0
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +1 -0
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/morph-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-plan.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-plan.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ssao-config.unit.test.d.ts +2 -0
- package/dist/__tests__/ssao-config.unit.test.d.ts.map +1 -0
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/standard-descriptors.test-d.d.ts +2 -0
- package/dist/__tests__/standard-descriptors.test-d.d.ts.map +1 -0
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts +2 -0
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/standard-pipeline.integration.test.d.ts +2 -0
- package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +1 -0
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +2 -0
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +1 -0
- package/dist/{renderer/backend-selection.d.ts → assembly/backend-contract.d.ts} +15 -4
- package/dist/assembly/backend-contract.d.ts.map +1 -0
- package/dist/assembly/factory.d.ts +214 -0
- package/dist/assembly/factory.d.ts.map +1 -0
- package/dist/assembly/host-contract.d.ts +84 -0
- package/dist/assembly/host-contract.d.ts.map +1 -0
- package/dist/{renderer → assembly}/material/assembly.d.ts +0 -1
- package/dist/{renderer → assembly}/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/pipeline-projection.d.ts +30 -0
- package/dist/assembly/material/pipeline-projection.d.ts.map +1 -0
- package/dist/authoring.d.ts +11 -11
- package/dist/authoring.d.ts.map +1 -1
- package/dist/authoring.mjs +25 -3
- package/dist/authoring.mjs.map +1 -1
- package/dist/chunk-CQXZC5XI.mjs +182 -0
- package/dist/chunk-CQXZC5XI.mjs.map +1 -0
- package/dist/chunk-HCOGPHKS.mjs +93 -0
- package/dist/chunk-HCOGPHKS.mjs.map +1 -0
- package/dist/chunk-YEJIUW7D.mjs +1152 -0
- package/dist/chunk-YEJIUW7D.mjs.map +1 -0
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts +2 -0
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts +2 -0
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/schema-contract.unit.test.d.ts +2 -0
- package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +1 -0
- package/dist/components/glyph-text.d.ts +1 -1
- package/dist/components/glyph-text.d.ts.map +1 -1
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/instances.d.ts +1 -1
- package/dist/components/instances.d.ts.map +1 -1
- package/dist/components/light-helpers.d.ts +1 -1
- package/dist/components/light-helpers.d.ts.map +1 -1
- package/dist/components/lines.d.ts +5 -0
- package/dist/components/lines.d.ts.map +1 -0
- package/dist/components/mesh-filter.d.ts +7 -7
- package/dist/components/mesh-filter.d.ts.map +1 -1
- package/dist/components/points.d.ts +15 -0
- package/dist/components/points.d.ts.map +1 -0
- package/dist/components/scene-instance.d.ts +11 -11
- package/dist/components/skybox-background.d.ts +56 -0
- package/dist/components/skybox-background.d.ts.map +1 -0
- package/dist/components/skylight.d.ts +55 -0
- package/dist/components/skylight.d.ts.map +1 -0
- package/dist/components/sprite-animation.d.ts +2 -3
- package/dist/components/sprite-animation.d.ts.map +1 -1
- package/dist/components/sprite-instances.d.ts +1 -1
- package/dist/components/sprite-playback-mode.d.ts +6 -1
- package/dist/components/sprite-playback-mode.d.ts.map +1 -1
- package/dist/components/sprite-region-override.d.ts +2 -3
- package/dist/components/sprite-region-override.d.ts.map +1 -1
- package/dist/components/tile-layer.d.ts +5 -0
- package/dist/components/tile-layer.d.ts.map +1 -1
- package/dist/construct-renderer.d.ts +18 -1
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +27463 -4
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/debug-draw-glue.d.ts +2 -53
- package/dist/debug-draw-glue.d.ts.map +1 -1
- package/dist/device/device-scope.d.ts +83 -0
- package/dist/device/device-scope.d.ts.map +1 -0
- package/dist/{gpu-resource-store.d.ts → device/gpu-residency.d.ts} +91 -48
- package/dist/device/gpu-residency.d.ts.map +1 -0
- package/dist/device/resource-types.d.ts +8 -0
- package/dist/device/resource-types.d.ts.map +1 -0
- package/dist/engine-metrics.d.ts +2 -2
- package/dist/engine-metrics.d.ts.map +1 -1
- package/dist/errors/recover.d.ts +28 -1
- package/dist/errors/recover.d.ts.map +1 -1
- package/dist/errors/render.d.ts +320 -248
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/features/fullscreen.d.ts +19 -0
- package/dist/features/fullscreen.d.ts.map +1 -0
- package/dist/features/host.d.ts +32 -26
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/morph/morph-feature.d.ts +39 -5
- package/dist/features/morph/morph-feature.d.ts.map +1 -1
- package/dist/features/plan.d.ts +182 -0
- package/dist/features/plan.d.ts.map +1 -0
- package/dist/features/prepared-gpu-work.d.ts +21 -17
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/prepared-graphics-store.d.ts +2 -1
- package/dist/features/prepared-graphics-store.d.ts.map +1 -1
- package/dist/features/prepared-graphics.d.ts +11 -21
- package/dist/features/prepared-graphics.d.ts.map +1 -1
- package/dist/features/render-graph-compute.d.ts +2 -2
- package/dist/features/render-graph-compute.d.ts.map +1 -1
- package/dist/features/render-graph-contribution.d.ts +4 -7
- package/dist/features/render-graph-contribution.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +7 -3
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/render-graph-resources.d.ts +6 -6
- package/dist/features/render-graph-resources.d.ts.map +1 -1
- package/dist/features/targets.d.ts +5 -5
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +11 -190
- package/dist/features/types.d.ts.map +1 -1
- package/dist/features/vocabulary.d.ts +14 -0
- package/dist/features/vocabulary.d.ts.map +1 -0
- package/dist/fullscreen-post-process-pass.d.ts +4 -25
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/glyph-text-layout-system.d.ts +3 -2
- package/dist/glyph-text-layout-system.d.ts.map +1 -1
- package/dist/gpu-driven/batch-topology.d.ts +6 -75
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster.d.ts +13 -112
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-driven/view-gpu.d.ts +10 -66
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-resource.d.ts +3 -3
- package/dist/gpu-scene-schema.d.ts +1 -94
- package/dist/gpu-scene-schema.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +7 -33
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +3 -53
- package/dist/hdrp-buffers.d.ts.map +1 -1
- package/dist/ibl/IblPipelineCache.d.ts +74 -180
- package/dist/ibl/IblPipelineCache.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +1 -1
- package/dist/index.d.ts +17 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +167 -3
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +72 -0
- package/dist/inspection-types.d.ts.map +1 -0
- package/dist/instance-buffer-cache.d.ts +1 -4
- package/dist/instance-buffer-cache.d.ts.map +1 -1
- package/dist/internal.d.ts +1 -73
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.mjs +1 -43
- package/dist/internal.mjs.map +1 -1
- package/dist/lifecycle.d.ts +36 -2
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/materials.d.ts +0 -3
- package/dist/materials.d.ts.map +1 -1
- package/dist/mesh-material-bindings.d.ts +0 -1
- package/dist/mesh-material-bindings.d.ts.map +1 -1
- package/dist/pbr-pipeline.d.ts +77 -29
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-forward-lane.d.ts +5 -0
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -0
- package/dist/pipeline/standard-pipeline.d.ts +31 -0
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -0
- package/dist/pipeline/standard-profile.d.ts +40 -0
- package/dist/pipeline/standard-profile.d.ts.map +1 -0
- package/dist/pipeline-builder.d.ts +3 -3
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec-types.d.ts +24 -0
- package/dist/pipeline-spec-types.d.ts.map +1 -0
- package/dist/pipeline-spec.d.ts +16 -155
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/plugin.d.ts +1 -14
- package/dist/plugin.d.ts.map +1 -1
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/points-lines.bench.d.ts +2 -0
- package/dist/points-lines/__tests__/points-lines.bench.d.ts.map +1 -0
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts.map +1 -0
- package/dist/points-lines/admission.d.ts +36 -0
- package/dist/points-lines/admission.d.ts.map +1 -0
- package/dist/points-lines/bounds.d.ts +8 -0
- package/dist/points-lines/bounds.d.ts.map +1 -0
- package/dist/points-lines/expansion-cache.d.ts +28 -0
- package/dist/points-lines/expansion-cache.d.ts.map +1 -0
- package/dist/points-lines/inspection.d.ts +53 -0
- package/dist/points-lines/inspection.d.ts.map +1 -0
- package/dist/points-lines/prepare.d.ts +67 -0
- package/dist/points-lines/prepare.d.ts.map +1 -0
- package/dist/points-lines/record.d.ts +60 -0
- package/dist/points-lines/record.d.ts.map +1 -0
- package/dist/points-lines/snapshot.d.ts +49 -0
- package/dist/points-lines/snapshot.d.ts.map +1 -0
- package/dist/post-process-errors.d.ts +18 -18
- package/dist/post-process-errors.d.ts.map +1 -1
- package/dist/prepare/prepared-graphics-resolver.d.ts +2 -5
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -1
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts +2 -0
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +7 -73
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +44 -44
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame-targets.d.ts +5 -38
- package/dist/record/frame-targets.d.ts.map +1 -1
- package/dist/record/frame.d.ts +64 -52
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/helpers.d.ts +3 -2
- package/dist/record/helpers.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +12 -4
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +90 -59
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +28 -3
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +1 -1
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts +276 -3
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +252 -0
- package/dist/record/render-context.d.ts.map +1 -0
- package/dist/record/shadow-pass.d.ts +15 -88
- 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 +29 -7
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +9 -3
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/render-contract.d.ts +424 -0
- package/dist/render-contract.d.ts.map +1 -0
- package/dist/render-data.d.ts.map +1 -1
- package/dist/render-graph-primitives.d.ts +14 -362
- package/dist/render-graph-primitives.d.ts.map +1 -1
- package/dist/render-pipeline.d.ts +25 -64
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +110 -338
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts +24 -713
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/render-scene-types.d.ts +61 -0
- package/dist/scene/render-scene-types.d.ts.map +1 -0
- package/dist/scene/render-scene.d.ts +112 -0
- package/dist/scene/render-scene.d.ts.map +1 -0
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts +2 -5
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts.map +1 -1
- package/dist/ssao-buffers.d.ts +22 -3
- package/dist/ssao-buffers.d.ts.map +1 -1
- package/dist/systems/skin-palette-allocator.d.ts +2 -4
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -1
- package/dist/systems/skin-palette-types.d.ts +14 -0
- package/dist/systems/skin-palette-types.d.ts.map +1 -0
- package/dist/systems/transparent-sort-config.d.ts +23 -2
- package/dist/systems/transparent-sort-config.d.ts.map +1 -1
- package/dist/tilemap-chunk-extract-system.d.ts +4 -3
- package/dist/tilemap-chunk-extract-system.d.ts.map +1 -1
- package/dist/typed-render-graph-primitives.d.ts +2 -4
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/typed-shadow-passes.d.ts +3 -3
- package/dist/typed-shadow-passes.d.ts.map +1 -1
- package/package.json +23 -23
- package/src/__tests__/authoring-path.unit.test.ts +9 -0
- package/src/__tests__/backend-selection-rhi-capture.test-d.ts +1 -1
- package/src/__tests__/callback-inference.test-d.ts +6 -3
- package/src/__tests__/cluster-grid-default-surface.unit.test.ts +7 -4
- package/src/__tests__/construct-renderer-identity.unit.test.ts +15 -2
- package/src/__tests__/device-scope-lifecycle.unit.test.ts +151 -0
- package/src/__tests__/device-scope-stale-matrix.unit.test.ts +42 -0
- package/src/__tests__/direct-extract-consumer-contract.test-d.ts +8 -19
- package/src/__tests__/direct-light-snapshot.unit.test.ts +3 -13
- package/src/__tests__/factory-contract.integration.test.ts +158 -209
- package/src/__tests__/fallback-row-stride-surface.unit.test.ts +1 -4
- package/src/__tests__/frame-observation.contract.test.ts +17 -8
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +32 -0
- package/src/__tests__/glyph-text-layout-recovery.unit.test.ts +6 -11
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +21 -18
- package/src/__tests__/gpu-driven-production.integration.test.ts +32 -205
- package/src/__tests__/gpu-driven-scaling.unit.test.ts +4 -7
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +87 -8
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +170 -8
- package/src/{gpu-driven/view-reference.ts → __tests__/gpu-driven-view-reference.ts} +4 -3
- package/src/__tests__/gpu-driven-view.browser.test.ts +12 -1
- package/src/__tests__/gpu-driven-view.dawn.test.ts +12 -1
- package/src/__tests__/gpu-driven-view.unit.test.ts +11 -267
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +3 -3
- package/src/__tests__/gpu-scene-render-graph-gpu.ts +2 -3
- package/src/__tests__/gpu-scene.dawn.test.ts +2 -6
- package/src/__tests__/gpu-scene.unit.test.ts +10 -24
- package/src/__tests__/ibl/face-uniforms.unit.test.ts +46 -0
- package/src/__tests__/infinite-grid-no-vertex-probe.unit.test.ts +34 -66
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +14 -5
- package/src/__tests__/light-buffer-layout.unit.test.ts +4 -49
- package/src/__tests__/material-cooked-projection.unit.test.ts +31 -58
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +10 -15
- package/src/__tests__/material-static-dynamic-route.unit.test.ts +31 -50
- package/src/__tests__/material-stride-surface.unit.test.ts +2 -2
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +7 -8
- package/src/__tests__/morph-culling-reentry.dawn.test.ts +29 -38
- package/src/__tests__/morph-feature-gpu-work.integration.test.ts +45 -43
- package/src/__tests__/morph-feature-plan.unit.test.ts +53 -0
- package/src/__tests__/morph-visual-evidence.integration.test.ts +47 -33
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +11 -6
- package/src/__tests__/post-process-error-policy-owner.unit.test.ts +6 -13
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +6 -81
- package/src/__tests__/prepared-graphics-generation.unit.test.ts +3 -17
- package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +6 -74
- package/src/__tests__/prepared-graphics-resolver.unit.test.ts +1 -3
- package/src/__tests__/prepared-graphics-snapshot.unit.test.ts +2 -2
- package/src/__tests__/profiler-default-off.test.ts +1 -1
- package/src/__tests__/profiler-phase-catalog.test.ts +2 -2
- package/src/__tests__/profiler-phase-integration.test.ts +5 -13
- package/src/__tests__/profiler-phase-token.test.ts +3 -8
- package/src/__tests__/public-surface.test-d.ts +65 -3
- package/src/__tests__/recover-error-policy-owner.unit.test.ts +1 -21
- package/src/__tests__/render-error-code-owner.test-d.ts +24 -23
- package/src/__tests__/render-error-detail-ssot.test-d.ts +0 -95
- package/src/__tests__/render-error-exhaustive.test-d.ts +27 -1
- package/src/__tests__/render-feature-assembly.test-d.ts +8 -16
- package/src/__tests__/render-feature-context.test-d.ts +16 -40
- package/src/__tests__/render-feature-contract.test-d.ts +9 -18
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +6 -8
- package/src/__tests__/render-feature-docs.unit.test.ts +8 -7
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +14 -75
- package/src/__tests__/render-feature-plan.test-d.ts +161 -0
- package/src/__tests__/render-feature-plan.unit.test.ts +170 -0
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +8 -19
- package/src/__tests__/render-feature-prepared-errors.test-d.ts +3 -6
- package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +10 -71
- package/src/__tests__/render-feature-prepared-graphics-isolation.unit.test.ts +11 -61
- package/src/__tests__/render-feature-prepared-graphics-negative.test-d.ts +20 -43
- package/src/__tests__/render-feature-prepared-graphics.test-d.ts +56 -78
- package/src/__tests__/render-feature-public-surface.test-d.ts +6 -24
- package/src/__tests__/render-feature-retry.unit.test.ts +7 -48
- package/src/__tests__/render-feature-scheduling.unit.test.ts +15 -27
- package/src/__tests__/render-feature-stage-failed-policy-owner.unit.test.ts +0 -9
- package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +19 -109
- package/src/__tests__/render-feature-visibility-context.test-d.ts +1 -6
- package/src/__tests__/render-feature-visibility-context.unit.test.ts +1 -2
- package/src/__tests__/render-feature-zero-work.unit.test.ts +14 -20
- package/src/__tests__/render-scene-projection.unit.test.ts +73 -111
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +82 -95
- package/src/__tests__/renderer-lifecycle.integration.test.ts +49 -1
- package/src/__tests__/shader-stage-surface.unit.test.ts +14 -9
- package/src/__tests__/ssao-config.unit.test.ts +36 -0
- package/src/__tests__/ssao-kernel-surface.unit.test.ts +4 -5
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +28 -0
- package/src/__tests__/standard-descriptors.test-d.ts +22 -0
- package/src/__tests__/standard-pipeline.dawn.test.ts +61 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +124 -0
- package/src/__tests__/standard-profile-oracle.unit.test.ts +62 -0
- package/src/__tests__/surface-configuration.unit.test.ts +1 -2
- package/src/__tests__/texture-usage-surface.unit.test.ts +3 -6
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +40 -206
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +1 -11
- package/src/__tests__/urp-pipeline.unit.test.ts +2 -2
- package/src/__tests__/vertex-color-pipeline.unit.test.ts +10 -2
- package/src/__tests__/vertex-layout-consumer.unit.test.ts +1 -1
- package/src/__tests__/visibility-diagnostics.integration.test.ts +7 -11
- package/src/__tests__/visibility-extract.integration.test.ts +20 -11
- package/src/__tests__/visibility-extract.perf.test.ts +66 -32
- package/src/__tests__/visibility-feature-dedup.integration.test.ts +2 -4
- package/src/__tests__/visibility-hidden-report.unit.test.ts +1 -2
- package/src/__tests__/visibility-instances.integration.test.ts +7 -11
- package/src/__tests__/visibility-multi-world.integration.test.ts +38 -6
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +18 -41
- package/src/__tests__/visibility-public-surface.test-d.ts +10 -9
- package/src/__tests__/visibility-resolver.unit.test.ts +2 -1
- package/src/__tests__/visibility-resource-short-circuit.unit.test.ts +80 -0
- package/src/__tests__/visibility-snapshot-contract.unit.test.ts +2 -1
- package/src/__tests__/vocabulary.unit.test.ts +1 -1
- package/src/assembly/backend-contract.ts +57 -0
- package/src/{renderer/renderer-factory.ts → assembly/factory.ts} +1741 -2699
- package/src/assembly/host-contract.ts +101 -0
- package/src/{renderer → assembly}/material/assembly.ts +2 -7
- package/src/assembly/material/pipeline-projection.ts +63 -0
- package/src/authoring.ts +15 -22
- package/src/components/__tests__/points-lines-admission.unit.test.ts +219 -0
- package/src/components/__tests__/points-lines-schema.unit.test.ts +56 -0
- package/src/components/__tests__/schema-contract.unit.test.ts +10 -0
- package/src/components/glyph-text.ts +3 -2
- package/src/components/index.ts +14 -9
- package/src/components/instances.ts +4 -5
- package/src/components/light-helpers.ts +1 -1
- package/src/components/lines.ts +18 -0
- package/src/components/mesh-filter.ts +11 -10
- package/src/components/points.ts +40 -0
- package/src/components/post-process-params.ts +3 -3
- package/src/components/scene-instance.ts +12 -12
- package/src/components/skybox-background.ts +103 -0
- package/src/components/{environment.ts → skylight.ts} +2 -110
- package/src/components/sprite-animation.ts +3 -4
- package/src/components/sprite-instances.ts +2 -2
- package/src/components/sprite-playback-mode.ts +7 -1
- package/src/components/sprite-region-override.ts +2 -3
- package/src/components/tile-layer.ts +8 -2
- package/src/construct-renderer.ts +67 -4
- package/src/debug-draw-glue.ts +8 -129
- package/src/device/device-scope.ts +306 -0
- package/src/{gpu-resource-store.ts → device/gpu-residency.ts} +540 -639
- package/src/device/resource-types.ts +20 -0
- package/src/engine-metrics.ts +12 -19
- package/src/errors/recover.ts +45 -3
- package/src/errors/render.ts +469 -429
- package/src/features/fullscreen.ts +46 -0
- package/src/features/host.ts +575 -309
- package/src/features/morph/morph-feature.ts +195 -105
- package/src/features/plan.ts +447 -0
- package/src/features/prepared-gpu-work.ts +72 -15
- package/src/features/prepared-graphics-store.ts +20 -6
- package/src/features/prepared-graphics.ts +12 -71
- package/src/features/render-graph-compute.ts +14 -5
- package/src/features/render-graph-contribution.ts +43 -63
- package/src/features/render-graph-raster.ts +32 -8
- package/src/features/render-graph-resources.ts +25 -23
- package/src/features/targets.ts +8 -21
- package/src/features/types.ts +39 -227
- package/src/features/vocabulary.ts +24 -0
- package/src/fullscreen-post-process-pass.ts +14 -57
- package/src/glyph-text-layout-system.ts +70 -96
- package/src/gpu-driven/batch-topology.ts +24 -202
- package/src/gpu-driven/production-raster.ts +99 -1109
- package/src/gpu-driven/view-gpu.ts +46 -192
- package/src/gpu-resource.ts +4 -4
- package/src/gpu-scene-schema.ts +11 -99
- package/src/gpu-scene.ts +231 -364
- package/src/hdrp-buffers.ts +12 -221
- package/src/ibl/IblPipelineCache.ts +471 -711
- package/src/ibl/skylight-bind-group.ts +4 -4
- package/src/index.ts +75 -217
- package/src/inspection-types.ts +80 -0
- package/src/instance-buffer-cache.ts +1 -29
- package/src/internal.ts +6 -85
- package/src/lifecycle.ts +64 -19
- package/src/materials.ts +7 -29
- package/src/mesh-material-bindings.ts +0 -1
- package/src/pbr-pipeline.ts +441 -53
- package/src/{urp-pipeline.ts → pipeline/standard-forward-lane.ts} +38 -149
- package/src/{hdrp-pipeline.ts → pipeline/standard-pipeline.ts} +221 -191
- package/src/pipeline/standard-profile.ts +65 -0
- package/src/pipeline-builder.ts +60 -64
- package/src/pipeline-spec-types.ts +28 -0
- package/src/pipeline-spec.ts +72 -609
- package/src/plugin.ts +7 -75
- package/src/points-lines/__tests__/bounds.unit.test.ts +21 -0
- package/src/points-lines/__tests__/cache-recovery.unit.test.ts +157 -0
- package/src/points-lines/__tests__/inspection-lanes.integration.test.ts +146 -0
- package/src/points-lines/__tests__/inspection.unit.test.ts +173 -0
- package/src/points-lines/__tests__/lane-structural.integration.test.ts +122 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +400 -0
- package/src/points-lines/__tests__/raster-lane.integration.test.ts +44 -0
- package/src/points-lines/__tests__/snapshot.unit.test.ts +101 -0
- package/src/points-lines/__tests__/view-ubo.unit.test.ts +73 -0
- package/src/points-lines/admission.ts +238 -0
- package/src/points-lines/bounds.ts +23 -0
- package/src/points-lines/expansion-cache.ts +215 -0
- package/src/points-lines/inspection.ts +97 -0
- package/src/points-lines/prepare.ts +177 -0
- package/src/points-lines/record.ts +125 -0
- package/src/points-lines/snapshot.ts +130 -0
- package/src/post-process-errors.ts +31 -33
- package/src/prepare/prepared-graphics-resolver.ts +5 -4
- package/src/record/__tests__/material-slot-plan.unit.test.ts +1 -33
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +41 -0
- package/src/record/__tests__/video-texture-view.unit.test.ts +1 -1
- package/src/record/frame-lighting.ts +88 -197
- package/src/record/frame-snapshot.ts +45 -60
- package/src/record/frame-targets.ts +8 -243
- package/src/record/frame.ts +521 -797
- package/src/record/helpers.ts +6 -11
- package/src/record/main-pass-geometry.ts +198 -147
- package/src/record/main-pass-material.ts +517 -190
- package/src/record/main-pass-sprite-draws.ts +199 -118
- package/src/record/main-pass.ts +166 -144
- package/src/record/mesh-ssbo.ts +517 -38
- package/src/record/render-context.ts +384 -0
- package/src/record/shadow-pass.ts +154 -1843
- package/src/record/skybox-post-pass.ts +14 -15
- package/src/record/typed-frame-graph.ts +224 -262
- package/src/record/view-ubo.ts +53 -37
- package/src/render-contract.ts +582 -0
- package/src/render-data.ts +3 -3
- package/src/render-graph-primitives.ts +76 -851
- package/src/render-pipeline.ts +104 -188
- package/src/render-system-extract.ts +1114 -1732
- package/src/render-system.ts +614 -1939
- package/src/scene/render-scene-types.ts +67 -0
- package/src/scene/render-scene.ts +1087 -0
- package/src/scene-instances/post-spawn-resolve-joints.ts +4 -7
- package/src/ssao-buffers.ts +167 -8
- package/src/systems/skin-palette-allocator.ts +21 -64
- package/src/systems/skin-palette-types.ts +14 -0
- package/src/systems/transparent-sort-config.ts +25 -3
- package/src/tilemap-chunk-extract-system.ts +53 -70
- package/src/typed-render-graph-primitives.ts +35 -24
- package/src/typed-shadow-passes.ts +26 -56
- package/dist/__tests__/analytic-sky-contract.test.d.ts +0 -2
- package/dist/__tests__/analytic-sky-contract.test.d.ts.map +0 -1
- package/dist/__tests__/analytic-sky-falsify.test.d.ts +0 -2
- package/dist/__tests__/analytic-sky-falsify.test.d.ts.map +0 -1
- package/dist/__tests__/assets-runtime-handoff.integration.test.d.ts +0 -2
- package/dist/__tests__/assets-runtime-handoff.integration.test.d.ts.map +0 -1
- package/dist/__tests__/backend-selection.integration.test.d.ts +0 -2
- package/dist/__tests__/backend-selection.integration.test.d.ts.map +0 -1
- package/dist/__tests__/camera-temporal.test-d.d.ts +0 -2
- package/dist/__tests__/camera-temporal.test-d.d.ts.map +0 -1
- package/dist/__tests__/camera-temporal.test.d.ts +0 -2
- package/dist/__tests__/camera-temporal.test.d.ts.map +0 -1
- package/dist/__tests__/directional-shadow-probe-atlas-layout.unit.test.d.ts +0 -2
- package/dist/__tests__/directional-shadow-probe-atlas-layout.unit.test.d.ts.map +0 -1
- package/dist/__tests__/environment-inspection.test.d.ts +0 -2
- package/dist/__tests__/environment-inspection.test.d.ts.map +0 -1
- package/dist/__tests__/fog-ai-user.fixture.d.ts +0 -2
- package/dist/__tests__/fog-ai-user.fixture.d.ts.map +0 -1
- package/dist/__tests__/fog-custom-render-feature.fixture.d.ts +0 -16
- package/dist/__tests__/fog-custom-render-feature.fixture.d.ts.map +0 -1
- package/dist/__tests__/fog-custom-render-feature.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-custom-render-feature.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-inspection.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-inspection.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-owner-state.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-owner-state.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-pipeline-topology.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-pipeline-topology.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-public-surface.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-public-surface.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-ray-contract.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-ray-contract.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-source-absence.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-source-absence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fog-temporal.integration.test.d.ts +0 -2
- package/dist/__tests__/fog-temporal.integration.test.d.ts.map +0 -1
- package/dist/__tests__/frame-chain.unit.test.d.ts +0 -2
- package/dist/__tests__/frame-chain.unit.test.d.ts.map +0 -1
- package/dist/__tests__/gpu-scene-field-type-owner.test-d.d.ts +0 -2
- package/dist/__tests__/gpu-scene-field-type-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/hdrp-pipeline.unit.test.d.ts +0 -2
- package/dist/__tests__/hdrp-pipeline.unit.test.d.ts.map +0 -1
- package/dist/__tests__/ibl/ibl-fallback.unit.test.d.ts +0 -2
- package/dist/__tests__/ibl/ibl-fallback.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-derived-error-stop-draw.integration.test.d.ts +0 -2
- package/dist/__tests__/material-derived-error-stop-draw.integration.test.d.ts.map +0 -1
- package/dist/__tests__/material-derived-payload.integration.test.d.ts +0 -2
- package/dist/__tests__/material-derived-payload.integration.test.d.ts.map +0 -1
- package/dist/__tests__/materials.unit.test.d.ts +0 -2
- package/dist/__tests__/materials.unit.test.d.ts.map +0 -1
- package/dist/__tests__/param-schema-projection-census.unit.test.d.ts +0 -2
- package/dist/__tests__/param-schema-projection-census.unit.test.d.ts.map +0 -1
- package/dist/__tests__/persistent-render-scene.unit.test.d.ts +0 -2
- package/dist/__tests__/persistent-render-scene.unit.test.d.ts.map +0 -1
- package/dist/__tests__/pipeline-error-policy-owner.unit.test.d.ts +0 -2
- package/dist/__tests__/pipeline-error-policy-owner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/pipeline-pass-trace.test.d.ts +0 -2
- package/dist/__tests__/pipeline-pass-trace.test.d.ts.map +0 -1
- package/dist/__tests__/pipeline-stage-owner.test-d.d.ts +0 -2
- package/dist/__tests__/pipeline-stage-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/plugin.test.d.ts +0 -2
- package/dist/__tests__/plugin.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-backend-matrix.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-backend-matrix.unit.test.d.ts.map +0 -1
- package/dist/__tests__/prepared-graphics-resolver-recording.unit.test.d.ts +0 -2
- package/dist/__tests__/prepared-graphics-resolver-recording.unit.test.d.ts.map +0 -1
- package/dist/__tests__/public-pipeline-id.test-d.d.ts +0 -2
- package/dist/__tests__/public-pipeline-id.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-dispatch-membership.unit.test.d.ts +0 -2
- package/dist/__tests__/render-dispatch-membership.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-construction.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-construction.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-error-code-owner.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-error-code-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-gpu-buffer-usage-owner.test-d.d.ts +0 -2
- package/dist/__tests__/render-feature-gpu-buffer-usage-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/render-feature-graph.integration.test.d.ts +0 -2
- package/dist/__tests__/render-feature-graph.integration.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-graphics-staging.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-graphics-staging.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-order.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-order.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-prepared-graphics-recording.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-prepared-graphics-recording.unit.test.d.ts.map +0 -1
- package/dist/__tests__/render-feature-staging.unit.test.d.ts +0 -2
- package/dist/__tests__/render-feature-staging.unit.test.d.ts.map +0 -1
- package/dist/__tests__/renderer-render-scene-public.test-d.d.ts +0 -2
- package/dist/__tests__/renderer-render-scene-public.test-d.d.ts.map +0 -1
- package/dist/__tests__/scene-temporal-coverage.unit.test.d.ts +0 -2
- package/dist/__tests__/scene-temporal-coverage.unit.test.d.ts.map +0 -1
- package/dist/__tests__/sun-snapshot-consumers.test.d.ts +0 -2
- package/dist/__tests__/sun-snapshot-consumers.test.d.ts.map +0 -1
- package/dist/__tests__/surface-backend-kind-owner.test-d.d.ts +0 -2
- package/dist/__tests__/surface-backend-kind-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/taa-history-store.unit.test.d.ts +0 -2
- package/dist/__tests__/taa-history-store.unit.test.d.ts.map +0 -1
- package/dist/__tests__/temporal-frame-transaction.integration.test.d.ts +0 -2
- package/dist/__tests__/temporal-frame-transaction.integration.test.d.ts.map +0 -1
- package/dist/__tests__/temporal-inspection.unit.test.d.ts +0 -2
- package/dist/__tests__/temporal-inspection.unit.test.d.ts.map +0 -1
- package/dist/assets/__tests__/asset-decoders.unit.test.d.ts +0 -2
- package/dist/assets/__tests__/asset-decoders.unit.test.d.ts.map +0 -1
- package/dist/assets/__tests__/mipmap-generator.unit.test.d.ts +0 -2
- package/dist/assets/__tests__/mipmap-generator.unit.test.d.ts.map +0 -1
- package/dist/assets/__tests__/render-asset-port.unit.test.d.ts +0 -2
- package/dist/assets/__tests__/render-asset-port.unit.test.d.ts.map +0 -1
- package/dist/assets/__tests__/resolve-render-asset.unit.test.d.ts +0 -2
- package/dist/assets/__tests__/resolve-render-asset.unit.test.d.ts.map +0 -1
- package/dist/chunk-DJIMFYX6.mjs +0 -1439
- package/dist/chunk-DJIMFYX6.mjs.map +0 -1
- package/dist/chunk-F2SIOCRM.mjs +0 -7423
- package/dist/chunk-F2SIOCRM.mjs.map +0 -1
- package/dist/chunk-JMSB7AR4.mjs +0 -3
- package/dist/chunk-JMSB7AR4.mjs.map +0 -1
- package/dist/chunk-KHI6K4C6.mjs +0 -659
- package/dist/chunk-KHI6K4C6.mjs.map +0 -1
- package/dist/chunk-PORZOL2V.mjs +0 -569
- package/dist/chunk-PORZOL2V.mjs.map +0 -1
- package/dist/chunk-UOJGMDGP.mjs +0 -29913
- package/dist/chunk-UOJGMDGP.mjs.map +0 -1
- package/dist/components/__tests__/atmosphere-red.test.d.ts +0 -2
- package/dist/components/__tests__/atmosphere-red.test.d.ts.map +0 -1
- package/dist/components/__tests__/atmosphere.test.d.ts +0 -2
- package/dist/components/__tests__/atmosphere.test.d.ts.map +0 -1
- package/dist/components/__tests__/fog.test-d.d.ts +0 -2
- package/dist/components/__tests__/fog.test-d.d.ts.map +0 -1
- package/dist/components/__tests__/fog.test.d.ts +0 -2
- package/dist/components/__tests__/fog.test.d.ts.map +0 -1
- package/dist/components/atmosphere.d.ts +0 -18
- package/dist/components/atmosphere.d.ts.map +0 -1
- package/dist/components/environment.d.ts +0 -115
- package/dist/components/environment.d.ts.map +0 -1
- package/dist/deferred-lighting.d.ts +0 -13
- package/dist/deferred-lighting.d.ts.map +0 -1
- package/dist/dynamic-texture-store.d.ts +0 -42
- package/dist/dynamic-texture-store.d.ts.map +0 -1
- package/dist/environment/__tests__/failure-injection.test.d.ts +0 -2
- package/dist/environment/__tests__/failure-injection.test.d.ts.map +0 -1
- package/dist/environment/__tests__/generation-red.test.d.ts +0 -2
- package/dist/environment/__tests__/generation-red.test.d.ts.map +0 -1
- package/dist/environment/__tests__/generation.test.d.ts +0 -2
- package/dist/environment/__tests__/generation.test.d.ts.map +0 -1
- package/dist/environment/__tests__/graph-transaction.test.d.ts +0 -2
- package/dist/environment/__tests__/graph-transaction.test.d.ts.map +0 -1
- package/dist/environment/__tests__/inspection-red.test.d.ts +0 -2
- package/dist/environment/__tests__/inspection-red.test.d.ts.map +0 -1
- package/dist/environment/__tests__/lifecycle-evidence.test.d.ts +0 -2
- package/dist/environment/__tests__/lifecycle-evidence.test.d.ts.map +0 -1
- package/dist/environment/__tests__/pipeline-topology.test.d.ts +0 -2
- package/dist/environment/__tests__/pipeline-topology.test.d.ts.map +0 -1
- package/dist/environment/__tests__/readiness.test.d.ts +0 -2
- package/dist/environment/__tests__/readiness.test.d.ts.map +0 -1
- package/dist/environment/__tests__/recovery.test.d.ts +0 -2
- package/dist/environment/__tests__/recovery.test.d.ts.map +0 -1
- package/dist/environment/__tests__/resize-dispose.test.d.ts +0 -2
- package/dist/environment/__tests__/resize-dispose.test.d.ts.map +0 -1
- package/dist/environment/__tests__/signature-red.test.d.ts +0 -2
- package/dist/environment/__tests__/signature-red.test.d.ts.map +0 -1
- package/dist/environment/__tests__/signature.test.d.ts +0 -2
- package/dist/environment/__tests__/signature.test.d.ts.map +0 -1
- package/dist/environment/descriptors.d.ts +0 -2
- package/dist/environment/descriptors.d.ts.map +0 -1
- package/dist/environment/extracted-environment.d.ts +0 -53
- package/dist/environment/extracted-environment.d.ts.map +0 -1
- package/dist/environment/generation.d.ts +0 -62
- package/dist/environment/generation.d.ts.map +0 -1
- package/dist/environment/gpu-bundle.d.ts +0 -23
- package/dist/environment/gpu-bundle.d.ts.map +0 -1
- package/dist/environment/graph.d.ts +0 -108
- package/dist/environment/graph.d.ts.map +0 -1
- package/dist/environment/inspection.d.ts +0 -48
- package/dist/environment/inspection.d.ts.map +0 -1
- package/dist/environment/lifecycle.d.ts +0 -22
- package/dist/environment/lifecycle.d.ts.map +0 -1
- package/dist/environment/readiness.d.ts +0 -29
- package/dist/environment/readiness.d.ts.map +0 -1
- package/dist/environment/signature.d.ts +0 -70
- package/dist/environment/signature.d.ts.map +0 -1
- package/dist/extract/__tests__/directional-csm-domain.unit.test.d.ts +0 -2
- package/dist/extract/__tests__/directional-csm-domain.unit.test.d.ts.map +0 -1
- package/dist/extract/__tests__/environment-source.test.d.ts +0 -2
- package/dist/extract/__tests__/environment-source.test.d.ts.map +0 -1
- package/dist/extract/__tests__/schema-readers.unit.test.d.ts +0 -2
- package/dist/extract/__tests__/schema-readers.unit.test.d.ts.map +0 -1
- package/dist/extract/directional-csm.d.ts +0 -129
- package/dist/extract/directional-csm.d.ts.map +0 -1
- package/dist/extract/index.d.ts +0 -5
- package/dist/extract/index.d.ts.map +0 -1
- package/dist/extract/material-interface.d.ts +0 -56
- package/dist/extract/material-interface.d.ts.map +0 -1
- package/dist/extract/schema-readers.d.ts +0 -20
- package/dist/extract/schema-readers.d.ts.map +0 -1
- package/dist/features/graph-contribution.d.ts +0 -64
- package/dist/features/graph-contribution.d.ts.map +0 -1
- package/dist/features/index.d.ts +0 -21
- package/dist/features/index.d.ts.map +0 -1
- package/dist/features/morph/index.d.ts +0 -3
- package/dist/features/morph/index.d.ts.map +0 -1
- package/dist/features/morph/morph-bounds.d.ts +0 -42
- package/dist/features/morph/morph-bounds.d.ts.map +0 -1
- package/dist/features/scene-temporal.d.ts +0 -45
- package/dist/features/scene-temporal.d.ts.map +0 -1
- package/dist/features/taa-resolve.d.ts +0 -21
- package/dist/features/taa-resolve.d.ts.map +0 -1
- package/dist/frame-chain.d.ts +0 -14
- package/dist/frame-chain.d.ts.map +0 -1
- package/dist/gpu-driven/view-reference.d.ts.map +0 -1
- package/dist/gpu-resource-store.d.ts.map +0 -1
- package/dist/hdrp-cluster-membership.d.ts +0 -2
- package/dist/hdrp-cluster-membership.d.ts.map +0 -1
- package/dist/hdrp-pipeline.d.ts +0 -36
- package/dist/hdrp-pipeline.d.ts.map +0 -1
- package/dist/ibl/cubemap-projection.d.ts +0 -23
- package/dist/ibl/cubemap-projection.d.ts.map +0 -1
- package/dist/ibl/face-uniforms.d.ts +0 -65
- package/dist/ibl/face-uniforms.d.ts.map +0 -1
- package/dist/mesh-update-errors.d.ts +0 -71
- package/dist/mesh-update-errors.d.ts.map +0 -1
- package/dist/mipmap-generator.d.ts +0 -39
- package/dist/mipmap-generator.d.ts.map +0 -1
- package/dist/param-schema-projection-census.d.ts +0 -18
- package/dist/param-schema-projection-census.d.ts.map +0 -1
- package/dist/persistent-render-scene.d.ts +0 -158
- package/dist/persistent-render-scene.d.ts.map +0 -1
- package/dist/pipeline/index.d.ts +0 -11
- package/dist/pipeline/index.d.ts.map +0 -1
- package/dist/pipeline-errors.d.ts +0 -110
- package/dist/pipeline-errors.d.ts.map +0 -1
- package/dist/prepare/__tests__/schema-readers.unit.test.d.ts +0 -2
- package/dist/prepare/__tests__/schema-readers.unit.test.d.ts.map +0 -1
- package/dist/prepare/index.d.ts +0 -4
- package/dist/prepare/index.d.ts.map +0 -1
- package/dist/prepare/schema-readers.d.ts +0 -11
- package/dist/prepare/schema-readers.d.ts.map +0 -1
- package/dist/record/__tests__/environment-record.test.d.ts +0 -2
- package/dist/record/__tests__/environment-record.test.d.ts.map +0 -1
- package/dist/record/__tests__/frame-targets.unit.test.d.ts +0 -2
- package/dist/record/__tests__/frame-targets.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/membership-timing.unit.test.d.ts +0 -2
- package/dist/record/__tests__/membership-timing.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/render-submission.integration.test.d.ts +0 -2
- package/dist/record/__tests__/render-submission.integration.test.d.ts.map +0 -1
- package/dist/record/__tests__/render-submission.perf.test.d.ts +0 -2
- package/dist/record/__tests__/render-submission.perf.test.d.ts.map +0 -1
- package/dist/record/__tests__/shadow-submit-mode.unit.test.d.ts +0 -2
- package/dist/record/__tests__/shadow-submit-mode.unit.test.d.ts.map +0 -1
- package/dist/record/__tests__/view-ubo-layout.unit.test.d.ts +0 -2
- package/dist/record/__tests__/view-ubo-layout.unit.test.d.ts.map +0 -1
- package/dist/record/frame-observation.d.ts +0 -38
- package/dist/record/frame-observation.d.ts.map +0 -1
- package/dist/record/index.d.ts +0 -15
- package/dist/record/index.d.ts.map +0 -1
- package/dist/record/main-pass-skin.d.ts +0 -46
- package/dist/record/main-pass-skin.d.ts.map +0 -1
- package/dist/record/main-pass-sprite.d.ts +0 -69
- package/dist/record/main-pass-sprite.d.ts.map +0 -1
- package/dist/record/material-payload.d.ts +0 -43
- package/dist/record/material-payload.d.ts.map +0 -1
- package/dist/record/material-slot-plan.d.ts +0 -26
- package/dist/record/material-slot-plan.d.ts.map +0 -1
- package/dist/record/membership-timing.d.ts +0 -232
- package/dist/record/membership-timing.d.ts.map +0 -1
- package/dist/record/shadow-caster-uniform.d.ts +0 -8
- package/dist/record/shadow-caster-uniform.d.ts.map +0 -1
- package/dist/record/shadow-submit-mode.d.ts +0 -66
- package/dist/record/shadow-submit-mode.d.ts.map +0 -1
- package/dist/render-dispatch-membership.d.ts +0 -47
- package/dist/render-dispatch-membership.d.ts.map +0 -1
- package/dist/render-pipeline-context.d.ts +0 -289
- package/dist/render-pipeline-context.d.ts.map +0 -1
- package/dist/render-pipeline-target.d.ts +0 -16
- package/dist/render-pipeline-target.d.ts.map +0 -1
- package/dist/render-scene-projection.d.ts +0 -174
- package/dist/render-scene-projection.d.ts.map +0 -1
- package/dist/render-system-fold.d.ts +0 -266
- package/dist/render-system-fold.d.ts.map +0 -1
- package/dist/renderer/asset-service.d.ts +0 -10
- package/dist/renderer/asset-service.d.ts.map +0 -1
- package/dist/renderer/backend-selection.d.ts.map +0 -1
- package/dist/renderer/environment-classify.d.ts +0 -6
- package/dist/renderer/environment-classify.d.ts.map +0 -1
- package/dist/renderer/environment-error.d.ts +0 -13
- package/dist/renderer/environment-error.d.ts.map +0 -1
- package/dist/renderer/material/pipeline-projection.d.ts +0 -91
- package/dist/renderer/material/pipeline-projection.d.ts.map +0 -1
- package/dist/renderer/renderer-factory.d.ts +0 -289
- package/dist/renderer/renderer-factory.d.ts.map +0 -1
- package/dist/renderer.d.ts +0 -771
- package/dist/renderer.d.ts.map +0 -1
- package/dist/scene-utils/collect-subtree.d.ts +0 -11
- package/dist/scene-utils/collect-subtree.d.ts.map +0 -1
- package/dist/ssao-data.d.ts +0 -34
- package/dist/ssao-data.d.ts.map +0 -1
- package/dist/surface-format.d.ts +0 -10
- package/dist/surface-format.d.ts.map +0 -1
- package/dist/taa-history-store.d.ts +0 -88
- package/dist/taa-history-store.d.ts.map +0 -1
- package/dist/temporal-coverage.d.ts +0 -35
- package/dist/temporal-coverage.d.ts.map +0 -1
- package/dist/temporal-frame-transaction.d.ts +0 -92
- package/dist/temporal-frame-transaction.d.ts.map +0 -1
- package/dist/temporal-inspection.d.ts +0 -57
- package/dist/temporal-inspection.d.ts.map +0 -1
- package/dist/temporal-view.d.ts +0 -43
- package/dist/temporal-view.d.ts.map +0 -1
- package/dist/tilemap/resolve-tileset-runtime.d.ts +0 -23
- package/dist/tilemap/resolve-tileset-runtime.d.ts.map +0 -1
- package/dist/urp-pipeline.d.ts +0 -4
- package/dist/urp-pipeline.d.ts.map +0 -1
- package/src/__tests__/analytic-sky-contract.test.ts +0 -27
- package/src/__tests__/analytic-sky-falsify-carriers.mjs +0 -43
- package/src/__tests__/analytic-sky-falsify.test.ts +0 -94
- package/src/__tests__/assets-runtime-handoff.integration.test.ts +0 -36
- package/src/__tests__/backend-selection.integration.test.ts +0 -11
- package/src/__tests__/camera-temporal.test-d.ts +0 -8
- package/src/__tests__/camera-temporal.test.ts +0 -188
- package/src/__tests__/directional-shadow-probe-atlas-layout.unit.test.ts +0 -18
- package/src/__tests__/environment-inspection.test.ts +0 -45
- package/src/__tests__/fog-ai-user.fixture.ts +0 -350
- package/src/__tests__/fog-custom-render-feature.fixture.ts +0 -33
- package/src/__tests__/fog-custom-render-feature.integration.test.ts +0 -76
- package/src/__tests__/fog-inspection.integration.test.ts +0 -127
- package/src/__tests__/fog-owner-state.integration.test.ts +0 -112
- package/src/__tests__/fog-pipeline-topology.integration.test.ts +0 -93
- package/src/__tests__/fog-public-surface.integration.test.ts +0 -60
- package/src/__tests__/fog-ray-contract.integration.test.ts +0 -73
- package/src/__tests__/fog-source-absence.integration.test.ts +0 -51
- package/src/__tests__/fog-temporal.integration.test.ts +0 -115
- package/src/__tests__/frame-chain.unit.test.ts +0 -26
- package/src/__tests__/gpu-scene-field-type-owner.test-d.ts +0 -27
- package/src/__tests__/hdrp-pipeline.unit.test.ts +0 -100
- package/src/__tests__/ibl/ibl-fallback.unit.test.ts +0 -23
- package/src/__tests__/material-derived-error-stop-draw.integration.test.ts +0 -69
- package/src/__tests__/material-derived-payload.integration.test.ts +0 -164
- package/src/__tests__/materials.unit.test.ts +0 -25
- package/src/__tests__/param-schema-projection-census.unit.test.ts +0 -40
- package/src/__tests__/persistent-render-scene.unit.test.ts +0 -1311
- package/src/__tests__/pipeline-error-policy-owner.unit.test.ts +0 -167
- package/src/__tests__/pipeline-pass-trace.test.ts +0 -92
- package/src/__tests__/pipeline-stage-owner.test-d.ts +0 -13
- package/src/__tests__/plugin.test.ts +0 -25
- package/src/__tests__/prepared-graphics-backend-matrix.unit.test.ts +0 -129
- package/src/__tests__/prepared-graphics-resolver-recording.unit.test.ts +0 -180
- package/src/__tests__/public-pipeline-id.test-d.ts +0 -6
- package/src/__tests__/render-dispatch-membership.unit.test.ts +0 -117
- package/src/__tests__/render-feature-construction.unit.test.ts +0 -124
- package/src/__tests__/render-feature-error-code-owner.test-d.ts +0 -27
- package/src/__tests__/render-feature-gpu-buffer-usage-owner.test-d.ts +0 -46
- package/src/__tests__/render-feature-graph.integration.test.ts +0 -205
- package/src/__tests__/render-feature-graphics-staging.unit.test.ts +0 -200
- package/src/__tests__/render-feature-order.unit.test.ts +0 -66
- package/src/__tests__/render-feature-prepared-graphics-recording.unit.test.ts +0 -107
- package/src/__tests__/render-feature-staging.unit.test.ts +0 -94
- package/src/__tests__/renderer-render-scene-public.test-d.ts +0 -27
- package/src/__tests__/scene-temporal-coverage.unit.test.ts +0 -259
- package/src/__tests__/sun-snapshot-consumers.test.ts +0 -35
- package/src/__tests__/surface-backend-kind-owner.test-d.ts +0 -42
- package/src/__tests__/taa-history-store.unit.test.ts +0 -196
- package/src/__tests__/temporal-frame-transaction.integration.test.ts +0 -537
- package/src/__tests__/temporal-inspection.unit.test.ts +0 -138
- package/src/assets/__tests__/asset-decoders.unit.test.ts +0 -92
- package/src/assets/__tests__/mipmap-generator.unit.test.ts +0 -52
- package/src/assets/__tests__/render-asset-port.unit.test.ts +0 -54
- package/src/assets/__tests__/resolve-render-asset.unit.test.ts +0 -47
- package/src/components/__tests__/atmosphere-red.test.ts +0 -51
- package/src/components/__tests__/atmosphere.test.ts +0 -79
- package/src/components/__tests__/fog.test-d.ts +0 -49
- package/src/components/__tests__/fog.test.ts +0 -60
- package/src/components/atmosphere.ts +0 -64
- package/src/deferred-lighting.ts +0 -92
- package/src/dynamic-texture-store.ts +0 -111
- package/src/environment/README.md +0 -76
- package/src/environment/__tests__/failure-injection.test.ts +0 -50
- package/src/environment/__tests__/generation-red.test.ts +0 -64
- package/src/environment/__tests__/generation.test.ts +0 -37
- package/src/environment/__tests__/graph-transaction.test.ts +0 -85
- package/src/environment/__tests__/inspection-red.test.ts +0 -53
- package/src/environment/__tests__/lifecycle-evidence.test.ts +0 -40
- package/src/environment/__tests__/pipeline-topology.test.ts +0 -33
- package/src/environment/__tests__/readiness.test.ts +0 -42
- package/src/environment/__tests__/recovery.test.ts +0 -62
- package/src/environment/__tests__/resize-dispose.test.ts +0 -30
- package/src/environment/__tests__/signature-red.test.ts +0 -45
- package/src/environment/__tests__/signature.test.ts +0 -60
- package/src/environment/descriptors.ts +0 -7
- package/src/environment/extracted-environment.ts +0 -239
- package/src/environment/generation.ts +0 -158
- package/src/environment/gpu-bundle.ts +0 -144
- package/src/environment/graph.ts +0 -588
- package/src/environment/inspection.ts +0 -107
- package/src/environment/lifecycle.ts +0 -124
- package/src/environment/readiness.ts +0 -76
- package/src/environment/signature.ts +0 -185
- package/src/extract/__tests__/directional-csm-domain.unit.test.ts +0 -391
- package/src/extract/__tests__/environment-source.test.ts +0 -105
- package/src/extract/__tests__/schema-readers.unit.test.ts +0 -16
- package/src/extract/directional-csm.ts +0 -959
- package/src/extract/index.ts +0 -10
- package/src/extract/material-interface.ts +0 -604
- package/src/extract/schema-readers.ts +0 -27
- package/src/features/graph-contribution.ts +0 -577
- package/src/features/index.ts +0 -100
- package/src/features/morph/index.ts +0 -24
- package/src/features/morph/morph-bounds.ts +0 -123
- package/src/features/scene-temporal.ts +0 -274
- package/src/features/taa-resolve.ts +0 -244
- package/src/frame-chain.ts +0 -21
- package/src/hdrp-cluster-membership.ts +0 -70
- package/src/ibl/cubemap-projection.ts +0 -60
- package/src/ibl/face-uniforms.ts +0 -150
- package/src/mesh-update-errors.ts +0 -113
- package/src/mipmap-generator.ts +0 -244
- package/src/param-schema-projection-census.ts +0 -73
- package/src/persistent-render-scene.ts +0 -1752
- package/src/pipeline/index.ts +0 -40
- package/src/pipeline-errors.ts +0 -172
- package/src/prepare/__tests__/schema-readers.unit.test.ts +0 -16
- package/src/prepare/index.ts +0 -8
- package/src/prepare/schema-readers.ts +0 -20
- package/src/record/__tests__/environment-record.test.ts +0 -35
- package/src/record/__tests__/frame-targets.unit.test.ts +0 -54
- package/src/record/__tests__/membership-timing.unit.test.ts +0 -524
- package/src/record/__tests__/render-submission.integration.test.ts +0 -76
- package/src/record/__tests__/render-submission.perf.test.ts +0 -141
- package/src/record/__tests__/shadow-submit-mode.unit.test.ts +0 -88
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +0 -101
- package/src/record/frame-observation.ts +0 -122
- package/src/record/index.ts +0 -15
- package/src/record/main-pass-skin.ts +0 -51
- package/src/record/main-pass-sprite.ts +0 -166
- package/src/record/material-payload.ts +0 -292
- package/src/record/material-slot-plan.ts +0 -68
- package/src/record/membership-timing.ts +0 -1012
- package/src/record/shadow-caster-uniform.ts +0 -37
- package/src/record/shadow-submit-mode.ts +0 -277
- package/src/render-dispatch-membership.ts +0 -155
- package/src/render-pipeline-context.ts +0 -332
- package/src/render-pipeline-target.ts +0 -96
- package/src/render-scene-projection.ts +0 -1738
- package/src/render-system-fold.ts +0 -531
- package/src/renderer/asset-service.ts +0 -32
- package/src/renderer/backend-selection.ts +0 -121
- package/src/renderer/environment-classify.ts +0 -30
- package/src/renderer/environment-error.ts +0 -19
- package/src/renderer/material/pipeline-projection.ts +0 -140
- package/src/renderer.ts +0 -940
- package/src/scene-utils/collect-subtree.ts +0 -40
- package/src/ssao-data.ts +0 -106
- package/src/surface-format.ts +0 -37
- package/src/taa-history-store.ts +0 -429
- package/src/temporal-coverage.ts +0 -106
- package/src/temporal-frame-transaction.ts +0 -301
- package/src/temporal-inspection.ts +0 -194
- package/src/temporal-view.ts +0 -174
- package/src/tilemap/resolve-tileset-runtime.ts +0 -72
package/README.md
CHANGED
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
# `@forgeax/engine-render`
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Render happy path
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`
|
|
8
|
-
`
|
|
9
|
-
|
|
5
|
+
`RenderScene -> Standard Pipeline -> DeviceScope -> FrameReceipt` is the only frame
|
|
6
|
+
model. The host calls `createRenderer`, `attach(world)`, and `draw(request)`; diagnostics use
|
|
7
|
+
`inspect`, `observe(receipt, request)`, and `recover`. `FrameReceipt` is the synchronous proof that
|
|
8
|
+
submit completed. A failed `Result` carries `code`, `hint`, and `detail`; repair the named owner,
|
|
9
|
+
rebuild or cold-cook its source, then retry the same request.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
```ts
|
|
12
|
+
const created = await createRenderer(canvas);
|
|
13
|
+
if (!created.ok) throw created.error;
|
|
14
|
+
const renderer = created.value;
|
|
15
|
+
const attached = renderer.attach(world);
|
|
16
|
+
if (!attached.ok) throw attached.error;
|
|
17
|
+
const frame = renderer.draw({
|
|
18
|
+
leases: [attached.value],
|
|
19
|
+
camera: { lease: attached.value },
|
|
20
|
+
environment: { lease: attached.value },
|
|
21
|
+
});
|
|
22
|
+
if (!frame.ok) throw frame.error;
|
|
23
|
+
const observation = await renderer.observe(frame.value, { include: ['timings'] });
|
|
24
|
+
```
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
The Standard pipeline selects direct or clustered lighting from capabilities and keeps shadow,
|
|
27
|
+
PBR, IBL, SSAO, bloom, tone, antialiasing, sky, material, VFX, and debug feature ownership inside
|
|
28
|
+
the same graph and submit boundary. CPU and WebGL2 fallback are capability lanes of that pipeline,
|
|
29
|
+
not second renderer identities.
|
|
21
30
|
|
|
22
31
|
## Direct-light parity contract
|
|
23
32
|
|
|
24
33
|
The direct-light proposition is: one public `DirectionalLight`/`PointLight`/
|
|
25
|
-
`SpotLight` semantic snapshot must produce the same analytic result in
|
|
26
|
-
|
|
34
|
+
`SpotLight` semantic snapshot must produce the same analytic result in every
|
|
35
|
+
Standard capability lane. The authority is the revision-pinned
|
|
27
36
|
[`three-r184-finite-range-authority.json`](../../apps/parity/color-lighting/cases/direct-light/calibration/three-r184-finite-range-authority.json).
|
|
28
37
|
It is `ready` only when its Three revision, source hash, config, and expected
|
|
29
38
|
samples are present. Missing authority or paired GPU captures is `blocked`; do
|
|
@@ -46,7 +55,7 @@ The public mapping is deliberately small:
|
|
|
46
55
|
| Color | Linear RGB; no hidden global multiplier | Light snapshot and buffer layout |
|
|
47
56
|
| Range and decay | Positive range is meters; `Infinity` means no cutoff; runtime uses `e=2` | Three r184 authority |
|
|
48
57
|
| Cone | KHR radians import to component degrees; snapshot stores `cosInner` and `cosOuter` | glTF bridge and extract |
|
|
49
|
-
| Direction | KHR local `-Z` after world rotation; extract normalizes once; downstream shaders consume the result | Extract snapshot and
|
|
58
|
+
| Direction | KHR local `-Z` after world rotation; extract normalizes once; downstream shaders consume the result | Extract snapshot and Standard shaders |
|
|
50
59
|
|
|
51
60
|
The runtime finite-range factor is the Three r184 squared window:
|
|
52
61
|
`clamp(1 - (d / c)^4, 0, 1)^2`. The KHR
|
|
@@ -61,228 +70,6 @@ must retain `provenance`, `captures`, `raw hash`, `analyticMax`, `roiMax`, and
|
|
|
61
70
|
`verdict` for each backend x pipeline x case. A same-canvas self-comparison or
|
|
62
71
|
analytic-only green result is not direct-light parity evidence.
|
|
63
72
|
|
|
64
|
-
## Fog: authoring, inspection, and recovery
|
|
65
|
-
|
|
66
|
-
> [!IMPORTANT]
|
|
67
|
-
> Fog is the one public scene-radiance component. Spawn it in the World that
|
|
68
|
-
> is passed as resourceOwner; the renderer selects zero or one Fog entity,
|
|
69
|
-
> validates the fields, publishes a candidate, and commits it only after a
|
|
70
|
-
> successful frame submission. Applications do not register a post effect,
|
|
71
|
-
> pack a Fog buffer, import Fog WGSL, or maintain Fog history.
|
|
72
|
-
|
|
73
|
-
The shortest authoring route is one public import plus the existing draw owner:
|
|
74
|
-
The minimum form is world.spawn({ component: Fog, data: {} }) when defaults are sufficient.
|
|
75
|
-
|
|
76
|
-
```ts
|
|
77
|
-
import { Fog } from '@forgeax/engine-render';
|
|
78
|
-
import type { RenderError } from '@forgeax/engine-render';
|
|
79
|
-
|
|
80
|
-
const fogEntity = world.spawn({
|
|
81
|
-
component: Fog,
|
|
82
|
-
data: {
|
|
83
|
-
color: [0.45, 0.52, 0.6],
|
|
84
|
-
density: 0.018,
|
|
85
|
-
heightFalloff: 0.15,
|
|
86
|
-
maxOpacity: 0.85,
|
|
87
|
-
},
|
|
88
|
-
}).unwrap();
|
|
89
|
-
|
|
90
|
-
const drawn = renderer.draw([world], { cameraOwner: 0, resourceOwner: 0 });
|
|
91
|
-
if (!drawn.ok) reportRenderError(drawn.error as RenderError);
|
|
92
|
-
const fogInspection = renderer.renderScene.fog;
|
|
93
|
-
void fogEntity;
|
|
94
|
-
void fogInspection;
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Authoring domain
|
|
98
|
-
|
|
99
|
-
| Field | Valid domain | Default | Meaning |
|
|
100
|
-
|:--|:--|--:|:--|
|
|
101
|
-
| color | three finite non-negative numbers | [0.5, 0.5, 0.5] | Linear Fog radiance color; HDR values are valid |
|
|
102
|
-
| density | finite number >= 0 | 0.01 | Base optical density |
|
|
103
|
-
| heightFalloff | finite number >= 0 | 0 | Exponential density falloff along world y |
|
|
104
|
-
| maxOpacity | finite number in [0, 1] | 1 | Upper bound for the Fog mix; surface alpha is preserved |
|
|
105
|
-
|
|
106
|
-
The component has no mode, profile, baseHeight, start, or end field.
|
|
107
|
-
heightFalloff = 0 is the uniform-density lane. A missing Fog entity means
|
|
108
|
-
disabled scene Fog and adds no Fog-owned graph resource, pass, texture, bind
|
|
109
|
-
group, or history. A second Fog entity in the same resourceOwner is a
|
|
110
|
-
structured conflict, not a winner-selection policy.
|
|
111
|
-
|
|
112
|
-
resourceOwner is an existing numeric World owner, not a string resource:
|
|
113
|
-
|
|
114
|
-
| Fog cardinality in the selected owner | Renderer fact | Recovery |
|
|
115
|
-
|:--:|:--|:--|
|
|
116
|
-
| 0 | enabled=false; no accepted Fog snapshot | Continue without scene Fog |
|
|
117
|
-
| 1 | Candidate is validated and becomes last-known-good after submit | Read renderer.renderScene.fog |
|
|
118
|
-
| N | fog-owner-conflict; no new candidate is published | Remove every extra Fog entity, then retry draw |
|
|
119
|
-
|
|
120
|
-
### Bounded inspection
|
|
121
|
-
|
|
122
|
-
Read the accepted facts after draw:
|
|
123
|
-
|
|
124
|
-
```ts
|
|
125
|
-
const fog = renderer.renderScene.fog;
|
|
126
|
-
const accepted = {
|
|
127
|
-
enabled: fog.enabled,
|
|
128
|
-
resourceOwner: fog.resourceOwner,
|
|
129
|
-
entity: fog.entity,
|
|
130
|
-
revision: fog.revision,
|
|
131
|
-
reactive: fog.reactive,
|
|
132
|
-
failure: fog.failure,
|
|
133
|
-
};
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
The inspection is bounded and read-only. revision changes when a successful
|
|
137
|
-
Fog authoring candidate changes; reactive is true on the current frame when
|
|
138
|
-
the accepted revision changed. A failed candidate does not replace the
|
|
139
|
-
last-known-good snapshot. failure is either fog-owner-conflict,
|
|
140
|
-
fog-parameters-invalid, or undefined; it is not a free-form diagnostic
|
|
141
|
-
registry.
|
|
142
|
-
|
|
143
|
-
### Structured errors and exhaustive recovery
|
|
144
|
-
|
|
145
|
-
Fog failures are members of the closed RenderError union:
|
|
146
|
-
FogOwnerConflictError has code fog-owner-conflict, while
|
|
147
|
-
FogParametersInvalidError has code fog-parameters-invalid. Both errors expose
|
|
148
|
-
code, detail, expected, and hint; detail carries the bounded values needed for
|
|
149
|
-
a retry.
|
|
150
|
-
|
|
151
|
-
```ts
|
|
152
|
-
function recoverFog(error: RenderError): 'retry' | 'forward' {
|
|
153
|
-
switch (error.code) {
|
|
154
|
-
case 'fog-owner-conflict':
|
|
155
|
-
// Remove all but one Fog entity in error.detail.resourceOwner.
|
|
156
|
-
return 'retry';
|
|
157
|
-
case 'fog-parameters-invalid':
|
|
158
|
-
// Set error.detail.field to a value satisfying error.expected.
|
|
159
|
-
return 'retry';
|
|
160
|
-
default:
|
|
161
|
-
return 'forward';
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
For fog-owner-conflict, inspect error.detail.entities and
|
|
167
|
-
error.detail.omitted; remove every extra entity from that resourceOwner, then
|
|
168
|
-
retry draw. For fog-parameters-invalid, inspect error.detail.entity,
|
|
169
|
-
error.detail.field, error.detail.actual, and the structured expected domain;
|
|
170
|
-
repair the ECS field and retry. Do not parse the error message, create a
|
|
171
|
-
fallback material, or silently disable Fog.
|
|
172
|
-
|
|
173
|
-
### Height-aware scene-radiance formula
|
|
174
|
-
|
|
175
|
-
The shared forgeax_view::fog module integrates optical depth along a
|
|
176
|
-
producer-supplied world-space ray. Let y0 be the ray origin height, dy its
|
|
177
|
-
world-space vertical direction, d its linear distance, h the height falloff,
|
|
178
|
-
and rho the authored density:
|
|
179
|
-
|
|
180
|
-
$$
|
|
181
|
-
\rho_0 = \rho e^{-h y_0},\qquad
|
|
182
|
-
q = h\,dy,\qquad
|
|
183
|
-
\tau =
|
|
184
|
-
\begin{cases}
|
|
185
|
-
\rho_0 d & |q| < \epsilon,\\
|
|
186
|
-
\rho_0 \dfrac{1-e^{-qd}}{q} & |q| \geq \epsilon.
|
|
187
|
-
\end{cases}
|
|
188
|
-
$$
|
|
189
|
-
|
|
190
|
-
$$
|
|
191
|
-
T = e^{-\tau},\qquad
|
|
192
|
-
\alpha_f = \operatorname{clamp}(m(1-T), 0, 1),\qquad
|
|
193
|
-
C' = \operatorname{mix}(C, C_f, \alpha_f),
|
|
194
|
-
$$
|
|
195
|
-
|
|
196
|
-
where m is maxOpacity, C is the producer color, and Cf is the authored
|
|
197
|
-
linear Fog color. The output keeps the producer alpha unchanged. CPU
|
|
198
|
-
extraction and WGSL share the same field order and ray contract; near/far
|
|
199
|
-
values and non-linear depth are not Fog inputs.
|
|
200
|
-
|
|
201
|
-
### Producer and pipeline responsibility
|
|
202
|
-
|
|
203
|
-
Fog is applied exactly once to linear scene radiance before the
|
|
204
|
-
renderer-owned temporal resolve. URP and HDRP keep their existing pipeline
|
|
205
|
-
order; opaque, masked, unlit, Standard PBR, transparent, Sprite, Text,
|
|
206
|
-
Skybox, and the five VFX render paths supply their own ray facts and call the
|
|
207
|
-
shared module. G-buffer facts, shadow maps, and overlay/debug output are not
|
|
208
|
-
Fog inputs. Alpha is preserved for transparent and VFX output.
|
|
209
|
-
|
|
210
|
-
```mermaid
|
|
211
|
-
flowchart TD
|
|
212
|
-
Author["World spawns one Fog entity"] --> Extract["extract selects resourceOwner"]
|
|
213
|
-
Extract --> Candidate["validate and stage candidate"]
|
|
214
|
-
Candidate --> Submit{"successful frame submit"}
|
|
215
|
-
Submit -->|yes| Accepted["publish revision and bounded inspection"]
|
|
216
|
-
Submit -->|no| Lkg["retain last-known-good snapshot"]
|
|
217
|
-
Accepted --> Scene["linear scene-radiance Fog exactly once"]
|
|
218
|
-
Scene --> Temporal["existing temporal resolve"]
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
No Fog-specific pass, texture, bind group, upload, history, registry, or
|
|
222
|
-
fullscreen fallback is part of this route. TAA remains the sole history owner;
|
|
223
|
-
Fog revision changes use its existing current-frame reactive lane.
|
|
224
|
-
|
|
225
|
-
### Real evidence commands
|
|
226
|
-
|
|
227
|
-
Run the focused contracts first, then the two independent feature carriers:
|
|
228
|
-
|
|
229
|
-
```sh
|
|
230
|
-
pnpm exec vitest run --project='@forgeax/engine-render' packages/render/src/__tests__/fog-public-surface.integration.test.ts packages/render/src/__tests__/fog-source-absence.integration.test.ts packages/render/src/__tests__/fog-custom-render-feature.integration.test.ts
|
|
231
|
-
pnpm --filter @forgeax/bevy-fog smoke
|
|
232
|
-
pnpm --filter @forgeax/bevy-fog smoke:browser
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Each carrier must write case-wise expected, observed, delta, verdict, and
|
|
236
|
-
confidence fields plus revision/reactive/recovery facts. The Dawn artifact is
|
|
237
|
-
evidence/dawn-fog-trace.json; the Browser artifact is
|
|
238
|
-
evidence/browser-fog-trace.json. PNG is auxiliary evidence: it never replaces
|
|
239
|
-
linear readback or the case-wise verdict.
|
|
240
|
-
|
|
241
|
-
> [!CAUTION]
|
|
242
|
-
> The current M4 Dawn and Browser 300-frame artifacts are real executions but
|
|
243
|
-
> remain verdict: fail because their RGB deltas exceed 0.02. This README
|
|
244
|
-
> records the failure rather than promoting it to green. Preserve the
|
|
245
|
-
> artifacts and repair the Engine owner before claiming visual parity.
|
|
246
|
-
|
|
247
|
-
### Custom RenderFeature responsibility
|
|
248
|
-
|
|
249
|
-
A custom RenderFeature can consume the renderer-owned scene-color target and
|
|
250
|
-
contribute an overlay through the existing graph seam. It must not become a
|
|
251
|
-
second Fog owner or create fog-texture, fog-history, fog-bind-group,
|
|
252
|
-
Fog-specific upload state, or a parallel formula. The executable fixture is
|
|
253
|
-
src/__tests__/fog-custom-render-feature.fixture.ts; its compile/import/overlay
|
|
254
|
-
evidence is evidence/custom-render-feature-compile.json and contains the
|
|
255
|
-
fixture path, compiler command, exitCode, moduleImport, and overlay verdict.
|
|
256
|
-
|
|
257
|
-
<details>
|
|
258
|
-
<summary>Custom feature boundary checklist</summary>
|
|
259
|
-
|
|
260
|
-
- [x] Consume existing graph targets instead of allocating a Fog resource.
|
|
261
|
-
- [x] Keep engine-render as the Fog owner.
|
|
262
|
-
- [x] Use the public RenderFeature lifecycle and opaque staging references.
|
|
263
|
-
- [ ] Add a new public capability only through a separate design and owner review.
|
|
264
|
-
|
|
265
|
-
</details>
|
|
266
|
-
|
|
267
|
-
### Out of scope for this Fog contract
|
|
268
|
-
|
|
269
|
-
| Deferred capability | Boundary |
|
|
270
|
-
|:--|:--|
|
|
271
|
-
| Linear start/end, Exp2, baseHeight, public mode/profile, or a second Fog component | Reopen design only if a real scene proves the single density field insufficient |
|
|
272
|
-
| Froxel/raymarch volume, 3D density, phase/scattering, light/shadow injection, or temporal volume denoise | Separate volume and lighting owner |
|
|
273
|
-
| Local Fog volumes, overlap/blend, or directional phase | Separate volume composition authority |
|
|
274
|
-
| Atmosphere, Sun, analytic sky, clouds, weather, or cloud shadow | Separate sky/weather/environment owner |
|
|
275
|
-
| OIT, layered media, volume compositing, or automatic exposure | Separate transparency and color-management owners |
|
|
276
|
-
| Fog-specific pass, texture, bind group, upload, history, or coverage registry | Explicitly forbidden because they duplicate RenderGraph/View/TAA SSOT |
|
|
277
|
-
| Frozen GPU epsilon, exponent, or full diagnostic UI | Keep implementation details behind ABI and bounded evidence |
|
|
278
|
-
|
|
279
|
-
M5 closure remains explicit:
|
|
280
|
-
|
|
281
|
-
- [x] Public Fog schema and bounded inspection are documented.
|
|
282
|
-
- [x] One-cut app source absence and two closed recovery errors are indexed.
|
|
283
|
-
- [x] Real Dawn/Browser evidence paths and their current failed verdicts are linked.
|
|
284
|
-
- [ ] RGB tolerance repair and full smoke-fleet gates remain required.
|
|
285
|
-
|
|
286
73
|
## Particle feature boundary
|
|
287
74
|
|
|
288
75
|
Particle rendering is provided by
|
|
@@ -291,71 +78,35 @@ generic RenderFeature host, prepared graphics resolver, pipeline readiness
|
|
|
291
78
|
contract, and structured renderer errors; it does not own VFX simulation or
|
|
292
79
|
particle asset authoring.
|
|
293
80
|
|
|
294
|
-
## Deferred
|
|
295
|
-
|
|
296
|
-
Render owns the opt-in `membershipTiming` contract for the real
|
|
297
|
-
`hdrp-cluster-membership` compute pass. App and Runtime only forward the option;
|
|
298
|
-
they do not define a second profiler or reason vocabulary.
|
|
299
|
-
|
|
300
|
-
| Mode | Work | Result |
|
|
301
|
-
|:--|:--|:--|
|
|
302
|
-
| omitted | No query set, resolve buffer, map, or queue wait | No timing record |
|
|
303
|
-
| `cpu-control` | Existing CPU binner remains the control path | Accepted control record with `gpu: null` |
|
|
304
|
-
| `gpu` | Bounded timestamp query, resolve, async queue completion, and map | GPU ticks plus backend period, or a terminal refusal/error |
|
|
305
|
-
|
|
306
|
-
> [!IMPORTANT]
|
|
307
|
-
> A GPU request is refused when the backend does not advertise timestamp
|
|
308
|
-
> queries or a positive timestamp period. RhiNull and the wgpu WebGL2 path are
|
|
309
|
-
> intentionally non-timing backends. They never synthesize GPU duration.
|
|
310
|
-
|
|
311
|
-
The controller timestamps immediately around the existing membership dispatch,
|
|
312
|
-
keeps GPU ticks separate from CPU encode/submit and async readback, and
|
|
313
|
-
terminalizes captures on timeout, submit failure, queue completion failure,
|
|
314
|
-
readback failure, device recovery, or disposal. The closed
|
|
315
|
-
`MembershipTimingReasonCode` union and its exhaustive mapping live in
|
|
316
|
-
[`src/record/membership-timing.ts`](src/record/membership-timing.ts).
|
|
317
|
-
|
|
318
|
-
Timestamp-capable backends must execute both raw timestamp writes. A missing or
|
|
319
|
-
throwing write is a structured `timestamp-write-unavailable` refusal; Render
|
|
320
|
-
never publishes a zero, reversed, or non-finite GPU interval as a report.
|
|
321
|
-
|
|
322
|
-
## Deferred membership evidence closure
|
|
323
|
-
|
|
324
|
-
> [!IMPORTANT]
|
|
325
|
-
> The close condition is `acceptedGpu=16`, with five accepted Dawn GPU
|
|
326
|
-
> records at each of 32, 64, and 128 lights, one 256-light record, positive
|
|
327
|
-
> tick intervals, per-light-count variance, and the 256-light overflow
|
|
328
|
-
> fingerprint. `acceptedGpu=0` is a blocker. CPU control, WebKit refusal,
|
|
329
|
-
> RhiNull refusal, PNG screenshots, and capability bits never count as GPU
|
|
330
|
-
> evidence.
|
|
331
|
-
|
|
332
|
-
The producer and validator are deliberately separate from the public Render
|
|
333
|
-
API. Generate the exact manifest, run the full producer matrix, and inspect
|
|
334
|
-
the machine-readable report in this order:
|
|
81
|
+
## Deferred lighting evidence
|
|
335
82
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
83
|
+
Deferred lighting validation is consumer evidence, not a Render production
|
|
84
|
+
subsystem. The learn-render smoke exercises the Standard clustered path and
|
|
85
|
+
the profiler captures bounded CPU ownership evidence; the WebKit fallback
|
|
86
|
+
gate exercises the browser delivery path. Runtime inspection uses the public
|
|
87
|
+
`inspect` and `observe` projections, while any future timestamp benchmark
|
|
88
|
+
belongs in `packages/render/bench` and its dev-verify producer. Render does
|
|
89
|
+
not expose a timing controller or a second membership-specific API.
|
|
340
90
|
|
|
341
|
-
|
|
91
|
+
## RenderFeature: the producer seam (first-read index)
|
|
342
92
|
|
|
343
|
-
|
|
344
|
-
`optimizationReleaseReady`, `counts`, `errors`, and `blocker`. A blocker uses
|
|
345
|
-
`code`, `expected`, `hint`, and the observed `acceptedGpu` count so an AI user
|
|
346
|
-
can recover by inspecting per-attempt refusal, profile, identity, and artifact
|
|
347
|
-
hash records. The owner reason union remains closed; for example,
|
|
348
|
-
`timestamp-query-unsupported` is a refusal, while `timestamp-write-unavailable`
|
|
349
|
-
is a terminal producer failure. Neither is a successful GPU sample.
|
|
93
|
+
### Material contract projection
|
|
350
94
|
|
|
351
|
-
|
|
95
|
+
Render consumes only the Pack-owned material publication projection. Its
|
|
96
|
+
inputs are runtime bool/value data, composed module slots, and the closed
|
|
97
|
+
compiler context; render never authors, cooks, writes DDC, or selects a
|
|
98
|
+
fallback material. The projection preserves `layoutIdentity`,
|
|
99
|
+
`programIdentity`, `cookIdentity`, and `materialPublicationIdentity` so a
|
|
100
|
+
stale draw can be traced to the first producer divergence.
|
|
352
101
|
|
|
353
|
-
The public route
|
|
354
|
-
active RenderGraph pass.
|
|
355
|
-
producer
|
|
356
|
-
`
|
|
357
|
-
|
|
358
|
-
|
|
102
|
+
The public route is one `RenderFeature<FrameData>` through the Standard
|
|
103
|
+
Pipeline and the active RenderGraph pass. In the examples below, `type FrameData`
|
|
104
|
+
is the producer-owned extracted value. A feature extracts one frame value,
|
|
105
|
+
then its mandatory `plan(data, context)` declares named resources and passes;
|
|
106
|
+
the host derives graph access, preparation, recording, and recovery from that
|
|
107
|
+
plan. Register it at construction with
|
|
108
|
+
`createRenderer(canvas, { features: [feature] })`. A feature never receives a
|
|
109
|
+
device, queue, encoder, staging builder, or submit callback.
|
|
359
110
|
|
|
360
111
|
> [!IMPORTANT]
|
|
361
112
|
> Render consumes the effective MaterialAsset snapshot produced by extract. Each texture slot carries its own coordinate set and transform into the built-in PBR binding layout; render records do not reinterpret authoring fields or manufacture shader artifacts. The effective `passes` are already validated.
|
|
@@ -389,35 +140,156 @@ uses the neutral engine material.
|
|
|
389
140
|
|
|
390
141
|
The render path is `MaterialAsset` -> extract snapshot -> prepare resources -> record the per-slot `coordinates` and values. The effective `parent` is already resolved before extract. If a material contract or reflection binding fails, preserve the structured error and repair the source contract or cooked module before drawing again; that is the recovery route. The render package owns consumption, not material import or cook policy.
|
|
391
142
|
|
|
143
|
+
## Points and Lines authoring (M1)
|
|
144
|
+
|
|
145
|
+
Points and Lines are first-class render components. Their geometry remains a
|
|
146
|
+
normal `MeshAsset`, and their material remains the engine-owned
|
|
147
|
+
`Materials.unlit` asset. The M1 path validates the complete candidate before
|
|
148
|
+
any render publication; it does not add a second mesh, material, CLI, RPC, or
|
|
149
|
+
manifest authority.
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import { Lines, Materials, PointShapeValue, Points, admitPointsLines } from '@forgeax/engine-render';
|
|
153
|
+
import { World } from '@forgeax/engine-ecs';
|
|
154
|
+
import type { MeshAsset } from '@forgeax/engine-types';
|
|
155
|
+
|
|
156
|
+
const positions = new Float32Array([0, 0, 0, 1, 0, 0, 2, 0, 0]);
|
|
157
|
+
const pointMesh = {
|
|
158
|
+
kind: 'mesh',
|
|
159
|
+
vertices: positions,
|
|
160
|
+
attributes: { position: positions },
|
|
161
|
+
submeshes: [{
|
|
162
|
+
indexOffset: 0,
|
|
163
|
+
indexCount: 0,
|
|
164
|
+
vertexCount: 3,
|
|
165
|
+
topology: 'point-list',
|
|
166
|
+
materialSlot: 0,
|
|
167
|
+
}],
|
|
168
|
+
materialSlots: [{ slotName: 'default' }],
|
|
169
|
+
} satisfies MeshAsset;
|
|
170
|
+
const material = Materials.unlit([1, 0.5, 0.25, 1], { castShadow: false });
|
|
171
|
+
const world = new World();
|
|
172
|
+
const entity = world.spawn({
|
|
173
|
+
component: Points,
|
|
174
|
+
data: { sizePx: 4, shape: PointShapeValue.circle },
|
|
175
|
+
}).unwrap();
|
|
176
|
+
const admitted = admitPointsLines({
|
|
177
|
+
entity,
|
|
178
|
+
points: { sizePx: 4, shape: PointShapeValue.circle },
|
|
179
|
+
mesh: pointMesh,
|
|
180
|
+
material,
|
|
181
|
+
});
|
|
182
|
+
if (!admitted.ok) throw new Error(admitted.error.hint);
|
|
183
|
+
|
|
184
|
+
world.spawn({ component: Lines, data: { widthPx: 2 } }).unwrap();
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The style vocabulary is deliberately small in M1:
|
|
188
|
+
|
|
189
|
+
| Component | Field | Default | Accepted values |
|
|
190
|
+
|:--|:--|--:|:--|
|
|
191
|
+
| `Points` | `sizePx` | `4` | finite number greater than `0` |
|
|
192
|
+
| `Points` | `shape` | `square` | `square` or `circle` |
|
|
193
|
+
| `Lines` | `widthPx` | `1` | finite number greater than `0` |
|
|
194
|
+
|
|
195
|
+
Admission consumes one style component, one ordinary mesh topology, and one
|
|
196
|
+
unlit forward material. Indexed and non-indexed `point-list` meshes are valid
|
|
197
|
+
for `Points`; indexed and non-indexed paired `line-list` meshes are valid for
|
|
198
|
+
`Lines`.
|
|
199
|
+
|
|
200
|
+
| Candidate | M1 result | Reason |
|
|
201
|
+
|:--|:--:|:--|
|
|
202
|
+
| `Points` + `point-list` + finite positive `sizePx` + unlit forward material | supported | `square` and `circle` are the only point shapes |
|
|
203
|
+
| `Lines` + paired `line-list` + finite positive `widthPx` + unlit forward material | supported | each pair is one line segment |
|
|
204
|
+
| `line-strip`, triangle topology, mixed submeshes, or an odd line-list tail | refused | topology cannot be inferred or admitted atomically |
|
|
205
|
+
| both `Points` and `Lines` on one candidate | refused | one entity has one style lane |
|
|
206
|
+
| `Materials.standard`, shadow-caster, deferred, or another shader module | refused | M1 accepts one engine-owned unlit forward pass |
|
|
207
|
+
| candidate count over `maxPoints` or `maxSegments` | refused | bounded admission prevents partial publication |
|
|
208
|
+
|
|
209
|
+
When admission refuses a candidate, consume the structured result rather than
|
|
210
|
+
parsing its message. The result exposes `.code`, `.expected`, `.hint`, and a
|
|
211
|
+
code-specific `.detail` containing the relevant entity, component, mesh,
|
|
212
|
+
material, submesh, lane, generation, or stage facts:
|
|
213
|
+
|
|
214
|
+
```ts
|
|
215
|
+
const result = admitPointsLines({ entity, points: {}, mesh: pointMesh, material });
|
|
216
|
+
if (!result.ok) {
|
|
217
|
+
console.error(result.error.code);
|
|
218
|
+
console.error(result.error.expected);
|
|
219
|
+
console.error(result.error.hint);
|
|
220
|
+
console.error(result.error.detail);
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
M1 intentionally refuses strip expansion, joins, caps, dashes, picking, and
|
|
225
|
+
visible point/line draw preparation. Those are later implementation lanes, not
|
|
226
|
+
implicit fallbacks in authoring code.
|
|
227
|
+
|
|
228
|
+
## Points and Lines runtime contract
|
|
229
|
+
|
|
230
|
+
The complete public closure is `MeshAsset` topology, one `Points` or `Lines`
|
|
231
|
+
component, `Materials.unlit`, and the Standard renderer. The owner retains the
|
|
232
|
+
source view, derives expanded geometry during prepare, and records the dedicated
|
|
233
|
+
points-lines pipeline in the active main geometry pass. Applications do not
|
|
234
|
+
create a second mesh, GPU buffer, shader module, cache, recovery ledger, or
|
|
235
|
+
backend branch.
|
|
236
|
+
|
|
237
|
+
| Surface | Supported contract | Refused or not claimed |
|
|
238
|
+
|:--|:--|:--|
|
|
239
|
+
| topology | indexed or non-indexed `point-list` and paired `line-list` | strips, triangles, mixed topology, and odd line tails |
|
|
240
|
+
| style | finite positive `Points.sizePx` and `Lines.widthPx`; circle or square points | negative, non-finite, or lane-conflicting values |
|
|
241
|
+
| material | engine-owned `Materials.unlit` forward material | standard/PBR, deferred, shadow-only, or custom runtime shader |
|
|
242
|
+
| capability lane | direct WebGPU runtime; clustered unlit preserves the same authoring contract | CPU and WebGL2 require their declared capability route; no pixel result is inferred from RhiNull |
|
|
243
|
+
| structural lane | RhiNull records retained projection, preparation, bindings, and draw shape | RhiNull is never hardware or pixel evidence |
|
|
244
|
+
|
|
245
|
+
Prepare and record remain one lifecycle. A failed result is an owner fact, not a
|
|
246
|
+
request to fall back to a generic mesh draw. Inspect the structured error and
|
|
247
|
+
repair the source or producer, then retry the same renderer:
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
const inspection = renderer.inspect();
|
|
251
|
+
const pointsLines = inspection.renderScene.pointsLines;
|
|
252
|
+
// Repair the named source or producer, then retry inspection and draw.
|
|
253
|
+
report(pointsLines);
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Inspection reports source bytes, derived bytes, vertex/index counts, cache
|
|
257
|
+
state, upload state, draw count, lane, and the retained `lastKnownGood` state.
|
|
258
|
+
Recovery is `inspect -> producer rebuild or cold-cook -> prepare -> record`.
|
|
259
|
+
It never publishes a partial expansion and never hides a stale-generation or
|
|
260
|
+
missing-resource error.
|
|
261
|
+
|
|
262
|
+
For visual evidence, use the topology probe and retain its raw screenshot,
|
|
263
|
+
readback, source/derived byte counts, draw count, and validation errors. A
|
|
264
|
+
focused direct-WebGPU probe is evidence for that lane only. The repository-wide
|
|
265
|
+
`pnpm test:browser` gate was explicitly skipped by human override in this
|
|
266
|
+
milestone and must not be reported as passed; the controlled Dawn attempt
|
|
267
|
+
timed out during environment build before Dawn Vitest ran.
|
|
268
|
+
|
|
269
|
+
The M5 boundary does not include strip joins, caps, dashes, picking, a new CLI
|
|
270
|
+
or RPC operation, application-local WGSL, a second Geometry factory, or a
|
|
271
|
+
separate cache/recovery authority.
|
|
272
|
+
|
|
392
273
|
> [!IMPORTANT]
|
|
393
274
|
> Owner: render vocabulary and the extract → prepare → record frame boundary. Runtime selects concrete services and calls this package; it does not re-own these tokens.
|
|
394
275
|
|
|
395
276
|
```ts
|
|
396
|
-
import {
|
|
397
|
-
Camera,
|
|
398
|
-
materialTextureValue,
|
|
399
|
-
MeshFilter,
|
|
400
|
-
MeshRenderer,
|
|
401
|
-
} from '@forgeax/engine-render';
|
|
277
|
+
import { Camera, MeshFilter, MeshRenderer } from '@forgeax/engine-render';
|
|
402
278
|
import { createRenderer } from '@forgeax/engine-runtime';
|
|
403
279
|
|
|
404
280
|
const renderer = await createRenderer(canvas);
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
if (ready.ok && attached.ok) {
|
|
281
|
+
const attached = renderer.attach(world);
|
|
282
|
+
if (attached.ok) {
|
|
408
283
|
world.update(1 / 60).unwrap();
|
|
409
|
-
renderer.draw(
|
|
284
|
+
renderer.draw({
|
|
285
|
+
leases: [attached.value],
|
|
286
|
+
camera: { lease: attached.value },
|
|
287
|
+
environment: { lease: attached.value },
|
|
288
|
+
});
|
|
410
289
|
}
|
|
411
|
-
|
|
412
|
-
// A numeric texture handle is normalized into the structured material slot.
|
|
413
|
-
const values = { baseColorTexture: materialTextureValue(textureHandle) };
|
|
414
290
|
```
|
|
415
291
|
|
|
416
|
-
|
|
417
|
-
and keep `baseColorTexture` on the same `paramSchema -> derive -> cook/load ->
|
|
418
|
-
extract/record` path.
|
|
419
|
-
|
|
420
|
-
`attachWorld` installs renderer-required derived-state systems once. Hosts built
|
|
292
|
+
`attach` installs renderer-required derived-state systems once. Hosts built
|
|
421
293
|
with `createApp` get this wiring automatically. A custom loop attaches each
|
|
422
294
|
World before its first update, then keeps `draw` as a read-only consumer of the
|
|
423
295
|
state published by `World.update()`.
|
|
@@ -425,12 +297,10 @@ state published by `World.update()`.
|
|
|
425
297
|
## Persistent render scene
|
|
426
298
|
|
|
427
299
|
The ordinary single-World path bootstraps one renderer-owned CPU projection,
|
|
428
|
-
then drains the World's bounded change journal.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
renderable archetypes; transform changes update only their stable projection
|
|
433
|
-
slots. Unrelated gameplay component writes do not invalidate render state.
|
|
300
|
+
then drains the World's bounded change journal. A no-change frame reuses the
|
|
301
|
+
last visible snapshot without traversing renderable archetypes; transform
|
|
302
|
+
changes update only their stable projection slots. Unrelated gameplay
|
|
303
|
+
component writes do not invalidate render state.
|
|
434
304
|
|
|
435
305
|
Mutable shared payloads use the same explicit-dirty rule: mutate the resolved
|
|
436
306
|
payload, then call `world.sharedRefs.markChanged(handle)`. The renderer compares
|
|
@@ -458,7 +328,7 @@ are real driver/pixel proofs for the GPU-driven boundary; they do not make
|
|
|
458
328
|
RhiNull a pixel backend or make the CPU projection cease to be the scene
|
|
459
329
|
authority.
|
|
460
330
|
|
|
461
|
-
Inspect the current path through `renderer.
|
|
331
|
+
Inspect the current path through `renderer.inspect()`. Its detached CPU snapshot exposes
|
|
462
332
|
full rebuilds, no-change and delta frames, transform/material/instance updates,
|
|
463
333
|
removals, the journal cursor, projection cardinality, and the last resync
|
|
464
334
|
reason. The nested `gpu` status is one of `inactive`, `unsupported`, `resident`,
|
|
@@ -466,7 +336,9 @@ reason. The nested `gpu` status is one of `inactive`, `unsupported`, `resident`,
|
|
|
466
336
|
upload ranges and bytes, grows, clears, rebuilds, and no-change frames. The
|
|
467
337
|
`gpuDriven` inspection reports whether stable frames materialized or validated
|
|
468
338
|
GPU-owned rows and whether candidate or batch topology bytes were uploaded.
|
|
469
|
-
GPU errors
|
|
339
|
+
GPU and renderer contract errors arrive through the single `renderer.subscribe`
|
|
340
|
+
event stream (`event.kind === 'error'`); the renderer does not expose a second
|
|
341
|
+
error listener registry.
|
|
470
342
|
|
|
471
343
|
## GPU-driven view kernel
|
|
472
344
|
|
|
@@ -480,28 +352,27 @@ primitive world transform with each ordinary instance-local transform, writes a
|
|
|
480
352
|
compact `(instanceIndex, materialIndex)` stream, sets explicit overflow flags,
|
|
481
353
|
and emits indirect arguments with `firstInstance = 0`.
|
|
482
354
|
|
|
483
|
-
The
|
|
355
|
+
The Standard frame activates the production raster lane when compute, storage
|
|
484
356
|
buffers, and indirect drawing are available. The current lane accepts opaque,
|
|
485
357
|
rigid default-unlit passes with batch-stable render state, ordinary instances,
|
|
486
358
|
indexed or non-indexed geometry, multiple submeshes and material slots, and the
|
|
487
359
|
canonical `12F` vertex layout. It also accepts persistent rigid multi-World
|
|
488
|
-
composition
|
|
489
|
-
|
|
490
|
-
projection rather than the CPU-visible snapshot. The same typed graph imports the scene and mesh
|
|
360
|
+
composition. Candidates come from the complete persistent projection rather
|
|
361
|
+
than the CPU-visible snapshot. The same typed graph imports the scene and mesh
|
|
491
362
|
buffers, runs the three compute passes, and consumes generated arguments with
|
|
492
363
|
`drawIndexedIndirect` or `drawIndirect`. Entities accepted by that lane are not
|
|
493
364
|
also validated, uploaded, or recorded by the CPU forward loop on a stable
|
|
494
365
|
frame.
|
|
495
366
|
|
|
496
|
-
|
|
367
|
+
clustered, PBR and custom shader variants, texture/sampler/video resource bindings,
|
|
497
368
|
transparent meshes, skinning, morphing, non-canonical layouts, and shadow views
|
|
498
369
|
keep explicit CPU or specialized lanes. WebGL2 selects capability fallback from
|
|
499
370
|
the same persistent projection; it does not emulate compute. Visibility and
|
|
500
371
|
hierarchy changes, non-rigid multi-World composition, and some prepared-resource
|
|
501
372
|
changes still require bounded reconcile work. The implemented lane proves a
|
|
502
373
|
zero-upload stable data path and broad rigid geometry coverage, but hardware
|
|
503
|
-
100k timing, schema-derived material variants,
|
|
504
|
-
|
|
374
|
+
100k timing, schema-derived material variants, stable world identities, and
|
|
375
|
+
GPU-driven shadows remain required before declaring P3 complete.
|
|
505
376
|
|
|
506
377
|
The bounded inspection reports topology revision, candidates, batches, visible
|
|
507
378
|
capacity, buffer capacities, update count, upload bytes, rebuild count, and CPU
|
|
@@ -509,7 +380,7 @@ fallback rows. RhiNull verifies graph dependency order and stable-frame zero
|
|
|
509
380
|
work; Dawn and Chromium verification consume indexed, non-indexed,
|
|
510
381
|
multi-submesh, and instanced arguments, read persistent scene tables in the
|
|
511
382
|
vertex path, and compare the resulting pixel. The renderer-level RhiNull
|
|
512
|
-
integration also proves that the built-in
|
|
383
|
+
integration also proves that the built-in Standard graph contains the compute chain
|
|
513
384
|
before `main`, including rigid multi-World composition, without GPU plus CPU
|
|
514
385
|
duplicate draws. The renderer retains one graph, one compile owner, one
|
|
515
386
|
encoder, and one submit route.
|
|
@@ -522,71 +393,11 @@ encoder, and one submit route.
|
|
|
522
393
|
> semantics; later coverage can make those changes entity-local without adding
|
|
523
394
|
> another scene authority.
|
|
524
395
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
conflict. Awaiting also completes the feature's declared material-shader
|
|
531
|
-
prewarm, so its first prepared draw observes the same ready barrier as a
|
|
532
|
-
boot-time feature.
|
|
533
|
-
|
|
534
|
-
This is the graph-only Wave 1 feature route; prepared graphics and late shader
|
|
535
|
-
prewarm extend the same lifecycle for production asset features.
|
|
536
|
-
|
|
537
|
-
When a late-installed feature remains registered through device loss, its declared material
|
|
538
|
-
shaders remain part of the renderer's live prewarm set. `await renderer.recover()` therefore
|
|
539
|
-
rebuilds those modules before the next prepared draw rather than relying on a one-frame retry.
|
|
540
|
-
|
|
541
|
-
For capability composition, `rendererPlugin(renderer)` provides the Host-owned
|
|
542
|
-
renderer and `renderFeaturePlugin(feature)` binds installation to a Cordis
|
|
543
|
-
Fiber. Fiber disposal calls `uninstallRenderFeature`, waits for submitted GPU
|
|
544
|
-
work, releases prepared batches/resources, and removes the feature's shader
|
|
545
|
-
prewarm declarations before the disposer resolves. The Fiber is never queried
|
|
546
|
-
inside extract, prepare, record, RenderGraph execution, or an RHI command loop.
|
|
547
|
-
|
|
548
|
-
When an App or Engine Worker owns the host-created Renderer itself, it installs
|
|
549
|
-
`ownedRendererPlugin(renderer)`. The same Provider publishes the renderer
|
|
550
|
-
Service and calls `Renderer.dispose()` after dependent capability Fibers have
|
|
551
|
-
unwound. Assemble-form Apps use borrowed `rendererPlugin(renderer)` instead.
|
|
552
|
-
|
|
553
|
-
```ts
|
|
554
|
-
const fiber = await app.pluginContext.plugin(renderFeaturePlugin(feature));
|
|
555
|
-
await fiber.dispose();
|
|
556
|
-
```
|
|
557
|
-
|
|
558
|
-
Boot-time `features: [...]` remains the direct renderer-construction path. Use
|
|
559
|
-
the plugin helper when the feature belongs to an optional or reloadable
|
|
560
|
-
capability whose lifetime must be reversible.
|
|
561
|
-
|
|
562
|
-
### Built-in pipeline identity and cleanup
|
|
563
|
-
|
|
564
|
-
The built-in Universal Render Pipeline is registered under the stable public
|
|
565
|
-
identifier `URP_PIPELINE_ID` (`'forgeax::urp'`). Import the identifier from the
|
|
566
|
-
public `@forgeax/engine-render` entry when constructing a
|
|
567
|
-
`RenderPipelineAsset`; the `urpPipeline` implementation remains engine-owned.
|
|
568
|
-
|
|
569
|
-
```ts
|
|
570
|
-
import { URP_PIPELINE_ID } from '@forgeax/engine-render';
|
|
571
|
-
|
|
572
|
-
const asset = {
|
|
573
|
-
kind: 'render-pipeline',
|
|
574
|
-
pipelineId: URP_PIPELINE_ID,
|
|
575
|
-
config: {},
|
|
576
|
-
};
|
|
577
|
-
const cleanup = renderer.installPipeline(asset);
|
|
578
|
-
if (cleanup.ok) {
|
|
579
|
-
// Keep this disposer with the Renderer / Fiber that installed the asset.
|
|
580
|
-
cleanup.value();
|
|
581
|
-
}
|
|
582
|
-
```
|
|
583
|
-
|
|
584
|
-
> [!IMPORTANT]
|
|
585
|
-
> Pipeline, post-process, and RenderFeature registrations belong to a
|
|
586
|
-
> Renderer instance and must be disposed with that instance or its owning
|
|
587
|
-
> Fiber. Do not add a module-level `installed` set or reach through
|
|
588
|
-
> `renderer.store`; those are lifecycle and allocation internals, not public
|
|
589
|
-
> extension state.
|
|
396
|
+
Features are supplied through the construction options (`features: [...]`) and
|
|
397
|
+
enter the same host-owned extract → plan → graph projection path. The public
|
|
398
|
+
`Renderer` intentionally has no install/uninstall methods: optional capability
|
|
399
|
+
lifetime belongs to the App host, while recovery re-runs the plan against the
|
|
400
|
+
replacement device generation.
|
|
590
401
|
|
|
591
402
|
| This package owns | Excluded concepts |
|
|
592
403
|
|:--|:--|
|
|
@@ -657,92 +468,68 @@ const renderer = await createRenderer(canvas, { profiler });
|
|
|
657
468
|
```
|
|
658
469
|
|
|
659
470
|
Use the package's `validateProfileCapture` and `buildProfileModel` entries for offline analysis.
|
|
660
|
-
The render package remains the owner of render vocabulary and extract/
|
|
471
|
+
The render package remains the owner of render vocabulary and extract/plan/record execution.
|
|
661
472
|
|
|
662
473
|
## RenderFeature: the producer seam
|
|
663
474
|
|
|
664
475
|
Register one producer-owned feature at the renderer assembly boundary. The
|
|
665
|
-
same `FrameData` type flows through `extract
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
execute/submit boundary.
|
|
476
|
+
same `FrameData` type flows through `extract` and the mandatory `plan`; the
|
|
477
|
+
host derives preparation, graph access, recording, and lifecycle isolation
|
|
478
|
+
from that one plan. Both paths execute inside the active RenderGraph and the
|
|
479
|
+
frame's single execute/submit boundary.
|
|
670
480
|
|
|
671
|
-
The smallest
|
|
672
|
-
|
|
481
|
+
The smallest feature returns a closed plan with named resources and passes.
|
|
482
|
+
Graph access is derived from those declarations; there is no staging object or
|
|
483
|
+
second contribution API:
|
|
673
484
|
|
|
674
485
|
```ts
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
486
|
+
plan: (frame, context) => ok({
|
|
487
|
+
resources: [
|
|
488
|
+
{ kind: 'compute-program', name: 'compact.program', program },
|
|
489
|
+
{ kind: 'compute-bindings', name: 'compact.bindings', program: 'compact.program', entries },
|
|
490
|
+
],
|
|
491
|
+
passes: [{
|
|
492
|
+
kind: 'compute', name: 'compact', program: 'compact.program',
|
|
493
|
+
bindings: 'compact.bindings', dispatches,
|
|
494
|
+
}],
|
|
495
|
+
})
|
|
680
496
|
```
|
|
681
497
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
498
|
+
The plan contains cooked program descriptors, named buffers and bindings, logical
|
|
499
|
+
targets, and draw/dispatch commands. Graph buffer and texture access is derived
|
|
500
|
+
from those roles; producers never author a second `reads`/`writes` ledger and
|
|
501
|
+
never receive an encoder or submit authority.
|
|
686
502
|
|
|
687
503
|
### Five render terms
|
|
688
504
|
|
|
689
505
|
| Term | Meaning | Owner |
|
|
690
506
|
|:--|:--|:--|
|
|
691
|
-
| `RenderFeature` | Producer-owned extract/
|
|
692
|
-
| `
|
|
693
|
-
| RenderGraph pass | One declared graph execution node
|
|
507
|
+
| `RenderFeature` | Producer-owned extract/plan callbacks and frame data | Feature producer |
|
|
508
|
+
| `Standard Pipeline` | The single frame policy containing the supported capability/profile lanes | Render host |
|
|
509
|
+
| RenderGraph pass | One declared graph execution node in the active Standard Pipeline | Graph host |
|
|
694
510
|
| Material pass | One shader-facing pass in a `MaterialAsset` | Material asset |
|
|
695
|
-
|
|
|
696
|
-
| Prepared GPU work | Opaque persistent compute program, binding, buffer, dispatch, and indirect-draw references | Render host |
|
|
511
|
+
| RenderFeaturePlan | One executable declaration of resources, bindings, targets, and commands | Feature producer |
|
|
697
512
|
|
|
698
513
|
### Prepared compute resources
|
|
699
514
|
|
|
700
|
-
`RenderFeature` producers
|
|
701
|
-
uniform/storage buffers, and dispatches. The renderer
|
|
702
|
-
|
|
515
|
+
`RenderFeature` producers declare cooked compute pipelines, reflected name-based bindings,
|
|
516
|
+
uniform/storage buffers, and dispatches. The renderer prepares those declarations,
|
|
517
|
+
imports the persistent buffers into the render graph, and derives `uniform-read`,
|
|
703
518
|
`storage-read`, or `storage-read-write` access. Producers do not repeat a string `reads/writes`
|
|
704
519
|
ledger and do not receive an encoder.
|
|
705
520
|
|
|
706
|
-
Compute and graphics passes use the same
|
|
707
|
-
owns `beginComputePass` / `end`;
|
|
708
|
-
commands
|
|
521
|
+
Compute and graphics passes use the same plan projection and submission boundary. The graph
|
|
522
|
+
owns `beginComputePass` / `end`; the plan records only named pipeline, bind group, and dispatch
|
|
523
|
+
commands. Persistent buffers retain device identity across frames,
|
|
709
524
|
rebuild with the feature-host generation, and retire only after queue completion. A storage buffer
|
|
710
525
|
may also be consumed as renderer-declared vertex data.
|
|
711
526
|
|
|
712
527
|
Feature contexts never expose raw GPU graphics state, a complete pipeline
|
|
713
|
-
context, submit authority, or a command encoder. They expose
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
data, attachments, and draw records. Both paths execute inside the active
|
|
719
|
-
RenderGraph and the frame's single execute/submit boundary. The active RenderGraph
|
|
720
|
-
owns that frame boundary. Do not cast either context to a raw device or encoder. See
|
|
721
|
-
[`features/graph-contribution.ts`](src/features/graph-contribution.ts) for the
|
|
722
|
-
staging shape.
|
|
723
|
-
|
|
724
|
-
The copyable recipe above is therefore a graph-only Wave 1 feature; it stops at
|
|
725
|
-
the graph seam and does not provide a production particle draw path.
|
|
726
|
-
|
|
727
|
-
### Prepared graphics recipe
|
|
728
|
-
|
|
729
|
-
Prepared graphics extends the existing graph-owned staging seam with five
|
|
730
|
-
opaque reference kinds. A producer requests preparation during `prepare`,
|
|
731
|
-
retains only the returned references, and contributes declarative records. The
|
|
732
|
-
render host owns generation checks, graph composition, recording, and submit.
|
|
733
|
-
|
|
734
|
-
Persistent GPU work follows the same ownership rule. A feature may retain opaque bindings for an
|
|
735
|
-
active producer; bindings retain their transitive program and buffers. Untouched resources are
|
|
736
|
-
detached after a successful feature frame and destroyed after queue completion, never while an
|
|
737
|
-
in-flight command can still reference them.
|
|
738
|
-
|
|
739
|
-
Prepare opaque references through `context.graphics` and, when compute is
|
|
740
|
-
available, `context.gpu`; retain those references in producer-owned frame data
|
|
741
|
-
and consume them only through `addComputePass` and `addGraphicsPass` during
|
|
742
|
-
`contribute`. The executable contract examples live in
|
|
743
|
-
[`render-feature-graph.integration.test.ts`](src/__tests__/render-feature-graph.integration.test.ts)
|
|
744
|
-
and
|
|
745
|
-
[`render-feature-gpu-work.integration.test.ts`](src/__tests__/render-feature-gpu-work.integration.test.ts).
|
|
528
|
+
context, submit authority, or a command encoder. They expose immutable
|
|
529
|
+
capabilities and logical targets for plan construction. The active RenderGraph
|
|
530
|
+
owns the frame boundary; do not cast a plan context to a backend object or
|
|
531
|
+
encoder. The executable contract examples live in the plan-focused tests under
|
|
532
|
+
`src/record/__tests__` and `src/features`.
|
|
746
533
|
|
|
747
534
|
### Failure and recovery
|
|
748
535
|
|
|
@@ -756,19 +543,17 @@ consume the structured `error.detail` context.
|
|
|
756
543
|
|:--|:--|
|
|
757
544
|
| `active` | Continue the next frame |
|
|
758
545
|
| `failed` / `render-feature-stage-failed` | Correct producer data and retry on the next frame |
|
|
759
|
-
| `disabled` / `render-feature-capability-missing` | Provide the capability on a replacement device; after device-loss recovery call `await renderer.recover()`. On a live renderer,
|
|
546
|
+
| `disabled` / `render-feature-capability-missing` | Provide the capability on a replacement device; after device-loss recovery call `await renderer.recover()`. On a live renderer, the public recovery boundary returns a structured renderer-state-invalid result, so rebuild on a capable device instead. |
|
|
760
547
|
| `render-feature-registration-conflict` | Fix identity/order at registration |
|
|
761
|
-
| `render-feature-pass-order-conflict` | Reorder the declared dependency and
|
|
548
|
+
| `render-feature-pass-order-conflict` | Reorder the declared dependency and re-plan on the next frame |
|
|
762
549
|
| `render-feature-preparation-failed` | Repair the named prepared resource and retry on the action in `error.detail.recovery`; after device loss, verify that the feature's declared shader was included in the recovery prewarm set |
|
|
763
550
|
| `render-feature-prepared-state-mismatch` | Read the discriminated `error.detail.reason`, repair the generation/layout/format mismatch, and retry |
|
|
764
551
|
| `render-feature-draw-recording-failed` | Read `error.detail.backendReason`, then retry after the host reports renderer recovery |
|
|
765
552
|
| `disposed` | Terminal; create a new renderer/feature registration |
|
|
766
553
|
|
|
767
|
-
Use `renderer.
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
The host still uses `renderer.registerPipeline(id, pipeline)` for a full
|
|
771
|
-
pipeline change.
|
|
554
|
+
Use `renderer.inspect()` for a read-only snapshot. Call `renderer.dispose()`
|
|
555
|
+
once or repeatedly; disposal is idempotent. Feature plans are assembled once
|
|
556
|
+
and the Standard host owns graph replacement and last-known-good recovery.
|
|
772
557
|
|
|
773
558
|
For a temporary presentation-owner handoff, call `renderer.releaseSurface()`.
|
|
774
559
|
It unconfigures the canvas and makes `draw()` fail closed without disposing the
|
|
@@ -778,9 +563,9 @@ next draw. Both calls are idempotent; `dispose()` remains the terminal path.
|
|
|
778
563
|
|
|
779
564
|
For the complete declaration shape, read
|
|
780
565
|
[`features/types.ts`](src/features/types.ts) and
|
|
781
|
-
[`features/
|
|
782
|
-
|
|
783
|
-
|
|
566
|
+
[`features/plan.ts`](src/features/plan.ts). For Standard profile and lane
|
|
567
|
+
selection, read the internal pipeline implementation through the host seam;
|
|
568
|
+
there is no public full-pipeline registration API. The producer
|
|
784
569
|
asset contract is [`@forgeax/engine-vfx`](../vfx/README.md), while graph
|
|
785
570
|
ownership is [`@forgeax/engine-render-graph`](../render-graph/README.md).
|
|
786
571
|
|
|
@@ -806,120 +591,23 @@ import {
|
|
|
806
591
|
GlyphText,
|
|
807
592
|
SpriteAnimation,
|
|
808
593
|
Tilemap,
|
|
809
|
-
|
|
810
|
-
TRANSPARENT_SORT_MODE_LAYER_Y,
|
|
594
|
+
TransparentSort,
|
|
811
595
|
} from '@forgeax/engine-render/authoring';
|
|
812
596
|
```
|
|
813
597
|
|
|
814
|
-
`authoring` also owns the
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
The root barrel does not expose frame stores or extract/prepare/record owners.
|
|
819
|
-
Custom pipelines use `RenderPipeline.build`, typed targets, and typed graph
|
|
820
|
-
primitives; the renderer owns graph compilation and submission.
|
|
821
|
-
|
|
822
|
-
`@forgeax/engine-render/internal` is an engine-owned assembly seam, not an
|
|
823
|
-
application API or a compatibility route. Imports from `/internal` under the
|
|
824
|
-
private `apps/` tree are engine dogfood for assembly coverage, not application
|
|
825
|
-
recipes. First-party packages may use it while the engine is assembled;
|
|
826
|
-
application code should not copy those imports. Its
|
|
827
|
-
surface can change without a consumer migration promise. If a custom renderer
|
|
828
|
-
needs a capability absent from the supported root operations, treat that as a
|
|
829
|
-
request for an explicit public design rather than importing `/internal`.
|
|
830
|
-
|
|
831
|
-
For a custom `RenderPipeline` with `Camera.antialias = ANTIALIAS_MSAA`, create
|
|
832
|
-
count-4 scene colour/depth targets plus a single-sample resolve target, then pass
|
|
833
|
-
the typed resolve target to `addTypedScenePass`. Downstream passes read that
|
|
834
|
-
resolved handle; single-sample pipelines omit it.
|
|
835
|
-
|
|
836
|
-
## Temporal antialiasing contract
|
|
837
|
-
|
|
838
|
-
`Camera.antialias = ANTIALIAS_TAA` selects the renderer-owned temporal path. The fixed v1 order is linear scene color -> temporal raster -> one TAA resolve -> bloom -> tone/output/debug/UI. `Camera.historyVersion` is the explicit reset authority; increment it after a camera cut or other discontinuity.
|
|
839
|
-
|
|
840
|
-
> [!IMPORTANT]
|
|
841
|
-
> Read `renderer.renderScene.temporal` after `draw()`. It is the bounded inspection SSOT for history bytes, reset reason, coverage, failure, and recovery. Applications must not retain graph textures or create a parallel history registry.
|
|
842
|
-
|
|
843
|
-
The none, FXAA, and MSAA lanes allocate zero TAA history and record neither `scene-temporal-clear` nor `taa-resolve`. The permanent real-backend oracle is [`apps/hello/taa`](../../apps/hello/taa/README.md).
|
|
844
|
-
|
|
845
|
-
The main scene raster is the only jittered domain. Temporal replay uses unjittered current and previous view projection matrices plus its own cleared depth attachment; reusing main depth would compare unjittered fragments against jittered visibility. The packed `rgba16float` payload is `(currentUv - previousUv, log2(1 + viewDepth), reactive)`. Clip payloads use linear interpolation so previous projection remains a geometric authority rather than a perspective-correct material varying.
|
|
846
|
-
|
|
847
|
-
Resolve and both history textures live in the unjittered output domain. Current scene color is therefore sampled at `uv + currentJitterUv`, while history is sampled at `uv - velocity`. This is the same coordinate transform as the jittered-domain form `uvJittered - velocity + (previousJitter - currentJitter)`: storing the previous resolve unjittered removes the previous-jitter term instead of dropping jitter correction. The v1 preset keeps hard UV/depth rejection, 3 x 3 current-neighborhood clipping, alpha preservation, and a fixed luminance-adaptive feedback range of 0.88 through 0.97 further reduced by reactive, velocity, depth, and startup factors.
|
|
848
|
-
|
|
849
|
-
### AI-user recipe: TAA, reset, and recovery
|
|
850
|
-
|
|
851
|
-
Enable TAA on the existing `Camera` and treat `historyVersion` as an explicit discontinuity counter. Do not increment it for ordinary camera motion.
|
|
852
|
-
|
|
853
|
-
```ts
|
|
854
|
-
import { ANTIALIAS_TAA, Camera } from '@forgeax/engine-render';
|
|
855
|
-
|
|
856
|
-
const camera = world.spawn({
|
|
857
|
-
component: Camera,
|
|
858
|
-
data: {
|
|
859
|
-
fov: Math.PI / 4,
|
|
860
|
-
aspect: 16 / 9,
|
|
861
|
-
near: 0.1,
|
|
862
|
-
far: 100,
|
|
863
|
-
antialias: ANTIALIAS_TAA,
|
|
864
|
-
historyVersion: 0,
|
|
865
|
-
},
|
|
866
|
-
}).unwrap();
|
|
867
|
-
|
|
868
|
-
let historyVersion = 0;
|
|
869
|
-
function resetHistoryAfterCameraCut(): void {
|
|
870
|
-
historyVersion += 1;
|
|
871
|
-
world.set(camera, Camera, { historyVersion }).unwrap();
|
|
872
|
-
}
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
Register `onError` before the first draw, handle the returned `Result`, then read the bounded inspection after the draw. The inspection is the recovery authority; the error listener preserves the exact structured failure that caused it.
|
|
876
|
-
|
|
877
|
-
```ts
|
|
878
|
-
const stopErrors = renderer.onError((error) => reportRenderError(error));
|
|
879
|
-
const drawn = renderer.draw([world], { cameraOwner: 0, resourceOwner: 0 });
|
|
880
|
-
if (!drawn.ok) reportRenderError(drawn.error);
|
|
881
|
-
|
|
882
|
-
const temporal = renderer.renderScene.temporal;
|
|
883
|
-
if (temporal.recovery !== 'none') {
|
|
884
|
-
reportTemporalRecovery(temporal.recovery, temporal.failure, temporal.coverage);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
stopErrors();
|
|
888
|
-
```
|
|
889
|
-
|
|
890
|
-
| `temporal.recovery` | Owner action |
|
|
891
|
-
|:--|:--|
|
|
892
|
-
| `none` | Continue; a stable submitted frame owns valid history. |
|
|
893
|
-
| `seed-history` | Submit the next continuous frame; increment `historyVersion` only for a real discontinuity. |
|
|
894
|
-
| `enable-temporal-capabilities` | Recreate the renderer on a device with `rgba16float` rendering and at least two color attachments. |
|
|
895
|
-
| `fix-temporal-pipeline-topology` | Repair the custom pipeline's target domain, attachment, or resolve count. |
|
|
896
|
-
| `complete-temporal-coverage` | Find `coverage.missingContributorIds`; make each producer exact or reactive. |
|
|
897
|
-
| `retry-frame` | Retry after the submit failure; aborted frames never advance history. |
|
|
898
|
-
| `rebuild-renderer` | Call `await renderer.recover()` after device loss and handle its `Result`. |
|
|
899
|
-
|
|
900
|
-
### Custom pipeline temporal seam
|
|
598
|
+
`authoring` also owns the grouped transparent-bucket configuration values. A
|
|
599
|
+
consumer that composes sprites with an existing 3D game can call
|
|
600
|
+
`TransparentSort.configure(world, { mode: TransparentSort.layerY, yzAlpha: 1 })`;
|
|
601
|
+
it should not reach into `/internal`.
|
|
901
602
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
const features = context.contributeFeatures([
|
|
906
|
-
sceneColorTarget,
|
|
907
|
-
sceneDepthTarget,
|
|
908
|
-
sceneTemporalTarget,
|
|
909
|
-
]);
|
|
910
|
-
if (!features.ok) return features;
|
|
911
|
-
|
|
912
|
-
const resolved = context.resolveTemporal({
|
|
913
|
-
sceneColor: sceneColorTarget,
|
|
914
|
-
sceneDepth: sceneDepthTarget,
|
|
915
|
-
sceneTemporal: sceneTemporalTarget,
|
|
916
|
-
});
|
|
917
|
-
if (!resolved.ok) return resolved;
|
|
918
|
-
|
|
919
|
-
const postInput = resolved.value?.resolvedColor ?? sceneColorTarget;
|
|
920
|
-
```
|
|
603
|
+
The root barrel does not expose frame stores or extract/plan/record owners.
|
|
604
|
+
Applications contribute work through `RenderFeature` plans; the Standard
|
|
605
|
+
renderer owns graph compilation and submission.
|
|
921
606
|
|
|
922
|
-
The
|
|
607
|
+
The render package has one narrow construction seam owned by the host. It is
|
|
608
|
+
not an application API or a compatibility route. Standard profile and
|
|
609
|
+
capability lanes own MSAA target selection and resolve; applications do not
|
|
610
|
+
replace the frame topology.
|
|
923
611
|
|
|
924
612
|
```mermaid
|
|
925
613
|
flowchart LR
|
|
@@ -947,7 +635,7 @@ const snapshot = resolveVisibility(world);
|
|
|
947
635
|
|:--|:--|:--|
|
|
948
636
|
| Author intent | `Visibility.state` is `inherited`, `hidden`, or `visible` | Read the ECS field or reflected `labels` |
|
|
949
637
|
| Effective state | `resolveVisibility(world).effective(entity)` applies valid scene parents | Inspect `snapshot.diagnostics` and `VisibilityResolution.source` |
|
|
950
|
-
| Render result | Render producers skip hidden candidates before material work | Read `renderer.visibilityStats`; it is not a frustum or picking metric |
|
|
638
|
+
| Render result | Render producers skip hidden candidates before material work | Read `renderer.inspect().visibilityStats`; it is not a frustum or picking metric |
|
|
951
639
|
|
|
952
640
|
If the state write returns an error, preserve `code`, `expected`, `hint`, and
|
|
953
641
|
`detail`, correct the enum value, and retry through `world.set`. If hierarchy
|
|
@@ -957,63 +645,3 @@ hide the issue with a custom mesh, camera workaround, or material substitute.
|
|
|
957
645
|
Out of scope: camera frustum policy, picking, app lifecycle, asset import, and
|
|
958
646
|
VFX shadow behavior. `@forgeax/engine-vfx-render` remains the producer-owned
|
|
959
647
|
particle bridge and consumes the same effective visibility boundary.
|
|
960
|
-
|
|
961
|
-
## Analytic atmosphere: one source, one submitted generation
|
|
962
|
-
|
|
963
|
-
The analytic environment route has one authoring source and one renderer-owned
|
|
964
|
-
submission transaction. `Atmosphere` contains exactly five medium fields; the
|
|
965
|
-
resource-owner selector enforces one Atmosphere source per World (the ECS schema
|
|
966
|
-
does not carry cardinality policy);
|
|
967
|
-
Sun direction, colour and illuminance belong to the co-located
|
|
968
|
-
`DirectionalLight` entity. The app never selects an atmosphere Skybox mode and
|
|
969
|
-
never owns an evaluator, cache, lifecycle ledger, encoder or queue submit.
|
|
970
|
-
|
|
971
|
-
```ts
|
|
972
|
-
const sunEntity = world.spawn(
|
|
973
|
-
{ component: Atmosphere, data: {
|
|
974
|
-
turbidity: 2.4,
|
|
975
|
-
rayleigh: 1.1,
|
|
976
|
-
mieCoefficient: 0.006,
|
|
977
|
-
mieDirectionalG: 0.78,
|
|
978
|
-
sunAngularRadius: 0.004675,
|
|
979
|
-
} },
|
|
980
|
-
{ component: DirectionalLight, data: {
|
|
981
|
-
direction: [0.35, -0.88, -0.2],
|
|
982
|
-
color: [1, 0.93, 0.82],
|
|
983
|
-
intensity: 2.2,
|
|
984
|
-
} },
|
|
985
|
-
).unwrap();
|
|
986
|
-
|
|
987
|
-
world.update(1 / 60).unwrap();
|
|
988
|
-
const frame = renderer.draw([world], { cameraOwner: 0, resourceOwner: 0 });
|
|
989
|
-
if (!frame.ok) reportRenderError(frame.error);
|
|
990
|
-
const submitted = renderer.renderScene.environment;
|
|
991
|
-
```
|
|
992
|
-
|
|
993
|
-
The final line is a bounded projection of the existing Renderer generation
|
|
994
|
-
transaction. It reports state, source World/entity, desired/active signature,
|
|
995
|
-
device generation, bytes, rebuild facts, failure/LKG and temporal publish/reset
|
|
996
|
-
facts. It does not expose GPU handles or mutable caches.
|
|
997
|
-
|
|
998
|
-
| Failure observation | Exhaustive recovery action |
|
|
999
|
-
|:--|:--|
|
|
1000
|
-
| `environment-source-conflict` | Keep exactly one image or Atmosphere source and retry extract. |
|
|
1001
|
-
| `atmosphere-sun-missing` | Add the co-located `DirectionalLight`; do not invent a second Sun store. |
|
|
1002
|
-
| `atmosphere-capability-insufficient` | Admit only the M0 capability matrix result or fail closed. |
|
|
1003
|
-
| `atmosphere-producer-failed` | Read the stage, preserve LKG, repair the producer and retry the same Renderer owner. |
|
|
1004
|
-
| `render-feature-*` / `webgpu-runtime-error` | Read the discriminated `code`/`detail`, abort the frame transaction and follow its explicit recovery. |
|
|
1005
|
-
|
|
1006
|
-
> [!WARNING]
|
|
1007
|
-
> `Fog`, day/night automation, clouds, aerial perspective, astronomy, auto
|
|
1008
|
-
> exposure and a high-frequency time-of-day system are not implemented by this
|
|
1009
|
-
> route. A compatibility alias, conceptual wrapper, second evaluator/cache or
|
|
1010
|
-
> second submit/lifecycle owner would fail the one-cut audit.
|
|
1011
|
-
|
|
1012
|
-
<details>
|
|
1013
|
-
<summary>U-12 comparative-only boundary</summary>
|
|
1014
|
-
|
|
1015
|
-
Three r184 and PMREM references may appear in comparative calibration evidence,
|
|
1016
|
-
but they are not an implementation dependency, runtime import, evaluator, or
|
|
1017
|
-
public API owner. Comparative observations cannot turn an unavailable
|
|
1018
|
-
Browser/Dawn readback into a ForgeaX pixel verdict.
|
|
1019
|
-
</details>
|