@forgeax/engine-render 0.1.29 → 0.1.31

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 (350) hide show
  1. package/README.md +248 -21
  2. package/dist/assembly/atmosphere-shader-prewarm.d.ts +1 -1
  3. package/dist/assembly/atmosphere-shader-prewarm.d.ts.map +1 -1
  4. package/dist/assembly/device-feature-admission.d.ts +4 -3
  5. package/dist/assembly/device-feature-admission.d.ts.map +1 -1
  6. package/dist/assembly/dynamic-geometry-host.d.ts +6 -0
  7. package/dist/assembly/dynamic-geometry-host.d.ts.map +1 -1
  8. package/dist/assembly/host-contract.d.ts +6 -0
  9. package/dist/assembly/host-contract.d.ts.map +1 -1
  10. package/dist/assembly/material/assembly.d.ts +26 -3
  11. package/dist/assembly/material/assembly.d.ts.map +1 -1
  12. package/dist/assembly/material/pipeline-helpers.d.ts +24 -0
  13. package/dist/assembly/material/pipeline-helpers.d.ts.map +1 -0
  14. package/dist/assembly/material-shader-policy.d.ts.map +1 -1
  15. package/dist/assembly/recovery/device-loss-fanout.d.ts.map +1 -1
  16. package/dist/assembly/recovery/recovery-attempt.d.ts +1 -6
  17. package/dist/assembly/recovery/recovery-attempt.d.ts.map +1 -1
  18. package/dist/assembly/recovery/renderer-recover.d.ts +1 -0
  19. package/dist/assembly/recovery/renderer-recover.d.ts.map +1 -1
  20. package/dist/assembly/renderer-facade.d.ts.map +1 -1
  21. package/dist/assembly/shader-prewarm-policy.d.ts +1 -1
  22. package/dist/assembly/shader-prewarm-policy.d.ts.map +1 -1
  23. package/dist/assembly/webgpu-ready.d.ts +1 -1
  24. package/dist/assembly/webgpu-ready.d.ts.map +1 -1
  25. package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
  26. package/dist/capture/scene-projection.d.ts +41 -0
  27. package/dist/capture/scene-projection.d.ts.map +1 -0
  28. package/dist/{chunk-BQVQOQJH.mjs → chunk-7MQ3XBSP.mjs} +20 -14
  29. package/dist/chunk-7MQ3XBSP.mjs.map +1 -0
  30. package/dist/{chunk-S4DNKQYQ.mjs → chunk-C3DDSXYK.mjs} +86 -33
  31. package/dist/chunk-C3DDSXYK.mjs.map +1 -0
  32. package/dist/{chunk-BTWH7BP4.mjs → chunk-FUUO4UND.mjs} +73 -29
  33. package/dist/chunk-FUUO4UND.mjs.map +1 -0
  34. package/dist/{chunk-NRNXBLIJ.mjs → chunk-JRBDO2KB.mjs} +46 -6
  35. package/dist/chunk-JRBDO2KB.mjs.map +1 -0
  36. package/dist/{chunk-NICXSHAT.mjs → chunk-MDQJPY3T.mjs} +8 -6
  37. package/dist/chunk-MDQJPY3T.mjs.map +1 -0
  38. package/dist/{chunk-JQTSEI3Z.mjs → chunk-NO4WZCAH.mjs} +3 -3
  39. package/dist/chunk-NO4WZCAH.mjs.map +1 -0
  40. package/dist/{chunk-FUODTTIA.mjs → chunk-PSEQ6QPH.mjs} +621 -108
  41. package/dist/chunk-PSEQ6QPH.mjs.map +1 -0
  42. package/dist/{chunk-33XZFTQU.mjs → chunk-S5UE2T5P.mjs} +48 -6
  43. package/dist/chunk-S5UE2T5P.mjs.map +1 -0
  44. package/dist/components/directional-light.d.ts +2 -2
  45. package/dist/components/dynamic-resolution.d.ts +15 -0
  46. package/dist/components/dynamic-resolution.d.ts.map +1 -0
  47. package/dist/components/index.d.ts +1 -0
  48. package/dist/components/index.d.ts.map +1 -1
  49. package/dist/components/light-helpers.d.ts.map +1 -1
  50. package/dist/components/reflection-probe.d.ts +1 -0
  51. package/dist/components/reflection-probe.d.ts.map +1 -1
  52. package/dist/components/skylight.d.ts +4 -1
  53. package/dist/components/skylight.d.ts.map +1 -1
  54. package/dist/construct-renderer.mjs +2172 -796
  55. package/dist/construct-renderer.mjs.map +1 -1
  56. package/dist/device/device-scope.d.ts +2 -0
  57. package/dist/device/device-scope.d.ts.map +1 -1
  58. package/dist/device/gpu-residency.d.ts +2 -2
  59. package/dist/device/gpu-residency.d.ts.map +1 -1
  60. package/dist/dynamic-geometry.d.ts.map +1 -1
  61. package/dist/environment/background.d.ts +3 -2
  62. package/dist/environment/background.d.ts.map +1 -1
  63. package/dist/environment/ibl.d.ts +11 -0
  64. package/dist/environment/ibl.d.ts.map +1 -0
  65. package/dist/environment/storage.d.ts +14 -0
  66. package/dist/environment/storage.d.ts.map +1 -0
  67. package/dist/errors/gpu-driven.d.ts +2 -2
  68. package/dist/errors/gpu-driven.d.ts.map +1 -1
  69. package/dist/errors/render.d.ts +35 -1
  70. package/dist/errors/render.d.ts.map +1 -1
  71. package/dist/extract/camera.d.ts.map +1 -1
  72. package/dist/extract/contracts.d.ts +7 -0
  73. package/dist/extract/contracts.d.ts.map +1 -1
  74. package/dist/extract/gpu-driven.d.ts +18 -1
  75. package/dist/extract/gpu-driven.d.ts.map +1 -1
  76. package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
  77. package/dist/gpu-driven/material-artifacts.d.ts +24 -0
  78. package/dist/gpu-driven/material-artifacts.d.ts.map +1 -0
  79. package/dist/gpu-driven/material-bindings.d.ts +7 -0
  80. package/dist/gpu-driven/material-bindings.d.ts.map +1 -0
  81. package/dist/gpu-driven/prepared-draw.d.ts +2 -0
  82. package/dist/gpu-driven/prepared-draw.d.ts.map +1 -1
  83. package/dist/gpu-driven/production-raster.d.ts +27 -6
  84. package/dist/gpu-driven/production-raster.d.ts.map +1 -1
  85. package/dist/gpu-resource.d.ts +5 -2
  86. package/dist/gpu-resource.d.ts.map +1 -1
  87. package/dist/gpu-scene-schema.d.ts.map +1 -1
  88. package/dist/gpu-scene.d.ts.map +1 -1
  89. package/dist/hdrp-buffers.d.ts +3 -0
  90. package/dist/hdrp-buffers.d.ts.map +1 -1
  91. package/dist/ibl/IblPipelineCache.d.ts +2 -0
  92. package/dist/ibl/IblPipelineCache.d.ts.map +1 -1
  93. package/dist/ibl/skylight-bind-group.d.ts +3 -1
  94. package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
  95. package/dist/index.d.ts +83 -81
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.mjs +7 -5
  98. package/dist/index.mjs.map +1 -1
  99. package/dist/inspection-types.d.ts +16 -1
  100. package/dist/inspection-types.d.ts.map +1 -1
  101. package/dist/internal.mjs +6 -6
  102. package/dist/material-row.d.ts +10 -0
  103. package/dist/material-row.d.ts.map +1 -1
  104. package/dist/pbr-pipeline.d.ts +3 -1
  105. package/dist/pbr-pipeline.d.ts.map +1 -1
  106. package/dist/pipeline/render-extent.d.ts +51 -0
  107. package/dist/pipeline/render-extent.d.ts.map +1 -0
  108. package/dist/pipeline/standard-build-context.d.ts +7 -0
  109. package/dist/pipeline/standard-build-context.d.ts.map +1 -0
  110. package/dist/pipeline/standard-forward-lane.d.ts +3 -2
  111. package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
  112. package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
  113. package/dist/pipeline/standard-post.d.ts +1 -1
  114. package/dist/pipeline/standard-post.d.ts.map +1 -1
  115. package/dist/pipeline/standard-profile.d.ts +2 -1
  116. package/dist/pipeline/standard-profile.d.ts.map +1 -1
  117. package/dist/pipeline-builder.d.ts +3 -1
  118. package/dist/pipeline-builder.d.ts.map +1 -1
  119. package/dist/plugin.d.ts.map +1 -1
  120. package/dist/post-process-errors.d.ts +9 -2
  121. package/dist/post-process-errors.d.ts.map +1 -1
  122. package/dist/prepare/extended-lighting/resources.d.ts +3 -3
  123. package/dist/record/frame-lighting.d.ts.map +1 -1
  124. package/dist/record/frame-snapshot.d.ts +3 -8
  125. package/dist/record/frame-snapshot.d.ts.map +1 -1
  126. package/dist/record/frame.d.ts +3 -2
  127. package/dist/record/frame.d.ts.map +1 -1
  128. package/dist/record/main-pass-geometry.d.ts +7 -2
  129. package/dist/record/main-pass-geometry.d.ts.map +1 -1
  130. package/dist/record/main-pass-material.d.ts +6 -3
  131. package/dist/record/main-pass-material.d.ts.map +1 -1
  132. package/dist/record/main-pass.d.ts +2 -0
  133. package/dist/record/main-pass.d.ts.map +1 -1
  134. package/dist/record/prepared-material-bindings.d.ts.map +1 -1
  135. package/dist/record/recovery-pipeline.d.ts +9 -1
  136. package/dist/record/recovery-pipeline.d.ts.map +1 -1
  137. package/dist/record/render-context.d.ts +34 -3
  138. package/dist/record/render-context.d.ts.map +1 -1
  139. package/dist/record/shadow-pass.d.ts +2 -2
  140. package/dist/record/shadow-pass.d.ts.map +1 -1
  141. package/dist/record/typed-frame-graph.d.ts +5 -2
  142. package/dist/record/typed-frame-graph.d.ts.map +1 -1
  143. package/dist/recovery/render-system-candidate.d.ts.map +1 -1
  144. package/dist/reflection/background.d.ts +14 -0
  145. package/dist/reflection/background.d.ts.map +1 -0
  146. package/dist/reflection/filter.d.ts.map +1 -1
  147. package/dist/reflection/projection.d.ts +1 -0
  148. package/dist/reflection/projection.d.ts.map +1 -1
  149. package/dist/reflection/record-owner.d.ts +4 -2
  150. package/dist/reflection/record-owner.d.ts.map +1 -1
  151. package/dist/render-contract.d.ts +47 -32
  152. package/dist/render-contract.d.ts.map +1 -1
  153. package/dist/render-graph-primitives.d.ts.map +1 -1
  154. package/dist/render-pipeline.d.ts +17 -1
  155. package/dist/render-pipeline.d.ts.map +1 -1
  156. package/dist/render-system-extract-tail.d.ts +9 -2
  157. package/dist/render-system-extract-tail.d.ts.map +1 -1
  158. package/dist/render-system-extract.d.ts +29 -2
  159. package/dist/render-system-extract.d.ts.map +1 -1
  160. package/dist/render-system.d.ts.map +1 -1
  161. package/dist/scene/render-scene.d.ts +2 -0
  162. package/dist/scene/render-scene.d.ts.map +1 -1
  163. package/dist/ssao-config.d.ts +8 -6
  164. package/dist/ssao-config.d.ts.map +1 -1
  165. package/dist/ssr/graph.d.ts.map +1 -1
  166. package/dist/temporal/gpu.d.ts.map +1 -1
  167. package/dist/temporal/index.mjs +5 -5
  168. package/dist/temporal/standard-scene-data.d.ts +2 -1
  169. package/dist/temporal/standard-scene-data.d.ts.map +1 -1
  170. package/dist/temporal/target-coverage-attachment.d.ts +15 -0
  171. package/dist/temporal/target-coverage-attachment.d.ts.map +1 -0
  172. package/dist/temporal/temporal-view.d.ts +6 -2
  173. package/dist/temporal/temporal-view.d.ts.map +1 -1
  174. package/dist/temporal/view.d.ts +6 -0
  175. package/dist/temporal/view.d.ts.map +1 -1
  176. package/dist/typed-render-graph-primitives.d.ts +6 -0
  177. package/dist/typed-render-graph-primitives.d.ts.map +1 -1
  178. package/dist/volume/component.d.ts +1 -0
  179. package/dist/volume/component.d.ts.map +1 -1
  180. package/package.json +21 -21
  181. package/src/__tests__/capture-scene-projection.unit.test.ts +24 -0
  182. package/src/__tests__/device-feature-admission.unit.test.ts +15 -24
  183. package/src/__tests__/device-loss-fanout.unit.test.ts +43 -0
  184. package/src/__tests__/dynamic-geometry-batch.unit.test.ts +157 -0
  185. package/src/__tests__/dynamic-geometry.unit.test.ts +36 -0
  186. package/src/__tests__/dynamic-resolution-plugin.integration.test.ts +81 -0
  187. package/src/__tests__/factory-contract.integration.test.ts +164 -1
  188. package/src/__tests__/frame-observation.contract.test.ts +21 -0
  189. package/src/__tests__/gpu-driven-baseline.characterization.test.ts +1 -1
  190. package/src/__tests__/gpu-driven-batch-topology-pbr.unit.test.ts +20 -1
  191. package/src/__tests__/gpu-driven-lod-cache.unit.test.ts +0 -3
  192. package/src/__tests__/gpu-driven-mesh-world-identity.unit.test.ts +0 -3
  193. package/src/__tests__/gpu-driven-pbr.dawn.test.ts +11 -6
  194. package/src/__tests__/gpu-driven-production.integration.test.ts +13 -25
  195. package/src/__tests__/gpu-driven-view.unit.test.ts +1 -0
  196. package/src/__tests__/gpu-pass-timing-browser-runner.ts +15 -0
  197. package/src/__tests__/gpu-pass-timing.browser.test.ts +14 -1
  198. package/src/__tests__/gpu-resource-scope.unit.test.ts +71 -0
  199. package/src/__tests__/gpu-scene.unit.test.ts +55 -1
  200. package/src/__tests__/materials-standard-contract.unit.test.ts +5 -1
  201. package/src/__tests__/mesh-submission-lifetime.unit.test.ts +8 -0
  202. package/src/__tests__/morph-neutral-admission.unit.test.ts +19 -0
  203. package/src/__tests__/physical-clearcoat.integration.test.ts +6 -1
  204. package/src/__tests__/post-process-error-policy-owner.unit.test.ts +6 -5
  205. package/src/__tests__/prepared-gpu-driven-pbr.integration.test.ts +216 -5
  206. package/src/__tests__/reflection-fallback-async-publication.unit.test.ts +68 -1
  207. package/src/__tests__/reflection-probe-authoring.unit.test.ts +12 -10
  208. package/src/__tests__/reflection-probe-box.dawn.test.ts +71 -0
  209. package/src/__tests__/reflection-probe-filter.unit.test.ts +9 -0
  210. package/src/__tests__/reflection-probe-orientation.dawn.test.ts +294 -0
  211. package/src/__tests__/reflection-probe-record-owner.characterization.unit.test.ts +5 -15
  212. package/src/__tests__/reflection-probe-updates.unit.test.ts +129 -0
  213. package/src/__tests__/render-error-code-owner.test-d.ts +3 -0
  214. package/src/__tests__/render-error-detail-ssot.test-d.ts +5 -1
  215. package/src/__tests__/render-extent.unit.test.ts +63 -0
  216. package/src/__tests__/render-scene-projection.unit.test.ts +3 -2
  217. package/src/__tests__/renderer-factory-material-contract.unit.test.ts +173 -9
  218. package/src/__tests__/shader-manifest-fixture.ts +6 -0
  219. package/src/__tests__/skinned-shadow-caster.test.ts +8 -1
  220. package/src/__tests__/specular-environment-scale.dawn.test.ts +4 -2
  221. package/src/__tests__/ssao-config.unit.test.ts +7 -0
  222. package/src/__tests__/ssao-surface.dawn.test.ts +252 -0
  223. package/src/__tests__/ssr-cube-silhouette.dawn.test.ts +270 -0
  224. package/src/__tests__/ssr-gpu-dispatch.browser.test.ts +51 -43
  225. package/src/__tests__/ssr-gpu-dispatch.dawn.test.ts +4 -0
  226. package/src/__tests__/ssr-gpu-dispatch.ts +10 -5
  227. package/src/__tests__/ssr-graph-topology.unit.test.ts +2 -2
  228. package/src/__tests__/ssr-hiz.browser.test.ts +1 -1
  229. package/src/__tests__/ssr-hiz.dawn.test.ts +1 -1
  230. package/src/__tests__/ssr-spatial.integration.test.ts +1 -1
  231. package/src/__tests__/standard-cluster-variant-resolution.unit.test.ts +40 -0
  232. package/src/__tests__/standard-pbr-artifact-assembly.unit.test.ts +238 -1
  233. package/src/__tests__/standard-profile-oracle.unit.test.ts +27 -0
  234. package/src/__tests__/taa-coverage-edge.dawn.test.ts +6 -0
  235. package/src/__tests__/taa-neighborhood-equivalence.dawn.test.ts +5 -1
  236. package/src/__tests__/taa-stability-feedback.ts +1 -0
  237. package/src/__tests__/temporal-reset-matrix.unit.test.ts +2 -2
  238. package/src/__tests__/temporal-view.unit.test.ts +17 -0
  239. package/src/__tests__/transmission-prewarm.unit.test.ts +57 -0
  240. package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +62 -13
  241. package/src/__tests__/volumetric-fog-topology.unit.test.ts +7 -7
  242. package/src/assembly/atmosphere-shader-prewarm.ts +3 -2
  243. package/src/assembly/device-feature-admission.ts +9 -4
  244. package/src/assembly/dynamic-geometry-host.ts +236 -163
  245. package/src/assembly/host-contract.ts +9 -0
  246. package/src/assembly/material/assembly.ts +350 -6
  247. package/src/assembly/material/pipeline-helpers.ts +100 -0
  248. package/src/assembly/material-shader-policy.ts +39 -18
  249. package/src/assembly/recovery/device-loss-fanout.ts +5 -0
  250. package/src/assembly/recovery/recovery-attempt.ts +2 -29
  251. package/src/assembly/recovery/renderer-recover.ts +6 -9
  252. package/src/assembly/renderer-facade.ts +22 -1
  253. package/src/assembly/shader-prewarm-policy.ts +14 -1
  254. package/src/assembly/webgpu-ready.ts +28 -19
  255. package/src/assembly/webgpu-renderer.ts +95 -95
  256. package/src/capture/scene-projection.ts +37 -0
  257. package/src/components/__tests__/dynamic-resolution-schema.unit.test.ts +65 -0
  258. package/src/components/__tests__/light-radius.integration.test.ts +59 -0
  259. package/src/components/directional-light.ts +3 -3
  260. package/src/components/dynamic-resolution.ts +67 -0
  261. package/src/components/index.ts +1 -0
  262. package/src/components/light-helpers.ts +6 -1
  263. package/src/components/reflection-probe.ts +1 -0
  264. package/src/components/skylight.ts +4 -1
  265. package/src/device/device-scope.ts +13 -7
  266. package/src/device/gpu-residency.ts +11 -11
  267. package/src/dynamic-geometry.ts +13 -8
  268. package/src/environment/background.ts +30 -12
  269. package/src/environment/ibl.ts +211 -0
  270. package/src/environment/storage.ts +63 -0
  271. package/src/errors/gpu-driven.ts +10 -3
  272. package/src/errors/render.ts +64 -0
  273. package/src/extract/camera.ts +12 -1
  274. package/src/extract/contracts.ts +10 -0
  275. package/src/extract/gpu-driven.ts +72 -17
  276. package/src/gpu-driven/batch-topology.ts +33 -11
  277. package/src/gpu-driven/material-artifacts.ts +179 -0
  278. package/src/gpu-driven/material-bindings.ts +41 -0
  279. package/src/gpu-driven/prepared-draw.ts +13 -2
  280. package/src/gpu-driven/production-raster.ts +681 -164
  281. package/src/gpu-resource.ts +21 -2
  282. package/src/gpu-scene-schema.ts +11 -2
  283. package/src/gpu-scene.ts +14 -3
  284. package/src/hdrp-buffers.ts +69 -0
  285. package/src/ibl/IblPipelineCache.ts +5 -0
  286. package/src/ibl/skylight-bind-group.ts +27 -17
  287. package/src/index.ts +92 -81
  288. package/src/inspection-types.ts +16 -1
  289. package/src/material-row.ts +60 -11
  290. package/src/pbr-pipeline.ts +13 -2
  291. package/src/pipeline/render-extent.ts +111 -0
  292. package/src/pipeline/standard-build-context.ts +7 -0
  293. package/src/pipeline/standard-forward-lane.ts +41 -24
  294. package/src/pipeline/standard-pipeline.ts +47 -18
  295. package/src/pipeline/standard-post.ts +4 -0
  296. package/src/pipeline/standard-profile.ts +2 -1
  297. package/src/pipeline-builder.ts +12 -3
  298. package/src/plugin.ts +4 -0
  299. package/src/post-process-errors.ts +26 -18
  300. package/src/prepare/__tests__/extended-lighting-capability.unit.test.ts +2 -2
  301. package/src/prepare/extended-lighting/resources.ts +3 -3
  302. package/src/record/__tests__/main-pass-geometry.unit.test.ts +68 -0
  303. package/src/record/__tests__/material-bg-cache.unit.test.ts +45 -0
  304. package/src/record/__tests__/material-slot-plan.unit.test.ts +9 -0
  305. package/src/record/__tests__/recovery-pipeline.unit.test.ts +47 -1
  306. package/src/record/__tests__/sprite-material-abi.unit.test.ts +7 -3
  307. package/src/record/__tests__/temporal-payload.unit.test.ts +2 -0
  308. package/src/record/frame-lighting.ts +3 -1
  309. package/src/record/frame-snapshot.ts +13 -11
  310. package/src/record/frame.ts +150 -74
  311. package/src/record/main-pass-geometry.ts +60 -9
  312. package/src/record/main-pass-material.ts +47 -19
  313. package/src/record/main-pass.ts +63 -4
  314. package/src/record/prepared-material-bindings.ts +4 -0
  315. package/src/record/recovery-pipeline.ts +56 -0
  316. package/src/record/render-context.ts +34 -3
  317. package/src/record/shadow-pass.ts +187 -50
  318. package/src/record/typed-frame-graph.ts +60 -3
  319. package/src/record/view-ubo.ts +1 -1
  320. package/src/recovery/render-system-candidate.ts +54 -11
  321. package/src/reflection/background.ts +151 -0
  322. package/src/reflection/filter.ts +3 -0
  323. package/src/reflection/projection.ts +16 -6
  324. package/src/reflection/record-owner.ts +282 -86
  325. package/src/render-contract.ts +50 -32
  326. package/src/render-graph-primitives.ts +28 -3
  327. package/src/render-pipeline.ts +20 -1
  328. package/src/render-system-extract-tail.ts +23 -3
  329. package/src/render-system-extract.ts +127 -42
  330. package/src/render-system.ts +35 -7
  331. package/src/scene/render-scene.ts +8 -0
  332. package/src/ssao-config.ts +25 -8
  333. package/src/ssr/graph.ts +78 -58
  334. package/src/temporal/gpu.ts +5 -0
  335. package/src/temporal/standard-scene-data.ts +7 -1
  336. package/src/temporal/target-coverage-attachment.ts +72 -0
  337. package/src/temporal/temporal-view.ts +10 -4
  338. package/src/temporal/view.ts +12 -2
  339. package/src/transmission/__tests__/standard-transmission.dawn.test.ts +24 -9
  340. package/src/typed-render-graph-primitives.ts +38 -0
  341. package/src/volume/component.ts +1 -0
  342. package/src/volume/passes.ts +3 -3
  343. package/dist/chunk-33XZFTQU.mjs.map +0 -1
  344. package/dist/chunk-BQVQOQJH.mjs.map +0 -1
  345. package/dist/chunk-BTWH7BP4.mjs.map +0 -1
  346. package/dist/chunk-FUODTTIA.mjs.map +0 -1
  347. package/dist/chunk-JQTSEI3Z.mjs.map +0 -1
  348. package/dist/chunk-NICXSHAT.mjs.map +0 -1
  349. package/dist/chunk-NRNXBLIJ.mjs.map +0 -1
  350. package/dist/chunk-S4DNKQYQ.mjs.map +0 -1
