@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.
Files changed (891) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +647 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/__tests__/authoring-path.unit.test.d.ts +2 -0
  5. package/dist/__tests__/authoring-path.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts +2 -0
  7. package/dist/__tests__/backend-selection-rhi-capture.test-d.d.ts.map +1 -0
  8. package/dist/__tests__/callback-inference.test-d.d.ts +2 -0
  9. package/dist/__tests__/callback-inference.test-d.d.ts.map +1 -0
  10. package/dist/__tests__/cluster-binner.test.d.ts +2 -0
  11. package/dist/__tests__/cluster-binner.test.d.ts.map +1 -0
  12. package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts +2 -0
  13. package/dist/__tests__/cluster-grid-default-surface.unit.test.d.ts.map +1 -0
  14. package/dist/__tests__/construct-renderer-identity.unit.test.d.ts +2 -0
  15. package/dist/__tests__/construct-renderer-identity.unit.test.d.ts.map +1 -0
  16. package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts +2 -0
  17. package/dist/__tests__/device-scope-lifecycle.unit.test.d.ts.map +1 -0
  18. package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts +2 -0
  19. package/dist/__tests__/device-scope-stale-matrix.unit.test.d.ts.map +1 -0
  20. package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts +2 -0
  21. package/dist/__tests__/direct-extract-consumer-contract.test-d.d.ts.map +1 -0
  22. package/dist/__tests__/direct-light-snapshot.unit.test.d.ts +2 -0
  23. package/dist/__tests__/direct-light-snapshot.unit.test.d.ts.map +1 -0
  24. package/dist/__tests__/factory-contract.integration.test.d.ts +2 -0
  25. package/dist/__tests__/factory-contract.integration.test.d.ts.map +1 -0
  26. package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts +2 -0
  27. package/dist/__tests__/fallback-row-stride-surface.unit.test.d.ts.map +1 -0
  28. package/dist/__tests__/frame-observation.contract.test.d.ts +2 -0
  29. package/dist/__tests__/frame-observation.contract.test.d.ts.map +1 -0
  30. package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts +2 -0
  31. package/dist/__tests__/fullscreen-feature-plan.unit.test.d.ts.map +1 -0
  32. package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts +2 -0
  33. package/dist/__tests__/glyph-text-layout-recovery.unit.test.d.ts.map +1 -0
  34. package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts +6 -0
  35. package/dist/__tests__/gpu-driven-indirect-raster-evidence.d.ts.map +1 -0
  36. package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts +2 -0
  37. package/dist/__tests__/gpu-driven-indirect-raster.browser.test.d.ts.map +1 -0
  38. package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts +2 -0
  39. package/dist/__tests__/gpu-driven-indirect-raster.dawn.test.d.ts.map +1 -0
  40. package/dist/__tests__/gpu-driven-production.integration.test.d.ts +2 -0
  41. package/dist/__tests__/gpu-driven-production.integration.test.d.ts.map +1 -0
  42. package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts +2 -0
  43. package/dist/__tests__/gpu-driven-scaling.unit.test.d.ts.map +1 -0
  44. package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts +18 -0
  45. package/dist/__tests__/gpu-driven-view-gpu-evidence.d.ts.map +1 -0
  46. package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts +2 -0
  47. package/dist/__tests__/gpu-driven-view-graph.integration.test.d.ts.map +1 -0
  48. package/dist/__tests__/gpu-driven-view-reference.d.ts +15 -0
  49. package/dist/__tests__/gpu-driven-view-reference.d.ts.map +1 -0
  50. package/dist/__tests__/gpu-driven-view.browser.test.d.ts +2 -0
  51. package/dist/__tests__/gpu-driven-view.browser.test.d.ts.map +1 -0
  52. package/dist/__tests__/gpu-driven-view.dawn.test.d.ts +2 -0
  53. package/dist/__tests__/gpu-driven-view.dawn.test.d.ts.map +1 -0
  54. package/dist/__tests__/gpu-driven-view.unit.test.d.ts +2 -0
  55. package/dist/__tests__/gpu-driven-view.unit.test.d.ts.map +1 -0
  56. package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts +2 -0
  57. package/dist/__tests__/gpu-resource-store-stride.unit.test.d.ts.map +1 -0
  58. package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts +7 -0
  59. package/dist/__tests__/gpu-scene-render-graph-gpu.d.ts.map +1 -0
  60. package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts +2 -0
  61. package/dist/__tests__/gpu-scene-render-graph.browser.test.d.ts.map +1 -0
  62. package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts +2 -0
  63. package/dist/__tests__/gpu-scene-render-graph.dawn.test.d.ts.map +1 -0
  64. package/dist/__tests__/gpu-scene-schema.unit.test.d.ts +2 -0
  65. package/dist/__tests__/gpu-scene-schema.unit.test.d.ts.map +1 -0
  66. package/dist/__tests__/gpu-scene.dawn.test.d.ts +2 -0
  67. package/dist/__tests__/gpu-scene.dawn.test.d.ts.map +1 -0
  68. package/dist/__tests__/gpu-scene.unit.test.d.ts +2 -0
  69. package/dist/__tests__/gpu-scene.unit.test.d.ts.map +1 -0
  70. package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts +2 -0
  71. package/dist/__tests__/ibl/face-uniforms.unit.test.d.ts.map +1 -0
  72. package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts +2 -0
  73. package/dist/__tests__/infinite-grid-no-vertex-probe.unit.test.d.ts.map +1 -0
  74. package/dist/__tests__/injection-kind-owner.test-d.d.ts +2 -0
  75. package/dist/__tests__/injection-kind-owner.test-d.d.ts.map +1 -0
  76. package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts +2 -0
  77. package/dist/__tests__/ktx2-basis-gpu-consumer.dawn.test.d.ts.map +1 -0
  78. package/dist/__tests__/light-buffer-layout.unit.test.d.ts +2 -0
  79. package/dist/__tests__/light-buffer-layout.unit.test.d.ts.map +1 -0
  80. package/dist/__tests__/material-contract-inventory.unit.test.d.ts +2 -0
  81. package/dist/__tests__/material-contract-inventory.unit.test.d.ts.map +1 -0
  82. package/dist/__tests__/material-cooked-projection.unit.test.d.ts +2 -0
  83. package/dist/__tests__/material-cooked-projection.unit.test.d.ts.map +1 -0
  84. package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts +2 -0
  85. package/dist/__tests__/material-snapshot-mutation.integration.test.d.ts.map +1 -0
  86. package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts +2 -0
  87. package/dist/__tests__/material-static-dynamic-route.unit.test.d.ts.map +1 -0
  88. package/dist/__tests__/material-stride-surface.unit.test.d.ts +2 -0
  89. package/dist/__tests__/material-stride-surface.unit.test.d.ts.map +1 -0
  90. package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts +2 -0
  91. package/dist/__tests__/mesh-buffer-usage-surface.unit.test.d.ts.map +1 -0
  92. package/dist/__tests__/mesh-material-bindings.unit.test.d.ts +2 -0
  93. package/dist/__tests__/mesh-material-bindings.unit.test.d.ts.map +1 -0
  94. package/dist/__tests__/mesh-stride-surface.unit.test.d.ts +2 -0
  95. package/dist/__tests__/mesh-stride-surface.unit.test.d.ts.map +1 -0
  96. package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts +2 -0
  97. package/dist/__tests__/morph-culling-reentry.dawn.test.d.ts.map +1 -0
  98. package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts +2 -0
  99. package/dist/__tests__/morph-feature-gpu-work.integration.test.d.ts.map +1 -0
  100. package/dist/__tests__/morph-feature-plan.unit.test.d.ts +2 -0
  101. package/dist/__tests__/morph-feature-plan.unit.test.d.ts.map +1 -0
  102. package/dist/__tests__/morph-visual-evidence.integration.test.d.ts +2 -0
  103. package/dist/__tests__/morph-visual-evidence.integration.test.d.ts.map +1 -0
  104. package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts +2 -0
  105. package/dist/__tests__/nineslice-handle-surface.unit.test.d.ts.map +1 -0
  106. package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts +2 -0
  107. package/dist/__tests__/post-process-error-policy-owner.unit.test.d.ts.map +1 -0
  108. package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts +2 -0
  109. package/dist/__tests__/prepared-buffer-kind-owner.test-d.d.ts.map +1 -0
  110. package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts +2 -0
  111. package/dist/__tests__/prepared-graphics-capability.unit.test.d.ts.map +1 -0
  112. package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts +2 -0
  113. package/dist/__tests__/prepared-graphics-generation.unit.test.d.ts.map +1 -0
  114. package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts +2 -0
  115. package/dist/__tests__/prepared-graphics-lifecycle.unit.test.d.ts.map +1 -0
  116. package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts +2 -0
  117. package/dist/__tests__/prepared-graphics-pipeline-warmup.unit.test.d.ts.map +1 -0
  118. package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts +2 -0
  119. package/dist/__tests__/prepared-graphics-resolver.unit.test.d.ts.map +1 -0
  120. package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts +2 -0
  121. package/dist/__tests__/prepared-graphics-snapshot.unit.test.d.ts.map +1 -0
  122. package/dist/__tests__/prepared-graphics-store.unit.test.d.ts +2 -0
  123. package/dist/__tests__/prepared-graphics-store.unit.test.d.ts.map +1 -0
  124. package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts +2 -0
  125. package/dist/__tests__/prepared-graphics-validation.unit.test.d.ts.map +1 -0
  126. package/dist/__tests__/profiler-default-off.test.d.ts +2 -0
  127. package/dist/__tests__/profiler-default-off.test.d.ts.map +1 -0
  128. package/dist/__tests__/profiler-phase-catalog.test.d.ts +2 -0
  129. package/dist/__tests__/profiler-phase-catalog.test.d.ts.map +1 -0
  130. package/dist/__tests__/profiler-phase-integration.test.d.ts +2 -0
  131. package/dist/__tests__/profiler-phase-integration.test.d.ts.map +1 -0
  132. package/dist/__tests__/profiler-phase-token.test.d.ts +2 -0
  133. package/dist/__tests__/profiler-phase-token.test.d.ts.map +1 -0
  134. package/dist/__tests__/public-surface.test-d.d.ts +2 -0
  135. package/dist/__tests__/public-surface.test-d.d.ts.map +1 -0
  136. package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts +2 -0
  137. package/dist/__tests__/recover-error-policy-owner.unit.test.d.ts.map +1 -0
  138. package/dist/__tests__/render-error-code-owner.test-d.d.ts +2 -0
  139. package/dist/__tests__/render-error-code-owner.test-d.d.ts.map +1 -0
  140. package/dist/__tests__/render-error-detail-ssot.test-d.d.ts +2 -0
  141. package/dist/__tests__/render-error-detail-ssot.test-d.d.ts.map +1 -0
  142. package/dist/__tests__/render-error-exhaustive.test-d.d.ts +2 -0
  143. package/dist/__tests__/render-error-exhaustive.test-d.d.ts.map +1 -0
  144. package/dist/__tests__/render-feature-assembly.test-d.d.ts +2 -0
  145. package/dist/__tests__/render-feature-assembly.test-d.d.ts.map +1 -0
  146. package/dist/__tests__/render-feature-context.test-d.d.ts +2 -0
  147. package/dist/__tests__/render-feature-context.test-d.d.ts.map +1 -0
  148. package/dist/__tests__/render-feature-contract.test-d.d.ts +2 -0
  149. package/dist/__tests__/render-feature-contract.test-d.d.ts.map +1 -0
  150. package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts +2 -0
  151. package/dist/__tests__/render-feature-diagnostics.unit.test.d.ts.map +1 -0
  152. package/dist/__tests__/render-feature-docs.unit.test.d.ts +2 -0
  153. package/dist/__tests__/render-feature-docs.unit.test.d.ts.map +1 -0
  154. package/dist/__tests__/render-feature-errors.unit.test.d.ts +2 -0
  155. package/dist/__tests__/render-feature-errors.unit.test.d.ts.map +1 -0
  156. package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts +2 -0
  157. package/dist/__tests__/render-feature-gpu-work.integration.test.d.ts.map +1 -0
  158. package/dist/__tests__/render-feature-plan.test-d.d.ts +2 -0
  159. package/dist/__tests__/render-feature-plan.test-d.d.ts.map +1 -0
  160. package/dist/__tests__/render-feature-plan.unit.test.d.ts +2 -0
  161. package/dist/__tests__/render-feature-plan.unit.test.d.ts.map +1 -0
  162. package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts +2 -0
  163. package/dist/__tests__/render-feature-prepared-diagnostics.unit.test.d.ts.map +1 -0
  164. package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts +2 -0
  165. package/dist/__tests__/render-feature-prepared-errors.test-d.d.ts.map +1 -0
  166. package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts +2 -0
  167. package/dist/__tests__/render-feature-prepared-graphics-docs.unit.test.d.ts.map +1 -0
  168. package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts +2 -0
  169. package/dist/__tests__/render-feature-prepared-graphics-isolation.unit.test.d.ts.map +1 -0
  170. package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts +2 -0
  171. package/dist/__tests__/render-feature-prepared-graphics-negative.test-d.d.ts.map +1 -0
  172. package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts +2 -0
  173. package/dist/__tests__/render-feature-prepared-graphics.test-d.d.ts.map +1 -0
  174. package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts +2 -0
  175. package/dist/__tests__/render-feature-prepared-graphics.unit.test.d.ts.map +1 -0
  176. package/dist/__tests__/render-feature-public-surface.test-d.d.ts +2 -0
  177. package/dist/__tests__/render-feature-public-surface.test-d.d.ts.map +1 -0
  178. package/dist/__tests__/render-feature-retry.unit.test.d.ts +2 -0
  179. package/dist/__tests__/render-feature-retry.unit.test.d.ts.map +1 -0
  180. package/dist/__tests__/render-feature-scheduling.unit.test.d.ts +2 -0
  181. package/dist/__tests__/render-feature-scheduling.unit.test.d.ts.map +1 -0
  182. package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts +2 -0
  183. package/dist/__tests__/render-feature-stage-failed-policy-owner.unit.test.d.ts.map +1 -0
  184. package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts +2 -0
  185. package/dist/__tests__/render-feature-stage-fault-recovery.unit.test.d.ts.map +1 -0
  186. package/dist/__tests__/render-feature-visibility-context.test-d.d.ts +2 -0
  187. package/dist/__tests__/render-feature-visibility-context.test-d.d.ts.map +1 -0
  188. package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts +2 -0
  189. package/dist/__tests__/render-feature-visibility-context.unit.test.d.ts.map +1 -0
  190. package/dist/__tests__/render-feature-zero-work.unit.test.d.ts +2 -0
  191. package/dist/__tests__/render-feature-zero-work.unit.test.d.ts.map +1 -0
  192. package/dist/__tests__/render-graph-compute-raster-gpu.d.ts +7 -0
  193. package/dist/__tests__/render-graph-compute-raster-gpu.d.ts.map +1 -0
  194. package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts +2 -0
  195. package/dist/__tests__/render-graph-compute-raster.browser.test.d.ts.map +1 -0
  196. package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts +2 -0
  197. package/dist/__tests__/render-graph-compute-raster.dawn.test.d.ts.map +1 -0
  198. package/dist/__tests__/render-graph-hzb-gpu.d.ts +7 -0
  199. package/dist/__tests__/render-graph-hzb-gpu.d.ts.map +1 -0
  200. package/dist/__tests__/render-graph-hzb.browser.test.d.ts +2 -0
  201. package/dist/__tests__/render-graph-hzb.browser.test.d.ts.map +1 -0
  202. package/dist/__tests__/render-graph-hzb.dawn.test.d.ts +2 -0
  203. package/dist/__tests__/render-graph-hzb.dawn.test.d.ts.map +1 -0
  204. package/dist/__tests__/render-graph-primitives.unit.test.d.ts +2 -0
  205. package/dist/__tests__/render-graph-primitives.unit.test.d.ts.map +1 -0
  206. package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts +12 -0
  207. package/dist/__tests__/render-graph-storage-indirect-gpu.d.ts.map +1 -0
  208. package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts +2 -0
  209. package/dist/__tests__/render-graph-storage-indirect.browser.test.d.ts.map +1 -0
  210. package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts +2 -0
  211. package/dist/__tests__/render-graph-storage-indirect.dawn.test.d.ts.map +1 -0
  212. package/dist/__tests__/render-scene-projection.unit.test.d.ts +2 -0
  213. package/dist/__tests__/render-scene-projection.unit.test.d.ts.map +1 -0
  214. package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts +2 -0
  215. package/dist/__tests__/renderer-factory-material-contract.unit.test.d.ts.map +1 -0
  216. package/dist/__tests__/renderer-lifecycle.integration.test.d.ts +2 -0
  217. package/dist/__tests__/renderer-lifecycle.integration.test.d.ts.map +1 -0
  218. package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts +2 -0
  219. package/dist/__tests__/rhi-backend-package-boundary.unit.test.d.ts.map +1 -0
  220. package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts +2 -0
  221. package/dist/__tests__/scriptable-pack-consumer.test-d.d.ts.map +1 -0
  222. package/dist/__tests__/shader-stage-surface.unit.test.d.ts +2 -0
  223. package/dist/__tests__/shader-stage-surface.unit.test.d.ts.map +1 -0
  224. package/dist/__tests__/ssao-config.unit.test.d.ts +2 -0
  225. package/dist/__tests__/ssao-config.unit.test.d.ts.map +1 -0
  226. package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts +2 -0
  227. package/dist/__tests__/ssao-kernel-surface.unit.test.d.ts.map +1 -0
  228. package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts +2 -0
  229. package/dist/__tests__/standard-clustered-pipeline.unit.test.d.ts.map +1 -0
  230. package/dist/__tests__/standard-descriptors.test-d.d.ts +2 -0
  231. package/dist/__tests__/standard-descriptors.test-d.d.ts.map +1 -0
  232. package/dist/__tests__/standard-pipeline.dawn.test.d.ts +2 -0
  233. package/dist/__tests__/standard-pipeline.dawn.test.d.ts.map +1 -0
  234. package/dist/__tests__/standard-pipeline.integration.test.d.ts +2 -0
  235. package/dist/__tests__/standard-pipeline.integration.test.d.ts.map +1 -0
  236. package/dist/__tests__/standard-profile-oracle.unit.test.d.ts +2 -0
  237. package/dist/__tests__/standard-profile-oracle.unit.test.d.ts.map +1 -0
  238. package/dist/__tests__/surface-configuration.unit.test.d.ts +2 -0
  239. package/dist/__tests__/surface-configuration.unit.test.d.ts.map +1 -0
  240. package/dist/__tests__/texture-usage-surface.unit.test.d.ts +2 -0
  241. package/dist/__tests__/texture-usage-surface.unit.test.d.ts.map +1 -0
  242. package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts +2 -0
  243. package/dist/__tests__/typed-pipeline-topology.unit.test.d.ts.map +1 -0
  244. package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts +2 -0
  245. package/dist/__tests__/urp-pipeline-targets.unit.test.d.ts.map +1 -0
  246. package/dist/__tests__/urp-pipeline.unit.test.d.ts +2 -0
  247. package/dist/__tests__/urp-pipeline.unit.test.d.ts.map +1 -0
  248. package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts +2 -0
  249. package/dist/__tests__/vertex-color-pipeline.unit.test.d.ts.map +1 -0
  250. package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts +2 -0
  251. package/dist/__tests__/vertex-layout-consumer.unit.test.d.ts.map +1 -0
  252. package/dist/__tests__/visibility-diagnostics.integration.test.d.ts +2 -0
  253. package/dist/__tests__/visibility-diagnostics.integration.test.d.ts.map +1 -0
  254. package/dist/__tests__/visibility-extract.integration.test.d.ts +2 -0
  255. package/dist/__tests__/visibility-extract.integration.test.d.ts.map +1 -0
  256. package/dist/__tests__/visibility-extract.perf.test.d.ts +2 -0
  257. package/dist/__tests__/visibility-extract.perf.test.d.ts.map +1 -0
  258. package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts +2 -0
  259. package/dist/__tests__/visibility-feature-dedup.integration.test.d.ts.map +1 -0
  260. package/dist/__tests__/visibility-hidden-report.unit.test.d.ts +2 -0
  261. package/dist/__tests__/visibility-hidden-report.unit.test.d.ts.map +1 -0
  262. package/dist/__tests__/visibility-instances.integration.test.d.ts +2 -0
  263. package/dist/__tests__/visibility-instances.integration.test.d.ts.map +1 -0
  264. package/dist/__tests__/visibility-multi-world.integration.test.d.ts +2 -0
  265. package/dist/__tests__/visibility-multi-world.integration.test.d.ts.map +1 -0
  266. package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts +2 -0
  267. package/dist/__tests__/visibility-producer-matrix.integration.test.d.ts.map +1 -0
  268. package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts +2 -0
  269. package/dist/__tests__/visibility-producer-matrix.unit.test.d.ts.map +1 -0
  270. package/dist/__tests__/visibility-public-surface.test-d.d.ts +2 -0
  271. package/dist/__tests__/visibility-public-surface.test-d.d.ts.map +1 -0
  272. package/dist/__tests__/visibility-resolver.unit.test.d.ts +2 -0
  273. package/dist/__tests__/visibility-resolver.unit.test.d.ts.map +1 -0
  274. package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts +2 -0
  275. package/dist/__tests__/visibility-resource-short-circuit.unit.test.d.ts.map +1 -0
  276. package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts +2 -0
  277. package/dist/__tests__/visibility-snapshot-contract.unit.test.d.ts.map +1 -0
  278. package/dist/__tests__/vocabulary.unit.test.d.ts +2 -0
  279. package/dist/__tests__/vocabulary.unit.test.d.ts.map +1 -0
  280. package/dist/assembly/backend-contract.d.ts +37 -0
  281. package/dist/assembly/backend-contract.d.ts.map +1 -0
  282. package/dist/assembly/factory.d.ts +207 -0
  283. package/dist/assembly/factory.d.ts.map +1 -0
  284. package/dist/assembly/host-contract.d.ts +84 -0
  285. package/dist/assembly/host-contract.d.ts.map +1 -0
  286. package/dist/assembly/material/assembly.d.ts +21 -0
  287. package/dist/assembly/material/assembly.d.ts.map +1 -0
  288. package/dist/assembly/material/pipeline-projection.d.ts +30 -0
  289. package/dist/assembly/material/pipeline-projection.d.ts.map +1 -0
  290. package/dist/assets/asset-decoders.d.ts +5 -0
  291. package/dist/assets/asset-decoders.d.ts.map +1 -0
  292. package/dist/assets/render-asset-port.d.ts +17 -0
  293. package/dist/assets/render-asset-port.d.ts.map +1 -0
  294. package/dist/assets/resolve-render-asset.d.ts +6 -0
  295. package/dist/assets/resolve-render-asset.d.ts.map +1 -0
  296. package/dist/authoring.d.ts +12 -0
  297. package/dist/authoring.d.ts.map +1 -0
  298. package/dist/authoring.mjs +27 -0
  299. package/dist/authoring.mjs.map +1 -0
  300. package/dist/chunk-CQXZC5XI.mjs +182 -0
  301. package/dist/chunk-CQXZC5XI.mjs.map +1 -0
  302. package/dist/chunk-HCOGPHKS.mjs +93 -0
  303. package/dist/chunk-HCOGPHKS.mjs.map +1 -0
  304. package/dist/chunk-YEJIUW7D.mjs +1152 -0
  305. package/dist/chunk-YEJIUW7D.mjs.map +1 -0
  306. package/dist/cluster-binner.d.ts +152 -0
  307. package/dist/cluster-binner.d.ts.map +1 -0
  308. package/dist/components/__tests__/points-lines-admission.unit.test.d.ts +2 -0
  309. package/dist/components/__tests__/points-lines-admission.unit.test.d.ts.map +1 -0
  310. package/dist/components/__tests__/points-lines-schema.unit.test.d.ts +2 -0
  311. package/dist/components/__tests__/points-lines-schema.unit.test.d.ts.map +1 -0
  312. package/dist/components/__tests__/schema-contract.unit.test.d.ts +2 -0
  313. package/dist/components/__tests__/schema-contract.unit.test.d.ts.map +1 -0
  314. package/dist/components/__tests__/schema-parity.unit.test.d.ts +2 -0
  315. package/dist/components/__tests__/schema-parity.unit.test.d.ts.map +1 -0
  316. package/dist/components/__tests__/visibility-schema.unit.test.d.ts +2 -0
  317. package/dist/components/__tests__/visibility-schema.unit.test.d.ts.map +1 -0
  318. package/dist/components/camera.d.ts +311 -0
  319. package/dist/components/camera.d.ts.map +1 -0
  320. package/dist/components/directional-light.d.ts +76 -0
  321. package/dist/components/directional-light.d.ts.map +1 -0
  322. package/dist/components/glyph-text.d.ts +26 -0
  323. package/dist/components/glyph-text.d.ts.map +1 -0
  324. package/dist/components/index.d.ts +24 -0
  325. package/dist/components/index.d.ts.map +1 -0
  326. package/dist/components/instances.d.ts +41 -0
  327. package/dist/components/instances.d.ts.map +1 -0
  328. package/dist/components/layer.d.ts +34 -0
  329. package/dist/components/layer.d.ts.map +1 -0
  330. package/dist/components/light-helpers.d.ts +53 -0
  331. package/dist/components/light-helpers.d.ts.map +1 -0
  332. package/dist/components/lines.d.ts +5 -0
  333. package/dist/components/lines.d.ts.map +1 -0
  334. package/dist/components/mesh-filter.d.ts +24 -0
  335. package/dist/components/mesh-filter.d.ts.map +1 -0
  336. package/dist/components/mesh-renderer.d.ts +33 -0
  337. package/dist/components/mesh-renderer.d.ts.map +1 -0
  338. package/dist/components/point-light-shadow.d.ts +27 -0
  339. package/dist/components/point-light-shadow.d.ts.map +1 -0
  340. package/dist/components/point-light.d.ts +35 -0
  341. package/dist/components/point-light.d.ts.map +1 -0
  342. package/dist/components/points.d.ts +15 -0
  343. package/dist/components/points.d.ts.map +1 -0
  344. package/dist/components/post-process-params.d.ts +5 -0
  345. package/dist/components/post-process-params.d.ts.map +1 -0
  346. package/dist/components/scene-instance.d.ts +140 -0
  347. package/dist/components/scene-instance.d.ts.map +1 -0
  348. package/dist/components/skybox-background.d.ts +56 -0
  349. package/dist/components/skybox-background.d.ts.map +1 -0
  350. package/dist/components/skylight.d.ts +55 -0
  351. package/dist/components/skylight.d.ts.map +1 -0
  352. package/dist/components/sort-key.d.ts +44 -0
  353. package/dist/components/sort-key.d.ts.map +1 -0
  354. package/dist/components/spot-light.d.ts +81 -0
  355. package/dist/components/spot-light.d.ts.map +1 -0
  356. package/dist/components/sprite-animation.d.ts +74 -0
  357. package/dist/components/sprite-animation.d.ts.map +1 -0
  358. package/dist/components/sprite-instances.d.ts +51 -0
  359. package/dist/components/sprite-instances.d.ts.map +1 -0
  360. package/dist/components/sprite-playback-mode.d.ts +42 -0
  361. package/dist/components/sprite-playback-mode.d.ts.map +1 -0
  362. package/dist/components/sprite-region-override.d.ts +46 -0
  363. package/dist/components/sprite-region-override.d.ts.map +1 -0
  364. package/dist/components/tile-layer.d.ts +106 -0
  365. package/dist/components/tile-layer.d.ts.map +1 -0
  366. package/dist/components/tilemap.d.ts +25 -0
  367. package/dist/components/tilemap.d.ts.map +1 -0
  368. package/dist/components/visibility.d.ts +22 -0
  369. package/dist/components/visibility.d.ts.map +1 -0
  370. package/dist/construct-renderer.d.ts +19 -0
  371. package/dist/construct-renderer.d.ts.map +1 -0
  372. package/dist/construct-renderer.mjs +27462 -0
  373. package/dist/construct-renderer.mjs.map +1 -0
  374. package/dist/debug-draw-glue.d.ts +5 -0
  375. package/dist/debug-draw-glue.d.ts.map +1 -0
  376. package/dist/device/device-scope.d.ts +83 -0
  377. package/dist/device/device-scope.d.ts.map +1 -0
  378. package/dist/device/gpu-residency.d.ts +337 -0
  379. package/dist/device/gpu-residency.d.ts.map +1 -0
  380. package/dist/device/resource-types.d.ts +8 -0
  381. package/dist/device/resource-types.d.ts.map +1 -0
  382. package/dist/engine-metrics.d.ts +23 -0
  383. package/dist/engine-metrics.d.ts.map +1 -0
  384. package/dist/errors/ecs-validation.d.ts +3 -0
  385. package/dist/errors/ecs-validation.d.ts.map +1 -0
  386. package/dist/errors/index.d.ts +4 -0
  387. package/dist/errors/index.d.ts.map +1 -0
  388. package/dist/errors/recover.d.ts +105 -0
  389. package/dist/errors/recover.d.ts.map +1 -0
  390. package/dist/errors/render.d.ts +705 -0
  391. package/dist/errors/render.d.ts.map +1 -0
  392. package/dist/extract/visibility.d.ts +26 -0
  393. package/dist/extract/visibility.d.ts.map +1 -0
  394. package/dist/features/fullscreen.d.ts +19 -0
  395. package/dist/features/fullscreen.d.ts.map +1 -0
  396. package/dist/features/host.d.ts +106 -0
  397. package/dist/features/host.d.ts.map +1 -0
  398. package/dist/features/morph/morph-feature.d.ts +79 -0
  399. package/dist/features/morph/morph-feature.d.ts.map +1 -0
  400. package/dist/features/plan.d.ts +182 -0
  401. package/dist/features/plan.d.ts.map +1 -0
  402. package/dist/features/prepared-gpu-work.d.ts +117 -0
  403. package/dist/features/prepared-gpu-work.d.ts.map +1 -0
  404. package/dist/features/prepared-graphics-store.d.ts +66 -0
  405. package/dist/features/prepared-graphics-store.d.ts.map +1 -0
  406. package/dist/features/prepared-graphics.d.ts +215 -0
  407. package/dist/features/prepared-graphics.d.ts.map +1 -0
  408. package/dist/features/render-graph-compute.d.ts +13 -0
  409. package/dist/features/render-graph-compute.d.ts.map +1 -0
  410. package/dist/features/render-graph-contribution.d.ts +12 -0
  411. package/dist/features/render-graph-contribution.d.ts.map +1 -0
  412. package/dist/features/render-graph-raster.d.ts +38 -0
  413. package/dist/features/render-graph-raster.d.ts.map +1 -0
  414. package/dist/features/render-graph-resources.d.ts +11 -0
  415. package/dist/features/render-graph-resources.d.ts.map +1 -0
  416. package/dist/features/targets.d.ts +32 -0
  417. package/dist/features/targets.d.ts.map +1 -0
  418. package/dist/features/types.d.ts +68 -0
  419. package/dist/features/types.d.ts.map +1 -0
  420. package/dist/features/vocabulary.d.ts +14 -0
  421. package/dist/features/vocabulary.d.ts.map +1 -0
  422. package/dist/fullscreen-post-process-pass.d.ts +157 -0
  423. package/dist/fullscreen-post-process-pass.d.ts.map +1 -0
  424. package/dist/glyph-text-layout-system.d.ts +19 -0
  425. package/dist/glyph-text-layout-system.d.ts.map +1 -0
  426. package/dist/gpu-driven/batch-topology.d.ts +55 -0
  427. package/dist/gpu-driven/batch-topology.d.ts.map +1 -0
  428. package/dist/gpu-driven/production-raster.d.ts +51 -0
  429. package/dist/gpu-driven/production-raster.d.ts.map +1 -0
  430. package/dist/gpu-driven/view-gpu.d.ts +85 -0
  431. package/dist/gpu-driven/view-gpu.d.ts.map +1 -0
  432. package/dist/gpu-resource.d.ts +73 -0
  433. package/dist/gpu-resource.d.ts.map +1 -0
  434. package/dist/gpu-scene-schema.d.ts +78 -0
  435. package/dist/gpu-scene-schema.d.ts.map +1 -0
  436. package/dist/gpu-scene.d.ts +55 -0
  437. package/dist/gpu-scene.d.ts.map +1 -0
  438. package/dist/gpu-stage.d.ts +4 -0
  439. package/dist/gpu-stage.d.ts.map +1 -0
  440. package/dist/gpu-texture-usage.d.ts +6 -0
  441. package/dist/gpu-texture-usage.d.ts.map +1 -0
  442. package/dist/gpu-usage.d.ts +9 -0
  443. package/dist/gpu-usage.d.ts.map +1 -0
  444. package/dist/hdrp-buffers.d.ts +163 -0
  445. package/dist/hdrp-buffers.d.ts.map +1 -0
  446. package/dist/ibl/IblPipelineCache.d.ts +168 -0
  447. package/dist/ibl/IblPipelineCache.d.ts.map +1 -0
  448. package/dist/ibl/skylight-bind-group.d.ts +130 -0
  449. package/dist/ibl/skylight-bind-group.d.ts.map +1 -0
  450. package/dist/index.d.ts +31 -0
  451. package/dist/index.d.ts.map +1 -0
  452. package/dist/index.mjs +169 -0
  453. package/dist/index.mjs.map +1 -0
  454. package/dist/inspection-types.d.ts +72 -0
  455. package/dist/inspection-types.d.ts.map +1 -0
  456. package/dist/instance-buffer-cache.d.ts +56 -0
  457. package/dist/instance-buffer-cache.d.ts.map +1 -0
  458. package/dist/internal.d.ts +2 -0
  459. package/dist/internal.d.ts.map +1 -0
  460. package/dist/internal.mjs +3 -0
  461. package/dist/internal.mjs.map +1 -0
  462. package/dist/lifecycle.d.ts +62 -0
  463. package/dist/lifecycle.d.ts.map +1 -0
  464. package/dist/light-buffer-layout.d.ts +164 -0
  465. package/dist/light-buffer-layout.d.ts.map +1 -0
  466. package/dist/materials.d.ts +47 -0
  467. package/dist/materials.d.ts.map +1 -0
  468. package/dist/mesh-material-bindings.d.ts +43 -0
  469. package/dist/mesh-material-bindings.d.ts.map +1 -0
  470. package/dist/pbr-pipeline.d.ts +301 -0
  471. package/dist/pbr-pipeline.d.ts.map +1 -0
  472. package/dist/pipeline/standard-forward-lane.d.ts +5 -0
  473. package/dist/pipeline/standard-forward-lane.d.ts.map +1 -0
  474. package/dist/pipeline/standard-pipeline.d.ts +31 -0
  475. package/dist/pipeline/standard-pipeline.d.ts.map +1 -0
  476. package/dist/pipeline/standard-profile.d.ts +40 -0
  477. package/dist/pipeline/standard-profile.d.ts.map +1 -0
  478. package/dist/pipeline-builder.d.ts +122 -0
  479. package/dist/pipeline-builder.d.ts.map +1 -0
  480. package/dist/pipeline-spec-types.d.ts +24 -0
  481. package/dist/pipeline-spec-types.d.ts.map +1 -0
  482. package/dist/pipeline-spec.d.ts +367 -0
  483. package/dist/pipeline-spec.d.ts.map +1 -0
  484. package/dist/plugin.d.ts +4 -0
  485. package/dist/plugin.d.ts.map +1 -0
  486. package/dist/points-lines/__tests__/bounds.unit.test.d.ts +2 -0
  487. package/dist/points-lines/__tests__/bounds.unit.test.d.ts.map +1 -0
  488. package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts +2 -0
  489. package/dist/points-lines/__tests__/cache-recovery.unit.test.d.ts.map +1 -0
  490. package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts +2 -0
  491. package/dist/points-lines/__tests__/inspection-lanes.integration.test.d.ts.map +1 -0
  492. package/dist/points-lines/__tests__/inspection.unit.test.d.ts +2 -0
  493. package/dist/points-lines/__tests__/inspection.unit.test.d.ts.map +1 -0
  494. package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts +2 -0
  495. package/dist/points-lines/__tests__/lane-structural.integration.test.d.ts.map +1 -0
  496. package/dist/points-lines/__tests__/points-lines.bench.d.ts +2 -0
  497. package/dist/points-lines/__tests__/points-lines.bench.d.ts.map +1 -0
  498. package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts +2 -0
  499. package/dist/points-lines/__tests__/raster-lane.integration.test.d.ts.map +1 -0
  500. package/dist/points-lines/__tests__/snapshot.unit.test.d.ts +2 -0
  501. package/dist/points-lines/__tests__/snapshot.unit.test.d.ts.map +1 -0
  502. package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts +2 -0
  503. package/dist/points-lines/__tests__/view-ubo.unit.test.d.ts.map +1 -0
  504. package/dist/points-lines/admission.d.ts +36 -0
  505. package/dist/points-lines/admission.d.ts.map +1 -0
  506. package/dist/points-lines/bounds.d.ts +8 -0
  507. package/dist/points-lines/bounds.d.ts.map +1 -0
  508. package/dist/points-lines/expansion-cache.d.ts +28 -0
  509. package/dist/points-lines/expansion-cache.d.ts.map +1 -0
  510. package/dist/points-lines/inspection.d.ts +53 -0
  511. package/dist/points-lines/inspection.d.ts.map +1 -0
  512. package/dist/points-lines/prepare.d.ts +67 -0
  513. package/dist/points-lines/prepare.d.ts.map +1 -0
  514. package/dist/points-lines/record.d.ts +60 -0
  515. package/dist/points-lines/record.d.ts.map +1 -0
  516. package/dist/points-lines/snapshot.d.ts +49 -0
  517. package/dist/points-lines/snapshot.d.ts.map +1 -0
  518. package/dist/post-process-errors.d.ts +182 -0
  519. package/dist/post-process-errors.d.ts.map +1 -0
  520. package/dist/prepare/prepared-graphics-resolver.d.ts +59 -0
  521. package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -0
  522. package/dist/record/__tests__/material-bg-cache.unit.test.d.ts +2 -0
  523. package/dist/record/__tests__/material-bg-cache.unit.test.d.ts.map +1 -0
  524. package/dist/record/__tests__/material-slot-plan.unit.test.d.ts +2 -0
  525. package/dist/record/__tests__/material-slot-plan.unit.test.d.ts.map +1 -0
  526. package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts +2 -0
  527. package/dist/record/__tests__/typed-frame-graph-plan.unit.test.d.ts.map +1 -0
  528. package/dist/record/__tests__/video-texture-view.unit.test.d.ts +2 -0
  529. package/dist/record/__tests__/video-texture-view.unit.test.d.ts.map +1 -0
  530. package/dist/record/frame-lighting.d.ts +121 -0
  531. package/dist/record/frame-lighting.d.ts.map +1 -0
  532. package/dist/record/frame-snapshot.d.ts +429 -0
  533. package/dist/record/frame-snapshot.d.ts.map +1 -0
  534. package/dist/record/frame-targets.d.ts +20 -0
  535. package/dist/record/frame-targets.d.ts.map +1 -0
  536. package/dist/record/frame.d.ts +71 -0
  537. package/dist/record/frame.d.ts.map +1 -0
  538. package/dist/record/helpers.d.ts +102 -0
  539. package/dist/record/helpers.d.ts.map +1 -0
  540. package/dist/record/main-pass-geometry.d.ts +28 -0
  541. package/dist/record/main-pass-geometry.d.ts.map +1 -0
  542. package/dist/record/main-pass-material.d.ts +204 -0
  543. package/dist/record/main-pass-material.d.ts.map +1 -0
  544. package/dist/record/main-pass-sprite-draws.d.ts +43 -0
  545. package/dist/record/main-pass-sprite-draws.d.ts.map +1 -0
  546. package/dist/record/main-pass.d.ts +20 -0
  547. package/dist/record/main-pass.d.ts.map +1 -0
  548. package/dist/record/mesh-ssbo.d.ts +446 -0
  549. package/dist/record/mesh-ssbo.d.ts.map +1 -0
  550. package/dist/record/render-context.d.ts +252 -0
  551. package/dist/record/render-context.d.ts.map +1 -0
  552. package/dist/record/shadow-pass.d.ts +52 -0
  553. package/dist/record/shadow-pass.d.ts.map +1 -0
  554. package/dist/record/skybox-post-pass.d.ts +33 -0
  555. package/dist/record/skybox-post-pass.d.ts.map +1 -0
  556. package/dist/record/typed-frame-graph.d.ts +35 -0
  557. package/dist/record/typed-frame-graph.d.ts.map +1 -0
  558. package/dist/record/view-ubo.d.ts +45 -0
  559. package/dist/record/view-ubo.d.ts.map +1 -0
  560. package/dist/render-contract.d.ts +424 -0
  561. package/dist/render-contract.d.ts.map +1 -0
  562. package/dist/render-data.d.ts +143 -0
  563. package/dist/render-data.d.ts.map +1 -0
  564. package/dist/render-graph-primitives.d.ts +76 -0
  565. package/dist/render-graph-primitives.d.ts.map +1 -0
  566. package/dist/render-pipeline.d.ts +110 -0
  567. package/dist/render-pipeline.d.ts.map +1 -0
  568. package/dist/render-system-extract.d.ts +868 -0
  569. package/dist/render-system-extract.d.ts.map +1 -0
  570. package/dist/render-system.d.ts +125 -0
  571. package/dist/render-system.d.ts.map +1 -0
  572. package/dist/scene/render-scene-types.d.ts +61 -0
  573. package/dist/scene/render-scene-types.d.ts.map +1 -0
  574. package/dist/scene/render-scene.d.ts +112 -0
  575. package/dist/scene/render-scene.d.ts.map +1 -0
  576. package/dist/scene-instances/post-spawn-resolve-joints.d.ts +30 -0
  577. package/dist/scene-instances/post-spawn-resolve-joints.d.ts.map +1 -0
  578. package/dist/shadow-atlas.d.ts +117 -0
  579. package/dist/shadow-atlas.d.ts.map +1 -0
  580. package/dist/ssao-buffers.d.ts +50 -0
  581. package/dist/ssao-buffers.d.ts.map +1 -0
  582. package/dist/ssao-config.d.ts +28 -0
  583. package/dist/ssao-config.d.ts.map +1 -0
  584. package/dist/systems/active-camera.d.ts +53 -0
  585. package/dist/systems/active-camera.d.ts.map +1 -0
  586. package/dist/systems/pass-selector.d.ts +24 -0
  587. package/dist/systems/pass-selector.d.ts.map +1 -0
  588. package/dist/systems/skin-palette-allocator.d.ts +49 -0
  589. package/dist/systems/skin-palette-allocator.d.ts.map +1 -0
  590. package/dist/systems/skin-palette-types.d.ts +14 -0
  591. package/dist/systems/skin-palette-types.d.ts.map +1 -0
  592. package/dist/systems/transparent-sort-config.d.ts +112 -0
  593. package/dist/systems/transparent-sort-config.d.ts.map +1 -0
  594. package/dist/tilemap-chunk-extract-system.d.ts +143 -0
  595. package/dist/tilemap-chunk-extract-system.d.ts.map +1 -0
  596. package/dist/typed-render-graph-primitives.d.ts +57 -0
  597. package/dist/typed-render-graph-primitives.d.ts.map +1 -0
  598. package/dist/typed-shadow-passes.d.ts +11 -0
  599. package/dist/typed-shadow-passes.d.ts.map +1 -0
  600. package/package.json +94 -0
  601. package/src/__tests__/authoring-path.unit.test.ts +23 -0
  602. package/src/__tests__/backend-selection-rhi-capture.test-d.ts +21 -0
  603. package/src/__tests__/callback-inference.test-d.ts +8 -0
  604. package/src/__tests__/cluster-binner.test.ts +272 -0
  605. package/src/__tests__/cluster-grid-default-surface.unit.test.ts +20 -0
  606. package/src/__tests__/construct-renderer-identity.unit.test.ts +23 -0
  607. package/src/__tests__/device-scope-lifecycle.unit.test.ts +151 -0
  608. package/src/__tests__/device-scope-stale-matrix.unit.test.ts +42 -0
  609. package/src/__tests__/direct-extract-consumer-contract.test-d.ts +23 -0
  610. package/src/__tests__/direct-light-snapshot.unit.test.ts +61 -0
  611. package/src/__tests__/factory-contract.integration.test.ts +280 -0
  612. package/src/__tests__/fallback-row-stride-surface.unit.test.ts +15 -0
  613. package/src/__tests__/frame-observation.contract.test.ts +112 -0
  614. package/src/__tests__/fullscreen-feature-plan.unit.test.ts +32 -0
  615. package/src/__tests__/glyph-text-layout-recovery.unit.test.ts +167 -0
  616. package/src/__tests__/gpu-driven-indirect-raster-evidence.ts +350 -0
  617. package/src/__tests__/gpu-driven-indirect-raster.browser.test.ts +12 -0
  618. package/src/__tests__/gpu-driven-indirect-raster.dawn.test.ts +16 -0
  619. package/src/__tests__/gpu-driven-production.integration.test.ts +436 -0
  620. package/src/__tests__/gpu-driven-scaling.unit.test.ts +87 -0
  621. package/src/__tests__/gpu-driven-view-gpu-evidence.ts +271 -0
  622. package/src/__tests__/gpu-driven-view-graph.integration.test.ts +290 -0
  623. package/src/__tests__/gpu-driven-view-reference.ts +111 -0
  624. package/src/__tests__/gpu-driven-view.browser.test.ts +30 -0
  625. package/src/__tests__/gpu-driven-view.dawn.test.ts +28 -0
  626. package/src/__tests__/gpu-driven-view.unit.test.ts +199 -0
  627. package/src/__tests__/gpu-resource-store-stride.unit.test.ts +59 -0
  628. package/src/__tests__/gpu-scene-render-graph-gpu.ts +308 -0
  629. package/src/__tests__/gpu-scene-render-graph.browser.test.ts +19 -0
  630. package/src/__tests__/gpu-scene-render-graph.dawn.test.ts +19 -0
  631. package/src/__tests__/gpu-scene-schema.unit.test.ts +16 -0
  632. package/src/__tests__/gpu-scene.dawn.test.ts +205 -0
  633. package/src/__tests__/gpu-scene.unit.test.ts +147 -0
  634. package/src/__tests__/ibl/face-uniforms.unit.test.ts +46 -0
  635. package/src/__tests__/infinite-grid-no-vertex-probe.unit.test.ts +92 -0
  636. package/src/__tests__/injection-kind-owner.test-d.ts +14 -0
  637. package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +728 -0
  638. package/src/__tests__/light-buffer-layout.unit.test.ts +40 -0
  639. package/src/__tests__/material-contract-inventory.unit.test.ts +24 -0
  640. package/src/__tests__/material-cooked-projection.unit.test.ts +150 -0
  641. package/src/__tests__/material-snapshot-mutation.integration.test.ts +53 -0
  642. package/src/__tests__/material-static-dynamic-route.unit.test.ts +94 -0
  643. package/src/__tests__/material-stride-surface.unit.test.ts +32 -0
  644. package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +106 -0
  645. package/src/__tests__/mesh-material-bindings.unit.test.ts +89 -0
  646. package/src/__tests__/mesh-stride-surface.unit.test.ts +16 -0
  647. package/src/__tests__/morph-culling-reentry.dawn.test.ts +157 -0
  648. package/src/__tests__/morph-feature-gpu-work.integration.test.ts +80 -0
  649. package/src/__tests__/morph-feature-plan.unit.test.ts +53 -0
  650. package/src/__tests__/morph-visual-evidence.integration.test.ts +80 -0
  651. package/src/__tests__/nineslice-handle-surface.unit.test.ts +19 -0
  652. package/src/__tests__/post-process-error-policy-owner.unit.test.ts +201 -0
  653. package/src/__tests__/prepared-buffer-kind-owner.test-d.ts +29 -0
  654. package/src/__tests__/prepared-graphics-capability.unit.test.ts +65 -0
  655. package/src/__tests__/prepared-graphics-generation.unit.test.ts +161 -0
  656. package/src/__tests__/prepared-graphics-lifecycle.unit.test.ts +138 -0
  657. package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +29 -0
  658. package/src/__tests__/prepared-graphics-resolver.unit.test.ts +285 -0
  659. package/src/__tests__/prepared-graphics-snapshot.unit.test.ts +105 -0
  660. package/src/__tests__/prepared-graphics-store.unit.test.ts +154 -0
  661. package/src/__tests__/prepared-graphics-validation.unit.test.ts +176 -0
  662. package/src/__tests__/profiler-default-off.test.ts +22 -0
  663. package/src/__tests__/profiler-phase-catalog.test.ts +66 -0
  664. package/src/__tests__/profiler-phase-integration.test.ts +62 -0
  665. package/src/__tests__/profiler-phase-token.test.ts +79 -0
  666. package/src/__tests__/public-surface.test-d.ts +94 -0
  667. package/src/__tests__/recover-error-policy-owner.unit.test.ts +107 -0
  668. package/src/__tests__/render-error-code-owner.test-d.ts +116 -0
  669. package/src/__tests__/render-error-detail-ssot.test-d.ts +139 -0
  670. package/src/__tests__/render-error-exhaustive.test-d.ts +110 -0
  671. package/src/__tests__/render-feature-assembly.test-d.ts +43 -0
  672. package/src/__tests__/render-feature-context.test-d.ts +57 -0
  673. package/src/__tests__/render-feature-contract.test-d.ts +49 -0
  674. package/src/__tests__/render-feature-diagnostics.unit.test.ts +149 -0
  675. package/src/__tests__/render-feature-docs.unit.test.ts +89 -0
  676. package/src/__tests__/render-feature-errors.unit.test.ts +47 -0
  677. package/src/__tests__/render-feature-gpu-work.integration.test.ts +316 -0
  678. package/src/__tests__/render-feature-plan.test-d.ts +161 -0
  679. package/src/__tests__/render-feature-plan.unit.test.ts +170 -0
  680. package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +90 -0
  681. package/src/__tests__/render-feature-prepared-errors.test-d.ts +79 -0
  682. package/src/__tests__/render-feature-prepared-graphics-docs.unit.test.ts +80 -0
  683. package/src/__tests__/render-feature-prepared-graphics-isolation.unit.test.ts +72 -0
  684. package/src/__tests__/render-feature-prepared-graphics-negative.test-d.ts +36 -0
  685. package/src/__tests__/render-feature-prepared-graphics.test-d.ts +74 -0
  686. package/src/__tests__/render-feature-prepared-graphics.unit.test.ts +121 -0
  687. package/src/__tests__/render-feature-public-surface.test-d.ts +57 -0
  688. package/src/__tests__/render-feature-retry.unit.test.ts +87 -0
  689. package/src/__tests__/render-feature-scheduling.unit.test.ts +110 -0
  690. package/src/__tests__/render-feature-stage-failed-policy-owner.unit.test.ts +137 -0
  691. package/src/__tests__/render-feature-stage-fault-recovery.unit.test.ts +146 -0
  692. package/src/__tests__/render-feature-visibility-context.test-d.ts +33 -0
  693. package/src/__tests__/render-feature-visibility-context.unit.test.ts +37 -0
  694. package/src/__tests__/render-feature-zero-work.unit.test.ts +76 -0
  695. package/src/__tests__/render-graph-compute-raster-gpu.ts +342 -0
  696. package/src/__tests__/render-graph-compute-raster.browser.test.ts +16 -0
  697. package/src/__tests__/render-graph-compute-raster.dawn.test.ts +22 -0
  698. package/src/__tests__/render-graph-hzb-gpu.ts +239 -0
  699. package/src/__tests__/render-graph-hzb.browser.test.ts +16 -0
  700. package/src/__tests__/render-graph-hzb.dawn.test.ts +23 -0
  701. package/src/__tests__/render-graph-primitives.unit.test.ts +22 -0
  702. package/src/__tests__/render-graph-storage-indirect-gpu.ts +162 -0
  703. package/src/__tests__/render-graph-storage-indirect.browser.test.ts +21 -0
  704. package/src/__tests__/render-graph-storage-indirect.dawn.test.ts +28 -0
  705. package/src/__tests__/render-scene-projection.unit.test.ts +168 -0
  706. package/src/__tests__/renderer-factory-material-contract.unit.test.ts +121 -0
  707. package/src/__tests__/renderer-lifecycle.integration.test.ts +58 -0
  708. package/src/__tests__/rhi-backend-package-boundary.unit.test.ts +11 -0
  709. package/src/__tests__/scriptable-pack-consumer.test-d.ts +14 -0
  710. package/src/__tests__/shader-stage-surface.unit.test.ts +43 -0
  711. package/src/__tests__/ssao-config.unit.test.ts +36 -0
  712. package/src/__tests__/ssao-kernel-surface.unit.test.ts +14 -0
  713. package/src/__tests__/standard-clustered-pipeline.unit.test.ts +28 -0
  714. package/src/__tests__/standard-descriptors.test-d.ts +22 -0
  715. package/src/__tests__/standard-pipeline.dawn.test.ts +61 -0
  716. package/src/__tests__/standard-pipeline.integration.test.ts +124 -0
  717. package/src/__tests__/standard-profile-oracle.unit.test.ts +62 -0
  718. package/src/__tests__/surface-configuration.unit.test.ts +91 -0
  719. package/src/__tests__/texture-usage-surface.unit.test.ts +58 -0
  720. package/src/__tests__/typed-pipeline-topology.unit.test.ts +223 -0
  721. package/src/__tests__/urp-pipeline-targets.unit.test.ts +42 -0
  722. package/src/__tests__/urp-pipeline.unit.test.ts +14 -0
  723. package/src/__tests__/vertex-color-pipeline.unit.test.ts +132 -0
  724. package/src/__tests__/vertex-layout-consumer.unit.test.ts +25 -0
  725. package/src/__tests__/visibility-diagnostics.integration.test.ts +62 -0
  726. package/src/__tests__/visibility-extract.integration.test.ts +98 -0
  727. package/src/__tests__/visibility-extract.perf.test.ts +130 -0
  728. package/src/__tests__/visibility-feature-dedup.integration.test.ts +55 -0
  729. package/src/__tests__/visibility-hidden-report.unit.test.ts +36 -0
  730. package/src/__tests__/visibility-instances.integration.test.ts +46 -0
  731. package/src/__tests__/visibility-multi-world.integration.test.ts +86 -0
  732. package/src/__tests__/visibility-producer-matrix.integration.test.ts +168 -0
  733. package/src/__tests__/visibility-producer-matrix.unit.test.ts +96 -0
  734. package/src/__tests__/visibility-public-surface.test-d.ts +27 -0
  735. package/src/__tests__/visibility-resolver.unit.test.ts +85 -0
  736. package/src/__tests__/visibility-resource-short-circuit.unit.test.ts +80 -0
  737. package/src/__tests__/visibility-snapshot-contract.unit.test.ts +60 -0
  738. package/src/__tests__/vocabulary.unit.test.ts +21 -0
  739. package/src/assembly/backend-contract.ts +57 -0
  740. package/src/assembly/factory.ts +8130 -0
  741. package/src/assembly/host-contract.ts +101 -0
  742. package/src/assembly/material/assembly.ts +48 -0
  743. package/src/assembly/material/pipeline-projection.ts +63 -0
  744. package/src/assets/asset-decoders.ts +158 -0
  745. package/src/assets/render-asset-port.ts +44 -0
  746. package/src/assets/resolve-render-asset.ts +13 -0
  747. package/src/authoring.ts +17 -0
  748. package/src/cluster-binner.ts +700 -0
  749. package/src/components/__tests__/points-lines-admission.unit.test.ts +219 -0
  750. package/src/components/__tests__/points-lines-schema.unit.test.ts +56 -0
  751. package/src/components/__tests__/schema-contract.unit.test.ts +10 -0
  752. package/src/components/__tests__/schema-parity.unit.test.ts +25 -0
  753. package/src/components/__tests__/visibility-schema.unit.test.ts +35 -0
  754. package/src/components/camera.ts +512 -0
  755. package/src/components/directional-light.ts +120 -0
  756. package/src/components/glyph-text.ts +64 -0
  757. package/src/components/index.ts +54 -0
  758. package/src/components/instances.ts +206 -0
  759. package/src/components/layer.ts +69 -0
  760. package/src/components/light-helpers.ts +188 -0
  761. package/src/components/lines.ts +18 -0
  762. package/src/components/mesh-filter.ts +60 -0
  763. package/src/components/mesh-renderer.ts +61 -0
  764. package/src/components/point-light-shadow.ts +43 -0
  765. package/src/components/point-light.ts +65 -0
  766. package/src/components/points.ts +40 -0
  767. package/src/components/post-process-params.ts +35 -0
  768. package/src/components/scene-instance.ts +193 -0
  769. package/src/components/skybox-background.ts +103 -0
  770. package/src/components/skylight.ts +97 -0
  771. package/src/components/sort-key.ts +75 -0
  772. package/src/components/spot-light.ts +124 -0
  773. package/src/components/sprite-animation.ts +168 -0
  774. package/src/components/sprite-instances.ts +179 -0
  775. package/src/components/sprite-playback-mode.ts +79 -0
  776. package/src/components/sprite-region-override.ts +105 -0
  777. package/src/components/tile-layer.ts +167 -0
  778. package/src/components/tilemap.ts +48 -0
  779. package/src/components/visibility.ts +53 -0
  780. package/src/construct-renderer.ts +67 -0
  781. package/src/debug-draw-glue.ts +48 -0
  782. package/src/device/device-scope.ts +306 -0
  783. package/src/device/gpu-residency.ts +1822 -0
  784. package/src/device/resource-types.ts +20 -0
  785. package/src/engine-metrics.ts +82 -0
  786. package/src/errors/ecs-validation.ts +16 -0
  787. package/src/errors/index.ts +3 -0
  788. package/src/errors/recover.ts +161 -0
  789. package/src/errors/render.ts +1284 -0
  790. package/src/extract/visibility.ts +120 -0
  791. package/src/features/fullscreen.ts +46 -0
  792. package/src/features/host.ts +1363 -0
  793. package/src/features/morph/morph-feature.ts +377 -0
  794. package/src/features/plan.ts +447 -0
  795. package/src/features/prepared-gpu-work.ts +959 -0
  796. package/src/features/prepared-graphics-store.ts +449 -0
  797. package/src/features/prepared-graphics.ts +420 -0
  798. package/src/features/render-graph-compute.ts +69 -0
  799. package/src/features/render-graph-contribution.ts +75 -0
  800. package/src/features/render-graph-raster.ts +332 -0
  801. package/src/features/render-graph-resources.ts +38 -0
  802. package/src/features/targets.ts +70 -0
  803. package/src/features/types.ts +103 -0
  804. package/src/features/vocabulary.ts +24 -0
  805. package/src/fullscreen-post-process-pass.ts +363 -0
  806. package/src/glyph-text-layout-system.ts +421 -0
  807. package/src/gpu-driven/batch-topology.ts +245 -0
  808. package/src/gpu-driven/production-raster.ts +695 -0
  809. package/src/gpu-driven/view-gpu.ts +703 -0
  810. package/src/gpu-resource.ts +159 -0
  811. package/src/gpu-scene-schema.ts +136 -0
  812. package/src/gpu-scene.ts +722 -0
  813. package/src/gpu-stage.ts +9 -0
  814. package/src/gpu-texture-usage.ts +12 -0
  815. package/src/gpu-usage.ts +14 -0
  816. package/src/hdrp-buffers.ts +480 -0
  817. package/src/ibl/IblPipelineCache.ts +1006 -0
  818. package/src/ibl/skylight-bind-group.ts +513 -0
  819. package/src/index.ts +129 -0
  820. package/src/inspection-types.ts +80 -0
  821. package/src/instance-buffer-cache.ts +95 -0
  822. package/src/internal.ts +9 -0
  823. package/src/lifecycle.ts +168 -0
  824. package/src/light-buffer-layout.ts +346 -0
  825. package/src/materials.ts +214 -0
  826. package/src/mesh-material-bindings.ts +103 -0
  827. package/src/pbr-pipeline.ts +1137 -0
  828. package/src/pipeline/standard-forward-lane.ts +229 -0
  829. package/src/pipeline/standard-pipeline.ts +555 -0
  830. package/src/pipeline/standard-profile.ts +65 -0
  831. package/src/pipeline-builder.ts +382 -0
  832. package/src/pipeline-spec-types.ts +28 -0
  833. package/src/pipeline-spec.ts +1231 -0
  834. package/src/plugin.ts +69 -0
  835. package/src/points-lines/__tests__/bounds.unit.test.ts +21 -0
  836. package/src/points-lines/__tests__/cache-recovery.unit.test.ts +157 -0
  837. package/src/points-lines/__tests__/inspection-lanes.integration.test.ts +146 -0
  838. package/src/points-lines/__tests__/inspection.unit.test.ts +173 -0
  839. package/src/points-lines/__tests__/lane-structural.integration.test.ts +122 -0
  840. package/src/points-lines/__tests__/points-lines.bench.ts +400 -0
  841. package/src/points-lines/__tests__/raster-lane.integration.test.ts +44 -0
  842. package/src/points-lines/__tests__/snapshot.unit.test.ts +101 -0
  843. package/src/points-lines/__tests__/view-ubo.unit.test.ts +73 -0
  844. package/src/points-lines/admission.ts +238 -0
  845. package/src/points-lines/bounds.ts +23 -0
  846. package/src/points-lines/expansion-cache.ts +215 -0
  847. package/src/points-lines/inspection.ts +97 -0
  848. package/src/points-lines/prepare.ts +177 -0
  849. package/src/points-lines/record.ts +125 -0
  850. package/src/points-lines/snapshot.ts +130 -0
  851. package/src/post-process-errors.ts +302 -0
  852. package/src/prepare/prepared-graphics-resolver.ts +456 -0
  853. package/src/record/__tests__/material-bg-cache.unit.test.ts +41 -0
  854. package/src/record/__tests__/material-slot-plan.unit.test.ts +44 -0
  855. package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +41 -0
  856. package/src/record/__tests__/video-texture-view.unit.test.ts +90 -0
  857. package/src/record/frame-lighting.ts +1074 -0
  858. package/src/record/frame-snapshot.ts +500 -0
  859. package/src/record/frame-targets.ts +137 -0
  860. package/src/record/frame.ts +1598 -0
  861. package/src/record/helpers.ts +284 -0
  862. package/src/record/main-pass-geometry.ts +1065 -0
  863. package/src/record/main-pass-material.ts +1043 -0
  864. package/src/record/main-pass-sprite-draws.ts +1137 -0
  865. package/src/record/main-pass.ts +610 -0
  866. package/src/record/mesh-ssbo.ts +885 -0
  867. package/src/record/render-context.ts +384 -0
  868. package/src/record/shadow-pass.ts +698 -0
  869. package/src/record/skybox-post-pass.ts +593 -0
  870. package/src/record/typed-frame-graph.ts +461 -0
  871. package/src/record/view-ubo.ts +222 -0
  872. package/src/render-contract.ts +582 -0
  873. package/src/render-data.ts +385 -0
  874. package/src/render-graph-primitives.ts +811 -0
  875. package/src/render-pipeline.ts +259 -0
  876. package/src/render-system-extract.ts +4585 -0
  877. package/src/render-system.ts +1933 -0
  878. package/src/scene/render-scene-types.ts +67 -0
  879. package/src/scene/render-scene.ts +1087 -0
  880. package/src/scene-instances/post-spawn-resolve-joints.ts +165 -0
  881. package/src/shadow-atlas.ts +244 -0
  882. package/src/ssao-buffers.ts +334 -0
  883. package/src/ssao-config.ts +61 -0
  884. package/src/systems/active-camera.ts +116 -0
  885. package/src/systems/pass-selector.ts +49 -0
  886. package/src/systems/skin-palette-allocator.ts +251 -0
  887. package/src/systems/skin-palette-types.ts +14 -0
  888. package/src/systems/transparent-sort-config.ts +233 -0
  889. package/src/tilemap-chunk-extract-system.ts +1290 -0
  890. package/src/typed-render-graph-primitives.ts +541 -0
  891. package/src/typed-shadow-passes.ts +165 -0
