@forgeax/engine-render 0.0.0-dev.8d955ade1c79
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 +647 -0
- package/dist/.tsbuildinfo +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__/callback-inference.test-d.d.ts +2 -0
- package/dist/__tests__/callback-inference.test-d.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__/device-scope-lifecycle.unit.test.d.ts +2 -0
- package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +2 -0
- package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +1 -0
- package/dist/__tests__/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__/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__/frame-observation.contract.test.d.ts +2 -0
- package/dist/__tests__/frame-observation.contract.test.d.ts.map +1 -0
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/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 +18 -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-reference.d.ts +15 -0
- package/dist/__tests__/gpu-driven-view-reference.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-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__/ibl/face-uniforms.unit.test.d.ts +2 -0
- package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +1 -0
- package/dist/__tests__/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-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__/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-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/morph-feature-plan.unit.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__/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-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.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-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-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-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-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-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-plan.test-d.d.ts +2 -0
- package/dist/__tests__/render-feature-plan.test-d.d.ts.map +1 -0
- package/dist/__tests__/render-feature-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/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.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-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__/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__/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-config.unit.test.d.ts +2 -0
- package/dist/__tests__/ssao-config.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__/standard-clustered-pipeline.unit.test.d.ts +2 -0
- package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +1 -0
- package/dist/__tests__/standard-descriptors.test-d.d.ts +2 -0
- package/dist/__tests__/standard-descriptors.test-d.d.ts.map +1 -0
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts +2 -0
- package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +1 -0
- package/dist/__tests__/standard-pipeline.integration.test.d.ts +2 -0
- package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +1 -0
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +2 -0
- package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/surface-configuration.unit.test.d.ts +2 -0
- package/dist/__tests__/surface-configuration.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-resource-short-circuit.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +1 -0
- package/dist/__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/assembly/backend-contract.d.ts +37 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -0
- package/dist/assembly/factory.d.ts +207 -0
- package/dist/assembly/factory.d.ts.map +1 -0
- package/dist/assembly/host-contract.d.ts +84 -0
- package/dist/assembly/host-contract.d.ts.map +1 -0
- package/dist/assembly/material/assembly.d.ts +21 -0
- package/dist/assembly/material/assembly.d.ts.map +1 -0
- package/dist/assembly/material/pipeline-projection.d.ts +30 -0
- package/dist/assembly/material/pipeline-projection.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 +27 -0
- package/dist/authoring.mjs.map +1 -0
- package/dist/chunk-CQXZC5XI.mjs +182 -0
- package/dist/chunk-CQXZC5XI.mjs.map +1 -0
- package/dist/chunk-HCOGPHKS.mjs +93 -0
- package/dist/chunk-HCOGPHKS.mjs.map +1 -0
- package/dist/chunk-YEJIUW7D.mjs +1152 -0
- package/dist/chunk-YEJIUW7D.mjs.map +1 -0
- package/dist/cluster-binner.d.ts +152 -0
- package/dist/cluster-binner.d.ts.map +1 -0
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts +2 -0
- package/dist/components/__tests__/points-lines-admission.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts +2 -0
- package/dist/components/__tests__/points-lines-schema.unit.test.d.ts.map +1 -0
- package/dist/components/__tests__/schema-contract.unit.test.d.ts +2 -0
- package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +1 -0
- package/dist/components/__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/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/glyph-text.d.ts +26 -0
- package/dist/components/glyph-text.d.ts.map +1 -0
- package/dist/components/index.d.ts +24 -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/lines.d.ts +5 -0
- package/dist/components/lines.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/points.d.ts +15 -0
- package/dist/components/points.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/skybox-background.d.ts +56 -0
- package/dist/components/skybox-background.d.ts.map +1 -0
- package/dist/components/skylight.d.ts +55 -0
- package/dist/components/skylight.d.ts.map +1 -0
- package/dist/components/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 +74 -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 +42 -0
- package/dist/components/sprite-playback-mode.d.ts.map +1 -0
- package/dist/components/sprite-region-override.d.ts +46 -0
- package/dist/components/sprite-region-override.d.ts.map +1 -0
- package/dist/components/tile-layer.d.ts +106 -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 +19 -0
- package/dist/construct-renderer.d.ts.map +1 -0
- package/dist/construct-renderer.mjs +27462 -0
- package/dist/construct-renderer.mjs.map +1 -0
- package/dist/debug-draw-glue.d.ts +5 -0
- package/dist/debug-draw-glue.d.ts.map +1 -0
- package/dist/device/device-scope.d.ts +83 -0
- package/dist/device/device-scope.d.ts.map +1 -0
- package/dist/device/gpu-residency.d.ts +337 -0
- package/dist/device/gpu-residency.d.ts.map +1 -0
- package/dist/device/resource-types.d.ts +8 -0
- package/dist/device/resource-types.d.ts.map +1 -0
- package/dist/engine-metrics.d.ts +23 -0
- package/dist/engine-metrics.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 +105 -0
- package/dist/errors/recover.d.ts.map +1 -0
- package/dist/errors/render.d.ts +705 -0
- package/dist/errors/render.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/fullscreen.d.ts +19 -0
- package/dist/features/fullscreen.d.ts.map +1 -0
- package/dist/features/host.d.ts +106 -0
- package/dist/features/host.d.ts.map +1 -0
- package/dist/features/morph/morph-feature.d.ts +79 -0
- package/dist/features/morph/morph-feature.d.ts.map +1 -0
- package/dist/features/plan.d.ts +182 -0
- package/dist/features/plan.d.ts.map +1 -0
- package/dist/features/prepared-gpu-work.d.ts +117 -0
- package/dist/features/prepared-gpu-work.d.ts.map +1 -0
- package/dist/features/prepared-graphics-store.d.ts +66 -0
- package/dist/features/prepared-graphics-store.d.ts.map +1 -0
- package/dist/features/prepared-graphics.d.ts +215 -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 +12 -0
- package/dist/features/render-graph-contribution.d.ts.map +1 -0
- package/dist/features/render-graph-raster.d.ts +38 -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/targets.d.ts +32 -0
- package/dist/features/targets.d.ts.map +1 -0
- package/dist/features/types.d.ts +68 -0
- package/dist/features/types.d.ts.map +1 -0
- package/dist/features/vocabulary.d.ts +14 -0
- package/dist/features/vocabulary.d.ts.map +1 -0
- package/dist/fullscreen-post-process-pass.d.ts +157 -0
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -0
- package/dist/glyph-text-layout-system.d.ts +19 -0
- package/dist/glyph-text-layout-system.d.ts.map +1 -0
- package/dist/gpu-driven/batch-topology.d.ts +55 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +51 -0
- package/dist/gpu-driven/production-raster.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +85 -0
- package/dist/gpu-driven/view-gpu.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 +78 -0
- package/dist/gpu-scene-schema.d.ts.map +1 -0
- package/dist/gpu-scene.d.ts +55 -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 +163 -0
- package/dist/hdrp-buffers.d.ts.map +1 -0
- package/dist/ibl/IblPipelineCache.d.ts +168 -0
- package/dist/ibl/IblPipelineCache.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 +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +169 -0
- package/dist/index.mjs.map +1 -0
- package/dist/inspection-types.d.ts +72 -0
- package/dist/inspection-types.d.ts.map +1 -0
- package/dist/instance-buffer-cache.d.ts +56 -0
- package/dist/instance-buffer-cache.d.ts.map +1 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.mjs +3 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/lifecycle.d.ts +62 -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 +47 -0
- package/dist/materials.d.ts.map +1 -0
- package/dist/mesh-material-bindings.d.ts +43 -0
- package/dist/mesh-material-bindings.d.ts.map +1 -0
- package/dist/pbr-pipeline.d.ts +301 -0
- package/dist/pbr-pipeline.d.ts.map +1 -0
- package/dist/pipeline/standard-forward-lane.d.ts +5 -0
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -0
- package/dist/pipeline/standard-pipeline.d.ts +31 -0
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -0
- package/dist/pipeline/standard-profile.d.ts +40 -0
- package/dist/pipeline/standard-profile.d.ts.map +1 -0
- package/dist/pipeline-builder.d.ts +122 -0
- package/dist/pipeline-builder.d.ts.map +1 -0
- package/dist/pipeline-spec-types.d.ts +24 -0
- package/dist/pipeline-spec-types.d.ts.map +1 -0
- package/dist/pipeline-spec.d.ts +367 -0
- package/dist/pipeline-spec.d.ts.map +1 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/bounds.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/inspection.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/points-lines.bench.d.ts +2 -0
- package/dist/points-lines/__tests__/points-lines.bench.d.ts.map +1 -0
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts +2 -0
- package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/snapshot.unit.test.d.ts.map +1 -0
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts +2 -0
- package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts.map +1 -0
- package/dist/points-lines/admission.d.ts +36 -0
- package/dist/points-lines/admission.d.ts.map +1 -0
- package/dist/points-lines/bounds.d.ts +8 -0
- package/dist/points-lines/bounds.d.ts.map +1 -0
- package/dist/points-lines/expansion-cache.d.ts +28 -0
- package/dist/points-lines/expansion-cache.d.ts.map +1 -0
- package/dist/points-lines/inspection.d.ts +53 -0
- package/dist/points-lines/inspection.d.ts.map +1 -0
- package/dist/points-lines/prepare.d.ts +67 -0
- package/dist/points-lines/prepare.d.ts.map +1 -0
- package/dist/points-lines/record.d.ts +60 -0
- package/dist/points-lines/record.d.ts.map +1 -0
- package/dist/points-lines/snapshot.d.ts +49 -0
- package/dist/points-lines/snapshot.d.ts.map +1 -0
- package/dist/post-process-errors.d.ts +182 -0
- package/dist/post-process-errors.d.ts.map +1 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts +59 -0
- package/dist/prepare/prepared-graphics-resolver.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__/typed-frame-graph-plan.unit.test.d.ts +2 -0
- package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +1 -0
- package/dist/record/__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/frame-lighting.d.ts +121 -0
- package/dist/record/frame-lighting.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 +20 -0
- package/dist/record/frame-targets.d.ts.map +1 -0
- package/dist/record/frame.d.ts +71 -0
- package/dist/record/frame.d.ts.map +1 -0
- package/dist/record/helpers.d.ts +102 -0
- package/dist/record/helpers.d.ts.map +1 -0
- package/dist/record/main-pass-geometry.d.ts +28 -0
- package/dist/record/main-pass-geometry.d.ts.map +1 -0
- package/dist/record/main-pass-material.d.ts +204 -0
- package/dist/record/main-pass-material.d.ts.map +1 -0
- package/dist/record/main-pass-sprite-draws.d.ts +43 -0
- package/dist/record/main-pass-sprite-draws.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/mesh-ssbo.d.ts +446 -0
- package/dist/record/mesh-ssbo.d.ts.map +1 -0
- package/dist/record/render-context.d.ts +252 -0
- package/dist/record/render-context.d.ts.map +1 -0
- package/dist/record/shadow-pass.d.ts +52 -0
- package/dist/record/shadow-pass.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 +35 -0
- package/dist/record/typed-frame-graph.d.ts.map +1 -0
- package/dist/record/view-ubo.d.ts +45 -0
- package/dist/record/view-ubo.d.ts.map +1 -0
- package/dist/render-contract.d.ts +424 -0
- package/dist/render-contract.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-graph-primitives.d.ts +76 -0
- package/dist/render-graph-primitives.d.ts.map +1 -0
- package/dist/render-pipeline.d.ts +110 -0
- package/dist/render-pipeline.d.ts.map +1 -0
- package/dist/render-system-extract.d.ts +868 -0
- package/dist/render-system-extract.d.ts.map +1 -0
- package/dist/render-system.d.ts +125 -0
- package/dist/render-system.d.ts.map +1 -0
- package/dist/scene/render-scene-types.d.ts +61 -0
- package/dist/scene/render-scene-types.d.ts.map +1 -0
- package/dist/scene/render-scene.d.ts +112 -0
- package/dist/scene/render-scene.d.ts.map +1 -0
- package/dist/scene-instances/post-spawn-resolve-joints.d.ts +30 -0
- package/dist/scene-instances/post-spawn-resolve-joints.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 +50 -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/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 +49 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -0
- package/dist/systems/skin-palette-types.d.ts +14 -0
- package/dist/systems/skin-palette-types.d.ts.map +1 -0
- package/dist/systems/transparent-sort-config.d.ts +112 -0
- package/dist/systems/transparent-sort-config.d.ts.map +1 -0
- package/dist/tilemap-chunk-extract-system.d.ts +143 -0
- package/dist/tilemap-chunk-extract-system.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +57 -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/package.json +94 -0
- package/src/__tests__/authoring-path.unit.test.ts +23 -0
- package/src/__tests__/backend-selection-rhi-capture.test-d.ts +21 -0
- package/src/__tests__/callback-inference.test-d.ts +8 -0
- package/src/__tests__/cluster-binner.test.ts +272 -0
- package/src/__tests__/cluster-grid-default-surface.unit.test.ts +20 -0
- package/src/__tests__/construct-renderer-identity.unit.test.ts +23 -0
- package/src/__tests__/device-scope-lifecycle.unit.test.ts +151 -0
- package/src/__tests__/device-scope-stale-matrix.unit.test.ts +42 -0
- package/src/__tests__/direct-extract-consumer-contract.test-d.ts +23 -0
- package/src/__tests__/direct-light-snapshot.unit.test.ts +61 -0
- package/src/__tests__/factory-contract.integration.test.ts +280 -0
- package/src/__tests__/fallback-row-stride-surface.unit.test.ts +15 -0
- package/src/__tests__/frame-observation.contract.test.ts +112 -0
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +32 -0
- package/src/__tests__/glyph-text-layout-recovery.unit.test.ts +167 -0
- package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +350 -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 +436 -0
- package/src/__tests__/gpu-driven-scaling.unit.test.ts +87 -0
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +271 -0
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +290 -0
- package/src/__tests__/gpu-driven-view-reference.ts +111 -0
- package/src/__tests__/gpu-driven-view.browser.test.ts +30 -0
- package/src/__tests__/gpu-driven-view.dawn.test.ts +28 -0
- package/src/__tests__/gpu-driven-view.unit.test.ts +199 -0
- package/src/__tests__/gpu-resource-store-stride.unit.test.ts +59 -0
- package/src/__tests__/gpu-scene-render-graph-gpu.ts +308 -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 +205 -0
- package/src/__tests__/gpu-scene.unit.test.ts +147 -0
- package/src/__tests__/ibl/face-uniforms.unit.test.ts +46 -0
- package/src/__tests__/infinite-grid-no-vertex-probe.unit.test.ts +92 -0
- package/src/__tests__/injection-kind-owner.test-d.ts +14 -0
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +728 -0
- package/src/__tests__/light-buffer-layout.unit.test.ts +40 -0
- package/src/__tests__/material-contract-inventory.unit.test.ts +24 -0
- package/src/__tests__/material-cooked-projection.unit.test.ts +150 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +53 -0
- package/src/__tests__/material-static-dynamic-route.unit.test.ts +94 -0
- package/src/__tests__/material-stride-surface.unit.test.ts +32 -0
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +106 -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 +157 -0
- package/src/__tests__/morph-feature-gpu-work.integration.test.ts +80 -0
- package/src/__tests__/morph-feature-plan.unit.test.ts +53 -0
- package/src/__tests__/morph-visual-evidence.integration.test.ts +80 -0
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +19 -0
- package/src/__tests__/post-process-error-policy-owner.unit.test.ts +201 -0
- package/src/__tests__/prepared-buffer-kind-owner.test-d.ts +29 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +65 -0
- package/src/__tests__/prepared-graphics-generation.unit.test.ts +161 -0
- package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +138 -0
- package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +29 -0
- package/src/__tests__/prepared-graphics-resolver.unit.test.ts +285 -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 +62 -0
- package/src/__tests__/profiler-phase-token.test.ts +79 -0
- package/src/__tests__/public-surface.test-d.ts +94 -0
- package/src/__tests__/recover-error-policy-owner.unit.test.ts +107 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +116 -0
- package/src/__tests__/render-error-detail-ssot.test-d.ts +139 -0
- package/src/__tests__/render-error-exhaustive.test-d.ts +110 -0
- package/src/__tests__/render-feature-assembly.test-d.ts +43 -0
- package/src/__tests__/render-feature-context.test-d.ts +57 -0
- package/src/__tests__/render-feature-contract.test-d.ts +49 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +149 -0
- package/src/__tests__/render-feature-docs.unit.test.ts +89 -0
- package/src/__tests__/render-feature-errors.unit.test.ts +47 -0
- package/src/__tests__/render-feature-gpu-work.integration.test.ts +316 -0
- package/src/__tests__/render-feature-plan.test-d.ts +161 -0
- package/src/__tests__/render-feature-plan.unit.test.ts +170 -0
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +90 -0
- package/src/__tests__/render-feature-prepared-errors.test-d.ts +79 -0
- package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +80 -0
- package/src/__tests__/render-feature-prepared-graphics-isolation.unit.test.ts +72 -0
- package/src/__tests__/render-feature-prepared-graphics-negative.test-d.ts +36 -0
- package/src/__tests__/render-feature-prepared-graphics.test-d.ts +74 -0
- package/src/__tests__/render-feature-prepared-graphics.unit.test.ts +121 -0
- package/src/__tests__/render-feature-public-surface.test-d.ts +57 -0
- package/src/__tests__/render-feature-retry.unit.test.ts +87 -0
- package/src/__tests__/render-feature-scheduling.unit.test.ts +110 -0
- package/src/__tests__/render-feature-stage-failed-policy-owner.unit.test.ts +137 -0
- package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +146 -0
- package/src/__tests__/render-feature-visibility-context.test-d.ts +33 -0
- package/src/__tests__/render-feature-visibility-context.unit.test.ts +37 -0
- package/src/__tests__/render-feature-zero-work.unit.test.ts +76 -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 +168 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +121 -0
- package/src/__tests__/renderer-lifecycle.integration.test.ts +58 -0
- package/src/__tests__/rhi-backend-package-boundary.unit.test.ts +11 -0
- package/src/__tests__/scriptable-pack-consumer.test-d.ts +14 -0
- package/src/__tests__/shader-stage-surface.unit.test.ts +43 -0
- package/src/__tests__/ssao-config.unit.test.ts +36 -0
- package/src/__tests__/ssao-kernel-surface.unit.test.ts +14 -0
- package/src/__tests__/standard-clustered-pipeline.unit.test.ts +28 -0
- package/src/__tests__/standard-descriptors.test-d.ts +22 -0
- package/src/__tests__/standard-pipeline.dawn.test.ts +61 -0
- package/src/__tests__/standard-pipeline.integration.test.ts +124 -0
- package/src/__tests__/standard-profile-oracle.unit.test.ts +62 -0
- package/src/__tests__/surface-configuration.unit.test.ts +91 -0
- package/src/__tests__/texture-usage-surface.unit.test.ts +58 -0
- package/src/__tests__/typed-pipeline-topology.unit.test.ts +223 -0
- package/src/__tests__/urp-pipeline-targets.unit.test.ts +42 -0
- package/src/__tests__/urp-pipeline.unit.test.ts +14 -0
- package/src/__tests__/vertex-color-pipeline.unit.test.ts +132 -0
- package/src/__tests__/vertex-layout-consumer.unit.test.ts +25 -0
- package/src/__tests__/visibility-diagnostics.integration.test.ts +62 -0
- package/src/__tests__/visibility-extract.integration.test.ts +98 -0
- package/src/__tests__/visibility-extract.perf.test.ts +130 -0
- package/src/__tests__/visibility-feature-dedup.integration.test.ts +55 -0
- package/src/__tests__/visibility-hidden-report.unit.test.ts +36 -0
- package/src/__tests__/visibility-instances.integration.test.ts +46 -0
- package/src/__tests__/visibility-multi-world.integration.test.ts +86 -0
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +168 -0
- package/src/__tests__/visibility-producer-matrix.unit.test.ts +96 -0
- package/src/__tests__/visibility-public-surface.test-d.ts +27 -0
- package/src/__tests__/visibility-resolver.unit.test.ts +85 -0
- package/src/__tests__/visibility-resource-short-circuit.unit.test.ts +80 -0
- package/src/__tests__/visibility-snapshot-contract.unit.test.ts +60 -0
- package/src/__tests__/vocabulary.unit.test.ts +21 -0
- package/src/assembly/backend-contract.ts +57 -0
- package/src/assembly/factory.ts +8130 -0
- package/src/assembly/host-contract.ts +101 -0
- package/src/assembly/material/assembly.ts +48 -0
- package/src/assembly/material/pipeline-projection.ts +63 -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 +17 -0
- package/src/cluster-binner.ts +700 -0
- package/src/components/__tests__/points-lines-admission.unit.test.ts +219 -0
- package/src/components/__tests__/points-lines-schema.unit.test.ts +56 -0
- package/src/components/__tests__/schema-contract.unit.test.ts +10 -0
- package/src/components/__tests__/schema-parity.unit.test.ts +25 -0
- package/src/components/__tests__/visibility-schema.unit.test.ts +35 -0
- package/src/components/camera.ts +512 -0
- package/src/components/directional-light.ts +120 -0
- package/src/components/glyph-text.ts +64 -0
- package/src/components/index.ts +54 -0
- package/src/components/instances.ts +206 -0
- package/src/components/layer.ts +69 -0
- package/src/components/light-helpers.ts +188 -0
- package/src/components/lines.ts +18 -0
- package/src/components/mesh-filter.ts +60 -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/points.ts +40 -0
- package/src/components/post-process-params.ts +35 -0
- package/src/components/scene-instance.ts +193 -0
- package/src/components/skybox-background.ts +103 -0
- package/src/components/skylight.ts +97 -0
- package/src/components/sort-key.ts +75 -0
- package/src/components/spot-light.ts +124 -0
- package/src/components/sprite-animation.ts +168 -0
- package/src/components/sprite-instances.ts +179 -0
- package/src/components/sprite-playback-mode.ts +79 -0
- package/src/components/sprite-region-override.ts +105 -0
- package/src/components/tile-layer.ts +167 -0
- package/src/components/tilemap.ts +48 -0
- package/src/components/visibility.ts +53 -0
- package/src/construct-renderer.ts +67 -0
- package/src/debug-draw-glue.ts +48 -0
- package/src/device/device-scope.ts +306 -0
- package/src/device/gpu-residency.ts +1822 -0
- package/src/device/resource-types.ts +20 -0
- package/src/engine-metrics.ts +82 -0
- package/src/errors/ecs-validation.ts +16 -0
- package/src/errors/index.ts +3 -0
- package/src/errors/recover.ts +161 -0
- package/src/errors/render.ts +1284 -0
- package/src/extract/visibility.ts +120 -0
- package/src/features/fullscreen.ts +46 -0
- package/src/features/host.ts +1363 -0
- package/src/features/morph/morph-feature.ts +377 -0
- package/src/features/plan.ts +447 -0
- package/src/features/prepared-gpu-work.ts +959 -0
- package/src/features/prepared-graphics-store.ts +449 -0
- package/src/features/prepared-graphics.ts +420 -0
- package/src/features/render-graph-compute.ts +69 -0
- package/src/features/render-graph-contribution.ts +75 -0
- package/src/features/render-graph-raster.ts +332 -0
- package/src/features/render-graph-resources.ts +38 -0
- package/src/features/targets.ts +70 -0
- package/src/features/types.ts +103 -0
- package/src/features/vocabulary.ts +24 -0
- package/src/fullscreen-post-process-pass.ts +363 -0
- package/src/glyph-text-layout-system.ts +421 -0
- package/src/gpu-driven/batch-topology.ts +245 -0
- package/src/gpu-driven/production-raster.ts +695 -0
- package/src/gpu-driven/view-gpu.ts +703 -0
- package/src/gpu-resource.ts +159 -0
- package/src/gpu-scene-schema.ts +136 -0
- package/src/gpu-scene.ts +722 -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 +480 -0
- package/src/ibl/IblPipelineCache.ts +1006 -0
- package/src/ibl/skylight-bind-group.ts +513 -0
- package/src/index.ts +129 -0
- package/src/inspection-types.ts +80 -0
- package/src/instance-buffer-cache.ts +95 -0
- package/src/internal.ts +9 -0
- package/src/lifecycle.ts +168 -0
- package/src/light-buffer-layout.ts +346 -0
- package/src/materials.ts +214 -0
- package/src/mesh-material-bindings.ts +103 -0
- package/src/pbr-pipeline.ts +1137 -0
- package/src/pipeline/standard-forward-lane.ts +229 -0
- package/src/pipeline/standard-pipeline.ts +555 -0
- package/src/pipeline/standard-profile.ts +65 -0
- package/src/pipeline-builder.ts +382 -0
- package/src/pipeline-spec-types.ts +28 -0
- package/src/pipeline-spec.ts +1231 -0
- package/src/plugin.ts +69 -0
- package/src/points-lines/__tests__/bounds.unit.test.ts +21 -0
- package/src/points-lines/__tests__/cache-recovery.unit.test.ts +157 -0
- package/src/points-lines/__tests__/inspection-lanes.integration.test.ts +146 -0
- package/src/points-lines/__tests__/inspection.unit.test.ts +173 -0
- package/src/points-lines/__tests__/lane-structural.integration.test.ts +122 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +400 -0
- package/src/points-lines/__tests__/raster-lane.integration.test.ts +44 -0
- package/src/points-lines/__tests__/snapshot.unit.test.ts +101 -0
- package/src/points-lines/__tests__/view-ubo.unit.test.ts +73 -0
- package/src/points-lines/admission.ts +238 -0
- package/src/points-lines/bounds.ts +23 -0
- package/src/points-lines/expansion-cache.ts +215 -0
- package/src/points-lines/inspection.ts +97 -0
- package/src/points-lines/prepare.ts +177 -0
- package/src/points-lines/record.ts +125 -0
- package/src/points-lines/snapshot.ts +130 -0
- package/src/post-process-errors.ts +302 -0
- package/src/prepare/prepared-graphics-resolver.ts +456 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +41 -0
- package/src/record/__tests__/material-slot-plan.unit.test.ts +44 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +41 -0
- package/src/record/__tests__/video-texture-view.unit.test.ts +90 -0
- package/src/record/frame-lighting.ts +1074 -0
- package/src/record/frame-snapshot.ts +500 -0
- package/src/record/frame-targets.ts +137 -0
- package/src/record/frame.ts +1598 -0
- package/src/record/helpers.ts +284 -0
- package/src/record/main-pass-geometry.ts +1065 -0
- package/src/record/main-pass-material.ts +1043 -0
- package/src/record/main-pass-sprite-draws.ts +1137 -0
- package/src/record/main-pass.ts +610 -0
- package/src/record/mesh-ssbo.ts +885 -0
- package/src/record/render-context.ts +384 -0
- package/src/record/shadow-pass.ts +698 -0
- package/src/record/skybox-post-pass.ts +593 -0
- package/src/record/typed-frame-graph.ts +461 -0
- package/src/record/view-ubo.ts +222 -0
- package/src/render-contract.ts +582 -0
- package/src/render-data.ts +385 -0
- package/src/render-graph-primitives.ts +811 -0
- package/src/render-pipeline.ts +259 -0
- package/src/render-system-extract.ts +4585 -0
- package/src/render-system.ts +1933 -0
- package/src/scene/render-scene-types.ts +67 -0
- package/src/scene/render-scene.ts +1087 -0
- package/src/scene-instances/post-spawn-resolve-joints.ts +165 -0
- package/src/shadow-atlas.ts +244 -0
- package/src/ssao-buffers.ts +334 -0
- package/src/ssao-config.ts +61 -0
- package/src/systems/active-camera.ts +116 -0
- package/src/systems/pass-selector.ts +49 -0
- package/src/systems/skin-palette-allocator.ts +251 -0
- package/src/systems/skin-palette-types.ts +14 -0
- package/src/systems/transparent-sort-config.ts +233 -0
- package/src/tilemap-chunk-extract-system.ts +1290 -0
- package/src/typed-render-graph-primitives.ts +541 -0
- package/src/typed-shadow-passes.ts +165 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import type { World } from '@forgeax/engine-ecs';
|
|
2
|
+
import { probeVideoHighPerfUpload } from '@forgeax/engine-graphics-extras';
|
|
3
|
+
import {
|
|
4
|
+
type BindGroup,
|
|
5
|
+
RhiError,
|
|
6
|
+
type RhiRenderPassEncoder,
|
|
7
|
+
type TextureView,
|
|
8
|
+
} from '@forgeax/engine-rhi';
|
|
9
|
+
import type { Handle, PassKind, PassSelector } from '@forgeax/engine-types';
|
|
10
|
+
import { createHdrpUnifiedBindGroup, getOrCreateHdrpBuffers } from '../hdrp-buffers';
|
|
11
|
+
import { getOrCreateIblCache } from '../ibl/IblPipelineCache';
|
|
12
|
+
import { buildBeginRenderPassDescriptor } from '../pipeline-spec';
|
|
13
|
+
import { POINTS_LINES_MATERIAL_SHADER_ID } from '../points-lines/record';
|
|
14
|
+
import type { RenderRecordPhase } from '../render-contract';
|
|
15
|
+
import type { MaterialSnapshot } from '../render-system-extract';
|
|
16
|
+
import { recordGeometryDraws } from './main-pass-geometry';
|
|
17
|
+
import {
|
|
18
|
+
applyMaterialTextureUvScales,
|
|
19
|
+
applyParamSnapshotToUbo,
|
|
20
|
+
buildPerSubmeshMaterialBg as buildPerSubmeshMaterialBgImpl,
|
|
21
|
+
detectNineSliceScaleTooSmall,
|
|
22
|
+
type PerSubmeshMaterialBgDeps,
|
|
23
|
+
residentTextureView,
|
|
24
|
+
writePbrMaterialUboPayload,
|
|
25
|
+
} from './main-pass-material';
|
|
26
|
+
import { recordSpritePass } from './main-pass-sprite-draws';
|
|
27
|
+
import type { _InternalRenderPipelineContext } from './render-context';
|
|
28
|
+
import { MATERIAL_PER_ENTITY_STRIDE, STANDARD_PBR_UBO_SIZE } from './render-context';
|
|
29
|
+
import {
|
|
30
|
+
buildMatchedMaterialHandlesByRenderable,
|
|
31
|
+
buildMatchedRenderableIndices,
|
|
32
|
+
} from './shadow-pass';
|
|
33
|
+
|
|
34
|
+
const ZERO_SKYLIGHT_PAYLOAD = new Float32Array([0, 0, 0, 0, 0, 0, 0, 1]);
|
|
35
|
+
|
|
36
|
+
export type MainPassOptions = {
|
|
37
|
+
readonly colorViews?: readonly (TextureView | null)[];
|
|
38
|
+
readonly colorFormats?: readonly GPUTextureFormat[];
|
|
39
|
+
readonly depthView?: TextureView | null;
|
|
40
|
+
readonly passKind?: PassKind;
|
|
41
|
+
readonly clearColor?: readonly [number, number, number, number];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* feat-20260529-rendergraph-pass-abstraction M4 / w13b: main forward
|
|
46
|
+
* (geometry) pass recording, extracted verbatim from recordFrame. Uses the
|
|
47
|
+
* SHARED frame encoder (c.encoder); the geometry + optional LDR sprite-split
|
|
48
|
+
* sub-pass write into geometryColorView (HDR target or swap-chain view).
|
|
49
|
+
* Driven by the render-graph 'main' pass execute closure.
|
|
50
|
+
*/
|
|
51
|
+
export function recordMainPass(
|
|
52
|
+
c: _InternalRenderPipelineContext,
|
|
53
|
+
selector?: PassSelector,
|
|
54
|
+
options?: MainPassOptions,
|
|
55
|
+
graphPass?: RhiRenderPassEncoder,
|
|
56
|
+
): void {
|
|
57
|
+
const {
|
|
58
|
+
runtime,
|
|
59
|
+
world,
|
|
60
|
+
store,
|
|
61
|
+
pipelineState,
|
|
62
|
+
encoder,
|
|
63
|
+
clear,
|
|
64
|
+
geometryColorView,
|
|
65
|
+
geometryDepthView,
|
|
66
|
+
validatedOrdered,
|
|
67
|
+
viewBindGroup,
|
|
68
|
+
meshBindGroup,
|
|
69
|
+
frameState,
|
|
70
|
+
bindGroupCounts,
|
|
71
|
+
skylight,
|
|
72
|
+
skylightCount,
|
|
73
|
+
skyboxActive,
|
|
74
|
+
splitLdrSprite,
|
|
75
|
+
msaaActive,
|
|
76
|
+
geometryColorResolveView,
|
|
77
|
+
dispatch,
|
|
78
|
+
hdrpClusterBindGroup,
|
|
79
|
+
materialSlotIndices,
|
|
80
|
+
materialSlots,
|
|
81
|
+
materialSlotOwners,
|
|
82
|
+
materialSlotCount,
|
|
83
|
+
} = c;
|
|
84
|
+
// bug-20260615 M3 / m3-1: sampleCount is threaded through every
|
|
85
|
+
// getMaterialShaderPipeline call site so the cache key / builder
|
|
86
|
+
// disambiguate count=1 vs count=4 PSOs. Derived from the per-camera
|
|
87
|
+
// msaaActive boolean (already on the context).
|
|
88
|
+
const sampleCount = msaaActive ? 4 : 1;
|
|
89
|
+
const passKind = options?.passKind ?? 'forward';
|
|
90
|
+
const colorViews = options?.colorViews ?? [geometryColorView];
|
|
91
|
+
const colorFormats = options?.colorFormats ?? [
|
|
92
|
+
(c.tonemapActive ? 'rgba16float' : pipelineState.colorAttachmentFormat) as GPUTextureFormat,
|
|
93
|
+
];
|
|
94
|
+
const targetDepthView = options?.depthView ?? geometryDepthView;
|
|
95
|
+
const clearColor = options?.clearColor ?? clear;
|
|
96
|
+
// feat-20260623-world-space-video-asset M4 / w17 (D-2 / AC-09): high-perf
|
|
97
|
+
// GPUExternalTexture upload availability for video sources, resolved by the
|
|
98
|
+
// explicit RhiCaps-based capability probe. The probe checks
|
|
99
|
+
// backendKind==='webgpu' AND `importExternalTexture` method presence; the
|
|
100
|
+
// latter is absent today (OOS-5), so this is false and the general
|
|
101
|
+
// copyExternalImageToTexture path (w16) is the sole route. The branch exists
|
|
102
|
+
// so the AC-09 two-path reserved hook is code-review-verifiable, not a TODO.
|
|
103
|
+
const videoHighPerfAvailable = probeVideoHighPerfUpload(runtime.device);
|
|
104
|
+
// feat-20260609-hdrp-cluster-fragment-ggx M4 / w16: HDRP active swaps the
|
|
105
|
+
// group(2) bindGroup for the unified 7-entry layout (mesh SSBO at binding 0
|
|
106
|
+
// + cluster 4 buffer at bindings 3..6). The dynamic offset
|
|
107
|
+
// (`i * MESH_PER_ENTITY_STRIDE`) stays valid because the unified BGL binds
|
|
108
|
+
// the SAME mesh SSBO at binding 0; the cluster-forward shader reads the
|
|
109
|
+
// cluster bindings off the rest of the layout. Plan D-1 (URP path zero
|
|
110
|
+
// change) is preserved — when `!isHdrpActive` the URP `meshBindGroup`
|
|
111
|
+
// path runs verbatim.
|
|
112
|
+
// feat-20260612-hdrp-ssao wiring fix: when the HDRP forward pass resolved a
|
|
113
|
+
// real `ssaoBlurred` view (stashed on ctx by the pass execute closure), build
|
|
114
|
+
// the unified group(2) bind group with that view at binding 7 so fs_main reads
|
|
115
|
+
// the actual occlusion factor instead of the 1x1 white fallback. The default
|
|
116
|
+
// `hdrpClusterBindGroup` (built ahead of graph.execute) always carries the
|
|
117
|
+
// fallback because the transient SSAO texture does not exist that early.
|
|
118
|
+
// Built per frame (the SSAO target is a graph transient, so no cross-frame
|
|
119
|
+
// cache); HDRP-only and SSAO-only, so URP and SSAO-off paths are untouched.
|
|
120
|
+
let hdrpSsaoBindGroup: BindGroup | null = null;
|
|
121
|
+
if (
|
|
122
|
+
frameState.isHdrpActive &&
|
|
123
|
+
hdrpClusterBindGroup !== null &&
|
|
124
|
+
c.hdrpSsaoBlurredView !== undefined
|
|
125
|
+
) {
|
|
126
|
+
const hdrpBuffers = getOrCreateHdrpBuffers(
|
|
127
|
+
runtime,
|
|
128
|
+
frameState.installedPipelineConfig?.clusterGrid,
|
|
129
|
+
);
|
|
130
|
+
if (hdrpBuffers !== null) {
|
|
131
|
+
hdrpSsaoBindGroup = createHdrpUnifiedBindGroup(
|
|
132
|
+
runtime,
|
|
133
|
+
hdrpBuffers,
|
|
134
|
+
pipelineState.meshStorageBuffer.buffer,
|
|
135
|
+
{ enabled: true, ssaoBlurredView: c.hdrpSsaoBlurredView },
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const meshGroup2: BindGroup | null =
|
|
140
|
+
frameState.isHdrpActive && hdrpClusterBindGroup !== null
|
|
141
|
+
? (hdrpSsaoBindGroup ?? hdrpClusterBindGroup)
|
|
142
|
+
: meshBindGroup;
|
|
143
|
+
// ── Geometry (main colour) pass ──────────────────────────────────
|
|
144
|
+
// D-2: tracks whether the geometry pass was explicitly ended inside
|
|
145
|
+
// the `if (validatedOrdered.length > 0)` block (sprite split path),
|
|
146
|
+
// to avoid a double-end at the unconditional `pass.end()` below.
|
|
147
|
+
let geometryPassEnded = false;
|
|
148
|
+
// feat-20260531-skybox-env-background M2 / w8: condition main colour
|
|
149
|
+
// loadOp on skyboxActive (AC-05). When skybox is active, the skybox
|
|
150
|
+
// pass writes the far plane + cubemap colour to hdrColor before main;
|
|
151
|
+
// main must load (not clear) to composite geometry on top. Depth
|
|
152
|
+
// loadOp stays 'clear' -- skybox does not write depth, so main's
|
|
153
|
+
// depth test naturally covers skybox pixels with foreground geometry.
|
|
154
|
+
const mainColorLoadOp = skyboxActive ? 'load' : 'clear';
|
|
155
|
+
// feat-20260604 M2 / w9-w10: MSAA resolve placement. When MSAA is active the
|
|
156
|
+
// geometry pass writes a count=4 multisample target. The resolve to the
|
|
157
|
+
// single-sample output (LDR swap-chain view / HDR hdrColor) happens at the
|
|
158
|
+
// LAST pass that writes that multisample target: the main pass itself when
|
|
159
|
+
// there is no LDR sprite split, or the sprite sub-pass end when there is
|
|
160
|
+
// (F-1 -- geometry + sprites share one multisample texture; resolving at the
|
|
161
|
+
// main pass would drop the sprites drawn after). The sprite sub-pass is
|
|
162
|
+
// LDR-only, so under HDR the main pass always resolves.
|
|
163
|
+
const mainPassResolves =
|
|
164
|
+
passKind === 'forward' && msaaActive && geometryColorResolveView !== null && !splitLdrSprite;
|
|
165
|
+
// forward main pass: depth24plus-stencil8 auto-emits stencil ops via the
|
|
166
|
+
// helper's stencil-op gate (plan-strategy M4 R3/R5 stencil-op SSOT).
|
|
167
|
+
// mainColorLoadOp toggles between 'clear' and 'load' (skyboxActive case).
|
|
168
|
+
const pass: RhiRenderPassEncoder =
|
|
169
|
+
graphPass ??
|
|
170
|
+
encoder.beginRenderPass(
|
|
171
|
+
buildBeginRenderPassDescriptor(
|
|
172
|
+
{
|
|
173
|
+
colorFormats,
|
|
174
|
+
depthFormat: 'depth24plus-stencil8',
|
|
175
|
+
sampleCount: msaaActive ? 4 : 1,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
colorViews,
|
|
179
|
+
depthView: targetDepthView,
|
|
180
|
+
...(mainPassResolves ? { resolveTargets: [geometryColorResolveView] } : {}),
|
|
181
|
+
},
|
|
182
|
+
passKind,
|
|
183
|
+
{
|
|
184
|
+
colorLoadOp: mainColorLoadOp,
|
|
185
|
+
clearColor: {
|
|
186
|
+
r: clearColor[0] ?? 0,
|
|
187
|
+
g: clearColor[1] ?? 0,
|
|
188
|
+
b: clearColor[2] ?? 0,
|
|
189
|
+
a: clearColor[3] ?? 1,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
) as never,
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
// Geometry submission block: setPipeline + 4 bind groups + per-entity
|
|
196
|
+
// material uploads + drawIndexed.
|
|
197
|
+
|
|
198
|
+
// feat-20260609 M2: filter entities by pass selector.
|
|
199
|
+
const matchedIndices =
|
|
200
|
+
selector !== undefined ? buildMatchedRenderableIndices(dispatch, selector) : null;
|
|
201
|
+
const matchedMaterials =
|
|
202
|
+
selector !== undefined ? buildMatchedMaterialHandlesByRenderable(dispatch, selector) : null;
|
|
203
|
+
|
|
204
|
+
if (validatedOrdered.length > 0) {
|
|
205
|
+
// feat-20260518-pbr-direct-lighting-mvp M5 / w22.10 (D-4 + D-9 +
|
|
206
|
+
// AC-07 std140): per-entity material slice grew from 32 B (legacy
|
|
207
|
+
// baseColor:vec4 + metallic + roughness + 8B padding) to 48 B
|
|
208
|
+
// mirroring the post-w22.10 `Material` WGSL struct field-for-field
|
|
209
|
+
// (see STANDARD_PBR_UBO_SIZE JSDoc in render-system.ts). The dynamic-
|
|
210
|
+
// offset stride is MATERIAL_PER_ENTITY_STRIDE; the BindGroup entry's
|
|
211
|
+
// `size` remains the derived material payload size.
|
|
212
|
+
const MATERIAL_SLICE = STANDARD_PBR_UBO_SIZE;
|
|
213
|
+
// feat-20260515 M3 / T-M3-05 (research F-6 fix): materialBindGroup now
|
|
214
|
+
// carries 3 entries -- the per-entity material UBO (binding 0,
|
|
215
|
+
// dynamic-offset retained from D-P9), the default sampler (binding 1,
|
|
216
|
+
// pipelineState.defaultSampler from createRenderer; research F-5
|
|
217
|
+
// linear min/mag/mipmap + repeat addressMode), and the texture-view
|
|
218
|
+
// (binding 2, resolved from MaterialSnapshot.baseColorTexture via
|
|
219
|
+
// AssetRegistry.getTextureGpuView when present, falling back to the
|
|
220
|
+
// pipelineState.fallbackTextureView 1x1 white pixel).
|
|
221
|
+
//
|
|
222
|
+
// The first validated renderable's material is sampled to choose the
|
|
223
|
+
// texture-view (M3 milestone simplification; M5 lifts this to
|
|
224
|
+
// per-entity slot writes once UV-driven sampling lands).
|
|
225
|
+
//
|
|
226
|
+
// feat-20260517-merge-mesh-renderer-material-renderer M3 / w10
|
|
227
|
+
// (this commit): the prior structural cast over `firstMaterial`
|
|
228
|
+
// (used to reach `baseColorTexture` before the snapshot carried
|
|
229
|
+
// it as a first-class field) is removed in favour of direct
|
|
230
|
+
// snapshot field access. `MaterialSnapshot` (extract-stage SSOT)
|
|
231
|
+
// already declares `baseColorTexture` (M2 / w6); record reads it
|
|
232
|
+
// directly with no asset registry round-trip and no cast --
|
|
233
|
+
// Pipeline Isolation: extract owns the asset to snapshot
|
|
234
|
+
// translation; record consumes the snapshot POD only (charter
|
|
235
|
+
// proposition 5 consistent abstraction; AC-07 reverse-grep gate
|
|
236
|
+
// `scripts/forgeax/check-render-record-no-material-asset-get.mjs`
|
|
237
|
+
// forbids both the cast pattern and a direct material asset
|
|
238
|
+
// typed-lookup regrowth in this file).
|
|
239
|
+
// bug-20260522-per-entity-material-texture-binding D-1/D-2:
|
|
240
|
+
// the pre-loop `firstMaterial` / `materialTextureView` / `
|
|
241
|
+
// baseMaterialEntries` / single shared `materialBindGroup` are
|
|
242
|
+
// removed. Each entity now creates its own per-entity material BG
|
|
243
|
+
// inside the draw loop, resolving binding=2 from its own
|
|
244
|
+
// `entry.source.material.baseColorTexture` (mirroring sprite path).
|
|
245
|
+
//
|
|
246
|
+
// feat-20260520-skylight-ibl-cubemap M3 round-4 / t48 amend: the
|
|
247
|
+
// 14-entry merged BG (7 material + 7 Skylight) is now assembled per
|
|
248
|
+
// entity inside the draw loop. The Skylight part stays scene-level
|
|
249
|
+
// (single `skylightResources` resolved once below); only the first 7
|
|
250
|
+
// material entries are rebuilt per-entity with the correct
|
|
251
|
+
// per-entity textureView at binding=2.
|
|
252
|
+
const skylightFallback = pipelineState.skylightFallback;
|
|
253
|
+
if (skylightFallback === null) {
|
|
254
|
+
throw new RhiError({
|
|
255
|
+
code: 'webgpu-runtime-error',
|
|
256
|
+
expected: 'pipelineState.skylightFallback != null when PBR pipeline is active',
|
|
257
|
+
hint: 'createRenderer must allocate skylightFallback alongside the PBR pipeline (D-5 round-4)',
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
// feat-20260520-skylight-ibl-cubemap M4 round-4 / t60 (D-5 round-4):
|
|
261
|
+
// select active vs fallback Skylight resources by `skylightCount` from
|
|
262
|
+
// the extract stage. Active path reaches into the per-device
|
|
263
|
+
// `IblPipelineCache` slots (irradianceView / prefilterView / brdfLutView)
|
|
264
|
+
// populated by the internal equirect-to-cubemap projection; fallback uses the
|
|
265
|
+
// 1x1-zero identity bundle that converges ambient to 0 (D-4 physical
|
|
266
|
+
// convergence -- no `if (hasSkylight)` shader branch).
|
|
267
|
+
// The samplers are reused from `skylightFallback.sampler` for both
|
|
268
|
+
// paths (linear / clamp-to-edge is correct for IBL cube + 2D LUT
|
|
269
|
+
// sampling either way). The intensity uniform is rewritten per-frame
|
|
270
|
+
// when active so `sampleIblSpecular * intensity` carries the user's
|
|
271
|
+
// Skylight.intensity value; fallback keeps intensity=0 (createSkylightFallback
|
|
272
|
+
// seed) so ambient = 0 even when the same buffer is shared.
|
|
273
|
+
let activeViews: { irr: TextureView; pref: TextureView; brdf: TextureView } | undefined;
|
|
274
|
+
// Per-frame Skylight uniform: std140 32 B = [intensity, colorR, colorG,
|
|
275
|
+
// colorB, rotation quaternion]. Default to all-zero so a transition from "has Skylight" ->
|
|
276
|
+
// "no Skylight" does not leak the prior frame's ambient (intensity 0
|
|
277
|
+
// muzzles everything, including the white fallback irradiance cube).
|
|
278
|
+
runtime.device.queue.writeBuffer(skylightFallback.intensityBuffer, 0, ZERO_SKYLIGHT_PAYLOAD);
|
|
279
|
+
if (skylight !== undefined && skylightCount >= 1) {
|
|
280
|
+
// A Skylight exists. Write its intensity + color regardless of whether
|
|
281
|
+
// a cubemap is bound: with a cubemap the IBL views below light the
|
|
282
|
+
// ambient; WITHOUT one, the white fallback irradiance cube + this color
|
|
283
|
+
// give an instant solid-color ambient (downstream integration #4) with
|
|
284
|
+
// no async precompute. The white fallback only contributes when a
|
|
285
|
+
// Skylight is present because the zero-payload above sets intensity 0
|
|
286
|
+
// when no Skylight exists.
|
|
287
|
+
const [cr, cg, cb] = skylight.color;
|
|
288
|
+
const [qx, qy, qz, qw] = skylight.rotation;
|
|
289
|
+
const uniformPayload = new Float32Array([skylight.intensity, cr, cg, cb, qx, qy, qz, qw]);
|
|
290
|
+
runtime.device.queue.writeBuffer(skylightFallback.intensityBuffer, 0, uniformPayload);
|
|
291
|
+
const cache = getOrCreateIblCache(runtime.deviceScope);
|
|
292
|
+
if (
|
|
293
|
+
cache.irradianceView !== undefined &&
|
|
294
|
+
cache.prefilterView !== undefined &&
|
|
295
|
+
cache.brdfLutView !== undefined
|
|
296
|
+
) {
|
|
297
|
+
activeViews = {
|
|
298
|
+
irr: cache.irradianceView,
|
|
299
|
+
pref: cache.prefilterView,
|
|
300
|
+
brdf: cache.brdfLutView,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
const skylightResources =
|
|
305
|
+
activeViews !== undefined
|
|
306
|
+
? {
|
|
307
|
+
irradianceView: activeViews.irr,
|
|
308
|
+
irradianceSampler: skylightFallback.sampler,
|
|
309
|
+
prefilterView: activeViews.pref,
|
|
310
|
+
prefilterSampler: skylightFallback.sampler,
|
|
311
|
+
brdfLutView: activeViews.brdf,
|
|
312
|
+
brdfLutSampler: skylightFallback.sampler,
|
|
313
|
+
intensityBuffer: skylightFallback.intensityBuffer,
|
|
314
|
+
}
|
|
315
|
+
: {
|
|
316
|
+
irradianceView: skylightFallback.irradianceView,
|
|
317
|
+
irradianceSampler: skylightFallback.sampler,
|
|
318
|
+
prefilterView: skylightFallback.prefilterView,
|
|
319
|
+
prefilterSampler: skylightFallback.sampler,
|
|
320
|
+
brdfLutView: skylightFallback.brdfLutView,
|
|
321
|
+
brdfLutSampler: skylightFallback.sampler,
|
|
322
|
+
intensityBuffer: skylightFallback.intensityBuffer,
|
|
323
|
+
};
|
|
324
|
+
// Per-entity material uploads (D-P9 retained path).
|
|
325
|
+
// feat-20260613 fix-issue-1 (D-8 channelMap split): the payload mirrors
|
|
326
|
+
// the post-split sidecar paramSchema for default-standard-pbr (14 entries
|
|
327
|
+
// packed std140 across a 96 B schema tail):
|
|
328
|
+
// [0..3] baseColor vec4<f32> (offset 0)
|
|
329
|
+
// [4] metallic f32 (offset 16)
|
|
330
|
+
// [5] roughness f32 (offset 20)
|
|
331
|
+
// [6] metallicChannel f32 (offset 24)
|
|
332
|
+
// [7] roughnessChannel f32 (offset 28)
|
|
333
|
+
// [8] aoChannel f32 (offset 32)
|
|
334
|
+
// [9] extraChannel f32 (offset 36)
|
|
335
|
+
// [12..14] emissive vec3<f32> (offset 48, vec3 align=16)
|
|
336
|
+
// [15] emissiveIntensity f32 (offset 60)
|
|
337
|
+
// [16] occlusionStrength f32 (offset 64)
|
|
338
|
+
// Channel selectors default to (B,G,R,_) = (2,1,0,0) per glTF 2.0
|
|
339
|
+
// KHR_materials_pbrSpecularGlossiness ARM packing; the fragment casts
|
|
340
|
+
// each f32 to u32 at the pick_channel call site. The full 128 B bind window is
|
|
341
|
+
// overwritten per-entity so unlit entities still produce a deterministic
|
|
342
|
+
// payload (charter P3 explicit failure: zero-init via fresh ArrayBuffer).
|
|
343
|
+
//
|
|
344
|
+
// Material snapshots are interned by extract-owned identity before this
|
|
345
|
+
// pass. Repeated scene instances therefore share one 256-byte UBO slot;
|
|
346
|
+
// materialSlotIndices maps each authored submesh material to that slot.
|
|
347
|
+
// feat-city-glb Bug 5 (per-submesh transparency): shared per-submesh
|
|
348
|
+
// material bind-group assembly, called by BOTH the geometry pass and the
|
|
349
|
+
// LDR blend sub-pass so a transparent PBR submesh binds the identical
|
|
350
|
+
// metallic/roughness/normal/emissive/occlusion + Skylight layout
|
|
351
|
+
// the geometry pass uses (the sub-pass previously bound a sprite-only BG,
|
|
352
|
+
// which cannot render a PBR decal). Captures only frame-stable closure
|
|
353
|
+
// state; the caller passes the per-submesh material snapshot + entityKey
|
|
354
|
+
// (for video texture routing) and sets the dynamic UBO offset itself.
|
|
355
|
+
const perSubmeshMaterialBgDeps: PerSubmeshMaterialBgDeps = {
|
|
356
|
+
runtime,
|
|
357
|
+
pipelineState,
|
|
358
|
+
world,
|
|
359
|
+
store,
|
|
360
|
+
materialSlice: MATERIAL_SLICE,
|
|
361
|
+
videoHighPerfAvailable,
|
|
362
|
+
skylightResources,
|
|
363
|
+
materialBgShared: frameState.materialBgShared,
|
|
364
|
+
materialBgAssemblyCache: c.materialBgAssemblyCache,
|
|
365
|
+
bindGroupCounts,
|
|
366
|
+
};
|
|
367
|
+
const buildPerSubmeshMaterialBg = (
|
|
368
|
+
submeshMaterial: MaterialSnapshot,
|
|
369
|
+
entityKey: number,
|
|
370
|
+
materialWorld: World = world,
|
|
371
|
+
): BindGroup =>
|
|
372
|
+
buildPerSubmeshMaterialBgImpl(
|
|
373
|
+
perSubmeshMaterialBgDeps,
|
|
374
|
+
submeshMaterial,
|
|
375
|
+
entityKey,
|
|
376
|
+
materialWorld,
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
const cachedMaterialUboPayload = c.materialUboPayloadCache;
|
|
380
|
+
let materialUboPayload: Uint8Array;
|
|
381
|
+
if (
|
|
382
|
+
cachedMaterialUboPayload?.materialSlots === materialSlots &&
|
|
383
|
+
cachedMaterialUboPayload.materialSlotCount === materialSlotCount
|
|
384
|
+
) {
|
|
385
|
+
materialUboPayload = cachedMaterialUboPayload.payload;
|
|
386
|
+
} else {
|
|
387
|
+
materialUboPayload = new Uint8Array(materialSlotCount * MATERIAL_PER_ENTITY_STRIDE);
|
|
388
|
+
const slotPayload = new Uint8Array(STANDARD_PBR_UBO_SIZE);
|
|
389
|
+
const slotPayloadF32 = new Float32Array(
|
|
390
|
+
slotPayload.buffer,
|
|
391
|
+
slotPayload.byteOffset,
|
|
392
|
+
slotPayload.byteLength / 4,
|
|
393
|
+
);
|
|
394
|
+
for (let materialSlot = 0; materialSlot < materialSlots.length; materialSlot += 1) {
|
|
395
|
+
const mat = materialSlots[materialSlot];
|
|
396
|
+
const entry = validatedOrdered[materialSlotOwners[materialSlot] ?? -1];
|
|
397
|
+
if (mat === undefined || entry === undefined) continue;
|
|
398
|
+
|
|
399
|
+
// feat-20260625-refactor-sprite-as-transparent-mesh M3 / w13 (D-2):
|
|
400
|
+
// single unified Material UBO write path. Sprite materials now flow
|
|
401
|
+
// through the same `buildPbrMaterialUboPayload` baseline +
|
|
402
|
+
// `applyParamSnapshotToUbo` generic std140 overlay every other
|
|
403
|
+
// paramSchema-driven material uses. Extract folds the sprite-specific
|
|
404
|
+
// user inputs into the UBO-aligned paramSnapshot vec4 entries
|
|
405
|
+
// (colorTint / region / pivotAndSize / slicesAndMode); the writer
|
|
406
|
+
// walks `derive(paramSchema).uboLayout.entries` and writes each at
|
|
407
|
+
// its std140 offset. The legacy sprite-specific UBO builder + the
|
|
408
|
+
// sprite-vs-PBR branch are gone (AC-03).
|
|
409
|
+
writePbrMaterialUboPayload(slotPayloadF32, mat);
|
|
410
|
+
// Schema-driven paramSnapshot overlay generalised in feat-20260625
|
|
411
|
+
// M1 / w3: the writer walks `derive(paramSchema).uboLayout.entries`
|
|
412
|
+
// and writes each numeric field at its std140 offset (plan-strategy
|
|
413
|
+
// section 2 D-2). The engine's stock PBR material ships
|
|
414
|
+
// `paramSnapshot: undefined`, so this is a no-op on the default
|
|
415
|
+
// PBR path -- the explicit field writes in buildPbrMaterialUboPayload
|
|
416
|
+
// already cover every byte. User shaders carrying a paramSnapshot
|
|
417
|
+
// (including the post-ablation sprite path) get their fields
|
|
418
|
+
// written at the derive-computed offsets; R-H gate keeps the
|
|
419
|
+
// helper snapshot-only, no asset get.
|
|
420
|
+
const materialShaderId = mat.materialShaderId;
|
|
421
|
+
const schema =
|
|
422
|
+
mat.materialParamSchema ??
|
|
423
|
+
(materialShaderId !== undefined ? runtime.getParamSchema?.(materialShaderId) : undefined);
|
|
424
|
+
applyParamSnapshotToUbo(slotPayloadF32, schema, mat.paramSnapshot);
|
|
425
|
+
applyMaterialTextureUvScales(slotPayloadF32, mat, world);
|
|
426
|
+
// Missing-texture detection: structural debug-pink fallback overrides
|
|
427
|
+
// the baseColor/colorTint slot when a bound baseColorTexture handle
|
|
428
|
+
// resolves to no GPU view. Runs for every textured material path
|
|
429
|
+
// (sprite / sprite-lit / standard-pbr / pbr-skin / unlit) — the bound
|
|
430
|
+
// texture would otherwise silently fall back to the 1x1 white view in
|
|
431
|
+
// the per-submesh BG (main-pass-material.ts), rendering flat with no
|
|
432
|
+
// warn / RhiError. Mirroring the telemetry here makes a missing/failed
|
|
433
|
+
// GLB texture immediately diagnosable instead of a silent flat render
|
|
434
|
+
// (feat-future-pbr-missing-texture-fallback-explicit; feedback
|
|
435
|
+
// 2026-07-04-glb-pbr-textures-not-applied-flat-render).
|
|
436
|
+
//
|
|
437
|
+
// Reads only `mat.baseColorTexture` + the GPU view registry (plan R-H
|
|
438
|
+
// gate: no asset.get<MaterialAsset> reach-back). The debug-pink write
|
|
439
|
+
// lands on f32[0..2], which is baseColor.rgb for the PBR/skin UBO and
|
|
440
|
+
// colorTint.rgb for the sprite UBO — same offset, so one override
|
|
441
|
+
// covers both.
|
|
442
|
+
{
|
|
443
|
+
const matHandleRaw = mat.baseColorTexture as Handle<'TextureAsset', 'shared'> | undefined;
|
|
444
|
+
if (matHandleRaw !== undefined) {
|
|
445
|
+
const view = residentTextureView(entry.world ?? world, store, runtime, matHandleRaw);
|
|
446
|
+
if (view === undefined) {
|
|
447
|
+
const rawId: number = matHandleRaw;
|
|
448
|
+
if (!frameState.warnedMissingBaseColorTextureHandles.has(rawId)) {
|
|
449
|
+
frameState.warnedMissingBaseColorTextureHandles.add(rawId);
|
|
450
|
+
console.warn(
|
|
451
|
+
`[forgeax] baseColor texture ${rawId} missing GPU view, rendering debug pink (shader=${materialShaderId ?? '<none>'} entityIndex=${entry.renderableIndex})`,
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
runtime.errorRegistry.fire(
|
|
455
|
+
new RhiError({
|
|
456
|
+
code: 'asset-not-registered',
|
|
457
|
+
expected: 'material baseColor TextureAsset uploaded to GPU',
|
|
458
|
+
hint: 'register + uploadTexture the baseColor texture before draw([world], { cameraOwner: 0, resourceOwner: 0 }); rendering falls back to debug pink until then',
|
|
459
|
+
detail: { assetHandle: rawId },
|
|
460
|
+
}),
|
|
461
|
+
);
|
|
462
|
+
// Debug pink override on slot 0 baseColor/colorTint.rgb (alpha preserved).
|
|
463
|
+
slotPayloadF32[0] = 1.0;
|
|
464
|
+
slotPayloadF32[1] = 0.4;
|
|
465
|
+
slotPayloadF32[2] = 0.7;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
materialUboPayload.set(slotPayload, materialSlot * MATERIAL_PER_ENTITY_STRIDE);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// Material UBO slots can share one snapshot identity, but nine-slice
|
|
474
|
+
// validity depends on each entity's transform. Preserve diagnostics per
|
|
475
|
+
// renderable instead of inheriting the first owner of a shared slot.
|
|
476
|
+
for (const entry of validatedOrdered) {
|
|
477
|
+
const mat = entry.source.material;
|
|
478
|
+
const materialShaderId = mat.materialShaderId;
|
|
479
|
+
if (materialShaderId !== 'forgeax::sprite' && materialShaderId !== 'forgeax::sprite-lit')
|
|
480
|
+
continue;
|
|
481
|
+
const slicesAndMode = mat.paramSnapshot?.slicesAndMode as readonly number[] | undefined;
|
|
482
|
+
if (slicesAndMode === undefined || slicesAndMode.length < 4) continue;
|
|
483
|
+
const slicesArr: readonly [number, number, number, number] = [
|
|
484
|
+
slicesAndMode[0] ?? 0,
|
|
485
|
+
slicesAndMode[1] ?? 0,
|
|
486
|
+
slicesAndMode[2] ?? 0,
|
|
487
|
+
slicesAndMode[3] ?? 0,
|
|
488
|
+
];
|
|
489
|
+
if (slicesArr[0] === 0 && slicesArr[1] === 0 && slicesArr[2] === 0 && slicesArr[3] === 0)
|
|
490
|
+
continue;
|
|
491
|
+
detectNineSliceScaleTooSmall(
|
|
492
|
+
entry.source.transform.world,
|
|
493
|
+
slicesArr,
|
|
494
|
+
entry.renderableIndex,
|
|
495
|
+
frameState.warnedNineSliceScaleEntities,
|
|
496
|
+
runtime.metrics,
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
c.materialUboPayloadCache = {
|
|
500
|
+
materialSlots,
|
|
501
|
+
materialSlotCount,
|
|
502
|
+
payload: materialUboPayload,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// All material slots are staged before the first geometry draw. One
|
|
507
|
+
// stride-shaped upload preserves every dynamic offset while avoiding one
|
|
508
|
+
// queue call per material; the RHI still validates alignment and bounds at
|
|
509
|
+
// this single owner-level write boundary.
|
|
510
|
+
const materialUboUpload = runtime.device.queue.writeBuffer(
|
|
511
|
+
pipelineState.materialUniformBuffer.buffer,
|
|
512
|
+
0,
|
|
513
|
+
materialUboPayload,
|
|
514
|
+
);
|
|
515
|
+
if (!materialUboUpload.ok) throw materialUboUpload.error;
|
|
516
|
+
// Static material resources are a property of the frame-local material
|
|
517
|
+
// slot, not of each submesh draw. Resolve them once here so the geometry
|
|
518
|
+
// loop only selects a prepared binding. Video fields remain entity-bound:
|
|
519
|
+
// their current frame view is keyed by entityKey and must be resolved at
|
|
520
|
+
// the draw site.
|
|
521
|
+
const preparedMaterialBindGroups = new Array<BindGroup | undefined>(materialSlotCount);
|
|
522
|
+
for (let materialSlot = 0; materialSlot < materialSlotCount; materialSlot += 1) {
|
|
523
|
+
const material = materialSlots[materialSlot];
|
|
524
|
+
if (material === undefined || (material.videoTextureFields?.size ?? 0) > 0) continue;
|
|
525
|
+
const owner = validatedOrdered[materialSlotOwners[materialSlot] ?? -1];
|
|
526
|
+
if (owner === undefined) continue;
|
|
527
|
+
preparedMaterialBindGroups[materialSlot] = buildPerSubmeshMaterialBg(
|
|
528
|
+
material,
|
|
529
|
+
owner.source.entityKey,
|
|
530
|
+
owner.world ?? world,
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
const resolveMaterialBindGroup = (
|
|
534
|
+
materialSlot: number,
|
|
535
|
+
material: MaterialSnapshot,
|
|
536
|
+
entityKey: number,
|
|
537
|
+
materialWorld: World = world,
|
|
538
|
+
): BindGroup =>
|
|
539
|
+
material.materialShaderId !== POINTS_LINES_MATERIAL_SHADER_ID
|
|
540
|
+
? (preparedMaterialBindGroups[materialSlot] ??
|
|
541
|
+
buildPerSubmeshMaterialBg(material, entityKey, materialWorld))
|
|
542
|
+
: buildPerSubmeshMaterialBg(material, entityKey, materialWorld);
|
|
543
|
+
|
|
544
|
+
pass.setBindGroup(0, viewBindGroup as BindGroup, [0]);
|
|
545
|
+
|
|
546
|
+
// Track which (mesh-vertex-buffer, mesh-index-buffer, pipeline) combo
|
|
547
|
+
// was last bound so consecutive entities sharing the same combo skip
|
|
548
|
+
// the redundant rebinds (cheap GPU cost; net wins on workloads where
|
|
549
|
+
// most entities share BUILTIN_CUBE + unlit). Initial nulls force the
|
|
550
|
+
// first iteration to bind unconditionally.
|
|
551
|
+
// M-3 / w12: vertexBuffer/indexBuffer state locals migrate to GpuBuffer.
|
|
552
|
+
const recordGeometry = (): void => {
|
|
553
|
+
recordGeometryDraws(
|
|
554
|
+
c,
|
|
555
|
+
pass,
|
|
556
|
+
matchedMaterials,
|
|
557
|
+
materialSlotIndices,
|
|
558
|
+
sampleCount,
|
|
559
|
+
meshGroup2,
|
|
560
|
+
meshBindGroup,
|
|
561
|
+
resolveMaterialBindGroup,
|
|
562
|
+
passKind,
|
|
563
|
+
);
|
|
564
|
+
};
|
|
565
|
+
if (c.profilePhase === undefined) {
|
|
566
|
+
recordGeometry();
|
|
567
|
+
} else {
|
|
568
|
+
const passName = passKind === 'deferred' ? 'g-buffer' : 'forward';
|
|
569
|
+
c.profilePhase(
|
|
570
|
+
`record/graph-execute/${passName}/geometry-loop` as RenderRecordPhase,
|
|
571
|
+
recordGeometry,
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// D-2: LDR sprite pass. Runs after the geometry pass when there are
|
|
576
|
+
// sprite entities in the draw list and the LDR path is active.
|
|
577
|
+
// The geometry pass used the bgra8unorm-srgb sRGB view (hardware sRGB
|
|
578
|
+
// encoding for unlit/standard/pbr output). The sprite pass uses the
|
|
579
|
+
// bgra8unorm storage view (loadOp=load) so the sprite LDR pipeline
|
|
580
|
+
// (target=bgra8unorm, blend=premultiplied-alpha) can write over the
|
|
581
|
+
// already-encoded geometry pixels. Depth is loaded from the geometry
|
|
582
|
+
// pass so sprite-vs-mesh occlusion (depthCompare=less-equal) is
|
|
583
|
+
// preserved (plan-strategy §2 D-2 + §4 R-4).
|
|
584
|
+
if (passKind === 'forward') {
|
|
585
|
+
geometryPassEnded = recordSpritePass(
|
|
586
|
+
c,
|
|
587
|
+
pass,
|
|
588
|
+
matchedIndices,
|
|
589
|
+
materialSlotIndices,
|
|
590
|
+
sampleCount,
|
|
591
|
+
resolveMaterialBindGroup,
|
|
592
|
+
skylightResources,
|
|
593
|
+
graphPass,
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
} // end if (validatedOrdered.length > 0) -- Case E falls through to pass.end()
|
|
597
|
+
|
|
598
|
+
if (!geometryPassEnded && graphPass === undefined) {
|
|
599
|
+
pass.end();
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export function encodeMainPass(
|
|
604
|
+
c: _InternalRenderPipelineContext,
|
|
605
|
+
pass: RhiRenderPassEncoder,
|
|
606
|
+
selector?: PassSelector,
|
|
607
|
+
options?: MainPassOptions,
|
|
608
|
+
): void {
|
|
609
|
+
recordMainPass(c, selector, options, pass);
|
|
610
|
+
}
|