@@ -23,15 +23,16 @@ import type {
23
23
  } from '@forgeax/engine-rhi';
24
24
  import type { SkinError } from '@forgeax/engine-skinning';
25
25
  import type { ImageError } from '@forgeax/engine-types';
26
- import type { RhiBackendInstrumentation } from './assembly/backend-contract';
27
- import type { Antialias, BloomEnabled, CameraExposure, Tonemap } from './components/camera';
28
- import type { ScreenSpaceReflectionData } from './components/screen-space-reflection';
29
- import type { EnvironmentInspection } from './environment/inspection';
30
- import type { GpuDrivenPreparationError } from './errors/gpu-driven';
31
- import type { RecoveryOutcome, RecoveryPhase } from './errors/recover';
32
- import type { RenderError } from './errors/render';
33
- import type { RenderFeature, RenderFeatureDiagnostics } from './features/types';
34
- import type { PostProcessShaderEntry } from './fullscreen-post-process-pass';
26
+ import type { RhiBackendInstrumentation } from './assembly/backend-contract.js';
27
+ import type { Antialias, BloomEnabled, CameraExposure, Tonemap } from './components/camera.js';
28
+ import type { DynamicResolutionData } from './components/dynamic-resolution.js';
29
+ import type { ScreenSpaceReflectionData } from './components/screen-space-reflection.js';
30
+ import type { EnvironmentInspection } from './environment/inspection.js';
31
+ import type { GpuDrivenPreparationError } from './errors/gpu-driven.js';
32
+ import type { RecoveryOutcome, RecoveryPhase } from './errors/recover.js';
33
+ import type { RenderError } from './errors/render.js';
34
+ import type { RenderFeature, RenderFeatureDiagnostics } from './features/types.js';
35
+ import type { PostProcessShaderEntry } from './fullscreen-post-process-pass.js';
35
36
  import type {
36
37
  BloomInspection,
37
38
  DirectionalShadowInspection,
@@ -46,10 +47,11 @@ import type {
46
47
  SsrSpatialInspection,
47
48
  TemporalTargetInspection,
48
49
  TransmissionInspection,
49
- } from './inspection-types';
50
- import type { InstanceCollectionInspection, InstanceCollectionStore } from './instances';
51
- import type { RenderSceneBounds } from './scene/render-scene-types';
52
- import type { SsrAdmissionIdentity } from './ssr/identity';
50
+ } from './inspection-types.js';
51
+ import type { InstanceCollectionInspection, InstanceCollectionStore } from './instances.js';
52
+ import type { RenderExtent } from './pipeline/render-extent.js';
53
+ import type { RenderSceneBounds } from './scene/render-scene-types.js';
54
+ import type { SsrAdmissionIdentity } from './ssr/identity.js';
53
55
  import type {
54
56
  RenderTarget,
55
57
  RenderTargetDescriptor,
@@ -58,11 +60,11 @@ import type {
58
60
  RenderTargetReadbackTicket,
59
61
  RenderTargetTextureSource,
60
62
  RenderTargetTextureSourceOptions,
61
- } from './targets/contracts';
62
- import type { TemporalInspection } from './temporal/inspection';
63
+ } from './targets/contracts.js';
64
+ import type { TemporalInspection } from './temporal/inspection.js';
63
65
 