@@ -0,0 +1,868 @@
1
+ import type { AssetRegistry } from '@forgeax/engine-assets-runtime';
2
+ import type { World } from '@forgeax/engine-ecs';
3
+ import { type Mat4, type Vec3 } from '@forgeax/engine-math';
4
+ import { type SceneHierarchySnapshot } from '@forgeax/engine-scene';
5
+ import type { Handle, MaterialAsset, MaterialPass, MaterialRenderState, MaterialTextureCoordinates, ParamSchemaEntry, PrimitiveTopology } from '@forgeax/engine-types';
6
+ import { type VisibilitySnapshot } from './extract/visibility';
7
+ import type { RenderFeatureHiddenEntityReport, RenderFeatureWorldVisibilitySnapshot } from './features/types';
8
+ import { type MeshMaterialBindingDiagnostic, type MeshMaterialBindingSource } from './mesh-material-bindings';
9
+ import type { PointsLinesRetainedSnapshot } from './points-lines/snapshot';
10
+ import { type CameraSnapshot } from './render-contract';
11
+ import type { SkinPaletteAllocator } from './systems/skin-palette-allocator';
12
+ import type { SkinPaletteSlice } from './systems/skin-palette-types';
13
+ /**
14
+ * DirectionalLightSnapshot — sun-like infinite light variant of the
15
+ * `LightSnapshot` discriminated union (M2 / w16 / AC-03). Host pre-multiplies
16
+ * `color * intensity` so the shader sees the radiance term directly (charter
17
+ * P4 host-side parity); `direction` stays in raw outgoing-vector form so the
18
+ * shader can negate it once for BRDF (`let l = normalize(-light.direction)`).
19
+ *
20
+ * Plan-strategy D-S1 (3) (LightSnapshot to GPU buffer bucket 1:1 mapping).
21
+ */
22
+ export interface DirectionalLightSnapshot {
23
+ readonly kind: 'directional';
24
+ readonly direction: Vec3;
25
+ readonly color: Vec3;
26
+ readonly intensity: number;
27
+ }
28
+ /**
29
+ * PointLightSnapshot — omnidirectional point variant. `position` from the
30
+ * companion Transform; `invRangeSquared = 1 / range^2` host-folded via
31
+ * `computeInvRangeSquared` (range = +Infinity -> 0; range = 0 -> 1e8 NaN
32
+ * protection per D-S5).
33
+ */
34
+ export interface PointLightSnapshot {
35
+ readonly kind: 'point';
36
+ readonly position: Vec3;
37
+ readonly color: Vec3;
38
+ readonly intensity: number;
39
+ readonly invRangeSquared: number;
40
+ /**
41
+ * feat-20260612-point-light-shadows-urp-hdrp M1 / T-M1-8 + M4 / T-M4-4:
42
+ * cube_array atlas layer index for this light's shadow map (0..3 for shadow
43
+ * casters; sentinel `-1` for non-shadow lights). Default `-1` per
44
+ * plan-strategy §D-2 — record stage / shader skips shadow sampling when the
45
+ * lane equals the sentinel. Joined with `pointShadow[]` by entity at the
46
+ * end of extract; HDRP record stage threads `shadowAtlasLayer + shadowNear +
47
+ * shadowFar` through `packLightSlot` as the §D-8 pad-lane payload.
48
+ */
49
+ readonly shadowAtlasLayer?: number;
50
+ /**
51
+ * Per-face perspective near plane (matches `PointLightShadow.nearPlane`).
52
+ * Used by HDRP `evalPointShadowed` for depth-ref reconstruction; rides
53
+ * `LightSlot.kind_and_pad.z` (byte 56..60) on the std430 std layout.
54
+ */
55
+ readonly shadowNear?: number;
56
+ /**
57
+ * Per-face perspective far plane (matches `PointLightShadow.farPlane`).
58
+ * Rides `LightSlot.kind_and_pad.w` (byte 60..64).
59
+ */
60
+ readonly shadowFar?: number;
61
+ }
62
+ /**
63
+ * PointShadowSnapshot — extract-stage view of one shadow-casting point light
64
+ * (feat-20260612-point-light-shadows-urp-hdrp M1 / T-M1-7).
65
+ *
66
+ * `entity` is the spawning entity (joins PointLight + PointLightShadow on the
67
+ * same archetype); `position` is the light world-space position resolved from
68
+ * the companion Transform (mirrors PointLightSnapshot.position).
69
+ * `shadowMatrices` is the 96-float packed mat4[6] table (column-major,
70
+ * 6 mat4 * 16 floats = 384 bytes) ready for UBO upload.
71
+ *
72
+ * Plan-strategy §D-3: the record stage allocates a dynamic-offset uniform
73
+ * buffer (384 B per-light, aligned to minUniformBufferOffsetAlignment, WebGPU
74
+ * min 256 -> 512 B stride). Extract owns the host-side `Float32Array(96)`;
75
+ * record owns the GPU `RhiBuffer` lifetime.
76
+ *
77
+ * `mapSize` / `nearPlane` / `farPlane` ride here so record stage can size the
78
+ * cube atlas faces and feed shader the proj constants without re-querying ECS.
79
+ * `shadowAtlasLayer` is assigned by extract in spawn order (0 .. cap-1) so the
80
+ * downstream LightSlot / packPointLight packers carry the layer index in
81
+ * pointPadW (T-M1-8 will rename to shadowAtlasLayer).
82
+ */
83
+ export interface PointShadowSnapshot {
84
+ /** Spawning entity index (joins PointLight + PointLightShadow + Transform). */
85
+ readonly entity: number;
86
+ /** World-space light position (sourced from companion Transform). */
87
+ readonly position: Vec3;
88
+ /** PointLightShadow.mapSize (per-face cube square dimension; 512 default). */
89
+ readonly mapSize: number;
90
+ readonly nearPlane: number;
91
+ readonly farPlane: number;
92
+ /**
93
+ * Atlas layer assigned by extract in spawn order (0..cap-1, where cap=4
94
+ * matches PointLightShadow cardinality). Sentinel -1 is reserved by the
95
+ * shader-side LightSlot for no-shadow lights (T-M1-8).
96
+ */
97
+ readonly shadowAtlasLayer: number;
98
+ /**
99
+ * 6 view-proj mat4 in face order [+X, -X, +Y, -Y, +Z, -Z] packed into one
100
+ * Float32Array(96). 16 floats per face = 64 B; 6 * 64 = 384 B raw. The
101
+ * record stage pads each slot to 512 B (256 alignment) when packing into
102
+ * the per-light dynamic-offset UBO (plan-strategy §D-3).
103
+ */
104
+ readonly shadowMatrices: Float32Array;
105
+ }
106
+ /**
107
+ * SpotLightSnapshot — cone-restricted variant. `position` from companion
108
+ * Transform; `direction` raw outgoing-vector; `cosInner` / `cosOuter` host
109
+ * pre-converted via `degToCos` so the shader sees only cosines (D-S2).
110
+ *
111
+ * feat-20260625-spot-light-shadow-mapping M1 w5: added shadow fields.
112
+ * castShadow (bool) gates shadow projection; lightViewProj is the perspective
113
+ * light-view-projection matrix computed in extract (undefined when castShadow
114
+ * is false, dir degenerates, or the light is clipped). shadowAtlasTile
115
+ * (i32 sentinel -1) is the allocated tile index 0..3 or -1 for unassigned
116
+ * (plan-strategy D-4). mapSize / nearPlane / farPlane are the source
117
+ * component shadow parameters carried through to the record stage.
118
+ */
119
+ export interface SpotLightSnapshot {
120
+ readonly kind: 'spot';
121
+ readonly position: Vec3;
122
+ readonly direction: Vec3;
123
+ readonly color: Vec3;
124
+ readonly intensity: number;
125
+ readonly invRangeSquared: number;
126
+ readonly cosInner: number;
127
+ readonly cosOuter: number;
128
+ readonly castShadow: boolean;
129
+ readonly lightViewProj: Float32Array | undefined;
130
+ readonly mapSize: number;
131
+ readonly nearPlane: number;
132
+ readonly farPlane: number;
133
+ readonly shadowAtlasTile: number;
134
+ }
135
+ /**
136
+ * LightSnapshot — discriminated union of the three KHR_lights_punctual
137
+ * variants. AI users + the record stage perform an exhaustive switch on
138
+ * `kind`; missing arms are caught at compile time (no `default`,
139
+ * `assertNever`-style guards). Plan-strategy R-10.
140
+ */
141
+ export type LightSnapshot = DirectionalLightSnapshot | PointLightSnapshot | SpotLightSnapshot;
142
+ /**
143
+ * ExtractedLights — three-bucket output of the extractFrame three-query
144
+ * union (M2 / w16 / AC-03). Plan-strategy section 3.1 EXT node:
145
+ * - `directional` — at most one (record-stage N>1 fail-fast lands in M3)
146
+ * - `point[]` — first-slice cap of 4 enforced at record stage (M3)
147
+ * - `spot[]` — first-slice cap of 4 enforced at record stage (M3)
148
+ * `directionalCount` exposes the raw count of DirectionalLight entities the
149
+ * extract observed (so the record stage can fire `render-system-multi-light`
150
+ * when N>1 without re-running the query). M3 / w19 will widen this with
151
+ * pointCount / spotCount fields once the matching record-time fail-fast
152
+ * lands; for M2 the field stays directional-only to keep AC-06 (a) intact.
153
+ */
154
+ export interface ExtractedLights {
155
+ readonly directional: DirectionalLightSnapshot | undefined;
156
+ readonly directionalCount: number;
157
+ readonly point: readonly PointLightSnapshot[];
158
+ readonly spot: readonly SpotLightSnapshot[];
159
+ /**
160
+ * feat-20260613-csm-cascaded-shadow-maps M2 / w9: per-cascade light-view-
161
+ * projection matrices (one per cascade, length 4 pre-allocated). Each matrix
162
+ * is a column-major 16-float mat4 with atlas tile UV inset baked in
163
+ * (plan-strategy D-3). cascadeCount < 4: unused slots are zero matrices.
164
+ * Undefined when castShadow=false or no directional light.
165
+ */
166
+ readonly lightViewProj: readonly Float32Array[] | undefined;
167
+ /**
168
+ * feat-20260613-csm-cascaded-shadow-maps M2 / w9: view-space z depths
169
+ * of the PSSM split planes (length 4, Float32Array). cascadeCount < 4:
170
+ * unused slots are 0.0f. Undefined when castShadow=false or no directional
171
+ * light.
172
+ */
173
+ readonly splitPlanes: Float32Array | undefined;
174
+ /**
175
+ * feat-20260613-csm-cascaded-shadow-maps M2 / w9: effective cascade count
176
+ * from the DirectionalLight component (1..4). Undefined when castShadow=false
177
+ * or no directional light.
178
+ */
179
+ readonly cascadeCount: number | undefined;
180
+ /**
181
+ * feat-20260613-csm-cascaded-shadow-maps M2 / w9: cascade blend width
182
+ * from the DirectionalLight component (0..0.5). Undefined when castShadow=false
183
+ * or no directional light.
184
+ */
185
+ readonly cascadeBlend: number | undefined;
186
+ /**
187
+ * feat-20260520-directional-light-shadow-mapping M1c / w8:
188
+ * shadowMapSize from DirectionalLight.mapSize. Drives shadow RT
189
+ * lazy-allocate (idempotency: same size -> no rebuild). Undefined when
190
+ * castShadow=false or no directional light.
191
+ */
192
+ readonly shadowMapSize: number | undefined;
193
+ /**
194
+ * feat-20260621-merge-directionallightshadow-into-directionallight M2:
195
+ * depthBias from the merged DirectionalLight (constant shadow-bias floor).
196
+ * Populated when castShadow=true on the first-hit directional light;
197
+ * undefined otherwise.
198
+ */
199
+ readonly depthBias: number | undefined;
200
+ /**
201
+ * feat-20260621-merge-directionallightshadow-into-directionallight M2:
202
+ * normalBias from the merged DirectionalLight (slope-based shadow-bias
203
+ * coefficient).
204
+ * Populated when castShadow=true on the first-hit directional light;
205
+ * undefined otherwise.
206
+ */
207
+ readonly normalBias: number | undefined;
208
+ /**
209
+ * feat-20260621-merge-directionallightshadow-into-directionallight M2:
210
+ * pcfKernelSize from the merged DirectionalLight (PCF kernel width, odd>=1).
211
+ * Populated when castShadow=true on the first-hit directional light;
212
+ * undefined otherwise.
213
+ */
214
+ readonly pcfKernelSize: number | undefined;
215
+ /**
216
+ * feat-20260612-point-light-shadows-urp-hdrp M1 / T-M1-7:
217
+ * shadow-casting point lights (PointLight + PointLightShadow + Transform
218
+ * archetype join). Each entry carries the per-light 6-face VP matrices and
219
+ * the assigned cube_array atlas layer (0..3 in spawn order; sentinel -1 is
220
+ * reserved by the shader-side LightSlot for no-shadow point lights).
221
+ *
222
+ * Empty array when no PointLightShadow components exist (zero-cost gate per
223
+ * AC-09; record stage skips atlas allocation + shadow pass dispatch).
224
+ */
225
+ readonly pointShadow: readonly PointShadowSnapshot[];
226
+ /**
227
+ * bug-20260710-editor-cross-world-shadow: the RAW directional-shadow config
228
+ * (cascadeCount / splitLambda / cascadeBlend / mapSize / shadowDistance) of
229
+ * the first-hit castShadow DirectionalLight, carried unconditionally of
230
+ * whether this world had a camera. The {@link extractFrames} merge layer
231
+ * re-runs {@link computeDirectionalCsm} with this config + the surfaced
232
+ * camera so directional shadows work when the light and camera live in
233
+ * DIFFERENT worlds (editor editorWorld/sceneWorld super-composite). Undefined
234
+ * when castShadow=false or no directional light. The `lightViewProj` /
235
+ * `splitPlanes` fields above remain the *computed* per-world outputs (correct
236
+ * for single-world; recomputed at merge for cross-world).
237
+ */
238
+ readonly directionalCsmConfig: DirectionalCsmConfig | undefined;
239
+ /**
240
+ * bug-20260710-editor-cross-world-shadow: the light-direction of the
241
+ * first-hit castShadow DirectionalLight, carried so the merge layer can
242
+ * rebuild the light-view matrix. Redundant with `directional.direction` but
243
+ * kept explicit so the CSM recompute reads a single config bundle. Undefined
244
+ * when castShadow=false or no directional light.
245
+ */
246
+ readonly directionalCsmDirection: Vec3 | undefined;
247
+ }
248
+ /**
249
+ * SkylightSnapshot -- extract-stage view of one Skylight entity
250
+ * (feat-20260520-skylight-ibl-cubemap M4 / t26).
251
+ *
252
+ * `equirectHandle` carries the packed u32 handle for
253
+ * `Handle<EquirectAsset, 'shared'>`; the record stage drives the internal
254
+ * lazy cubemap projection from it and resolves the projected GPU cubemap via
255
+ * `GpuResidencyCache.getCubemapGpuView(...)` and related helpers
256
+ * (feat-20260630 M3 / w16-w18). The snapshot carries NO projection status
257
+ * field: the status truth lives in the store's CubemapGpuEntry (D-3 SSOT);
258
+ * record queries it once per frame.
259
+ *
260
+ * `intensity` defaults to 1.0 via the Skylight component token defaults
261
+ * (plan-strategy D-6: Skylight data flows through existing extract->record
262
+ * pipeline; no independent ECS system).
263
+ */
264
+ export interface SkylightSnapshot {
265
+ readonly equirectHandle: number;
266
+ readonly color: readonly [number, number, number];
267
+ readonly intensity: number;
268
+ /** Environment-space quaternion [x, y, z, w], identity by default. */
269
+ readonly rotation: readonly [number, number, number, number];
270
+ readonly entityHandle: number;
271
+ }
272
+ /**
273
+ * SkyboxSnapshot -- extract-stage view of one SkyboxBackground entity
274
+ * (feat-20260531-skybox-env-background M2 / w5).
275
+ *
276
+ * `equirectHandle` carries the packed u32 handle for
277
+ * `Handle<EquirectAsset, 'shared'>`; the record stage resolves the projected
278
+ * GPU cubemap via `GpuResidencyCache.getCubemapGpuView(...)`.
279
+ *
280
+ * `mode` carries the raw `f32` column value (`SKYBOX_MODE_CUBEMAP = 0`).
281
+ * First hit wins per plan-strategy D-6; multi-entity once-warn in record stage.
282
+ */
283
+ export interface SkyboxSnapshot {
284
+ readonly equirectHandle: number;
285
+ readonly mode: number;
286
+ /** Environment-space quaternion [x, y, z, w], identity by default. */
287
+ readonly rotation: readonly [number, number, number, number];
288
+ readonly entityHandle: number;
289
+ }
290
+ export interface RenderableSnapshot {
291
+ readonly assetHandle: number;
292
+ readonly transform: TransformSnapshot;
293
+ /** Finite producer-owned local bounds retained for persistent CPU view work. */
294
+ readonly localAabb?: Float32Array;
295
+ /** Indexed single-submesh facts consumed by the first GPU-driven rigid lane. */
296
+ readonly gpuDrivenDraws?: readonly GpuDrivenDrawSnapshot[];
297
+ /**
298
+ * feat-20260608 M5 amend / w11-a: the entity's representative (first)
299
+ * material snapshot, kept as a same-name shorthand for `materials[0]`.
300
+ * Per-entity dispatch (shading model routing, sprite-vs-mesh split, the
301
+ * D-1/D-3 pipeline-tag pick) is uniform across the entity's submeshes
302
+ * today, so the existing 20+ `entry.source.material.X` consumers in the
303
+ * record stage stay unchanged. Per-submesh material data (baseColor /
304
+ * UBO payload / paramSnapshot) lives in `materials[i]`.
305
+ */
306
+ readonly material: MaterialSnapshot;
307
+ /**
308
+ * feat-20260608 M5 amend / w11-a: per-submesh MaterialSnapshot[]
309
+ * positionally aligned with `MeshAsset.submeshes[]` (plan §3.2 sequence
310
+ * step 6 + AC-08). Length always equals the entity's submesh count once
311
+ * the extract stage's count-mismatch validator (M2 / w12) has filtered
312
+ * misaligned spawns. The record stage reads `materials[i]` to upload the
313
+ * i-th material UBO slot before drawing the i-th submesh.
314
+ *
315
+ * Backward-compat: `materials[0] === material` (the legacy mid-grey
316
+ * default-material case-B path also routes through `materials = [default]`,
317
+ * keeping the legacy single-mesh-no-material spawn shape working without
318
+ * a special branch in record).
319
+ */
320
+ readonly materials: readonly MaterialSnapshot[];
321
+ /** Per-slot provenance trace from the shared mesh-material resolver. */
322
+ readonly materialBindingSources: readonly MeshMaterialBindingSource[];
323
+ /** Active structured override diagnostics for this renderable. */
324
+ readonly materialBindingDiagnostics?: readonly MeshMaterialBindingDiagnostic[];
325
+ /**
326
+ * feat-20260708-composited-multi-world-rendering M1 / D-1: the worldId
327
+ * of the world this renderable was extracted from. Defaults to 0 in
328
+ * single-world path (extractFrame always assigns 0). The merge layer
329
+ * (extractFrames in M2) stamps the correct worldId per world before
330
+ * the record stage consumes it. Combined with `entityKey` via
331
+ * `worldEntityKey(worldId, entityKey)` to form per-entity cache keys.
332
+ *
333
+ * Never rewrite `entityKey` itself — consumers that need the real
334
+ * entity handle (video provider, etc.) read the bare `entityKey`.
335
+ */
336
+ readonly worldId: number;
337
+ /**
338
+ * feat-20260531-per-frame-bind-group-cache M1 / w3: packed Entity u32
339
+ * (encodeEntity(indexSlot, generation)) surface'd from the extract
340
+ * stage. Stable per-entity identity for the record stage cache keys
341
+ * (material / instances / per-frame clean-up) without re-querying the
342
+ * World (charter P5 Pipeline Isolation: record stage only consumes
343
+ * snapshot POD). Reuses the encodeEntity calculation already performed
344
+ * at :1293 for the Instances path, and now also computed for plain
345
+ * (non-Instances) renderables.
346
+ *
347
+ * Never rewrite this field — cache keys use `worldEntityKey(worldId, entityKey)`,
348
+ * not the bare entityKey alone (D-1).
349
+ */
350
+ readonly entityKey: number;
351
+ /**
352
+ * feat-20260514 M3 (w15): when the entity carries an `Instances` component
353
+ * the extract stage materialises a fresh `Float32Array` snapshot of the
354
+ * packed mat4 transforms (16 f32 per instance, stride 16) plus a stable
355
+ * `cacheKey` (the entity's packed u32) and the `archVersion` (used by the
356
+ * record stage to invalidate its per-entity GPU buffer cache when the
357
+ * archetype storage grew). Absent (`undefined`) means the record stage
358
+ * falls back to the shared 1-element identity-mat4 storage buffer +
359
+ * `drawIndexed(.., 1, ..)`.
360
+ */
361
+ readonly instances?: InstancesSnapshot;
362
+ /**
363
+ * feat-20260625-sprite-instances-and-tilemap-terrain-static-batch M3 / w10
364
+ * (plan-strategy D-1 + D-9): when the entity carries a `SpriteInstances`
365
+ * component the extract stage materialises a paired snapshot — packed mat4
366
+ * `transforms` (16 f32, stride 16) + per-instance UV `regions` (4 f32,
367
+ * stride 4) — plus the same cache fingerprint pair (`cacheKey` = entity
368
+ * packed u32, `archVersion` = archetype version stamp at snapshot time).
369
+ * The record stage interleaves the two arrays into an 80B-per-instance
370
+ * single GPU buffer routed through `@group(3) @binding(0)` (BGL unchanged,
371
+ * D-1). Absent (`undefined`) means the entity is not a `SpriteInstances`
372
+ * carrier; the record stage falls back to its existing sprite path
373
+ * (material UBO region + identity-instance buffer).
374
+ *
375
+ * Three structured `EcsError` codes fire at extract entry and skip the
376
+ * renderable on violation (charter P3 explicit failure):
377
+ * - `'sprite-instances-mutually-exclusive-with-instances'`
378
+ * - `'sprite-instances-requires-sprite-shading-model'`
379
+ * - `'sprite-instances-count-mismatch'`
380
+ */
381
+ readonly spriteInstances?: SpriteInstancesSnapshot;
382
+ /**
383
+ * feat-20260523-skin-skeleton-animation M2 / T-21: when the entity carries
384
+ * a `Skin` component the extract stage populates this field with the
385
+ * skin palette slice metadata. The record stage uses this to route the
386
+ * draw to `forgeax::pbr-skin` pipeline + set the palette dynamic offset.
387
+ * Absent (`undefined`) means the entity is not skinned.
388
+ */
389
+ readonly skin?: SkinPaletteSlice;
390
+ /**
391
+ * ECS-owned morph weights. Presence selects the Standard Pipeline CPU
392
+ * specialized deformation lane; the asset remains the source of target
393
+ * deltas and the record stage only receives this frozen POD snapshot.
394
+ */
395
+ readonly morph?: MorphSnapshot;
396
+ /** Detached M2 authoring facts for the optional Points/Lines projection. */
397
+ readonly pointsLines?: PointsLinesRetainedSnapshot;
398
+ }
399
+ export interface MorphSnapshot {
400
+ readonly weights: Float32Array;
401
+ readonly targetCount: number;
402
+ }
403
+ export interface GpuDrivenDrawSnapshot {
404
+ readonly kind: 'indexed' | 'non-indexed';
405
+ readonly first: number;
406
+ readonly count: number;
407
+ readonly baseVertex: number;
408
+ readonly materialSlot: number;
409
+ readonly topology: PrimitiveTopology;
410
+ readonly pipelineClass: string;
411
+ readonly materialResourceClass: string;
412
+ }
413
+ export interface InstancesSnapshot {
414
+ /** Packed column-major mat4 transforms (16 f32 per instance). */
415
+ readonly transforms: Float32Array;
416
+ /** Number of instances (transforms.length / 16). */
417
+ readonly instanceCount: number;
418
+ /** Stable per-entity GPU buffer cache key (the packed Entity u32). */
419
+ readonly cacheKey: number;
420
+ /**
421
+ * Archetype version stamp at snapshot time. The record stage compares this
422
+ * against its cached version per cacheKey; a bump means the underlying
423
+ * BufferPool slot may have grown / been reallocated, forcing a fresh
424
+ * `device.createBuffer + queue.writeBuffer` round.
425
+ */
426
+ readonly archVersion: number;
427
+ }
428
+ /**
429
+ * feat-20260625-sprite-instances-and-tilemap-terrain-static-batch M3 / w10:
430
+ * extract-stage view of a `SpriteInstances` carrier (2D peer of
431
+ * `InstancesSnapshot`).
432
+ *
433
+ * Field shapes mirror `InstancesSnapshot` so the record-stage cache protocol
434
+ * (`(cacheKey, archVersion, byteLength)` fingerprint triple) is reused
435
+ * verbatim. The byte length consumed at upload time is the sum
436
+ * `transforms.byteLength + regions.byteLength` (= 80*N for N instances,
437
+ * plan-strategy D-1 interleaved single-buffer); the record stage builds the
438
+ * 80B/instance interleaved buffer once per (entity, archVersion, byteLength)
439
+ * fingerprint change.
440
+ */
441
+ export interface SpriteInstancesSnapshot {
442
+ /** Packed column-major mat4 transforms (16 f32 per instance, stride 16). */
443
+ readonly transforms: Float32Array;
444
+ /** Per-instance UV vec4 regions (4 f32 per instance, stride 4). */
445
+ readonly regions: Float32Array;
446
+ /**
447
+ * Number of instances. Derived from `transforms.length / 16` (equivalently
448
+ * `regions.length / 4`); the extract-entry validator guarantees the two
449
+ * derivations agree, otherwise it fires
450
+ * `'sprite-instances-count-mismatch'` and skips the renderable.
451
+ */
452
+ readonly instanceCount: number;
453
+ /** Stable per-entity GPU buffer cache key (the packed Entity u32, D-9). */
454
+ readonly cacheKey: number;
455
+ /** Archetype version stamp at snapshot time (cache invalidation fingerprint). */
456
+ readonly archVersion: number;
457
+ }
458
+ /**
459
+ * TransformSnapshot: extract-stage view of one entity's resolved world
460
+ * transform (feat-20260601 D-3). Holds the single `world` mat4 (column-major
461
+ * 16 floats, copied from the entity's `Transform.world` view written by
462
+ * propagateTransforms). The record stage copies these 16 floats straight into
463
+ * the mesh SSBO slot (zero `mat4.compose`); position / scale consumers derive
464
+ * from the mat4 via `mat4.getTranslation` / basis-column lengths.
465
+ */
466
+ export interface TransformSnapshot {
467
+ readonly world: Float32Array;
468
+ }
469
+ /**
470
+ * MaterialSnapshot: extract-stage view of one entity's material asset (M2 / w6
471
+ * of feat-20260517-merge-mesh-renderer-material-renderer; plan-strategy section 2.3).
472
+ *
473
+ * Adds optional `baseColorTexture` + `sampler` slots (consumed by the record
474
+ * stage's textured-material code path; M3 / w10 dropped the cast-over-firstMaterial
475
+ * pattern in favour of direct snapshot field reads).
476
+ *
477
+ * feat-20260522-learn-render-3-1-sponza-model-loading-with-multi-l M4 extends
478
+ * the snapshot with `metallicRoughnessTexture` and `normalTexture`
479
+ * so the record stage can wire PBR texture bindings 4 and 6
480
+ * from real GPU views instead of placeholder 1x1 white / flat-normal views.
481
+ *
482
+ * Bounded scope: the snapshot tracks only what the record stage actually
483
+ * consumes today (charter proposition 5 consistent abstraction; YAGNI for
484
+ * future-proof field bloat). Future MaterialAsset extensions (emissive / etc)
485
+ * drive snapshot extensions when the record stage starts consuming them, not
486
+ * vice-versa.
487
+ *
488
+ * tweak-20260701 M1: `shadingModel` field removed — shader identity via
489
+ * {@link materialShaderId} is the single source of truth for material dispatch.
490
+ */
491
+ export interface MaterialSnapshot {
492
+ readonly baseColor: Vec3;
493
+ readonly metallic: number;
494
+ readonly roughness: number;
495
+ readonly clearcoat?: number | undefined;
496
+ readonly clearcoatRoughness?: number | undefined;
497
+ /** Authored Standard PBR specular tint in linear runtime color space. */
498
+ readonly specularTint?: readonly [number, number, number] | undefined;
499
+ /**
500
+ * Schema-driven material shader identifier (feat-20260523 M4-T05).
501
+ * Populated when the material asset uses the schema-driven path
502
+ * (payload.materialShader set). Undefined for unlit/sprite legacy
503
+ * materials and for case-B defaultMaterialSnapshot.
504
+ *
505
+ * The record stage uses this as the pipeline cache key first-level
506
+ * discriminator (M4-T06).
507
+ */
508
+ readonly materialShaderId?: string | undefined;
509
+ /**
510
+ * Stable source handle for the material asset. Record uses this only for
511
+ * same-frame assembly reuse; GPU bind-group validity still comes from the
512
+ * resource-identity cache.
513
+ */
514
+ readonly materialHandle?: number | undefined;
515
+ /**
516
+ * The selected forward-pass state for this exact material. A mesh can bind
517
+ * different materials to its submeshes, so pipeline selection must read the
518
+ * state from the submesh snapshot rather than the entity's first material.
519
+ */
520
+ readonly renderState?: MaterialRenderState | undefined;
521
+ /**
522
+ * Schema-driven parameter snapshot (feat-20260523 M4-T05).
523
+ * Populated alongside materialShaderId. Maps param name to its
524
+ * runtime-resolved value: number for scalar params, number[] for
525
+ * vec/color params, string (GUID) for texture2d/sampler params.
526
+ */
527
+ readonly paramSnapshot?: Readonly<Record<string, number | number[] | string>> | undefined;
528
+ /** Effective MaterialAsset parameter contract used to lay out this snapshot. */
529
+ readonly materialParamSchema?: readonly ParamSchemaEntry[] | undefined;
530
+ /** Authored per-slot UV set and KHR texture transform metadata. */
531
+ readonly textureCoordinates?: ReadonlyMap<string, MaterialTextureCoordinates> | undefined;
532
+ /**
533
+ * User-region texture handles keyed by paramSchema field name
534
+ * (feat-20260621-learn-render-5-5-parallax M2 / w7). The SSOT carrier for
535
+ * EVERY texture the shader's `derive(paramSchema).textureFieldNames`
536
+ * declares — `baseColorTexture` / `metallicRoughnessTexture` /
537
+ * `normalTexture` for built-in standard-PBR, plus each custom field such as
538
+ * `heightTexture` (LO 5.5 parallax). The record stage iterates this map to
539
+ * assemble the user-region bind group per the per-shader BGL (w8), so a 4th
540
+ * (or Nth) texture flows end-to-end without a hardcoded field list.
541
+ *
542
+ * Populated by iterating `textureFieldNames`; absent keys mean the
543
+ * paramValue was missing / mis-typed (record falls back to default white).
544
+ * `emissiveTexture` / `occlusionTexture` are NOT here — they live in the
545
+ * engine-injection lightmap region (their named fields below feed
546
+ * `appendInjection('lightmap')`, not the user-region).
547
+ */
548
+ readonly textureHandles?: ReadonlyMap<string, Handle<'TextureAsset', 'shared'>> | undefined;
549
+ /**
550
+ * User-region texture field names whose paramValue resolved to a VideoAsset
551
+ * (kind `'video'`) rather than a static TextureAsset
552
+ * (feat-20260623-world-space-video-asset M4 / w14, D-5). The video GUID
553
+ * occupies the same texture2d values slot a static texture would (P4:
554
+ * one binding shape), but extract routes it here instead of `textureHandles`
555
+ * so the record stage pulls the current-frame view from the transient
556
+ * DynamicTextureStore (D-3) instead of `GpuResidencyCache.ensureResident`
557
+ * (which has no `video` arm; AC-08). Each entry also carries the resolved
558
+ * clip handle so the record stage can key the per-frame upload.
559
+ *
560
+ * Producer/consumer split (charter P5 / AC-07 gate): extract owns the
561
+ * asset->snapshot translation; record consumes this POD field only — it never
562
+ * reaches back into the MaterialAsset to learn a field is video-sourced.
563
+ */
564
+ readonly videoTextureFields?: ReadonlyMap<string, Handle<'VideoAsset', 'shared'>> | undefined;
565
+ /** Authored sampler handles keyed by their matching texture parameter. */
566
+ readonly samplerHandles?: ReadonlyMap<string, Handle<'SamplerAsset', 'shared'>> | undefined;
567
+ readonly baseColorTexture?: Handle<'TextureAsset', 'shared'> | undefined;
568
+ /**
569
+ * PBR metallic-roughness texture handle (present for PBR/sprite/skin
570
+ * shaders). Undefined for the default-unlit shader
571
+ * (materialShaderId === 'forgeax::default-unlit'). The record stage reads
572
+ * this to write GPU view at material bind-group binding 4, falling
573
+ * back to a 1x1 white placeholder when undefined.
574
+ *
575
+ * feat-20260522-learn-render-3-1-sponza-model-loading-with-multi-l M4:
576
+ * field added so the record stage can wire real metallic-roughness
577
+ * textures from Sponza glTF materials (M3 writes the handle into
578
+ * SchemaDrivenMaterialAsset values; M4 extract carries it through to the snapshot).
579
+ */
580
+ readonly metallicRoughnessTexture?: Handle<'TextureAsset', 'shared'> | undefined;
581
+ /**
582
+ * PBR tangent-space normal texture handle (present for PBR/sprite/skin
583
+ * shaders). Undefined for the default-unlit shader
584
+ * (materialShaderId === 'forgeax::default-unlit'). The record stage reads
585
+ * this to write GPU view at material bind-group binding 6, falling
586
+ * back to a (0.5,0.5,1.0) flat-normal placeholder when undefined.
587
+ *
588
+ * feat-20260522-learn-render-3-1-sponza-model-loading-with-multi-l M4:
589
+ * field added symmetrically with metallicRoughnessTexture so the record
590
+ * stage can wire real normal textures from Sponza glTF materials.
591
+ */
592
+ readonly normalTexture?: Handle<'TextureAsset', 'shared'> | undefined;
593
+ /** Scalar applied to tangent-space normal XY after the normal texture sample. */
594
+ readonly normalScale?: number | undefined;
595
+ readonly emissive?: readonly [number, number, number] | undefined;
596
+ readonly emissiveIntensity?: number | undefined;
597
+ readonly emissiveTexture?: Handle<'TextureAsset', 'shared'> | undefined;
598
+ readonly occlusionTexture?: Handle<'TextureAsset', 'shared'> | undefined;
599
+ readonly occlusionStrength?: number | undefined;
600
+ /**
601
+ * Transparent composition flag derived from the first pass's
602
+ * `renderState.blend` presence on the underlying
603
+ * {@link MaterialPass} (feat-20260626-collapse M2: blend
604
+ * presence is the SSOT after `MaterialPass.transparent` was
605
+ * dropped in M1).
606
+ *
607
+ * The record stage reads this to drive both the LDR split-pass
608
+ * decision and the premultiplied-alpha blend resolution on the
609
+ * generic materialShaderId pipeline path — shader-agnostic, decoupled
610
+ * from the legacy `shadingModel` discriminant (feat-20260625 M2 D-3,
611
+ * finalised in w15; `shadingModel` field removed in tweak-20260701 M1).
612
+ *
613
+ * Extract derives this from the first pass's `renderState.blend !==
614
+ * undefined` (post-feat-20260626-collapse: blend presence is the
615
+ * single SSOT for "this material is transparent on the geometry
616
+ * pipeline cache key"). Multi-pass materials whose mix of opaque +
617
+ * transparent passes need finer routing should split into separate
618
+ * MaterialAsset entries (the normal forgeax pattern).
619
+ *
620
+ * Type is `boolean | undefined` (derived): `undefined` means "no
621
+ * passes / unknown"; consumers must read `=== true` / `!== true` to
622
+ * stay correct under both populated and absent cases.
623
+ */
624
+ readonly transparent?: boolean | undefined;
625
+ }
626
+ interface MaterialCacheChainIdentity {
627
+ readonly asset: MaterialAsset;
628
+ readonly parentGuid: string | undefined;
629
+ }
630
+ export interface MaterialSnapshotCacheEntry {
631
+ readonly snapshot: MaterialSnapshot;
632
+ readonly passes: readonly MaterialPass[];
633
+ /** Root/chain identities are present only on cross-frame-safe entries. */
634
+ readonly chain?: readonly MaterialCacheChainIdentity[];
635
+ /** AssetRegistry epoch at which the root/parent chain was last validated. */
636
+ readonly catalogEpoch?: number;
637
+ /** True only when every object reachable from the authored chain is frozen. */
638
+ readonly crossFrameSafe: boolean;
639
+ }
640
+ export type MaterialSnapshotCache = Map<number, MaterialSnapshotCacheEntry>;
641
+ export type MaterialSnapshotCachesByWorld = WeakMap<World, MaterialSnapshotCache>;
642
+ export interface DispatchEntry {
643
+ readonly entityIndex: number;
644
+ readonly materialHandle: number;
645
+ readonly renderableIndex: number;
646
+ readonly passIndex: number;
647
+ readonly queue: number;
648
+ /**
649
+ * Signed i32 from the entity's {@link Layer} component value (default 0 for
650
+ * entities without a Layer). Primary sort key for the transparent-dispatch
651
+ * sort in {@link render-system.ts}: lower value = drawn first (behind).
652
+ */
653
+ readonly layer: number;
654
+ readonly tags: Record<string, string>;
655
+ readonly renderState: MaterialRenderState | undefined;
656
+ readonly defines: Record<string, string> | undefined;
657
+ readonly vertexEntry: string | undefined;
658
+ readonly fragmentEntry: string | undefined;
659
+ readonly materialShaderId: string | undefined;
660
+ readonly paramSnapshot: Readonly<Record<string, number | number[] | string>> | undefined;
661
+ /**
662
+ * Stencil reference value from {@link MaterialPass.stencilReference}
663
+ * (draw-call dynamic state). Folded during extract for per-draw consumption
664
+ * in the record stage. `undefined` when the pass does not set a reference
665
+ * value (record stage falls back to WebGPU default 0).
666
+ */
667
+ readonly stencilReference?: number;
668
+ }
669
+ /**
670
+ * Stable-sort dispatch entries by `queue` value ascending.
671
+ * Returns a new sorted array (does not mutate the input).
672
+ * Same-queue entries preserve insertion order (AC-11 stable-order guarantee).
673
+ */
674
+ export declare function sortDispatchByQueue<E extends {
675
+ readonly queue: number;
676
+ }>(entries: readonly E[]): E[];
677
+ export interface ExtractedFrame {
678
+ readonly cameras: CameraSnapshot[];
679
+ readonly lights: ExtractedLights;
680
+ readonly renderables: RenderableSnapshot[];
681
+ /**
682
+ * Single dispatch list sorted by queue value (ascending, stable sort).
683
+ * Replaces the old opaqueDispatch / transparentDispatch / overlayDispatch
684
+ * three-bucket model per plan-strategy D-3.
685
+ */
686
+ readonly dispatch: DispatchEntry[];
687
+ readonly skylight: SkylightSnapshot | undefined;
688
+ readonly skylightCount: number;
689
+ readonly skybox: SkyboxSnapshot | undefined;
690
+ readonly skyboxCount: number;
691
+ /**
692
+ * feat-20260528-frustum-culling M3 / w11: frustum culling statistics
693
+ * collected during the extract phase. `total` is the count of entities
694
+ * that reached the culling decision point; `culled` is the count of
695
+ * those that were removed from renderables by frustum culling.
696
+ */
697
+ readonly frustumStats: {
698
+ readonly culled: number;
699
+ readonly total: number;
700
+ };
701
+ /** Candidate entities rejected by author visibility before resource parsing. */
702
+ readonly visibilityStats: {
703
+ readonly explicitlyHidden: number;
704
+ };
705
+ /**
706
+ * Per-frame post-process params snapshot collected from PostProcessParams
707
+ * entities (D-1: data-driven params channel). Maps shader id to the
708
+ * raw data bytes (Uint8Array = FieldValueType<'buffer'>). Last-one-wins
709
+ * when multiple entities bear the same shader id.
710
+ * Empty map when no PostProcessParams entities exist.
711
+ */
712
+ readonly postProcessParams: ReadonlyMap<string, Uint8Array>;
713
+ /** Visibility snapshots prepared for each contributing World. */
714
+ readonly visibilitySnapshots: readonly VisibilitySnapshot[];
715
+ /** World-labelled snapshots passed to generic RenderFeature extraction. */
716
+ readonly featureVisibilitySnapshots: readonly RenderFeatureWorldVisibilitySnapshot[];
717
+ /** Built-in hidden candidates, retained for host-side producer deduplication. */
718
+ readonly hiddenEntityReports: readonly RenderFeatureHiddenEntityReport[];
719
+ }
720
+ /**
721
+ * feat-20260608 M5 amend / w11-a: resolve a single MaterialAsset handle into
722
+ * a per-submesh MaterialSnapshot. Used by the extractFrame archetype loop to
723
+ * build `RenderableSnapshot.materials[]` for indices >= 1 (the entity-level
724
+ * snapshot at index 0 is built inline because it also drives multi-pass
725
+ * DispatchEntry creation + sprite-region overrides; per-submesh secondary
726
+ * materials are non-sprite + single-pass-equivalent for the record stage's
727
+ * UBO upload, so this helper produces a plain MaterialSnapshot only).
728
+ *
729
+ * Returns `defaultMaterialSnapshot()` (mid-grey unlit) for handle=0 (case-B
730
+ * sentinel, mirroring the inline path) and on each unresolved / non-material
731
+ * asset (so a partially-mis-registered multi-material entity still renders
732
+ * the resolvable submeshes; the count-mismatch validator already filtered
733
+ * the count-disagreement case earlier).
734
+ */
735
+ export declare function resolveMaterialSnapshot(handleRaw: number, world: World, assetsRef: AssetRegistry, materialSnapshotCache?: MaterialSnapshotCache, persistentMaterialSnapshotCache?: MaterialSnapshotCache): MaterialSnapshot;
736
+ /**
737
+ * feat-20260612-skin-palette-per-frame-upload M2 / m2-6: narrow per-frame
738
+ * pipeline surface consumed by `extractFrame`. Today only `skinPaletteAllocator`
739
+ * crosses the seam (the allocator owns the per-frame palette buffer + cursor;
740
+ * extract calls `resetForFrame` at frame entry then `allocateSlice` +
741
+ * `writeJointPalette` per skinned entity). Kept narrow on purpose — extract
742
+ * does NOT see the rest of `PipelineState` to avoid a circular import via
743
+ * `render-system.ts`.
744
+ */
745
+ export interface ExtractPipelineSurface {
746
+ readonly skinPaletteAllocator: SkinPaletteAllocator | null;
747
+ }
748
+ export declare function pssmSplit(nearPlane: number, farPlane: number, cascadeCount: number, splitLambda: number): Float32Array;
749
+ /**
750
+ * Build 6 face view-proj matrices for an omnidirectional shadow caster
751
+ * (point-light cube map). Returns 6 mat4 (column-major 16-float each) in face
752
+ * order [+X, -X, +Y, -Y, +Z, -Z] matching WebGPU cube layer convention.
753
+ *
754
+ * Each matrix is `proj * view` where:
755
+ * - `view = lookAt(lightPos, lightPos + faceLook[i], faceUp[i])`
756
+ * - `proj = perspective(PI/2, 1, near, far)` (WebGPU [0, 1] NDC short name)
757
+ *
758
+ * The returned `Mat4[]` length is always exactly 6. Caller can flatten into a
759
+ * 96-float (6 mat4) Float32Array for UBO upload (T-M1-7).
760
+ *
761
+ * @param lightPos world-space position of the point light (from companion Transform)
762
+ * @param near near plane distance (PointLightShadow.nearPlane)
763
+ * @param far far plane distance (PointLightShadow.farPlane)
764
+ */
765
+ export declare function buildPointShadowMatrices(lightPos: Vec3, near: number, far: number): Mat4[];
766
+ /**
767
+ * bug-20260710-editor-cross-world-shadow: the camera-frustum subset of
768
+ * {@link CameraSnapshot} that the directional-CSM matrix builder consumes.
769
+ * Extracted so the builder can run both inside {@link extractFrame} (single
770
+ * world) AND at the {@link extractFrames} merge layer, where the camera and the
771
+ * directional light may originate in DIFFERENT worlds (the editor
772
+ * editorWorld/sceneWorld super-composite). A cameraless world produces zero
773
+ * lightViewProj matrices, so the merge layer MUST recompute using the surfaced
774
+ * camera — see {@link computeDirectionalCsm}.
775
+ */
776
+ export interface CsmCameraData {
777
+ readonly world: Float32Array;
778
+ readonly fov: number;
779
+ readonly aspect: number;
780
+ readonly near: number;
781
+ readonly far: number;
782
+ readonly projection: 'perspective' | 'orthographic';
783
+ readonly orthoLeft: number;
784
+ readonly orthoRight: number;
785
+ readonly orthoBottom: number;
786
+ readonly orthoTop: number;
787
+ }
788
+ /**
789
+ * bug-20260710-editor-cross-world-shadow: the raw directional-shadow config a
790
+ * DirectionalLight carries, threaded onto {@link ExtractedLights} so the merge
791
+ * layer can recompute CSM matrices against the surfaced camera. Distinct from
792
+ * the *computed* outputs (lightViewProj / splitPlanes) also on ExtractedLights.
793
+ */
794
+ export interface DirectionalCsmConfig {
795
+ readonly cascadeCount: number;
796
+ readonly splitLambda: number;
797
+ readonly cascadeBlend: number;
798
+ readonly mapSize: number;
799
+ readonly shadowDistance: number;
800
+ }
801
+ /**
802
+ * bug-20260710-editor-cross-world-shadow: computed directional-CSM output —
803
+ * the per-cascade light-view-projection matrices plus the derived cascade
804
+ * metadata. Returned by {@link computeDirectionalCsm}; `undefined` when the
805
+ * config or camera is missing (caller leaves the fields undefined).
806
+ */
807
+ export interface DirectionalCsmResult {
808
+ readonly lightViewProj: Float32Array[];
809
+ readonly splitPlanes: Float32Array;
810
+ readonly cascadeCount: number;
811
+ readonly cascadeBlend: number;
812
+ readonly shadowMapSize: number;
813
+ }
814
+ /**
815
+ * bug-20260710-editor-cross-world-shadow: pure directional-CSM matrix builder,
816
+ * extracted verbatim from the former inline block in {@link extractFrame} (the
817
+ * PSSM split + per-cascade frustum-slice AABB fit + orthographic light
818
+ * projection). It is now a free function so BOTH the per-world extract and the
819
+ * cross-world merge layer can call it — the merge layer is the only place that
820
+ * pairs the first-hit directional light of one world with the surfaced camera
821
+ * of another (editor super-composite). Returns `null` when there is no camera
822
+ * to fit against (a cameraless world's directional light yields no matrices —
823
+ * the caller leaves lightViewProj undefined rather than emitting zero matrices
824
+ * that the WGSL reader would sample as NaN → "fully lit").
825
+ *
826
+ * Byte-identical to the prior inline computation for the single-world case
827
+ * (same PSSM lambda, same toward-light Z reach RC-2 fix, same clip-space
828
+ * matrix / tile-placement-in-shader split).
829
+ */
830
+ export declare function computeDirectionalCsm(direction: Vec3, config: DirectionalCsmConfig, cameraData: CsmCameraData | undefined): DirectionalCsmResult | null;
831
+ /**
832
+ * feat-20260709-editor-world-partition M1 / w4 (AC-08, plan-strategy §2 D-3):
833
+ * the owner index that previously served BOTH cameras and singleton render
834
+ * resources (skylight / skybox / postProcessParams) is split into two
835
+ * independent indices. `cameraOwner` selects the world whose cameras are
836
+ * surfaced; `resourceOwner` selects the world whose singleton resources are
837
+ * surfaced. A single number is accepted as the backward-compatible legacy form
838
+ * where `cameraOwner === resourceOwner === owner` (single-world callers +
839
+ * frame-loop stay byte-identical; the hard `{ owner }` cutover lands in M2).
840
+ */
841
+ export interface ExtractFramesOwner {
842
+ readonly cameraOwner: number;
843
+ readonly resourceOwner: number;
844
+ }
845
+ export interface PreparedExtractContext {
846
+ readonly assets: AssetRegistry | null | undefined;
847
+ readonly pipelineState: ExtractPipelineSurface | null | undefined;
848
+ readonly materialSnapshotCache: MaterialSnapshotCache | undefined;
849
+ readonly cull: 'self' | 'none' | 'external';
850
+ readonly cullCameras: readonly CameraSnapshot[] | undefined;
851
+ readonly hierarchy: SceneHierarchySnapshot;
852
+ readonly visibility: VisibilitySnapshot;
853
+ }
854
+ export declare function extractCameraSnapshots(world: World): CameraSnapshot[];
855
+ export declare function prepareExtractContext(world: World, options?: {
856
+ readonly assets?: AssetRegistry | null;
857
+ readonly pipelineState?: ExtractPipelineSurface | null;
858
+ readonly materialSnapshotCache?: MaterialSnapshotCache;
859
+ readonly cull?: 'self' | 'none' | 'external';
860
+ readonly cullCameras?: readonly CameraSnapshot[];
861
+ }): PreparedExtractContext;
862
+ export declare function extractFrames(worlds: readonly World[], owner: number | ExtractFramesOwner, assets?: AssetRegistry | null, pipelineState?: ExtractPipelineSurface | null, materialSnapshotCachesByWorld?: MaterialSnapshotCachesByWorld, options?: {
863
+ readonly cull?: 'normal' | 'none';
864
+ }): ExtractedFrame;
865
+ export declare function extractFrame(world: World, context: PreparedExtractContext): ExtractedFrame;
866
+ export declare function defaultMaterialSnapshot(materialHandle?: number): MaterialSnapshot;
867
+ export {};
868
+ //# sourceMappingURL=render-system-extract.d.ts.map