@forgeax/engine-render 0.1.2
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/LICENSE +202 -0
- package/README.md +1019 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/__tests__/analytic-sky-contract.test.d.ts +2 -0
- package/dist/__tests__/analytic-sky-contract.test.d.ts.map +1 -0
- package/dist/__tests__/analytic-sky-falsify.test.d.ts +2 -0
- package/dist/__tests__/analytic-sky-falsify.test.d.ts.map +1 -0
- package/dist/__tests__/assets-runtime-handoff.integration.test.d.ts +2 -0
- package/dist/__tests__/assets-runtime-handoff.integration.test.d.ts.map +1 -0
- package/dist/__tests__/authoring-path.unit.test.d.ts +2 -0
- package/dist/__tests__/authoring-path.unit.test.d.ts.map +1 -0
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts +2 -0
- package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts.map +1 -0
- package/dist/__tests__/backend-selection.integration.test.d.ts +2 -0
- package/dist/__tests__/backend-selection.integration.test.d.ts.map +1 -0
- package/dist/__tests__/callback-inference.test-d.d.ts +2 -0
- package/dist/__tests__/callback-inference.test-d.d.ts.map +1 -0
- package/dist/__tests__/camera-temporal.test-d.d.ts +2 -0
- package/dist/__tests__/camera-temporal.test-d.d.ts.map +1 -0
- package/dist/__tests__/camera-temporal.test.d.ts +2 -0
- package/dist/__tests__/camera-temporal.test.d.ts.map +1 -0
- package/dist/__tests__/cluster-binner.test.d.ts +2 -0
- package/dist/__tests__/cluster-binner.test.d.ts.map +1 -0
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts +2 -0
- package/dist/__tests__/construct-renderer-identity.unit.test.d.ts.map +1 -0
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts +2 -0
- package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts.map +1 -0
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts +2 -0
- package/dist/__tests__/direct-light-snapshot.unit.test.d.ts.map +1 -0
- package/dist/__tests__/directional-shadow-probe-atlas-layout.unit.test.d.ts +2 -0
- package/dist/__tests__/directional-shadow-probe-atlas-layout.unit.test.d.ts.map +1 -0
- package/dist/__tests__/environment-inspection.test.d.ts +2 -0
- package/dist/__tests__/environment-inspection.test.d.ts.map +1 -0
- package/dist/__tests__/factory-contract.integration.test.d.ts +2 -0
- package/dist/__tests__/factory-contract.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/fog-ai-user.fixture.d.ts +2 -0
- package/dist/__tests__/fog-ai-user.fixture.d.ts.map +1 -0
- package/dist/__tests__/fog-custom-render-feature.fixture.d.ts +16 -0
- package/dist/__tests__/fog-custom-render-feature.fixture.d.ts.map +1 -0
- package/dist/__tests__/fog-custom-render-feature.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-custom-render-feature.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-inspection.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-inspection.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-owner-state.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-owner-state.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-pipeline-topology.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-pipeline-topology.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-public-surface.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-public-surface.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-ray-contract.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-ray-contract.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-source-absence.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-source-absence.integration.test.d.ts.map +1 -0
- package/dist/__tests__/fog-temporal.integration.test.d.ts +2 -0
- package/dist/__tests__/fog-temporal.integration.test.d.ts.map +1 -0
- package/dist/__tests__/frame-chain.unit.test.d.ts +2 -0
- package/dist/__tests__/frame-chain.unit.test.d.ts.map +1 -0
- package/dist/__tests__/frame-observation.contract.test.d.ts +2 -0
- package/dist/__tests__/frame-observation.contract.test.d.ts.map +1 -0
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts +2 -0
- package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts +6 -0
- package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-production.integration.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +12 -0
- package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view.browser.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-driven-view.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-field-type-owner.test-d.d.ts +2 -0
- package/dist/__tests__/gpu-scene-field-type-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts +7 -0
- package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene-schema.unit.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene.dawn.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/gpu-scene.unit.test.d.ts +2 -0
- package/dist/__tests__/gpu-scene.unit.test.d.ts.map +1 -0
- package/dist/__tests__/hdrp-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/hdrp-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ibl/ibl-fallback.unit.test.d.ts +2 -0
- package/dist/__tests__/ibl/ibl-fallback.unit.test.d.ts.map +1 -0
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts +2 -0
- package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts.map +1 -0
- package/dist/__tests__/injection-kind-owner.test-d.d.ts +2 -0
- package/dist/__tests__/injection-kind-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts +2 -0
- package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts +2 -0
- package/dist/__tests__/light-buffer-layout.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts +2 -0
- package/dist/__tests__/material-contract-inventory.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts +2 -0
- package/dist/__tests__/material-cooked-projection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-derived-error-stop-draw.integration.test.d.ts +2 -0
- package/dist/__tests__/material-derived-error-stop-draw.integration.test.d.ts.map +1 -0
- package/dist/__tests__/material-derived-payload.integration.test.d.ts +2 -0
- package/dist/__tests__/material-derived-payload.integration.test.d.ts.map +1 -0
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts +2 -0
- package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts.map +1 -0
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts +2 -0
- package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts.map +1 -0
- package/dist/__tests__/material-stride-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/material-stride-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/materials.unit.test.d.ts +2 -0
- package/dist/__tests__/materials.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-material-bindings.unit.test.d.ts.map +1 -0
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/mesh-stride-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts +2 -0
- package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts +2 -0
- package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts.map +1 -0
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts +2 -0
- package/dist/__tests__/morph-visual-evidence.integration.test.d.ts.map +1 -0
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/param-schema-projection-census.unit.test.d.ts +2 -0
- package/dist/__tests__/param-schema-projection-census.unit.test.d.ts.map +1 -0
- package/dist/__tests__/persistent-render-scene.unit.test.d.ts +2 -0
- package/dist/__tests__/persistent-render-scene.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-error-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/pipeline-error-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-pass-trace.test.d.ts +2 -0
- package/dist/__tests__/pipeline-pass-trace.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline-stage-owner.test-d.d.ts +2 -0
- package/dist/__tests__/pipeline-stage-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/plugin.test.d.ts +2 -0
- package/dist/__tests__/plugin.test.d.ts.map +1 -0
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts +2 -0
- package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-backend-matrix.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-backend-matrix.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-resolver-recording.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-resolver-recording.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-store.unit.test.d.ts.map +1 -0
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts +2 -0
- package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-default-off.test.d.ts +2 -0
- package/dist/__tests__/profiler-default-off.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-phase-catalog.test.d.ts +2 -0
- package/dist/__tests__/profiler-phase-catalog.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-phase-integration.test.d.ts +2 -0
- package/dist/__tests__/profiler-phase-integration.test.d.ts.map +1 -0
- package/dist/__tests__/profiler-phase-token.test.d.ts +2 -0
- package/dist/__tests__/profiler-phase-token.test.d.ts.map +1 -0
- package/dist/__tests__/public-pipeline-id.test-d.d.ts +2 -0
- package/dist/__tests__/public-pipeline-id.test-d.d.ts.map +1 -0
- package/dist/__tests__/public-surface.test-d.d.ts +2 -0
- package/dist/__tests__/public-surface.test-d.d.ts.map +1 -0
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-dispatch-membership.unit.test.d.ts +2 -0
- package/dist/__tests__/render-dispatch-membership.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-error-code-owner.test-d.d.ts +2 -0
- package/dist/__tests__/render-error-code-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts +2 -0
- package/dist/__tests__/render-error-detail-ssot.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts +2 -0
- package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-assembly.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-construction.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-construction.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-context.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-context.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-contract.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-contract.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-docs.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-docs.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-error-code-owner.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-error-code-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-errors.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-errors.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-gpu-buffer-usage-owner.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-gpu-buffer-usage-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts +2 -0
- package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-graph.integration.test.d.ts +2 -0
- package/dist/__tests__/render-feature-graph.integration.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-graphics-staging.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-graphics-staging.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-order.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-order.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics-recording.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics-recording.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-public-surface.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-retry.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-retry.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-scheduling.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-staging.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-staging.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-visibility-context.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-zero-work.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts +7 -0
- package/dist/__tests__/render-graph-compute-raster-gpu.d.ts.map +1 -0
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts +2 -0
- package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts +2 -0
- package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-hzb-gpu.d.ts +7 -0
- package/dist/__tests__/render-graph-hzb-gpu.d.ts.map +1 -0
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts +2 -0
- package/dist/__tests__/render-graph-hzb.browser.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts +2 -0
- package/dist/__tests__/render-graph-hzb.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts +2 -0
- package/dist/__tests__/render-graph-primitives.unit.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts +12 -0
- package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts.map +1 -0
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts +2 -0
- package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts.map +1 -0
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts +2 -0
- package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/render-scene-projection.unit.test.d.ts +2 -0
- package/dist/__tests__/render-scene-projection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts +2 -0
- package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +2 -0
- package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +1 -0
- package/dist/__tests__/renderer-render-scene-public.test-d.d.ts +2 -0
- package/dist/__tests__/renderer-render-scene-public.test-d.d.ts.map +1 -0
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts +2 -0
- package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts.map +1 -0
- package/dist/__tests__/scene-temporal-coverage.unit.test.d.ts +2 -0
- package/dist/__tests__/scene-temporal-coverage.unit.test.d.ts.map +1 -0
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts +2 -0
- package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts.map +1 -0
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/shader-stage-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sun-snapshot-consumers.test.d.ts +2 -0
- package/dist/__tests__/sun-snapshot-consumers.test.d.ts.map +1 -0
- package/dist/__tests__/surface-backend-kind-owner.test-d.d.ts +2 -0
- package/dist/__tests__/surface-backend-kind-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/surface-configuration.unit.test.d.ts +2 -0
- package/dist/__tests__/surface-configuration.unit.test.d.ts.map +1 -0
- package/dist/__tests__/taa-history-store.unit.test.d.ts +2 -0
- package/dist/__tests__/taa-history-store.unit.test.d.ts.map +1 -0
- package/dist/__tests__/temporal-frame-transaction.integration.test.d.ts +2 -0
- package/dist/__tests__/temporal-frame-transaction.integration.test.d.ts.map +1 -0
- package/dist/__tests__/temporal-inspection.unit.test.d.ts +2 -0
- package/dist/__tests__/temporal-inspection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/texture-usage-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts +2 -0
- package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts.map +1 -0
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts +2 -0
- package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts.map +1 -0
- package/dist/__tests__/urp-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/urp-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts +2 -0
- package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-diagnostics.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-extract.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-extract.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-extract.perf.test.d.ts +2 -0
- package/dist/__tests__/visibility-extract.perf.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-hidden-report.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-instances.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-instances.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-multi-world.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts +2 -0
- package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-public-surface.test-d.d.ts +2 -0
- package/dist/__tests__/visibility-public-surface.test-d.d.ts.map +1 -0
- package/dist/__tests__/visibility-resolver.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-resolver.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts.map +1 -0
- package/dist/__tests__/vocabulary.unit.test.d.ts +2 -0
- package/dist/__tests__/vocabulary.unit.test.d.ts.map +1 -0
- package/dist/assets/__tests__/asset-decoders.unit.test.d.ts +2 -0
- package/dist/assets/__tests__/asset-decoders.unit.test.d.ts.map +1 -0
- package/dist/assets/__tests__/mipmap-generator.unit.test.d.ts +2 -0
- package/dist/assets/__tests__/mipmap-generator.unit.test.d.ts.map +1 -0
- package/dist/assets/__tests__/render-asset-port.unit.test.d.ts +2 -0
- package/dist/assets/__tests__/render-asset-port.unit.test.d.ts.map +1 -0
- package/dist/assets/__tests__/resolve-render-asset.unit.test.d.ts +2 -0
- package/dist/assets/__tests__/resolve-render-asset.unit.test.d.ts.map +1 -0
- package/dist/assets/asset-decoders.d.ts +5 -0
- package/dist/assets/asset-decoders.d.ts.map +1 -0
- package/dist/assets/render-asset-port.d.ts +17 -0
- package/dist/assets/render-asset-port.d.ts.map +1 -0
- package/dist/assets/resolve-render-asset.d.ts +6 -0
- package/dist/assets/resolve-render-asset.d.ts.map +1 -0
- package/dist/authoring.d.ts +12 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.mjs +5 -0
- package/dist/authoring.mjs.map +1 -0
- package/dist/chunk-33UF5SAO.mjs +7397 -0
- package/dist/chunk-33UF5SAO.mjs.map +1 -0
- package/dist/chunk-A5QCJSNL.mjs +29913 -0
- package/dist/chunk-A5QCJSNL.mjs.map +1 -0
- package/dist/chunk-JMSB7AR4.mjs +3 -0
- package/dist/chunk-JMSB7AR4.mjs.map +1 -0
- package/dist/chunk-LXNGO6AO.mjs +569 -0
- package/dist/chunk-LXNGO6AO.mjs.map +1 -0
- package/dist/chunk-QRXPSX4X.mjs +659 -0
- package/dist/chunk-QRXPSX4X.mjs.map +1 -0
- package/dist/chunk-YAKEQPWO.mjs +1439 -0
- package/dist/chunk-YAKEQPWO.mjs.map +1 -0
- package/dist/cluster-binner.d.ts +152 -0
- package/dist/cluster-binner.d.ts.map +1 -0
- package/dist/components/__tests__/atmosphere-red.test.d.ts +2 -0
- package/dist/components/__tests__/atmosphere-red.test.d.ts.map +1 -0
- package/dist/components/__tests__/atmosphere.test.d.ts +2 -0
- package/dist/components/__tests__/atmosphere.test.d.ts.map +1 -0
- package/dist/components/__tests__/fog.test-d.d.ts +2 -0
- package/dist/components/__tests__/fog.test-d.d.ts.map +1 -0
- package/dist/components/__tests__/fog.test.d.ts +2 -0
- package/dist/components/__tests__/fog.test.d.ts.map +1 -0
- package/dist/components/__tests__/schema-parity.unit.test.d.ts +2 -0
- package/dist/components/__tests__/schema-parity.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts +2 -0
- package/dist/components/__tests__/visibility-schema.unit.test.d.ts.map +1 -0
- package/dist/components/atmosphere.d.ts +18 -0
- package/dist/components/atmosphere.d.ts.map +1 -0
- package/dist/components/camera.d.ts +311 -0
- package/dist/components/camera.d.ts.map +1 -0
- package/dist/components/directional-light.d.ts +76 -0
- package/dist/components/directional-light.d.ts.map +1 -0
- package/dist/components/environment.d.ts +116 -0
- package/dist/components/environment.d.ts.map +1 -0
- package/dist/components/glyph-text.d.ts +26 -0
- package/dist/components/glyph-text.d.ts.map +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/instances.d.ts +41 -0
- package/dist/components/instances.d.ts.map +1 -0
- package/dist/components/layer.d.ts +34 -0
- package/dist/components/layer.d.ts.map +1 -0
- package/dist/components/light-helpers.d.ts +53 -0
- package/dist/components/light-helpers.d.ts.map +1 -0
- package/dist/components/mesh-filter.d.ts +24 -0
- package/dist/components/mesh-filter.d.ts.map +1 -0
- package/dist/components/mesh-renderer.d.ts +33 -0
- package/dist/components/mesh-renderer.d.ts.map +1 -0
- package/dist/components/point-light-shadow.d.ts +27 -0
- package/dist/components/point-light-shadow.d.ts.map +1 -0
- package/dist/components/point-light.d.ts +35 -0
- package/dist/components/point-light.d.ts.map +1 -0
- package/dist/components/post-process-params.d.ts +5 -0
- package/dist/components/post-process-params.d.ts.map +1 -0
- package/dist/components/scene-instance.d.ts +140 -0
- package/dist/components/scene-instance.d.ts.map +1 -0
- package/dist/components/sort-key.d.ts +44 -0
- package/dist/components/sort-key.d.ts.map +1 -0
- package/dist/components/spot-light.d.ts +81 -0
- package/dist/components/spot-light.d.ts.map +1 -0
- package/dist/components/sprite-animation.d.ts +75 -0
- package/dist/components/sprite-animation.d.ts.map +1 -0
- package/dist/components/sprite-instances.d.ts +51 -0
- package/dist/components/sprite-instances.d.ts.map +1 -0
- package/dist/components/sprite-playback-mode.d.ts +37 -0
- package/dist/components/sprite-playback-mode.d.ts.map +1 -0
- package/dist/components/sprite-region-override.d.ts +47 -0
- package/dist/components/sprite-region-override.d.ts.map +1 -0
- package/dist/components/tile-layer.d.ts +101 -0
- package/dist/components/tile-layer.d.ts.map +1 -0
- package/dist/components/tilemap.d.ts +25 -0
- package/dist/components/tilemap.d.ts.map +1 -0
- package/dist/components/visibility.d.ts +22 -0
- package/dist/components/visibility.d.ts.map +1 -0
- package/dist/construct-renderer.d.ts +2 -0
- package/dist/construct-renderer.d.ts.map +1 -0
- package/dist/construct-renderer.mjs +6 -0
- package/dist/construct-renderer.mjs.map +1 -0
- package/dist/debug-draw-glue.d.ts +56 -0
- package/dist/debug-draw-glue.d.ts.map +1 -0
- package/dist/deferred-lighting.d.ts +13 -0
- package/dist/deferred-lighting.d.ts.map +1 -0
- package/dist/dynamic-texture-store.d.ts +42 -0
- package/dist/dynamic-texture-store.d.ts.map +1 -0
- package/dist/engine-metrics.d.ts +23 -0
- package/dist/engine-metrics.d.ts.map +1 -0
- package/dist/environment/__tests__/failure-injection.test.d.ts +2 -0
- package/dist/environment/__tests__/failure-injection.test.d.ts.map +1 -0
- package/dist/environment/__tests__/generation-red.test.d.ts +2 -0
- package/dist/environment/__tests__/generation-red.test.d.ts.map +1 -0
- package/dist/environment/__tests__/generation.test.d.ts +2 -0
- package/dist/environment/__tests__/generation.test.d.ts.map +1 -0
- package/dist/environment/__tests__/graph-transaction.test.d.ts +2 -0
- package/dist/environment/__tests__/graph-transaction.test.d.ts.map +1 -0
- package/dist/environment/__tests__/inspection-red.test.d.ts +2 -0
- package/dist/environment/__tests__/inspection-red.test.d.ts.map +1 -0
- package/dist/environment/__tests__/lifecycle-evidence.test.d.ts +2 -0
- package/dist/environment/__tests__/lifecycle-evidence.test.d.ts.map +1 -0
- package/dist/environment/__tests__/pipeline-topology.test.d.ts +2 -0
- package/dist/environment/__tests__/pipeline-topology.test.d.ts.map +1 -0
- package/dist/environment/__tests__/readiness.test.d.ts +2 -0
- package/dist/environment/__tests__/readiness.test.d.ts.map +1 -0
- package/dist/environment/__tests__/recovery.test.d.ts +2 -0
- package/dist/environment/__tests__/recovery.test.d.ts.map +1 -0
- package/dist/environment/__tests__/resize-dispose.test.d.ts +2 -0
- package/dist/environment/__tests__/resize-dispose.test.d.ts.map +1 -0
- package/dist/environment/__tests__/signature-red.test.d.ts +2 -0
- package/dist/environment/__tests__/signature-red.test.d.ts.map +1 -0
- package/dist/environment/__tests__/signature.test.d.ts +2 -0
- package/dist/environment/__tests__/signature.test.d.ts.map +1 -0
- package/dist/environment/descriptors.d.ts +2 -0
- package/dist/environment/descriptors.d.ts.map +1 -0
- package/dist/environment/extracted-environment.d.ts +53 -0
- package/dist/environment/extracted-environment.d.ts.map +1 -0
- package/dist/environment/generation.d.ts +62 -0
- package/dist/environment/generation.d.ts.map +1 -0
- package/dist/environment/gpu-bundle.d.ts +23 -0
- package/dist/environment/gpu-bundle.d.ts.map +1 -0
- package/dist/environment/graph.d.ts +108 -0
- package/dist/environment/graph.d.ts.map +1 -0
- package/dist/environment/inspection.d.ts +48 -0
- package/dist/environment/inspection.d.ts.map +1 -0
- package/dist/environment/lifecycle.d.ts +22 -0
- package/dist/environment/lifecycle.d.ts.map +1 -0
- package/dist/environment/readiness.d.ts +29 -0
- package/dist/environment/readiness.d.ts.map +1 -0
- package/dist/environment/signature.d.ts +70 -0
- package/dist/environment/signature.d.ts.map +1 -0
- package/dist/errors/ecs-validation.d.ts +3 -0
- package/dist/errors/ecs-validation.d.ts.map +1 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/recover.d.ts +78 -0
- package/dist/errors/recover.d.ts.map +1 -0
- package/dist/errors/render.d.ts +633 -0
- package/dist/errors/render.d.ts.map +1 -0
- package/dist/extract/__tests__/directional-csm-domain.unit.test.d.ts +2 -0
- package/dist/extract/__tests__/directional-csm-domain.unit.test.d.ts.map +1 -0
- package/dist/extract/__tests__/environment-source.test.d.ts +2 -0
- package/dist/extract/__tests__/environment-source.test.d.ts.map +1 -0
- package/dist/extract/__tests__/schema-readers.unit.test.d.ts +2 -0
- package/dist/extract/__tests__/schema-readers.unit.test.d.ts.map +1 -0
- package/dist/extract/directional-csm.d.ts +129 -0
- package/dist/extract/directional-csm.d.ts.map +1 -0
- package/dist/extract/index.d.ts +5 -0
- package/dist/extract/index.d.ts.map +1 -0
- package/dist/extract/material-interface.d.ts +56 -0
- package/dist/extract/material-interface.d.ts.map +1 -0
- package/dist/extract/schema-readers.d.ts +20 -0
- package/dist/extract/schema-readers.d.ts.map +1 -0
- package/dist/extract/visibility.d.ts +26 -0
- package/dist/extract/visibility.d.ts.map +1 -0
- package/dist/features/graph-contribution.d.ts +64 -0
- package/dist/features/graph-contribution.d.ts.map +1 -0
- package/dist/features/host.d.ts +100 -0
- package/dist/features/host.d.ts.map +1 -0
- package/dist/features/index.d.ts +21 -0
- package/dist/features/index.d.ts.map +1 -0
- package/dist/features/morph/index.d.ts +3 -0
- package/dist/features/morph/index.d.ts.map +1 -0
- package/dist/features/morph/morph-bounds.d.ts +42 -0
- package/dist/features/morph/morph-bounds.d.ts.map +1 -0
- package/dist/features/morph/morph-feature.d.ts +45 -0
- package/dist/features/morph/morph-feature.d.ts.map +1 -0
- package/dist/features/prepared-gpu-work.d.ts +113 -0
- package/dist/features/prepared-gpu-work.d.ts.map +1 -0
- package/dist/features/prepared-graphics-store.d.ts +65 -0
- package/dist/features/prepared-graphics-store.d.ts.map +1 -0
- package/dist/features/prepared-graphics.d.ts +225 -0
- package/dist/features/prepared-graphics.d.ts.map +1 -0
- package/dist/features/render-graph-compute.d.ts +13 -0
- package/dist/features/render-graph-compute.d.ts.map +1 -0
- package/dist/features/render-graph-contribution.d.ts +15 -0
- package/dist/features/render-graph-contribution.d.ts.map +1 -0
- package/dist/features/render-graph-raster.d.ts +34 -0
- package/dist/features/render-graph-raster.d.ts.map +1 -0
- package/dist/features/render-graph-resources.d.ts +11 -0
- package/dist/features/render-graph-resources.d.ts.map +1 -0
- package/dist/features/scene-temporal.d.ts +45 -0
- package/dist/features/scene-temporal.d.ts.map +1 -0
- package/dist/features/taa-resolve.d.ts +21 -0
- package/dist/features/taa-resolve.d.ts.map +1 -0
- package/dist/features/targets.d.ts +32 -0
- package/dist/features/targets.d.ts.map +1 -0
- package/dist/features/types.d.ts +247 -0
- package/dist/features/types.d.ts.map +1 -0
- package/dist/frame-chain.d.ts +14 -0
- package/dist/frame-chain.d.ts.map +1 -0
- package/dist/fullscreen-post-process-pass.d.ts +178 -0
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -0
- package/dist/glyph-text-layout-system.d.ts +18 -0
- package/dist/glyph-text-layout-system.d.ts.map +1 -0
- package/dist/gpu-driven/batch-topology.d.ts +124 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +150 -0
- package/dist/gpu-driven/production-raster.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +141 -0
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -0
- package/dist/gpu-driven/view-reference.d.ts +15 -0
- package/dist/gpu-driven/view-reference.d.ts.map +1 -0
- package/dist/gpu-resource-store.d.ts +294 -0
- package/dist/gpu-resource-store.d.ts.map +1 -0
- package/dist/gpu-resource.d.ts +73 -0
- package/dist/gpu-resource.d.ts.map +1 -0
- package/dist/gpu-scene-schema.d.ts +171 -0
- package/dist/gpu-scene-schema.d.ts.map +1 -0
- package/dist/gpu-scene.d.ts +81 -0
- package/dist/gpu-scene.d.ts.map +1 -0
- package/dist/gpu-stage.d.ts +4 -0
- package/dist/gpu-stage.d.ts.map +1 -0
- package/dist/gpu-texture-usage.d.ts +6 -0
- package/dist/gpu-texture-usage.d.ts.map +1 -0
- package/dist/gpu-usage.d.ts +9 -0
- package/dist/gpu-usage.d.ts.map +1 -0
- package/dist/hdrp-buffers.d.ts +213 -0
- package/dist/hdrp-buffers.d.ts.map +1 -0
- package/dist/hdrp-cluster-membership.d.ts +2 -0
- package/dist/hdrp-cluster-membership.d.ts.map +1 -0
- package/dist/hdrp-pipeline.d.ts +36 -0
- package/dist/hdrp-pipeline.d.ts.map +1 -0
- package/dist/ibl/IblPipelineCache.d.ts +274 -0
- package/dist/ibl/IblPipelineCache.d.ts.map +1 -0
- package/dist/ibl/cubemap-projection.d.ts +23 -0
- package/dist/ibl/cubemap-projection.d.ts.map +1 -0
- package/dist/ibl/face-uniforms.d.ts +65 -0
- package/dist/ibl/face-uniforms.d.ts.map +1 -0
- package/dist/ibl/skylight-bind-group.d.ts +130 -0
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -0
- package/dist/instance-buffer-cache.d.ts +59 -0
- package/dist/instance-buffer-cache.d.ts.map +1 -0
- package/dist/internal.d.ts +74 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.mjs +45 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/lifecycle.d.ts +28 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/light-buffer-layout.d.ts +164 -0
- package/dist/light-buffer-layout.d.ts.map +1 -0
- package/dist/materials.d.ts +50 -0
- package/dist/materials.d.ts.map +1 -0
- package/dist/mesh-material-bindings.d.ts +44 -0
- package/dist/mesh-material-bindings.d.ts.map +1 -0
- package/dist/mesh-update-errors.d.ts +71 -0
- package/dist/mesh-update-errors.d.ts.map +1 -0
- package/dist/mipmap-generator.d.ts +39 -0
- package/dist/mipmap-generator.d.ts.map +1 -0
- package/dist/param-schema-projection-census.d.ts +18 -0
- package/dist/param-schema-projection-census.d.ts.map +1 -0
- package/dist/pbr-pipeline.d.ts +253 -0
- package/dist/pbr-pipeline.d.ts.map +1 -0
- package/dist/persistent-render-scene.d.ts +158 -0
- package/dist/persistent-render-scene.d.ts.map +1 -0
- package/dist/pipeline/index.d.ts +11 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline-builder.d.ts +122 -0
- package/dist/pipeline-builder.d.ts.map +1 -0
- package/dist/pipeline-errors.d.ts +110 -0
- package/dist/pipeline-errors.d.ts.map +1 -0
- package/dist/pipeline-spec.d.ts +506 -0
- package/dist/pipeline-spec.d.ts.map +1 -0
- package/dist/plugin.d.ts +17 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/post-process-errors.d.ts +182 -0
- package/dist/post-process-errors.d.ts.map +1 -0
- package/dist/prepare/__tests__/schema-readers.unit.test.d.ts +2 -0
- package/dist/prepare/__tests__/schema-readers.unit.test.d.ts.map +1 -0
- package/dist/prepare/index.d.ts +4 -0
- package/dist/prepare/index.d.ts.map +1 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts +62 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -0
- package/dist/prepare/schema-readers.d.ts +11 -0
- package/dist/prepare/schema-readers.d.ts.map +1 -0
- package/dist/record/__tests__/environment-record.test.d.ts +2 -0
- package/dist/record/__tests__/environment-record.test.d.ts.map +1 -0
- package/dist/record/__tests__/frame-targets.unit.test.d.ts +2 -0
- package/dist/record/__tests__/frame-targets.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts +2 -0
- package/dist/record/__tests__/material-bg-cache.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts +2 -0
- package/dist/record/__tests__/material-slot-plan.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/membership-timing.unit.test.d.ts +2 -0
- package/dist/record/__tests__/membership-timing.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/render-submission.integration.test.d.ts +2 -0
- package/dist/record/__tests__/render-submission.integration.test.d.ts.map +1 -0
- package/dist/record/__tests__/render-submission.perf.test.d.ts +2 -0
- package/dist/record/__tests__/render-submission.perf.test.d.ts.map +1 -0
- package/dist/record/__tests__/shadow-submit-mode.unit.test.d.ts +2 -0
- package/dist/record/__tests__/shadow-submit-mode.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts +2 -0
- package/dist/record/__tests__/video-texture-view.unit.test.d.ts.map +1 -0
- package/dist/record/__tests__/view-ubo-layout.unit.test.d.ts +2 -0
- package/dist/record/__tests__/view-ubo-layout.unit.test.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +187 -0
- package/dist/record/frame-lighting.d.ts.map +1 -0
- package/dist/record/frame-observation.d.ts +38 -0
- package/dist/record/frame-observation.d.ts.map +1 -0
- package/dist/record/frame-snapshot.d.ts +429 -0
- package/dist/record/frame-snapshot.d.ts.map +1 -0
- package/dist/record/frame-targets.d.ts +53 -0
- package/dist/record/frame-targets.d.ts.map +1 -0
- package/dist/record/frame.d.ts +59 -0
- package/dist/record/frame.d.ts.map +1 -0
- package/dist/record/helpers.d.ts +101 -0
- package/dist/record/helpers.d.ts.map +1 -0
- package/dist/record/index.d.ts +15 -0
- package/dist/record/index.d.ts.map +1 -0
- package/dist/record/main-pass-geometry.d.ts +20 -0
- package/dist/record/main-pass-geometry.d.ts.map +1 -0
- package/dist/record/main-pass-material.d.ts +173 -0
- package/dist/record/main-pass-material.d.ts.map +1 -0
- package/dist/record/main-pass-skin.d.ts +46 -0
- package/dist/record/main-pass-skin.d.ts.map +1 -0
- package/dist/record/main-pass-sprite-draws.d.ts +18 -0
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -0
- package/dist/record/main-pass-sprite.d.ts +69 -0
- package/dist/record/main-pass-sprite.d.ts.map +1 -0
- package/dist/record/main-pass.d.ts +20 -0
- package/dist/record/main-pass.d.ts.map +1 -0
- package/dist/record/material-payload.d.ts +43 -0
- package/dist/record/material-payload.d.ts.map +1 -0
- package/dist/record/material-slot-plan.d.ts +26 -0
- package/dist/record/material-slot-plan.d.ts.map +1 -0
- package/dist/record/membership-timing.d.ts +232 -0
- package/dist/record/membership-timing.d.ts.map +1 -0
- package/dist/record/mesh-ssbo.d.ts +173 -0
- package/dist/record/mesh-ssbo.d.ts.map +1 -0
- package/dist/record/shadow-caster-uniform.d.ts +8 -0
- package/dist/record/shadow-caster-uniform.d.ts.map +1 -0
- package/dist/record/shadow-pass.d.ts +125 -0
- package/dist/record/shadow-pass.d.ts.map +1 -0
- package/dist/record/shadow-submit-mode.d.ts +66 -0
- package/dist/record/shadow-submit-mode.d.ts.map +1 -0
- package/dist/record/skybox-post-pass.d.ts +33 -0
- package/dist/record/skybox-post-pass.d.ts.map +1 -0
- package/dist/record/typed-frame-graph.d.ts +13 -0
- package/dist/record/typed-frame-graph.d.ts.map +1 -0
- package/dist/record/view-ubo.d.ts +39 -0
- package/dist/record/view-ubo.d.ts.map +1 -0
- package/dist/render-data.d.ts +143 -0
- package/dist/render-data.d.ts.map +1 -0
- package/dist/render-dispatch-membership.d.ts +47 -0
- package/dist/render-dispatch-membership.d.ts.map +1 -0
- package/dist/render-graph-primitives.d.ts +424 -0
- package/dist/render-graph-primitives.d.ts.map +1 -0
- package/dist/render-pipeline-context.d.ts +289 -0
- package/dist/render-pipeline-context.d.ts.map +1 -0
- package/dist/render-pipeline-target.d.ts +16 -0
- package/dist/render-pipeline-target.d.ts.map +1 -0
- package/dist/render-pipeline.d.ts +149 -0
- package/dist/render-pipeline.d.ts.map +1 -0
- package/dist/render-scene-projection.d.ts +174 -0
- package/dist/render-scene-projection.d.ts.map +1 -0
- package/dist/render-system-extract.d.ts +1096 -0
- package/dist/render-system-extract.d.ts.map +1 -0
- package/dist/render-system-fold.d.ts +266 -0
- package/dist/render-system-fold.d.ts.map +1 -0
- package/dist/render-system.d.ts +814 -0
- package/dist/render-system.d.ts.map +1 -0
- package/dist/renderer/asset-service.d.ts +10 -0
- package/dist/renderer/asset-service.d.ts.map +1 -0
- package/dist/renderer/backend-selection.d.ts +26 -0
- package/dist/renderer/backend-selection.d.ts.map +1 -0
- package/dist/renderer/environment-classify.d.ts +6 -0
- package/dist/renderer/environment-classify.d.ts.map +1 -0
- package/dist/renderer/environment-error.d.ts +13 -0
- package/dist/renderer/environment-error.d.ts.map +1 -0
- package/dist/renderer/material/assembly.d.ts +22 -0
- package/dist/renderer/material/assembly.d.ts.map +1 -0
- package/dist/renderer/material/pipeline-projection.d.ts +91 -0
- package/dist/renderer/material/pipeline-projection.d.ts.map +1 -0
- package/dist/renderer/renderer-factory.d.ts +283 -0
- package/dist/renderer/renderer-factory.d.ts.map +1 -0
- package/dist/renderer.d.ts +771 -0
- package/dist/renderer.d.ts.map +1 -0
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts +33 -0
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts.map +1 -0
- package/dist/scene-utils/collect-subtree.d.ts +11 -0
- package/dist/scene-utils/collect-subtree.d.ts.map +1 -0
- package/dist/shadow-atlas.d.ts +117 -0
- package/dist/shadow-atlas.d.ts.map +1 -0
- package/dist/ssao-buffers.d.ts +31 -0
- package/dist/ssao-buffers.d.ts.map +1 -0
- package/dist/ssao-config.d.ts +28 -0
- package/dist/ssao-config.d.ts.map +1 -0
- package/dist/ssao-data.d.ts +34 -0
- package/dist/ssao-data.d.ts.map +1 -0
- package/dist/surface-format.d.ts +10 -0
- package/dist/surface-format.d.ts.map +1 -0
- package/dist/systems/active-camera.d.ts +53 -0
- package/dist/systems/active-camera.d.ts.map +1 -0
- package/dist/systems/pass-selector.d.ts +24 -0
- package/dist/systems/pass-selector.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts +51 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -0
- package/dist/systems/transparent-sort-config.d.ts +91 -0
- package/dist/systems/transparent-sort-config.d.ts.map +1 -0
- package/dist/taa-history-store.d.ts +88 -0
- package/dist/taa-history-store.d.ts.map +1 -0
- package/dist/temporal-coverage.d.ts +35 -0
- package/dist/temporal-coverage.d.ts.map +1 -0
- package/dist/temporal-frame-transaction.d.ts +92 -0
- package/dist/temporal-frame-transaction.d.ts.map +1 -0
- package/dist/temporal-inspection.d.ts +57 -0
- package/dist/temporal-inspection.d.ts.map +1 -0
- package/dist/temporal-view.d.ts +43 -0
- package/dist/temporal-view.d.ts.map +1 -0
- package/dist/tilemap/resolve-tileset-runtime.d.ts +23 -0
- package/dist/tilemap/resolve-tileset-runtime.d.ts.map +1 -0
- package/dist/tilemap-chunk-extract-system.d.ts +142 -0
- package/dist/tilemap-chunk-extract-system.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +59 -0
- package/dist/typed-render-graph-primitives.d.ts.map +1 -0
- package/dist/typed-shadow-passes.d.ts +11 -0
- package/dist/typed-shadow-passes.d.ts.map +1 -0
- package/dist/urp-pipeline.d.ts +4 -0
- package/dist/urp-pipeline.d.ts.map +1 -0
- package/package.json +94 -0
- package/src/__tests__/analytic-sky-contract.test.ts +27 -0
- package/src/__tests__/analytic-sky-falsify-carriers.mjs +43 -0
- package/src/__tests__/analytic-sky-falsify.test.ts +94 -0
- package/src/__tests__/assets-runtime-handoff.integration.test.ts +36 -0
- package/src/__tests__/authoring-path.unit.test.ts +14 -0
- package/src/__tests__/backend-selection-rhi-capture.test-d.ts +21 -0
- package/src/__tests__/backend-selection.integration.test.ts +11 -0
- package/src/__tests__/callback-inference.test-d.ts +5 -0
- package/src/__tests__/camera-temporal.test-d.ts +8 -0
- package/src/__tests__/camera-temporal.test.ts +188 -0
- package/src/__tests__/cluster-binner.test.ts +272 -0
- package/src/__tests__/cluster-grid-default-surface.unit.test.ts +17 -0
- package/src/__tests__/construct-renderer-identity.unit.test.ts +10 -0
- package/src/__tests__/direct-extract-consumer-contract.test-d.ts +34 -0
- package/src/__tests__/direct-light-snapshot.unit.test.ts +71 -0
- package/src/__tests__/directional-shadow-probe-atlas-layout.unit.test.ts +18 -0
- package/src/__tests__/environment-inspection.test.ts +45 -0
- package/src/__tests__/factory-contract.integration.test.ts +331 -0
- package/src/__tests__/fallback-row-stride-surface.unit.test.ts +18 -0
- package/src/__tests__/fog-ai-user.fixture.ts +350 -0
- package/src/__tests__/fog-custom-render-feature.fixture.ts +33 -0
- package/src/__tests__/fog-custom-render-feature.integration.test.ts +76 -0
- package/src/__tests__/fog-inspection.integration.test.ts +127 -0
- package/src/__tests__/fog-owner-state.integration.test.ts +112 -0
- package/src/__tests__/fog-pipeline-topology.integration.test.ts +93 -0
- package/src/__tests__/fog-public-surface.integration.test.ts +60 -0
- package/src/__tests__/fog-ray-contract.integration.test.ts +73 -0
- package/src/__tests__/fog-source-absence.integration.test.ts +51 -0
- package/src/__tests__/fog-temporal.integration.test.ts +115 -0
- package/src/__tests__/frame-chain.unit.test.ts +26 -0
- package/src/__tests__/frame-observation.contract.test.ts +103 -0
- package/src/__tests__/glyph-text-layout-recovery.unit.test.ts +172 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +347 -0
- package/src/__tests__/gpu-driven-indirect-raster.browser.test.ts +12 -0
- package/src/__tests__/gpu-driven-indirect-raster.dawn.test.ts +16 -0
- package/src/__tests__/gpu-driven-production.integration.test.ts +609 -0
- package/src/__tests__/gpu-driven-scaling.unit.test.ts +90 -0
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +192 -0
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +128 -0
- package/src/__tests__/gpu-driven-view.browser.test.ts +19 -0
- package/src/__tests__/gpu-driven-view.dawn.test.ts +17 -0
- package/src/__tests__/gpu-driven-view.unit.test.ts +455 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +59 -0
- package/src/__tests__/gpu-scene-field-type-owner.test-d.ts +27 -0
- package/src/__tests__/gpu-scene-render-graph-gpu.ts +309 -0
- package/src/__tests__/gpu-scene-render-graph.browser.test.ts +19 -0
- package/src/__tests__/gpu-scene-render-graph.dawn.test.ts +19 -0
- package/src/__tests__/gpu-scene-schema.unit.test.ts +16 -0
- package/src/__tests__/gpu-scene.dawn.test.ts +209 -0
- package/src/__tests__/gpu-scene.unit.test.ts +161 -0
- package/src/__tests__/hdrp-pipeline.unit.test.ts +100 -0
- package/src/__tests__/ibl/ibl-fallback.unit.test.ts +23 -0
- package/src/__tests__/infinite-grid-no-vertex-probe.unit.test.ts +124 -0
- package/src/__tests__/injection-kind-owner.test-d.ts +14 -0
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +719 -0
- package/src/__tests__/light-buffer-layout.unit.test.ts +85 -0
- package/src/__tests__/material-contract-inventory.unit.test.ts +24 -0
- package/src/__tests__/material-cooked-projection.unit.test.ts +177 -0
- package/src/__tests__/material-derived-error-stop-draw.integration.test.ts +69 -0
- package/src/__tests__/material-derived-payload.integration.test.ts +164 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +58 -0
- package/src/__tests__/material-static-dynamic-route.unit.test.ts +113 -0
- package/src/__tests__/material-stride-surface.unit.test.ts +32 -0
- package/src/__tests__/materials.unit.test.ts +25 -0
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +107 -0
- package/src/__tests__/mesh-material-bindings.unit.test.ts +89 -0
- package/src/__tests__/mesh-stride-surface.unit.test.ts +16 -0
- package/src/__tests__/morph-culling-reentry.dawn.test.ts +166 -0
- package/src/__tests__/morph-feature-gpu-work.integration.test.ts +78 -0
- package/src/__tests__/morph-visual-evidence.integration.test.ts +66 -0
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +14 -0
- package/src/__tests__/param-schema-projection-census.unit.test.ts +40 -0
- package/src/__tests__/persistent-render-scene.unit.test.ts +1311 -0
- package/src/__tests__/pipeline-error-policy-owner.unit.test.ts +167 -0
- package/src/__tests__/pipeline-pass-trace.test.ts +92 -0
- package/src/__tests__/pipeline-stage-owner.test-d.ts +13 -0
- package/src/__tests__/plugin.test.ts +25 -0
- package/src/__tests__/post-process-error-policy-owner.unit.test.ts +208 -0
- package/src/__tests__/prepared-buffer-kind-owner.test-d.ts +29 -0
- package/src/__tests__/prepared-graphics-backend-matrix.unit.test.ts +129 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +140 -0
- package/src/__tests__/prepared-graphics-generation.unit.test.ts +175 -0
- package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +206 -0
- package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +29 -0
- package/src/__tests__/prepared-graphics-resolver-recording.unit.test.ts +180 -0
- package/src/__tests__/prepared-graphics-resolver.unit.test.ts +287 -0
- package/src/__tests__/prepared-graphics-snapshot.unit.test.ts +105 -0
- package/src/__tests__/prepared-graphics-store.unit.test.ts +154 -0
- package/src/__tests__/prepared-graphics-validation.unit.test.ts +176 -0
- package/src/__tests__/profiler-default-off.test.ts +22 -0
- package/src/__tests__/profiler-phase-catalog.test.ts +66 -0
- package/src/__tests__/profiler-phase-integration.test.ts +70 -0
- package/src/__tests__/profiler-phase-token.test.ts +84 -0
- package/src/__tests__/public-pipeline-id.test-d.ts +6 -0
- package/src/__tests__/public-surface.test-d.ts +32 -0
- package/src/__tests__/recover-error-policy-owner.unit.test.ts +127 -0
- package/src/__tests__/render-dispatch-membership.unit.test.ts +117 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +115 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +234 -0
- package/src/__tests__/render-error-exhaustive.test-d.ts +84 -0
- package/src/__tests__/render-feature-assembly.test-d.ts +51 -0
- package/src/__tests__/render-feature-construction.unit.test.ts +124 -0
- package/src/__tests__/render-feature-context.test-d.ts +81 -0
- package/src/__tests__/render-feature-contract.test-d.ts +58 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +151 -0
- package/src/__tests__/render-feature-docs.unit.test.ts +88 -0
- package/src/__tests__/render-feature-error-code-owner.test-d.ts +27 -0
- package/src/__tests__/render-feature-errors.unit.test.ts +47 -0
- package/src/__tests__/render-feature-gpu-buffer-usage-owner.test-d.ts +46 -0
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +377 -0
- package/src/__tests__/render-feature-graph.integration.test.ts +205 -0
- package/src/__tests__/render-feature-graphics-staging.unit.test.ts +200 -0
- package/src/__tests__/render-feature-order.unit.test.ts +66 -0
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +101 -0
- package/src/__tests__/render-feature-prepared-errors.test-d.ts +82 -0
- package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +141 -0
- package/src/__tests__/render-feature-prepared-graphics-isolation.unit.test.ts +122 -0
- package/src/__tests__/render-feature-prepared-graphics-negative.test-d.ts +59 -0
- package/src/__tests__/render-feature-prepared-graphics-recording.unit.test.ts +107 -0
- package/src/__tests__/render-feature-prepared-graphics.test-d.ts +96 -0
- package/src/__tests__/render-feature-prepared-graphics.unit.test.ts +121 -0
- package/src/__tests__/render-feature-public-surface.test-d.ts +75 -0
- package/src/__tests__/render-feature-retry.unit.test.ts +128 -0
- package/src/__tests__/render-feature-scheduling.unit.test.ts +122 -0
- package/src/__tests__/render-feature-stage-failed-policy-owner.unit.test.ts +146 -0
- package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +236 -0
- package/src/__tests__/render-feature-staging.unit.test.ts +94 -0
- package/src/__tests__/render-feature-visibility-context.test-d.ts +38 -0
- package/src/__tests__/render-feature-visibility-context.unit.test.ts +38 -0
- package/src/__tests__/render-feature-zero-work.unit.test.ts +82 -0
- package/src/__tests__/render-graph-compute-raster-gpu.ts +342 -0
- package/src/__tests__/render-graph-compute-raster.browser.test.ts +16 -0
- package/src/__tests__/render-graph-compute-raster.dawn.test.ts +22 -0
- package/src/__tests__/render-graph-hzb-gpu.ts +239 -0
- package/src/__tests__/render-graph-hzb.browser.test.ts +16 -0
- package/src/__tests__/render-graph-hzb.dawn.test.ts +23 -0
- package/src/__tests__/render-graph-primitives.unit.test.ts +22 -0
- package/src/__tests__/render-graph-storage-indirect-gpu.ts +162 -0
- package/src/__tests__/render-graph-storage-indirect.browser.test.ts +21 -0
- package/src/__tests__/render-graph-storage-indirect.dawn.test.ts +28 -0
- package/src/__tests__/render-scene-projection.unit.test.ts +206 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +125 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +10 -0
- package/src/__tests__/renderer-render-scene-public.test-d.ts +27 -0
- package/src/__tests__/rhi-backend-package-boundary.unit.test.ts +11 -0
- package/src/__tests__/scene-temporal-coverage.unit.test.ts +259 -0
- package/src/__tests__/scriptable-pack-consumer.test-d.ts +14 -0
- package/src/__tests__/shader-stage-surface.unit.test.ts +38 -0
- package/src/__tests__/ssao-kernel-surface.unit.test.ts +15 -0
- package/src/__tests__/sun-snapshot-consumers.test.ts +35 -0
- package/src/__tests__/surface-backend-kind-owner.test-d.ts +42 -0
- package/src/__tests__/surface-configuration.unit.test.ts +92 -0
- package/src/__tests__/taa-history-store.unit.test.ts +196 -0
- package/src/__tests__/temporal-frame-transaction.integration.test.ts +537 -0
- package/src/__tests__/temporal-inspection.unit.test.ts +138 -0
- package/src/__tests__/texture-usage-surface.unit.test.ts +61 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +389 -0
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +52 -0
- package/src/__tests__/urp-pipeline.unit.test.ts +14 -0
- package/src/__tests__/vertex-color-pipeline.unit.test.ts +124 -0
- package/src/__tests__/vertex-layout-consumer.unit.test.ts +25 -0
- package/src/__tests__/visibility-diagnostics.integration.test.ts +66 -0
- package/src/__tests__/visibility-extract.integration.test.ts +89 -0
- package/src/__tests__/visibility-extract.perf.test.ts +96 -0
- package/src/__tests__/visibility-feature-dedup.integration.test.ts +57 -0
- package/src/__tests__/visibility-hidden-report.unit.test.ts +37 -0
- package/src/__tests__/visibility-instances.integration.test.ts +50 -0
- package/src/__tests__/visibility-multi-world.integration.test.ts +54 -0
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +191 -0
- package/src/__tests__/visibility-producer-matrix.unit.test.ts +96 -0
- package/src/__tests__/visibility-public-surface.test-d.ts +26 -0
- package/src/__tests__/visibility-resolver.unit.test.ts +84 -0
- package/src/__tests__/visibility-snapshot-contract.unit.test.ts +59 -0
- package/src/__tests__/vocabulary.unit.test.ts +21 -0
- package/src/assets/__tests__/asset-decoders.unit.test.ts +92 -0
- package/src/assets/__tests__/mipmap-generator.unit.test.ts +52 -0
- package/src/assets/__tests__/render-asset-port.unit.test.ts +54 -0
- package/src/assets/__tests__/resolve-render-asset.unit.test.ts +47 -0
- package/src/assets/asset-decoders.ts +158 -0
- package/src/assets/render-asset-port.ts +44 -0
- package/src/assets/resolve-render-asset.ts +13 -0
- package/src/authoring.ts +24 -0
- package/src/cluster-binner.ts +700 -0
- package/src/components/__tests__/atmosphere-red.test.ts +51 -0
- package/src/components/__tests__/atmosphere.test.ts +79 -0
- package/src/components/__tests__/fog.test-d.ts +49 -0
- package/src/components/__tests__/fog.test.ts +60 -0
- package/src/components/__tests__/schema-parity.unit.test.ts +25 -0
- package/src/components/__tests__/visibility-schema.unit.test.ts +35 -0
- package/src/components/atmosphere.ts +64 -0
- package/src/components/camera.ts +512 -0
- package/src/components/directional-light.ts +120 -0
- package/src/components/environment.ts +206 -0
- package/src/components/glyph-text.ts +63 -0
- package/src/components/index.ts +49 -0
- package/src/components/instances.ts +207 -0
- package/src/components/layer.ts +69 -0
- package/src/components/light-helpers.ts +188 -0
- package/src/components/mesh-filter.ts +59 -0
- package/src/components/mesh-renderer.ts +61 -0
- package/src/components/point-light-shadow.ts +43 -0
- package/src/components/point-light.ts +65 -0
- package/src/components/post-process-params.ts +35 -0
- package/src/components/scene-instance.ts +193 -0
- package/src/components/sort-key.ts +75 -0
- package/src/components/spot-light.ts +124 -0
- package/src/components/sprite-animation.ts +169 -0
- package/src/components/sprite-instances.ts +179 -0
- package/src/components/sprite-playback-mode.ts +73 -0
- package/src/components/sprite-region-override.ts +106 -0
- package/src/components/tile-layer.ts +161 -0
- package/src/components/tilemap.ts +48 -0
- package/src/components/visibility.ts +53 -0
- package/src/construct-renderer.ts +4 -0
- package/src/debug-draw-glue.ts +169 -0
- package/src/deferred-lighting.ts +92 -0
- package/src/dynamic-texture-store.ts +111 -0
- package/src/engine-metrics.ts +89 -0
- package/src/environment/README.md +76 -0
- package/src/environment/__tests__/failure-injection.test.ts +50 -0
- package/src/environment/__tests__/generation-red.test.ts +64 -0
- package/src/environment/__tests__/generation.test.ts +37 -0
- package/src/environment/__tests__/graph-transaction.test.ts +85 -0
- package/src/environment/__tests__/inspection-red.test.ts +53 -0
- package/src/environment/__tests__/lifecycle-evidence.test.ts +40 -0
- package/src/environment/__tests__/pipeline-topology.test.ts +33 -0
- package/src/environment/__tests__/readiness.test.ts +42 -0
- package/src/environment/__tests__/recovery.test.ts +62 -0
- package/src/environment/__tests__/resize-dispose.test.ts +30 -0
- package/src/environment/__tests__/signature-red.test.ts +45 -0
- package/src/environment/__tests__/signature.test.ts +60 -0
- package/src/environment/descriptors.ts +7 -0
- package/src/environment/extracted-environment.ts +239 -0
- package/src/environment/generation.ts +158 -0
- package/src/environment/gpu-bundle.ts +144 -0
- package/src/environment/graph.ts +588 -0
- package/src/environment/inspection.ts +107 -0
- package/src/environment/lifecycle.ts +124 -0
- package/src/environment/readiness.ts +76 -0
- package/src/environment/signature.ts +185 -0
- package/src/errors/ecs-validation.ts +16 -0
- package/src/errors/index.ts +3 -0
- package/src/errors/recover.ts +119 -0
- package/src/errors/render.ts +1244 -0
- package/src/extract/__tests__/directional-csm-domain.unit.test.ts +391 -0
- package/src/extract/__tests__/environment-source.test.ts +105 -0
- package/src/extract/__tests__/schema-readers.unit.test.ts +16 -0
- package/src/extract/directional-csm.ts +959 -0
- package/src/extract/index.ts +10 -0
- package/src/extract/material-interface.ts +604 -0
- package/src/extract/schema-readers.ts +27 -0
- package/src/extract/visibility.ts +120 -0
- package/src/features/graph-contribution.ts +577 -0
- package/src/features/host.ts +1097 -0
- package/src/features/index.ts +100 -0
- package/src/features/morph/index.ts +24 -0
- package/src/features/morph/morph-bounds.ts +123 -0
- package/src/features/morph/morph-feature.ts +287 -0
- package/src/features/prepared-gpu-work.ts +902 -0
- package/src/features/prepared-graphics-store.ts +435 -0
- package/src/features/prepared-graphics.ts +479 -0
- package/src/features/render-graph-compute.ts +60 -0
- package/src/features/render-graph-contribution.ts +95 -0
- package/src/features/render-graph-raster.ts +308 -0
- package/src/features/render-graph-resources.ts +36 -0
- package/src/features/scene-temporal.ts +274 -0
- package/src/features/taa-resolve.ts +244 -0
- package/src/features/targets.ts +83 -0
- package/src/features/types.ts +291 -0
- package/src/frame-chain.ts +21 -0
- package/src/fullscreen-post-process-pass.ts +406 -0
- package/src/glyph-text-layout-system.ts +447 -0
- package/src/gpu-driven/batch-topology.ts +423 -0
- package/src/gpu-driven/production-raster.ts +1705 -0
- package/src/gpu-driven/view-gpu.ts +849 -0
- package/src/gpu-driven/view-reference.ts +110 -0
- package/src/gpu-resource-store.ts +1921 -0
- package/src/gpu-resource.ts +159 -0
- package/src/gpu-scene-schema.ts +224 -0
- package/src/gpu-scene.ts +855 -0
- package/src/gpu-stage.ts +9 -0
- package/src/gpu-texture-usage.ts +12 -0
- package/src/gpu-usage.ts +14 -0
- package/src/hdrp-buffers.ts +689 -0
- package/src/hdrp-cluster-membership.ts +70 -0
- package/src/hdrp-pipeline.ts +525 -0
- package/src/ibl/IblPipelineCache.ts +1246 -0
- package/src/ibl/cubemap-projection.ts +60 -0
- package/src/ibl/face-uniforms.ts +150 -0
- package/src/ibl/skylight-bind-group.ts +513 -0
- package/src/index.ts +271 -0
- package/src/instance-buffer-cache.ts +123 -0
- package/src/internal.ts +88 -0
- package/src/lifecycle.ts +123 -0
- package/src/light-buffer-layout.ts +346 -0
- package/src/materials.ts +236 -0
- package/src/mesh-material-bindings.ts +104 -0
- package/src/mesh-update-errors.ts +113 -0
- package/src/mipmap-generator.ts +244 -0
- package/src/param-schema-projection-census.ts +73 -0
- package/src/pbr-pipeline.ts +749 -0
- package/src/persistent-render-scene.ts +1752 -0
- package/src/pipeline/index.ts +40 -0
- package/src/pipeline-builder.ts +386 -0
- package/src/pipeline-errors.ts +172 -0
- package/src/pipeline-spec.ts +1768 -0
- package/src/plugin.ts +137 -0
- package/src/post-process-errors.ts +304 -0
- package/src/prepare/__tests__/schema-readers.unit.test.ts +16 -0
- package/src/prepare/index.ts +8 -0
- package/src/prepare/prepared-graphics-resolver.ts +455 -0
- package/src/prepare/schema-readers.ts +20 -0
- package/src/record/__tests__/environment-record.test.ts +35 -0
- package/src/record/__tests__/frame-targets.unit.test.ts +54 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +41 -0
- package/src/record/__tests__/material-slot-plan.unit.test.ts +76 -0
- package/src/record/__tests__/membership-timing.unit.test.ts +524 -0
- package/src/record/__tests__/render-submission.integration.test.ts +76 -0
- package/src/record/__tests__/render-submission.perf.test.ts +141 -0
- package/src/record/__tests__/shadow-submit-mode.unit.test.ts +88 -0
- package/src/record/__tests__/video-texture-view.unit.test.ts +90 -0
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +101 -0
- package/src/record/frame-lighting.ts +1183 -0
- package/src/record/frame-observation.ts +122 -0
- package/src/record/frame-snapshot.ts +515 -0
- package/src/record/frame-targets.ts +372 -0
- package/src/record/frame.ts +1874 -0
- package/src/record/helpers.ts +289 -0
- package/src/record/index.ts +15 -0
- package/src/record/main-pass-geometry.ts +1014 -0
- package/src/record/main-pass-material.ts +716 -0
- package/src/record/main-pass-skin.ts +51 -0
- package/src/record/main-pass-sprite-draws.ts +1056 -0
- package/src/record/main-pass-sprite.ts +166 -0
- package/src/record/main-pass.ts +588 -0
- package/src/record/material-payload.ts +292 -0
- package/src/record/material-slot-plan.ts +68 -0
- package/src/record/membership-timing.ts +1012 -0
- package/src/record/mesh-ssbo.ts +406 -0
- package/src/record/shadow-caster-uniform.ts +37 -0
- package/src/record/shadow-pass.ts +2387 -0
- package/src/record/shadow-submit-mode.ts +277 -0
- package/src/record/skybox-post-pass.ts +594 -0
- package/src/record/typed-frame-graph.ts +499 -0
- package/src/record/view-ubo.ts +206 -0
- package/src/render-data.ts +385 -0
- package/src/render-dispatch-membership.ts +155 -0
- package/src/render-graph-primitives.ts +1586 -0
- package/src/render-pipeline-context.ts +332 -0
- package/src/render-pipeline-target.ts +96 -0
- package/src/render-pipeline.ts +343 -0
- package/src/render-scene-projection.ts +1738 -0
- package/src/render-system-extract.ts +5203 -0
- package/src/render-system-fold.ts +531 -0
- package/src/render-system.ts +3258 -0
- package/src/renderer/asset-service.ts +32 -0
- package/src/renderer/backend-selection.ts +121 -0
- package/src/renderer/environment-classify.ts +30 -0
- package/src/renderer/environment-error.ts +19 -0
- package/src/renderer/material/assembly.ts +53 -0
- package/src/renderer/material/pipeline-projection.ts +140 -0
- package/src/renderer/renderer-factory.ts +9062 -0
- package/src/renderer.ts +940 -0
- package/src/scene-instances/post-spawn-resolve-joints.ts +168 -0
- package/src/scene-utils/collect-subtree.ts +40 -0
- package/src/shadow-atlas.ts +244 -0
- package/src/ssao-buffers.ts +175 -0
- package/src/ssao-config.ts +61 -0
- package/src/ssao-data.ts +106 -0
- package/src/surface-format.ts +37 -0
- package/src/systems/active-camera.ts +116 -0
- package/src/systems/pass-selector.ts +49 -0
- package/src/systems/skin-palette-allocator.ts +294 -0
- package/src/systems/transparent-sort-config.ts +211 -0
- package/src/taa-history-store.ts +429 -0
- package/src/temporal-coverage.ts +106 -0
- package/src/temporal-frame-transaction.ts +301 -0
- package/src/temporal-inspection.ts +194 -0
- package/src/temporal-view.ts +174 -0
- package/src/tilemap/resolve-tileset-runtime.ts +72 -0
- package/src/tilemap-chunk-extract-system.ts +1307 -0
- package/src/typed-render-graph-primitives.ts +530 -0
- package/src/typed-shadow-passes.ts +195 -0
- package/src/urp-pipeline.ts +340 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
// @forgeax/engine-runtime - host-side packing helpers for the
|
|
2
|
+
// PointLight + SpotLight std430 storage buffers + storage-buffer cap gate.
|
|
3
|
+
//
|
|
4
|
+
// Owns the byte-frozen std430 layout (D-S2):
|
|
5
|
+
//
|
|
6
|
+
// PointLight (32 B / 8 floats):
|
|
7
|
+
// [ 0..2 ] position vec3<f32>
|
|
8
|
+
// [ 3 ] invRangeSquared f32 (Bevy color_inverse_square_range.w)
|
|
9
|
+
// [ 4..6 ] color vec3<f32> (host-pre-multiplied: color * intensity)
|
|
10
|
+
// [ 7 ] shadowAtlasLayer i32 (sentinel -1 = no shadow; 0..3 = atlas layer)
|
|
11
|
+
// — feat-20260612-point-light-shadows-urp-hdrp M1 / T-M1-8 (D-2):
|
|
12
|
+
// repurposes the prior `pointPadW` lane. The lane is written as
|
|
13
|
+
// i32 via an Int32Array view of the same backing ArrayBuffer; the
|
|
14
|
+
// shader reads `shadowAtlasLayer: i32` from byte 28..32 of struct
|
|
15
|
+
// PointLight in common.wgsl. -1 (0xFFFFFFFF) is the no-shadow
|
|
16
|
+
// sentinel — shader path samples shadow only when layer >= 0.
|
|
17
|
+
//
|
|
18
|
+
// SpotLight (64 B / 16 floats):
|
|
19
|
+
// [ 0..2 ] position vec3<f32>
|
|
20
|
+
// [ 3 ] invRangeSquared f32
|
|
21
|
+
// [ 4..6 ] color vec3<f32> (host-pre-multiplied)
|
|
22
|
+
// [ 7 ] cosInner f32
|
|
23
|
+
// [ 8..10] direction vec3<f32> (raw outgoing vector)
|
|
24
|
+
// [ 11 ] cosOuter f32
|
|
25
|
+
// [12..14] pad f32 = 0 (std430 vec4 stride alignment)
|
|
26
|
+
// [ 15 ] shadowAtlasTile i32 (sentinel -1 = unassigned/clipped; 0..3 = tile)
|
|
27
|
+
// — feat-20260625-spot-light-shadow-mapping M2 / w8 (D-4):
|
|
28
|
+
// SpotLight GPU struct had no free pad lane (8 lanes full), so the
|
|
29
|
+
// clip signal extends the struct to a 4th vec4 column. The lane is
|
|
30
|
+
// written i32 via an Int32Array view of the same backing
|
|
31
|
+
// ArrayBuffer; the shader reads `shadowAtlasTile: i32` from byte
|
|
32
|
+
// 60..64 of struct SpotLight (common.wgsl). -1 (0xFFFFFFFF) is the
|
|
33
|
+
// unassigned/clipped sentinel — shader samples shadow only when
|
|
34
|
+
// tile >= 0. Mirrors point's slot-7 shadowAtlasLayer pattern.
|
|
35
|
+
//
|
|
36
|
+
// Array header (16 B, std430 stride alignment):
|
|
37
|
+
// [ 0 ] count u32 (number of valid slots in the trailing array)
|
|
38
|
+
// [ 1..3 ] pad u32 = 0
|
|
39
|
+
//
|
|
40
|
+
// AC anchor: requirements AC-04 (c) + C-7 (16 B alignment); plan-strategy
|
|
41
|
+
// section 2 D-S2 (byte-frozen layout); research Finding 2 (Bevy
|
|
42
|
+
// invRangeSquared naming) + Finding 9 (Bevy storage buffer pattern).
|
|
43
|
+
//
|
|
44
|
+
// Cap gate: maxStorageBuffersPerShaderStage >= 4 (M3 occupies 3 storage
|
|
45
|
+
// entries: meshSSBO + pointLightsBuffer + spotLightsBuffer; default WebGPU
|
|
46
|
+
// minimum is 8, requirements assumption A-7 + plan R-4). The closed
|
|
47
|
+
// `RhiErrorCode` union has no `'rhi-not-supported'` member; the
|
|
48
|
+
// plan-strategy phrasing collapses onto the spec-aligned `'limit-exceeded'`
|
|
49
|
+
// arm which already documents "input value exceeded device.limits.<name>"
|
|
50
|
+
// (RhiError JSDoc on packages/rhi/src/errors.ts). Reusing `'limit-exceeded'`
|
|
51
|
+
// keeps `RhiErrorCode` count at 18 (AGENTS.md error model evolution
|
|
52
|
+
// contract: minor add-only; w20a explicitly forbids count drift).
|
|
53
|
+
|
|
54
|
+
import { err, ok, type Result, RhiError } from '@forgeax/engine-rhi';
|
|
55
|
+
import type { PointLightSnapshot, SpotLightSnapshot } from './render-system-extract';
|
|
56
|
+
|
|
57
|
+
// ── HDRP LightSlot cluster-forward unified struct ─────────────────────────────
|
|
58
|
+
// feat-20260608-cluster-lighting M4 / w16.
|
|
59
|
+
//
|
|
60
|
+
// LightSlot is the single std430 struct shared by point and spot lights in the
|
|
61
|
+
// HDRP cluster-forward path. Field layout is byte-frozen (AC-11 double-sided
|
|
62
|
+
// lock with WGSL hdrp-cluster-forward.wgsl LightSlot struct):
|
|
63
|
+
//
|
|
64
|
+
// [ 0..2 ] position vec3<f32>
|
|
65
|
+
// [ 3 ] invRangeSquared f32
|
|
66
|
+
// [ 4..6 ] color vec3<f32> (host pre-multiplied: color * intensity)
|
|
67
|
+
// [ 7 ] cosInner f32 (point: 1.0)
|
|
68
|
+
// [ 8..10] direction vec3<f32> (point: vec3(0))
|
|
69
|
+
// [ 11 ] cosOuter f32 (point: 0.0)
|
|
70
|
+
// [ 12 ] kind u32 (POINT = 0, SPOT = 1)
|
|
71
|
+
// [ 13 ] shadow identity i32 (point layer / spot tile, -1 sentinel)
|
|
72
|
+
// [14..15] point depth f32x2 (point near/far; spot zero)
|
|
73
|
+
//
|
|
74
|
+
// Design: research Finding 1 (Bevy GpuClusteredLight 152B -> forgeax 64B),
|
|
75
|
+
// plan-strategy D-light-slot (kind bit-tag discriminant).
|
|
76
|
+
//
|
|
77
|
+
// The existing URP PointLight (32B) / SpotLight (48B) pack functions remain
|
|
78
|
+
// untouched; packLightSlot is the new HDRP-only entry.
|
|
79
|
+
|
|
80
|
+
/** Byte size of one HDRP LightSlot in std430 (16 x f32). AC-11 absolute-value lock. */
|
|
81
|
+
export const BYTES_PER_LIGHT_SLOT = 64;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* LightSlot kind discriminant — closed enum matching WGSL `KIND_POINT` / `KIND_SPOT`.
|
|
85
|
+
* Values are u32 bit-tags (not sequential); AC-12 exhaustive switch.
|
|
86
|
+
*/
|
|
87
|
+
export const LightSlotKind = {
|
|
88
|
+
POINT: 0,
|
|
89
|
+
SPOT: 1,
|
|
90
|
+
} as const;
|
|
91
|
+
export type LightSlotKind = (typeof LightSlotKind)[keyof typeof LightSlotKind];
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Byte-offset layout of one LightSlot in std430 (16 f32 = 64 B).
|
|
95
|
+
*
|
|
96
|
+
* Mirrors the WGSL `LightSlot` struct field order byte-for-byte.
|
|
97
|
+
* All offsets verified by w14 lightslot-layout.test.ts.
|
|
98
|
+
*
|
|
99
|
+
* feat-20260612-point-light-shadows-urp-hdrp M4 / T-M4-4 (plan-strategy §D-8):
|
|
100
|
+
* the prior u32x3 pad lanes at byte 52..64 carry shadow-side data on the HDRP
|
|
101
|
+
* path. `kind_and_pad.x = kind` (u32), `.y = shadow identity` (i32, sentinel
|
|
102
|
+
* -1 = no shadow), `.z = near` (f32 via bitcast), `.w = far`
|
|
103
|
+
* (f32 via bitcast). The shader reads near/far through `bitcast<f32>(...)`
|
|
104
|
+
* to keep the WGSL struct as `vec4<u32>` (alignment + naga_oil unchanged).
|
|
105
|
+
*/
|
|
106
|
+
export const LIGHTSLOT_LAYOUT = {
|
|
107
|
+
byteSize: BYTES_PER_LIGHT_SLOT,
|
|
108
|
+
positionOffset: 0,
|
|
109
|
+
invRangeSquaredOffset: 12,
|
|
110
|
+
colorOffset: 16,
|
|
111
|
+
cosInnerOffset: 28,
|
|
112
|
+
directionOffset: 32,
|
|
113
|
+
cosOuterOffset: 44,
|
|
114
|
+
kindOffset: 48,
|
|
115
|
+
shadowPayloadOffset: 52,
|
|
116
|
+
shadowAtlasLayerOffset: 52,
|
|
117
|
+
shadowAtlasTileOffset: 52,
|
|
118
|
+
shadowNearOffset: 56,
|
|
119
|
+
shadowFarOffset: 60,
|
|
120
|
+
floatCount: 16,
|
|
121
|
+
vec4Count: 4,
|
|
122
|
+
} as const;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Minimum storage-buffer count needed by the M3 record stage.
|
|
126
|
+
*
|
|
127
|
+
* 1. Mesh SSBO (entity_world + normalMatrix; per-renderable dynamic
|
|
128
|
+
* offset, 256 B stride).
|
|
129
|
+
* 2. PointLight std430 array (this feat).
|
|
130
|
+
* 3. SpotLight std430 array (this feat).
|
|
131
|
+
*
|
|
132
|
+
* Plan R-4 + plan-strategy section 4 risk table: assert >= 4 to keep the
|
|
133
|
+
* head-room margin for todo-125 (cluster expansion lifts to 4-5 entries).
|
|
134
|
+
*/
|
|
135
|
+
export const STORAGE_BUFFER_MIN_REQUIRED = 4;
|
|
136
|
+
|
|
137
|
+
/** Byte size of one PointLight std430 slot (vec4 * 2). */
|
|
138
|
+
export const POINT_LIGHT_STD430_BYTES = 32;
|
|
139
|
+
/**
|
|
140
|
+
* Byte size of one SpotLight std430 slot (vec4 * 4).
|
|
141
|
+
*
|
|
142
|
+
* feat-20260625-spot-light-shadow-mapping M2 / w8 (D-4): grew 48 -> 64 to make
|
|
143
|
+
* room for the `shadowAtlasTile: i32` clip-signal lane (slot 15). Slots 0..11
|
|
144
|
+
* keep the prior layout; slots 12..14 are vec4-alignment padding.
|
|
145
|
+
*/
|
|
146
|
+
export const SPOT_LIGHT_STD430_BYTES = 64;
|
|
147
|
+
|
|
148
|
+
/** Sentinel value for SpotLight slot[15] meaning "no shadow / clipped". */
|
|
149
|
+
export const SPOT_LIGHT_SHADOW_TILE_SENTINEL = -1;
|
|
150
|
+
/** Byte size of the array header (count u32 + 12 B pad to 16 B stride). */
|
|
151
|
+
export const LIGHT_ARRAY_HEADER_BYTES = 16;
|
|
152
|
+
/** Maximum number of slots packed in the first-slice cap layout (D-S3). */
|
|
153
|
+
export const LIGHT_ARRAY_MAX_SLOTS = 4;
|
|
154
|
+
|
|
155
|
+
/** Sentinel value for PointLight slot[7] / LightSlot pad meaning "no shadow". */
|
|
156
|
+
export const POINT_LIGHT_SHADOW_LAYER_SENTINEL = -1;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Pack one PointLightSnapshot into 8 floats / 32 B byte-for-byte std430.
|
|
160
|
+
*
|
|
161
|
+
* Returns a fresh `Float32Array` per call; `Float32Array.byteLength === 32`
|
|
162
|
+
* by construction (Float32Array(8).buffer.byteLength === 32). Slot 7
|
|
163
|
+
* (byte 28..32) carries `shadowAtlasLayer: i32` (sentinel -1 = no shadow,
|
|
164
|
+
* 0..3 = cube_array atlas layer index for shadow casters). The lane is
|
|
165
|
+
* written through an Int32Array view of the same backing ArrayBuffer so the
|
|
166
|
+
* shader's `i32` read at byte 28..32 of `struct PointLight` (common.wgsl)
|
|
167
|
+
* sees the correct two's-complement bits (-1 = 0xFFFFFFFF).
|
|
168
|
+
*/
|
|
169
|
+
export function packPointLight(snap: PointLightSnapshot): Float32Array {
|
|
170
|
+
const out = new Float32Array(8);
|
|
171
|
+
out[0] = snap.position[0] ?? 0;
|
|
172
|
+
out[1] = snap.position[1] ?? 0;
|
|
173
|
+
out[2] = snap.position[2] ?? 0;
|
|
174
|
+
out[3] = snap.invRangeSquared;
|
|
175
|
+
out[4] = snap.color[0] ?? 0;
|
|
176
|
+
out[5] = snap.color[1] ?? 0;
|
|
177
|
+
out[6] = snap.color[2] ?? 0;
|
|
178
|
+
// Slot 7: shadowAtlasLayer i32 via Int32Array view (sentinel -1 default).
|
|
179
|
+
const i32 = new Int32Array(out.buffer);
|
|
180
|
+
i32[7] = snap.shadowAtlasLayer ?? POINT_LIGHT_SHADOW_LAYER_SENTINEL;
|
|
181
|
+
return out;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Pack one SpotLightSnapshot into 16 floats (64 B byte-for-byte std430).
|
|
186
|
+
*
|
|
187
|
+
* cosInner / cosOuter ride the otherwise-padding `.w` lanes of the
|
|
188
|
+
* `color` and `direction` vec4 columns (AC-04 c + plan D-S2 16 B alignment
|
|
189
|
+
* via packing rather than padding rows). Slot 15 carries `shadowAtlasTile: i32`
|
|
190
|
+
* (sentinel -1 = unassigned/clipped, 0..3 = atlas tile) written through an
|
|
191
|
+
* Int32Array view so the shader's `i32` read at byte 60..64 of struct SpotLight
|
|
192
|
+
* (common.wgsl) sees the correct two's-complement bits (-1 = 0xFFFFFFFF).
|
|
193
|
+
* Slots 12..14 stay zero (vec4-alignment padding). feat-20260625 M2 / w8 (D-4).
|
|
194
|
+
*/
|
|
195
|
+
export function packSpotLight(snap: SpotLightSnapshot): Float32Array {
|
|
196
|
+
const out = new Float32Array(16);
|
|
197
|
+
out[0] = snap.position[0] ?? 0;
|
|
198
|
+
out[1] = snap.position[1] ?? 0;
|
|
199
|
+
out[2] = snap.position[2] ?? 0;
|
|
200
|
+
out[3] = snap.invRangeSquared;
|
|
201
|
+
out[4] = snap.color[0] ?? 0;
|
|
202
|
+
out[5] = snap.color[1] ?? 0;
|
|
203
|
+
out[6] = snap.color[2] ?? 0;
|
|
204
|
+
out[7] = snap.cosInner;
|
|
205
|
+
out[8] = snap.direction[0] ?? 0;
|
|
206
|
+
out[9] = snap.direction[1] ?? 0;
|
|
207
|
+
out[10] = snap.direction[2] ?? 0;
|
|
208
|
+
out[11] = snap.cosOuter;
|
|
209
|
+
// Slots 12..14 stay zero (vec4-alignment padding).
|
|
210
|
+
// Slot 15: shadowAtlasTile i32 via Int32Array view (sentinel -1 default).
|
|
211
|
+
const i32 = new Int32Array(out.buffer);
|
|
212
|
+
i32[15] = snap.shadowAtlasTile ?? SPOT_LIGHT_SHADOW_TILE_SENTINEL;
|
|
213
|
+
return out;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Pack the 16-byte std430 array header (count u32 + 12 B pad) for the
|
|
218
|
+
* point/spot light storage buffers.
|
|
219
|
+
*
|
|
220
|
+
* Returns a fresh `ArrayBuffer` so callers can either re-view it as
|
|
221
|
+
* `Uint8Array` for `queue.writeBuffer` or as `Uint32Array` for in-place
|
|
222
|
+
* inspection.
|
|
223
|
+
*/
|
|
224
|
+
export function packLightArrayHeader(count: number): ArrayBuffer {
|
|
225
|
+
const buf = new ArrayBuffer(LIGHT_ARRAY_HEADER_BYTES);
|
|
226
|
+
const u32 = new Uint32Array(buf);
|
|
227
|
+
u32[0] = count >>> 0;
|
|
228
|
+
// Slots 1..3 stay zero (12 B pad to 16 B stride alignment).
|
|
229
|
+
return buf;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Cap gate at createRenderer time: check whether the device has enough
|
|
234
|
+
* storage-buffer slots for the PBR pipeline (M3 requires
|
|
235
|
+
* `STORAGE_BUFFER_MIN_REQUIRED = 4`). Returns a three-way signal:
|
|
236
|
+
*
|
|
237
|
+
* - `Result.ok(true)` — storage buffer capable (cap >= 4);
|
|
238
|
+
* - `Result.ok(false)` — no storage buffer capability at all (cap === 0);
|
|
239
|
+
* consumer walks the uniform-fallback path;
|
|
240
|
+
* - `Result.err(RhiError)` — cap in (0, 4); not enough storage slots to run
|
|
241
|
+
* but also not a clean zero-cap uniform-fallback case (e.g. downlevel
|
|
242
|
+
* adapter with 1-3 slots). The error carries `'limit-exceeded'` with
|
|
243
|
+
* `LimitExceededDetail` shape.
|
|
244
|
+
*
|
|
245
|
+
* Uniform-fallback path decision (plan D-5): `cap === 0` is the wgpu
|
|
246
|
+
* WebGL2 backend signal (`downlevel_webgl2_defaults().limits.
|
|
247
|
+
* maxStorageBuffersPerShaderStage = 0`). Uniform fallback covers pointLight
|
|
248
|
+
* + spotLight + meshes + instances + skin palette — every storage-buffer
|
|
249
|
+
* entry in the PBR pipeline switches to `uniform`.
|
|
250
|
+
*/
|
|
251
|
+
/**
|
|
252
|
+
* Optional shadow info attached to a HDRP LightSlot for point lights with a
|
|
253
|
+
* companion `PointLightShadow` component. Sentinel `layer = -1` (the default
|
|
254
|
+
* when the snapshot has no shadow) makes the shader skip cube_array sampling
|
|
255
|
+
* and stay on the unshadowed `evalPoint` path.
|
|
256
|
+
*
|
|
257
|
+
* `near` / `far` ride the otherwise-pad lanes (`kind_and_pad.zw` in the WGSL
|
|
258
|
+
* struct, byte 56..64) and feed the depth-ref reconstruction in
|
|
259
|
+
* `evalPointShadowed`. Spot lights (and shadow-less point lights) leave these
|
|
260
|
+
* lanes zero per std430 init.
|
|
261
|
+
*/
|
|
262
|
+
export interface PointShadowSlotInfo {
|
|
263
|
+
readonly shadowAtlasLayer: number;
|
|
264
|
+
readonly near: number;
|
|
265
|
+
readonly far: number;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Pack one PointLightSnapshot or SpotLightSnapshot into a 64-byte LightSlot
|
|
270
|
+
* (16 floats, std430). Point lights fill `cosInner=1.0`, `direction=vec3(0)`,
|
|
271
|
+
* `cosOuter=0.0`, `kind=POINT(0)`. Spot lights fill all fields verbatim;
|
|
272
|
+
* `direction` is already normalized by extract and this owner never repeats
|
|
273
|
+
* that operation.
|
|
274
|
+
*
|
|
275
|
+
* feat-20260612-point-light-shadows-urp-hdrp M4 / T-M4-4 (plan-strategy §D-8):
|
|
276
|
+
* the optional point `shadow` info threads through to bytes 52..64 as
|
|
277
|
+
* `(shadowAtlasLayer i32, near f32, far f32)`. Spot snapshots write their
|
|
278
|
+
* `shadowAtlasTile` directly into the same identity lane and keep near/far 0.
|
|
279
|
+
* The shader reads `near`/`far`
|
|
280
|
+
* through `bitcast<f32>(kind_and_pad.zw)` so the WGSL struct stays
|
|
281
|
+
* `kind_and_pad: vec4<u32>` (alignment + naga_oil compose unchanged). When
|
|
282
|
+
* `shadow` is undefined (no PointLightShadow) the lanes default to
|
|
283
|
+
* `(layer = -1, 0, 0)` -- shader gates on `layer >= 0` so unshadowed lights
|
|
284
|
+
* stay on the `evaluate_point_light` path. Spot lights write their tile or -1.
|
|
285
|
+
*
|
|
286
|
+
* Returns a fresh `Float32Array(16)` per call.
|
|
287
|
+
*/
|
|
288
|
+
export function packLightSlot(
|
|
289
|
+
snap: PointLightSnapshot | SpotLightSnapshot,
|
|
290
|
+
shadow?: PointShadowSlotInfo,
|
|
291
|
+
): Float32Array {
|
|
292
|
+
const out = new Float32Array(16);
|
|
293
|
+
// position (vec3<f32> + invRangeSquared at lane .w)
|
|
294
|
+
out[0] = snap.position[0] ?? 0;
|
|
295
|
+
out[1] = snap.position[1] ?? 0;
|
|
296
|
+
out[2] = snap.position[2] ?? 0;
|
|
297
|
+
out[3] = snap.invRangeSquared;
|
|
298
|
+
// color (vec3<f32> + cosInner at lane .w)
|
|
299
|
+
out[4] = snap.color[0] ?? 0;
|
|
300
|
+
out[5] = snap.color[1] ?? 0;
|
|
301
|
+
out[6] = snap.color[2] ?? 0;
|
|
302
|
+
out[7] = snap.kind === 'point' ? 1.0 : snap.cosInner;
|
|
303
|
+
// direction (vec3<f32> + cosOuter at lane .w)
|
|
304
|
+
out[8] = snap.kind === 'point' ? 0 : (snap.direction[0] ?? 0);
|
|
305
|
+
out[9] = snap.kind === 'point' ? 0 : (snap.direction[1] ?? 0);
|
|
306
|
+
out[10] = snap.kind === 'point' ? 0 : (snap.direction[2] ?? 0);
|
|
307
|
+
out[11] = snap.kind === 'point' ? 0.0 : snap.cosOuter;
|
|
308
|
+
// Kind is a raw u32 discriminant at byte 48. Do not assign through the
|
|
309
|
+
// Float32Array: SPOT=1 must be 0x00000001, not f32(1.0) bits.
|
|
310
|
+
const u32 = new Uint32Array(out.buffer);
|
|
311
|
+
u32[12] = snap.kind === 'point' ? LightSlotKind.POINT : LightSlotKind.SPOT;
|
|
312
|
+
// Lanes 13..15 carry one kind-discriminated shadow identity. Point keeps
|
|
313
|
+
// layer/near/far; spot writes its snapshot tile and leaves near/far zero.
|
|
314
|
+
const i32 = new Int32Array(out.buffer);
|
|
315
|
+
if (snap.kind === 'point' && shadow !== undefined) {
|
|
316
|
+
i32[13] = shadow.shadowAtlasLayer;
|
|
317
|
+
out[14] = shadow.near;
|
|
318
|
+
out[15] = shadow.far;
|
|
319
|
+
} else if (snap.kind === 'spot') {
|
|
320
|
+
i32[13] = snap.shadowAtlasTile;
|
|
321
|
+
} else {
|
|
322
|
+
i32[13] = POINT_LIGHT_SHADOW_LAYER_SENTINEL;
|
|
323
|
+
// out[14] / out[15] remain zero (Float32Array zero-init).
|
|
324
|
+
}
|
|
325
|
+
return out;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export function assertStorageBufferCap(cap: number): Result<boolean, RhiError> {
|
|
329
|
+
if (cap >= STORAGE_BUFFER_MIN_REQUIRED) {
|
|
330
|
+
return ok(true);
|
|
331
|
+
}
|
|
332
|
+
if (cap === 0) {
|
|
333
|
+
return ok(false);
|
|
334
|
+
}
|
|
335
|
+
return err(
|
|
336
|
+
new RhiError({
|
|
337
|
+
code: 'limit-exceeded',
|
|
338
|
+
expected: `device.limits.maxStorageBuffersPerShaderStage >= ${STORAGE_BUFFER_MIN_REQUIRED}, or exactly 0 for uniform-fallback path`,
|
|
339
|
+
hint: `device.limits.maxStorageBuffersPerShaderStage = ${cap} < ${STORAGE_BUFFER_MIN_REQUIRED} and != 0. WebGPU spec default minimum is 8; this may be a downlevel adapter with partial storage support. Wait for todo-125 multi-light-pack which collapses point + spot into a single cluster storage buffer (1 entry instead of 2) for 2-3 buffer environments.`,
|
|
340
|
+
detail: {
|
|
341
|
+
maxStorageBufferBindingSize: cap,
|
|
342
|
+
requestedBytes: STORAGE_BUFFER_MIN_REQUIRED,
|
|
343
|
+
},
|
|
344
|
+
}),
|
|
345
|
+
);
|
|
346
|
+
}
|
package/src/materials.ts
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
MaterialAsset,
|
|
3
|
+
MaterialColorSpace,
|
|
4
|
+
MaterialParameter,
|
|
5
|
+
MaterialPass,
|
|
6
|
+
MaterialRenderState,
|
|
7
|
+
MaterialTextureValue,
|
|
8
|
+
MaterialValue,
|
|
9
|
+
} from '@forgeax/engine-types';
|
|
10
|
+
|
|
11
|
+
export const SPRITE_PREMULTIPLIED_ALPHA_BLEND: GPUBlendState = {
|
|
12
|
+
color: { srcFactor: 'one', dstFactor: 'one-minus-src-alpha', operation: 'add' },
|
|
13
|
+
alpha: { srcFactor: 'one', dstFactor: 'one-minus-src-alpha', operation: 'add' },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const STANDARD_MODULE = 'forgeax_material::standard';
|
|
17
|
+
const UNLIT_MODULE = 'forgeax_material::unlit';
|
|
18
|
+
const SPRITE_MODULE = 'forgeax_material::sprite';
|
|
19
|
+
|
|
20
|
+
export function materialTextureValue(value: MaterialValue): MaterialValue;
|
|
21
|
+
export function materialTextureValue(value: string): MaterialValue;
|
|
22
|
+
export function materialTextureValue(value: undefined): undefined;
|
|
23
|
+
export function materialTextureValue(
|
|
24
|
+
value: MaterialValue | string | undefined,
|
|
25
|
+
): MaterialValue | undefined {
|
|
26
|
+
if (value === undefined) return undefined;
|
|
27
|
+
if (typeof value === 'string') return value;
|
|
28
|
+
if (typeof value === 'number') {
|
|
29
|
+
return { texture: value as unknown as MaterialTextureValue['texture'] };
|
|
30
|
+
}
|
|
31
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) return value;
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function authoredColorParameter(
|
|
36
|
+
name: string,
|
|
37
|
+
type: 'color' | 'vec3',
|
|
38
|
+
colorSpace: MaterialColorSpace,
|
|
39
|
+
optional = false,
|
|
40
|
+
): MaterialParameter {
|
|
41
|
+
return {
|
|
42
|
+
name,
|
|
43
|
+
type,
|
|
44
|
+
...(type === 'color' && colorSpace === 'srgb' ? {} : { colorSpace }),
|
|
45
|
+
...(optional ? { optional: true } : {}),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function standardParameters(colorSpace: MaterialColorSpace): readonly MaterialParameter[] {
|
|
50
|
+
return [
|
|
51
|
+
authoredColorParameter('baseColor', 'color', colorSpace),
|
|
52
|
+
{ name: 'metallic', type: 'f32' },
|
|
53
|
+
{ name: 'roughness', type: 'f32' },
|
|
54
|
+
{ name: 'metallicChannel', type: 'f32', optional: true },
|
|
55
|
+
{ name: 'roughnessChannel', type: 'f32', optional: true },
|
|
56
|
+
{ name: 'aoChannel', type: 'f32', optional: true },
|
|
57
|
+
{ name: 'extraChannel', type: 'f32', optional: true },
|
|
58
|
+
authoredColorParameter('emissive', 'vec3', colorSpace, true),
|
|
59
|
+
{ name: 'emissiveIntensity', type: 'f32', optional: true },
|
|
60
|
+
{ name: 'occlusionStrength', type: 'f32', optional: true },
|
|
61
|
+
{ name: 'alphaCutoff', type: 'f32', optional: true },
|
|
62
|
+
{ name: 'clearcoat', type: 'f32', optional: true },
|
|
63
|
+
{ name: 'clearcoatRoughness', type: 'f32', optional: true },
|
|
64
|
+
authoredColorParameter('specularTint', 'vec3', colorSpace, true),
|
|
65
|
+
{ name: 'baseColorTexture', type: 'texture', optional: true },
|
|
66
|
+
{ name: 'metallicRoughnessTexture', type: 'texture', optional: true },
|
|
67
|
+
{ name: 'normalTexture', type: 'texture', optional: true },
|
|
68
|
+
{ name: 'specularTintTexture', type: 'texture', optional: true },
|
|
69
|
+
{ name: 'emissiveTexture', type: 'texture', optional: true },
|
|
70
|
+
{ name: 'occlusionTexture', type: 'texture', optional: true },
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function unlitParameters(colorSpace: MaterialColorSpace): readonly MaterialParameter[] {
|
|
75
|
+
return [
|
|
76
|
+
authoredColorParameter('baseColor', 'color', colorSpace),
|
|
77
|
+
{ name: 'alphaCutoff', type: 'f32', optional: true },
|
|
78
|
+
{ name: 'baseColorTexture', type: 'texture', optional: true },
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function pass(
|
|
83
|
+
name: string,
|
|
84
|
+
module: string,
|
|
85
|
+
renderState: MaterialRenderState | undefined,
|
|
86
|
+
fragmentEntry?: string,
|
|
87
|
+
queue?: number,
|
|
88
|
+
): MaterialPass {
|
|
89
|
+
const lightMode =
|
|
90
|
+
name === 'shadow-caster' ? 'ShadowCaster' : name === 'deferred' ? 'Deferred' : 'Forward';
|
|
91
|
+
const authoredState = (renderState ?? {}) as Readonly<Record<string, unknown>>;
|
|
92
|
+
const authoredTags = authoredState.tags as Readonly<Record<string, string>> | undefined;
|
|
93
|
+
return {
|
|
94
|
+
name,
|
|
95
|
+
program: {
|
|
96
|
+
module,
|
|
97
|
+
...(fragmentEntry === undefined ? {} : { fragmentEntry }),
|
|
98
|
+
},
|
|
99
|
+
renderState: {
|
|
100
|
+
...authoredState,
|
|
101
|
+
tags: { LightMode: lightMode, ...authoredTags },
|
|
102
|
+
...(queue === undefined ? {} : { queue }),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface UnlitOpts {
|
|
108
|
+
/** Asset-side authored color space. Defaults to sRGB. */
|
|
109
|
+
readonly colorSpace?: MaterialColorSpace;
|
|
110
|
+
readonly castShadow?: boolean;
|
|
111
|
+
readonly baseColorTexture?: MaterialValue;
|
|
112
|
+
readonly alphaCutoff?: number;
|
|
113
|
+
readonly renderState?: MaterialRenderState;
|
|
114
|
+
readonly queue?: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function unlit(rgba: readonly [number, number, number, number], opts?: UnlitOpts): MaterialAsset {
|
|
118
|
+
if (opts?.alphaCutoff !== undefined && (opts.alphaCutoff < 0 || opts.alphaCutoff > 1)) {
|
|
119
|
+
throw new Error(`Materials.unlit: alphaCutoff must be in [0, 1], got ${opts.alphaCutoff}`);
|
|
120
|
+
}
|
|
121
|
+
const values: Record<string, MaterialValue> = { baseColor: rgba };
|
|
122
|
+
if (opts?.baseColorTexture !== undefined) {
|
|
123
|
+
values.baseColorTexture = materialTextureValue(opts.baseColorTexture);
|
|
124
|
+
}
|
|
125
|
+
if (opts?.alphaCutoff !== undefined) values.alphaCutoff = opts.alphaCutoff;
|
|
126
|
+
const passes: [MaterialPass, ...MaterialPass[]] = [
|
|
127
|
+
pass('forward', UNLIT_MODULE, opts?.renderState, undefined, opts?.queue),
|
|
128
|
+
];
|
|
129
|
+
if (opts?.castShadow !== false) passes.push(pass('shadow-caster', UNLIT_MODULE, undefined));
|
|
130
|
+
return {
|
|
131
|
+
kind: 'material',
|
|
132
|
+
...(opts?.colorSpace === undefined || opts.colorSpace === 'srgb'
|
|
133
|
+
? {}
|
|
134
|
+
: { colorSpace: opts.colorSpace }),
|
|
135
|
+
passes,
|
|
136
|
+
parameters: unlitParameters(opts?.colorSpace ?? 'srgb'),
|
|
137
|
+
values,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface StandardOpts {
|
|
142
|
+
/** Asset-side authored color space for baseColor/emissive/specularTint. Defaults to sRGB. */
|
|
143
|
+
readonly colorSpace?: MaterialColorSpace;
|
|
144
|
+
readonly baseColor: readonly [number, number, number, number];
|
|
145
|
+
readonly metallic?: number;
|
|
146
|
+
readonly roughness?: number;
|
|
147
|
+
/** Texture channel used for the metallic factor; glTF defaults to B (2). */
|
|
148
|
+
readonly metallicChannel?: number;
|
|
149
|
+
/** Texture channel used for the roughness factor; glTF defaults to G (1). */
|
|
150
|
+
readonly roughnessChannel?: number;
|
|
151
|
+
readonly clearcoat?: number;
|
|
152
|
+
readonly clearcoatRoughness?: number;
|
|
153
|
+
readonly specularTint?: readonly [number, number, number];
|
|
154
|
+
readonly specularTintTexture?: MaterialValue;
|
|
155
|
+
readonly emissive?: readonly [number, number, number];
|
|
156
|
+
readonly emissiveIntensity?: number;
|
|
157
|
+
readonly emissiveTexture?: MaterialValue;
|
|
158
|
+
readonly baseColorTexture?: MaterialValue;
|
|
159
|
+
readonly metallicRoughnessTexture?: MaterialValue;
|
|
160
|
+
readonly normalTexture?: MaterialValue;
|
|
161
|
+
readonly occlusionTexture?: MaterialValue;
|
|
162
|
+
readonly occlusionStrength?: number;
|
|
163
|
+
readonly alphaCutoff?: number;
|
|
164
|
+
readonly renderState?: MaterialRenderState;
|
|
165
|
+
readonly castShadow?: boolean;
|
|
166
|
+
readonly queue?: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function validateChannel(
|
|
170
|
+
name: 'metallicChannel' | 'roughnessChannel',
|
|
171
|
+
value: number | undefined,
|
|
172
|
+
): void {
|
|
173
|
+
if (value !== undefined && (!Number.isInteger(value) || value < 0 || value > 3)) {
|
|
174
|
+
throw new Error(`Materials.standard: ${name} must be an integer in [0, 3], got ${value}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function standard(opts: StandardOpts): MaterialAsset {
|
|
179
|
+
const occlusionStrength = opts.occlusionStrength ?? 1;
|
|
180
|
+
if (occlusionStrength < 0 || occlusionStrength > 1) {
|
|
181
|
+
throw new Error(
|
|
182
|
+
`Materials.standard: occlusionStrength must be in [0, 1], got ${occlusionStrength}`,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
if (opts.alphaCutoff !== undefined && (opts.alphaCutoff < 0 || opts.alphaCutoff > 1)) {
|
|
186
|
+
throw new Error(`Materials.standard: alphaCutoff must be in [0, 1], got ${opts.alphaCutoff}`);
|
|
187
|
+
}
|
|
188
|
+
validateChannel('metallicChannel', opts.metallicChannel);
|
|
189
|
+
validateChannel('roughnessChannel', opts.roughnessChannel);
|
|
190
|
+
const values: Record<string, MaterialValue> = {
|
|
191
|
+
baseColor: opts.baseColor,
|
|
192
|
+
metallic: opts.metallic ?? 0,
|
|
193
|
+
roughness: opts.roughness ?? 0.5,
|
|
194
|
+
occlusionStrength,
|
|
195
|
+
specularTint: opts.specularTint ?? [1, 1, 1],
|
|
196
|
+
};
|
|
197
|
+
if (opts.metallicChannel !== undefined) values.metallicChannel = opts.metallicChannel;
|
|
198
|
+
if (opts.roughnessChannel !== undefined) values.roughnessChannel = opts.roughnessChannel;
|
|
199
|
+
if (opts.clearcoat !== undefined) values.clearcoat = opts.clearcoat;
|
|
200
|
+
if (opts.clearcoatRoughness !== undefined) values.clearcoatRoughness = opts.clearcoatRoughness;
|
|
201
|
+
if (opts.emissive !== undefined) values.emissive = opts.emissive;
|
|
202
|
+
if (opts.emissiveIntensity !== undefined) values.emissiveIntensity = opts.emissiveIntensity;
|
|
203
|
+
if (opts.emissiveTexture !== undefined)
|
|
204
|
+
values.emissiveTexture = materialTextureValue(opts.emissiveTexture);
|
|
205
|
+
if (opts.baseColorTexture !== undefined)
|
|
206
|
+
values.baseColorTexture = materialTextureValue(opts.baseColorTexture);
|
|
207
|
+
if (opts.metallicRoughnessTexture !== undefined) {
|
|
208
|
+
values.metallicRoughnessTexture = materialTextureValue(opts.metallicRoughnessTexture);
|
|
209
|
+
}
|
|
210
|
+
if (opts.normalTexture !== undefined)
|
|
211
|
+
values.normalTexture = materialTextureValue(opts.normalTexture);
|
|
212
|
+
if (opts.occlusionTexture !== undefined)
|
|
213
|
+
values.occlusionTexture = materialTextureValue(opts.occlusionTexture);
|
|
214
|
+
if (opts.specularTintTexture !== undefined) {
|
|
215
|
+
values.specularTintTexture = materialTextureValue(opts.specularTintTexture);
|
|
216
|
+
}
|
|
217
|
+
if (opts.alphaCutoff !== undefined) values.alphaCutoff = opts.alphaCutoff;
|
|
218
|
+
const passes: [MaterialPass, ...MaterialPass[]] = [
|
|
219
|
+
pass('forward', STANDARD_MODULE, opts.renderState, 'fs_main', opts.queue),
|
|
220
|
+
pass('deferred', STANDARD_MODULE, opts.renderState, 'fs_gbuffer', opts.queue),
|
|
221
|
+
];
|
|
222
|
+
if (opts.castShadow !== false) passes.push(pass('shadow-caster', STANDARD_MODULE, undefined));
|
|
223
|
+
return {
|
|
224
|
+
kind: 'material',
|
|
225
|
+
...(opts.colorSpace === undefined || opts.colorSpace === 'srgb'
|
|
226
|
+
? {}
|
|
227
|
+
: { colorSpace: opts.colorSpace }),
|
|
228
|
+
passes,
|
|
229
|
+
parameters: standardParameters(opts.colorSpace ?? 'srgb'),
|
|
230
|
+
values,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export const Materials = { unlit, standard } as const;
|
|
235
|
+
|
|
236
|
+
export { SPRITE_MODULE };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { AssetErrorDetail, AssetGuid, MeshAsset } from '@forgeax/engine-types';
|
|
2
|
+
|
|
3
|
+
export type MeshMaterialBindingSource = 'renderer-override' | 'mesh-default' | 'engine-default';
|
|
4
|
+
|
|
5
|
+
export interface MeshMaterialBindingDiagnostic {
|
|
6
|
+
readonly code:
|
|
7
|
+
| 'mesh-renderer-material-override-invalid'
|
|
8
|
+
| 'mesh-renderer-material-override-overflow';
|
|
9
|
+
readonly slotIndex: number;
|
|
10
|
+
readonly handle?: number;
|
|
11
|
+
/** Structured detail mirrors the renderer error for the active frame. */
|
|
12
|
+
readonly detail?: Readonly<AssetErrorDetail>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ResolvedMeshMaterialBinding {
|
|
16
|
+
readonly handle: number;
|
|
17
|
+
readonly source: MeshMaterialBindingSource;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Public read-only observation of the bindings used by the last frame. */
|
|
21
|
+
export interface MeshMaterialBindingObservation {
|
|
22
|
+
/** Renderer-local identity for one attached World generation; never a draw-array index. */
|
|
23
|
+
readonly worldId: number;
|
|
24
|
+
readonly entityKey: number;
|
|
25
|
+
readonly bindings: readonly ResolvedMeshMaterialBinding[];
|
|
26
|
+
readonly diagnostics: readonly MeshMaterialBindingDiagnostic[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type ResolveMeshMaterialBindingsResult =
|
|
30
|
+
| {
|
|
31
|
+
readonly ok: true;
|
|
32
|
+
readonly bindings: readonly ResolvedMeshMaterialBinding[];
|
|
33
|
+
readonly diagnostics: readonly MeshMaterialBindingDiagnostic[];
|
|
34
|
+
}
|
|
35
|
+
| {
|
|
36
|
+
readonly ok: false;
|
|
37
|
+
readonly code: 'mesh-material-slots-missing';
|
|
38
|
+
}
|
|
39
|
+
| {
|
|
40
|
+
readonly ok: false;
|
|
41
|
+
readonly code: 'mesh-default-material-not-ready';
|
|
42
|
+
readonly slotIndex: number;
|
|
43
|
+
readonly defaultMaterial: AssetGuid;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Single owner of the instance override -> mesh default -> engine default
|
|
48
|
+
* inheritance rule. It resolves once per logical slot; submeshes only project
|
|
49
|
+
* their materialSlot index onto the returned table.
|
|
50
|
+
*/
|
|
51
|
+
export function resolveMeshMaterialBindings(
|
|
52
|
+
mesh: MeshAsset,
|
|
53
|
+
rendererOverrides: ArrayLike<number>,
|
|
54
|
+
deps: {
|
|
55
|
+
readonly isValidOverride: (handle: number) => boolean;
|
|
56
|
+
readonly resolveMeshDefault: (guid: AssetGuid) => number | undefined;
|
|
57
|
+
},
|
|
58
|
+
): ResolveMeshMaterialBindingsResult {
|
|
59
|
+
const bindings: ResolvedMeshMaterialBinding[] = [];
|
|
60
|
+
const diagnostics: MeshMaterialBindingDiagnostic[] = [];
|
|
61
|
+
|
|
62
|
+
if (!Array.isArray(mesh.materialSlots)) {
|
|
63
|
+
return { ok: false, code: 'mesh-material-slots-missing' };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (rendererOverrides.length > mesh.materialSlots.length) {
|
|
67
|
+
diagnostics.push({
|
|
68
|
+
code: 'mesh-renderer-material-override-overflow',
|
|
69
|
+
slotIndex: mesh.materialSlots.length,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
for (let slotIndex = 0; slotIndex < mesh.materialSlots.length; slotIndex++) {
|
|
74
|
+
const override = rendererOverrides[slotIndex] ?? 0;
|
|
75
|
+
if (override !== 0 && deps.isValidOverride(override)) {
|
|
76
|
+
bindings.push({ handle: override, source: 'renderer-override' });
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (override !== 0) {
|
|
80
|
+
diagnostics.push({
|
|
81
|
+
code: 'mesh-renderer-material-override-invalid',
|
|
82
|
+
slotIndex,
|
|
83
|
+
handle: override,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const declaredDefault = mesh.materialSlots[slotIndex]?.defaultMaterial;
|
|
87
|
+
if (declaredDefault !== undefined) {
|
|
88
|
+
const handle = deps.resolveMeshDefault(declaredDefault);
|
|
89
|
+
if (handle === undefined) {
|
|
90
|
+
return {
|
|
91
|
+
ok: false,
|
|
92
|
+
code: 'mesh-default-material-not-ready',
|
|
93
|
+
slotIndex,
|
|
94
|
+
defaultMaterial: declaredDefault,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
bindings.push({ handle, source: 'mesh-default' });
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
bindings.push({ handle: 0, source: 'engine-default' });
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return { ok: true, bindings, diagnostics };
|
|
104
|
+
}
|