64
- export type { TransmissionInspection } from './inspection-types';
65
- export type { PointsLinesInspection } from './points-lines/inspection';
66
+ export type { TransmissionInspection } from './inspection-types.js';
67
+ export type { PointsLinesInspection } from './points-lines/inspection.js';
66
68
 
67
69
  import type {
68
70
  DynamicGeometryCandidate,
@@ -71,29 +73,29 @@ import type {
71
73
  DynamicGeometryOrdering,
72
74
  DynamicGeometryPrepareInput,
73
75
  DynamicGeometryReceipt,
74
- } from './dynamic-geometry';
76
+ } from './dynamic-geometry.js';
75
77
  import type {
76
78
  IblBindingInspection,
77
79
  MeshMaterialBindingObservation,
78
- } from './mesh-material-bindings';
79
- import type { StandardLightingInspection } from './pipeline/standard-lighting/inspection';
80
- import type { AutoExposureInspection } from './pipeline/standard-output/auto-exposure/inspection';
81
- import type { StandardLutInspection } from './pipeline/standard-output/lut-state';
82
- import type { StandardProfile } from './pipeline/standard-profile';
83
- import type { PointShadowInspection } from './point-shadow-inspection';
84
- import type { PostProcessError } from './post-process-errors';
80
+ } from './mesh-material-bindings.js';
81
+ import type { StandardLightingInspection } from './pipeline/standard-lighting/inspection.js';
82
+ import type { AutoExposureInspection } from './pipeline/standard-output/auto-exposure/inspection.js';
83
+ import type { StandardLutInspection } from './pipeline/standard-output/lut-state.js';
84
+ import type { StandardProfile } from './pipeline/standard-profile.js';
85
+ import type { PointShadowInspection } from './point-shadow-inspection.js';
86
+ import type { PostProcessError } from './post-process-errors.js';
85
87
  import type {
86
88
  GpuPassTimingObservation,
87
89
  GpuPassTimingOptions,
88
90
  } from './record/gpu-pass-timing/index.js';
89
- import type { VolumeTimingObservation } from './record/gpu-timing';
90
- import type { TemporalView } from './temporal/view';
91
- import type { VolumetricFogInspection } from './volume/inspection';
91
+ import type { VolumeTimingObservation } from './record/gpu-timing.js';
92
+ import type { TemporalView } from './temporal/view.js';
93
+ import type { VolumetricFogInspection } from './volume/inspection.js';
92
94
 
93
95
  export type {
94
96
  CubeCameraFace,
95
97
  CubeCameraUpdateIntent,
96
- } from './components/cube-camera';
98
+ } from './components/cube-camera.js';
97
99
 
98
100
  export interface CubeCameraSnapshot {
99
101
  readonly entityKey?: number;
@@ -158,6 +160,8 @@ export interface CameraSnapshot {
158
160
  /** Camera schema output projection consumed by Standard prepare/inspection. */
159
161
  readonly output?: CameraOutputSnapshot;
160
162
  readonly antialias: Antialias;
163
+ /** Optional detached Camera companion for fixed or adaptive scaling. */
164
+ readonly dynamicResolution?: DynamicResolutionData;
161
165
  readonly bloom: BloomEnabled;
162
166
  readonly bloomThreshold: number;
163
167
  readonly bloomIntensity: number;
@@ -186,8 +190,8 @@ export type {
186
190
  EnvironmentSource,
187
191
  FogFrame,
188
192
  FramePlan,
189
- } from './extract/environment';
190
- export type { TemporalView } from './temporal/view';
193
+ } from './extract/environment.js';
194
+ export type { TemporalView } from './temporal/view.js';
191
195
 
192
196
  /**
193
197
  * Render-graph state exposed to pipeline declarations. Concrete pipeline
@@ -303,6 +307,8 @@ export interface RenderPipelineContext {
303
307
  readonly clear: readonly [number, number, number, number] | number[];
304
308
  readonly targetW: number;
305
309
  readonly targetH: number;
310
+ /** Renderer-owned output/internal dimensions shared by Standard consumers. */
311
+ readonly extent?: RenderExtent;
306
312
  readonly currentTexture: Texture;
307
313
  readonly camera: CameraSnapshot;
308
314
  /** Per-frame post-process parameter bytes keyed by shader id. */
@@ -341,6 +347,7 @@ export interface SsrShaderSources {
341
347
 
342
348
  /** Stable analytic-atmosphere entry-point sources emitted by the shader manifest. */
343
349
  export interface AtmosphereShaderSources {
350
+ readonly ibl: string;
344
351
  readonly cube: string;
345
352
  readonly background: string;
346
353
  }
@@ -400,6 +407,15 @@ export interface Renderer {
400
407
  candidate: DynamicGeometryCandidate,
401
408
  ordering: DynamicGeometryOrdering,
402
409
  ): Result<DynamicGeometryCandidate, DynamicGeometryError>;
410
+ /**
411
+ * Atomically swap distinct entities in one attached World. Returned failures
412
+ * retain old bindings; an uncertain rollback throws to require paired rebuild.
413
+ * Invoke inside PhysicsWorld.admitDerivedShapeCandidates commitGeometry.
414
+ */
415
+ acceptDynamicGeometryCandidates(
416
+ candidates: readonly DynamicGeometryCandidate[],
417
+ ordering: DynamicGeometryOrdering,
418
+ ): Result<readonly DynamicGeometryCandidate[], DynamicGeometryError>;
403
419
  dynamicGeometryReceipt(candidate: DynamicGeometryCandidate): DynamicGeometryReceipt | undefined;
404
420
  cancelDynamicGeometry(candidate: DynamicGeometryCandidate): Result<void, DynamicGeometryError>;
405
421
  retireDynamicGeometry(candidate: DynamicGeometryCandidate): Result<void, DynamicGeometryError>;
@@ -471,7 +487,7 @@ export type RendererEvent =
471
487
  readonly kind: 'frame-submitted';
472
488
  readonly frameId: number;
473
489
  readonly deviceGeneration: number;
474
- /** The exact receipt returned by the renderer's submit boundary. */
490
+ /** The exact draw receipt, for observation when App owns the draw loop. */
475
491
  readonly receipt: FrameReceipt;
476
492
  };
477
493
 
@@ -980,6 +996,8 @@ export interface RendererOptions {
980
996
  readonly profiler?: Profiler | undefined;
981
997
  /** Explicitly request timestamp-query for receipt-bound GPU profiling. */
982
998
  readonly captureGpuTimings?: boolean | undefined;
999
+ /** Opt into full-frame reflection fallback pixel readback and hashing for diagnostics. */
1000
+ readonly captureReflectionFallbackReadback?: boolean | undefined;
983
1001
  /** Optional host-owned RHI lifecycle instrumentation, such as recording. */
984
1002
  readonly rhiInstrumentation?: RhiBackendInstrumentation | undefined;
985
1003
  /** Optional bounded GPU pass timing facts; this is not frame latency. */
@@ -15,6 +15,7 @@ import type {
15
15
  TextureFormat,
16
16
  TextureView,
17
17
  } from '@forgeax/engine-rhi';
18
+ import { RhiError } from '@forgeax/engine-rhi';
18
19
  import {
19
20
  buildFullscreenPostProcessPass,
20
21
  createFullscreenBindGroup,
@@ -28,7 +29,7 @@ import type { _InternalRenderPipelineContext } from './record/render-context';
28
29
  import { recordFxaaPass } from './record/skybox-post-pass';
29
30
  import type { RenderPipelineContext } from './render-contract';
30
31
  import { getOrCreateSsaoBuffers, getOrCreateSsaoFallbackTexture } from './ssao-buffers';
31
- import { getSsaoParameters } from './ssao-config';
32
+ import { getSsaoParameters, SSAO_SAMPLE_COUNTS } from './ssao-config';
32
33
 
33
34
  type DepthResolutionContext = Pick<_InternalRenderPipelineContext, 'runtime'> & {
34
35
  readonly frameState: {
@@ -198,6 +199,12 @@ function ensureSsaoRecordCompanions(internals: _InternalRenderPipelineContext):
198
199
  function buildSsaoUniformPayload(internals: _InternalRenderPipelineContext): Float32Array {
199
200
  const { camera, frameState } = internals;
200
201
  const sProj = computeProjectionMatrix(camera);
202
+ if (camera.temporal?.currentJitterUv !== undefined) {
203
+ const jitter = mat4.identity(mat4.create());
204
+ jitter[12] = camera.temporal.currentJitterUv[0] * 2;
205
+ jitter[13] = camera.temporal.currentJitterUv[1] * -2;
206
+ mat4.multiply(sProj, jitter, sProj);
207
+ }
201
208
  const sView = computeViewMatrix(camera);
202
209
  const invProj = mat4.create();
203
210
  mat4.invert(invProj, sProj);
@@ -214,6 +221,7 @@ function buildSsaoUniformPayload(internals: _InternalRenderPipelineContext): Flo
214
221
  out[48] = parameters.intensity;
215
222
  out[49] = parameters.radius;
216
223
  out[50] = parameters.bias;
224
+ out[51] = SSAO_SAMPLE_COUNTS[parameters.quality];
217
225
  return out;
218
226
  }
219
227
 
@@ -256,7 +264,19 @@ export function recordSsaoCalcPass(
256
264
  const { runtime, pipelineState, encoder } = _c;
257
265
  const pp = pipelineState.perPassResources;
258
266
 
259
- if (pp.ssaoCalcPipeline === null || pp.ssaoBgl === null) return;
267
+ if (runtime.device.caps.backendKind === 'wgpu-webgl2') {
268
+ throw new RhiError({
269
+ code: 'feature-not-enabled',
270
+ expected: 'SSAO raw depth sampling on a WebGPU-capable backend',
271
+ hint: 'use WebGPU for SSAO or disable StandardProfile.ssao on the GLES fallback',
272
+ });
273
+ }
274
+ if (pp.ssaoCalcPipeline === null || pp.ssaoBgl === null) {
275
+ throw new PostProcessError({
276
+ code: 'post-process-not-found',
277
+ detail: { id: 'forgeax::post::ssao-calc' },
278
+ });
279
+ }
260
280
  if (graphViews === undefined && (resolveCtx === undefined || ssaoRawKey === undefined)) return;
261
281
 
262
282
  const ssaoRawView =
@@ -392,7 +412,12 @@ export function recordSsaoBlurPass(
392
412
  const { runtime, pipelineState, encoder } = _c;
393
413
  const pp = pipelineState.perPassResources;
394
414
 
395
- if (pp.ssaoBlurPipeline === null || pp.ssaoBgl === null) return;
415
+ if (pp.ssaoBlurPipeline === null || pp.ssaoBgl === null) {
416
+ throw new PostProcessError({
417
+ code: 'post-process-not-found',
418
+ detail: { id: 'forgeax::post::ssao-blur' },
419
+ });
420
+ }
396
421
  if (
397
422
  graphViews === undefined &&
398
423
  (resolveCtx === undefined || ssaoBlurredKey === undefined || ssaoRawKey === undefined)
@@ -45,6 +45,7 @@ import {
45
45
  GPU_TEXTURE_USAGE_COPY_SRC,
46
46
  GPU_TEXTURE_USAGE_RENDER_ATTACHMENT,
47
47
  } from './gpu-texture-usage';
48
+ import type { RenderExtent } from './pipeline/render-extent';
48
49
  import type { StandardTopologyInputValue } from './pipeline/standard-lighting/topology';
49
50
  import { STANDARD_POST_STAGE_NAMES, type StandardProfile } from './pipeline/standard-profile';
50
51
  import type { SurfaceProfile } from './record/render-context';
@@ -231,6 +232,8 @@ export interface RenderPipelineTopology {
231
232
  readonly viewFormat: import('@forgeax/engine-rhi').TextureFormat;
232
233
  readonly profile?: SurfaceProfile | undefined;
233
234
  };
235
+ /** Renderer-owned immutable dimensions for Standard graph consumers. */
236
+ readonly extent?: RenderExtent;
234
237
  readonly camera: Pick<RenderPipelineContext['camera'], 'tonemap' | 'antialias' | 'bloom'>;
235
238
  /** Frame-stable Standard output policy; no raw RHI handles enter topology. */
236
239
  readonly output?: {
@@ -448,6 +451,13 @@ export interface RenderPipelineGpuDrivenProjection {
448
451
  ): void;
449
452
  }
450
453
 
454
+ /** Exact scene rows selected by an indirect batch; palette offsets are global. */
455
+ export interface GpuDrivenSceneMeshBinding {
456
+ readonly meshBuffer: Buffer;
457
+ readonly meshBytes: number;
458
+ readonly paletteBuffer?: Buffer;
459
+ }
460
+
451
461
  /** Producer-owned Standard PBR resources resolved during graph execution. */
452
462
  export interface GpuDrivenStandardPbrFrameResources {
453
463
  readonly materialBindGroups: (BindGroup | undefined)[];
@@ -455,12 +465,18 @@ export interface GpuDrivenStandardPbrFrameResources {
455
465
  readonly materialSlotIndicesByEntity: Map<number, readonly number[]>;
456
466
  readonly instancesBindGroup: BindGroup;
457
467
  readonly materialStride: number;
468
+ /** The current pass selects material membership and attachment formats. */
469
+ selectedMaterialSlots?: ReadonlySet<number>;
470
+ colorFormats?: readonly TextureFormat[];
458
471
  /** Exact producer-owned numeric Material table consumed by scene-index PBR. */
459
472
  readonly sceneMaterialBuffer: Buffer;
473
+ resolveClusteredMeshBindGroup?: (binding: GpuDrivenSceneMeshBinding) => BindGroup;
460
474
  }
461
475
 
462
476
  export interface RenderPipelineBuildContext<FrameCtx extends RenderPipelineFrame> {
463
477
  readonly graph: RenderGraphBuilder<FrameCtx>;
478
+ /** Optional Standard-only output-domain coverage producer input. */
479
+ readonly targetCoverage?: import('./temporal/target-coverage-attachment').TargetCoverageAttachment;
464
480
  /** Explicit receipt-bound color domains requested for this frame. */
465
481
  readonly observationCaptureDomains?: readonly FrameObservationDomain[] | undefined;
466
482
  /**
@@ -526,6 +542,7 @@ export interface RenderPipelineBuildContext<FrameCtx extends RenderPipelineFrame
526
542
  projectGpuDriven(target: {
527
543
  readonly format: TextureFormat;
528
544
  readonly sampleCount: 1 | 4;
545
+ readonly additionalColorFormats?: readonly TextureFormat[];
529
546
  }): Result<RenderPipelineGpuDrivenProjection | undefined, RenderPipelineBuildError>;
530
547
  projectGpuDrivenShadow?(
531
548
  identity: ShadowViewIdentity,
@@ -542,7 +559,9 @@ export interface RenderPipelineBuildContext<FrameCtx extends RenderPipelineFrame
542
559
  RenderPipelineBuildError
543
560
  >;
544
561
  /** Add renderer-owned cube capture work to the active pipeline graph. */
545
- contributeCubeCaptures?(): Result<void, RenderPipelineBuildError>;
562
+ contributeCubeCaptures?(
563
+ environmentCube?: import('./environment/ibl').GraphEnvironment,
564
+ ): Result<void, RenderPipelineBuildError>;
546
565
  /** Whether a producer-owned feature is installed for this graph build. */
547
566
  hasFeature?(identity: string): boolean;
548
567
  }
@@ -162,6 +162,7 @@ import {
162
162
  materialNormalScale,
163
163
  materialParamSchemaForMaterial,
164
164
  materialProgramKeysForMaterial,
165
+ materialSceneIndexProgramKeysForMaterial,
165
166
  materialStandardTextureMask,
166
167
  materialTextureFields,
167
168
  materialTextureRef,
@@ -209,7 +210,12 @@ export function extractFrames(
209
210
  readonly retainHidden?: boolean;
210
211
  readonly getMaterialShaderArtifact?: (
211
212
  materialShaderId: string,
212
- vertexColorAvailable?: boolean,
213
+ request?: {
214
+ readonly vertexColorAvailable?: boolean;
215
+ readonly deformation?: 'rigid' | 'skin';
216
+ readonly pass?: 'forward' | 'shadow' | 'depth';
217
+ readonly address?: 'direct' | 'scene-index';
218
+ },
213
219
  ) => MaterialShaderArtifact | undefined;
214
220
  readonly instanceCollections?: InstanceCollectionStore;
215
221
  } = {},
@@ -683,8 +689,8 @@ function hasFiniteOrderedLocalAabb(aabb: Float32Array | undefined): aabb is Floa
683
689
  return minX <= maxX && minY <= maxY && minZ <= maxZ;
684
690
  }
685
691
 
686
- function morphSnapshotFor(
687
- mesh: MeshAsset,
692
+ export function morphSnapshotFor(
693
+ mesh: Pick<MeshAsset, 'vertices' | 'morphTargets'>,
688
694
  weights: ArrayLike<number> | undefined,
689
695
  ): MorphSnapshot | undefined {
690
696
  const targets = mesh.morphTargets;
@@ -710,6 +716,9 @@ function morphSnapshotFor(
710
716
  if (!Number.isFinite(weight)) return undefined;
711
717
  copied[index] = weight;
712
718
  }
719
+ // Zero weights are the source vertex stream exactly. An authored but idle
720
+ // morph target must not disable skin scene-index admission or dispatch work.
721
+ if (copied.every((weight) => weight === 0)) return undefined;
713
722
  return { weights: copied, targetCount: targets.length };
714
723
  }
715
724
 
@@ -2139,6 +2148,11 @@ export function extractFrame(world: World, context: PreparedExtractContext): Ext
2139
2148
  assets,
2140
2149
  materialContext,
2141
2150
  );
2151
+ const materialSceneIndexProgramKeys = materialSceneIndexProgramKeysForMaterial(
2152
+ asset,
2153
+ assets,
2154
+ materialContext,
2155
+ );
2142
2156
  const authoredFirstPassShader = runtimeMaterialShaderIdForMaterial(
2143
2157
  allPasses,
2144
2158
  undefined,
@@ -2484,6 +2498,7 @@ export function extractFrame(world: World, context: PreparedExtractContext): Ext
2484
2498
  normalScale: normalScalePv,
2485
2499
  materialShaderId: firstPassShader,
2486
2500
  materialProgramKeys,
2501
+ materialSceneIndexProgramKeys,
2487
2502
  materialHandle: handleRaw,
2488
2503
  renderState: pipelineRenderState(allPasses[0]?.renderState),
2489
2504
  paramSnapshot: paramSnap,
@@ -3180,8 +3195,13 @@ export function extractFrame(world: World, context: PreparedExtractContext): Ext
3180
3195
  ...(entry.materialShaderId === undefined
3181
3196
  ? {}
3182
3197
  : { materialShaderId: entry.materialShaderId }),
3198
+ ...(entry.vertexEntry === undefined ? {} : { vertexEntry: entry.vertexEntry }),
3199
+ ...(entry.fragmentEntry === undefined
3200
+ ? {}
3201
+ : { fragmentEntry: entry.fragmentEntry }),
3183
3202
  ...(entry.renderState === undefined ? {} : { renderState: entry.renderState }),
3184
3203
  ...(cpuReason === undefined ? {} : { cpuReason }),
3204
+ gpuDrivenEligible: cpuReason === undefined,
3185
3205
  };
3186
3206
  shadowMembershipEntries.push(membership);
3187
3207
  localShadowMembershipEntries.push(membership);