@woosh/meep-engine 3.33.0 → 3.35.0

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 (503) hide show
  1. package/editor/Editor.d.ts.map +1 -1
  2. package/editor/Editor.js +0 -3
  3. package/editor/ecs/component/prototypeObjectEditor.js +1 -165
  4. package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -1
  5. package/editor/ecs/component/registerBasicTypeEditors.js +0 -5
  6. package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -1
  7. package/editor/ecs/component/registerEngineComponentEditors.js +0 -20
  8. package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -1
  9. package/editor/process/SymbolicDisplayProcess.js +100 -106
  10. package/editor/prototypeEditorShell.d.ts.map +1 -1
  11. package/editor/prototypeEditorShell.js +190 -186
  12. package/editor/templates/entity_templates.d.ts.map +1 -1
  13. package/editor/templates/entity_templates.js +10 -27
  14. package/editor/view/makeEntityDecorators.js +2 -2
  15. package/package.json +1 -1
  16. package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.d.ts +3 -3
  17. package/src/core/geom/3d/aabb/MovingBoundingBox.d.ts.map +1 -0
  18. package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.js +5 -5
  19. package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts +3 -0
  20. package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts.map +1 -0
  21. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGBA_LUT_HEATMAP_IR.js +1 -1
  22. package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts +6 -0
  23. package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts.map +1 -0
  24. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_INFERNO.js +1 -1
  25. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.d.ts +1 -1
  26. package/src/core/math/lookup/RGB_LUT_TURBO.d.ts.map +1 -0
  27. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.js +1 -1
  28. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.d.ts +1 -1
  29. package/src/core/math/lookup/RGB_LUT_VIRIDIS.d.ts.map +1 -0
  30. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.js +1 -1
  31. package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
  32. package/src/engine/animation/AnimatedActions.js +2 -4
  33. package/src/engine/animation/AnimationUtils.d.ts +1 -17
  34. package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
  35. package/src/engine/animation/AnimationUtils.js +138 -246
  36. package/src/engine/ecs/EntityManager.d.ts +1 -1
  37. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  38. package/src/engine/ecs/EntityManager.js +2 -2
  39. package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +268 -275
  40. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  41. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +0 -10
  42. package/src/engine/graphics/geometry/distribute_points_on_indexed_triangles.d.ts.map +1 -0
  43. package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.js +3 -3
  44. package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.d.ts +1 -1
  45. package/src/engine/graphics/texture/sampler/lut_to_sampler.d.ts.map +1 -0
  46. package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.js +1 -1
  47. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -3
  48. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  49. package/src/engine/graphics3/GPUParticleEmitterSystem.js +0 -3
  50. package/src/engine/network/NetworkSession.d.ts +1 -1
  51. package/src/engine/network/NetworkSession.js +1 -1
  52. package/src/engine/physics/cloth/MEASUREMENTS.md +115 -0
  53. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  54. package/src/engine/physics/cloth/solver/cloth_contact_find.js +2 -0
  55. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +9 -0
  56. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  57. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +30 -7
  58. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  59. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  60. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +12 -2
  61. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +11 -2
  62. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  63. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +14 -7
  64. package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts +6 -15
  65. package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts.map +1 -1
  66. package/src/engine/sound/ecs/audio/SpatialAudioIndex.js +161 -174
  67. package/src/shade/device/mock/SoftwareGPUBuffer.d.ts +5 -3
  68. package/src/shade/device/mock/SoftwareGPUBuffer.d.ts.map +1 -1
  69. package/src/shade/device/mock/SoftwareGPUBuffer.js +32 -3
  70. package/src/shade/device/timing/profile/GPUProfileSession.d.ts +25 -11
  71. package/src/shade/device/timing/profile/GPUProfileSession.d.ts.map +1 -1
  72. package/src/shade/device/timing/profile/GPUProfileSession.js +553 -474
  73. package/src/shade/playground/avboit/main.d.ts.map +1 -1
  74. package/src/shade/playground/avboit/main.js +888 -916
  75. package/src/shade/playground/caldera/main.js +73 -60
  76. package/src/shade/playground/particle_ecs/README.md +13 -7
  77. package/src/shade/playground/particle_ecs/bonfire_effects.d.ts +5 -5
  78. package/src/shade/playground/particle_ecs/bonfire_effects.js +5 -5
  79. package/src/shade/playground/particle_ecs/effects/smoke.json +1859 -1859
  80. package/src/shade/playground/particle_ecs/effects/soot.json +1605 -1605
  81. package/src/shade/playground/particle_system/README.md +1 -2
  82. package/src/shade/playground/profile_hotkey.d.ts.map +1 -1
  83. package/src/shade/playground/profile_hotkey.js +4 -40
  84. package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
  85. package/src/shade/playground/skinned_blas_refit/main.js +4 -39
  86. package/src/shade/playground/vgeo_runtime/main.js +25 -77
  87. package/src/shade/playground/vgeo_scene/main.js +2231 -2217
  88. package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
  89. package/src/shade/playground/volumetrics_froxel/main.js +4 -39
  90. package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
  91. package/src/shade/playground/volumetrics_froxel/measure.js +2 -4
  92. package/src/shade/renderer/GraphicsContext.d.ts +7 -0
  93. package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
  94. package/src/shade/renderer/GraphicsContext.js +11 -2
  95. package/src/shade/renderer/Renderer.d.ts +1 -1
  96. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  97. package/src/shade/renderer/Renderer.js +41 -1
  98. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +8 -0
  99. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  100. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +21 -0
  101. package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -1
  102. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  103. package/src/shade/renderer/geometry/GPUGeometryManager.js +9 -10
  104. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +5 -0
  105. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
  106. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +11 -0
  107. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +12 -0
  108. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
  109. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +25 -0
  110. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +115 -101
  111. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  112. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +282 -140
  113. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +30 -0
  114. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +4 -1
  115. package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +536 -0
  116. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +6 -2
  117. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  118. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +68 -19
  119. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +2 -1
  120. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  121. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +17 -1
  122. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +4 -0
  123. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
  124. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +42 -12
  125. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +93 -12
  126. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
  127. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +166 -20
  128. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
  129. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -7
  130. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
  131. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +12 -5
  132. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
  133. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -2
  134. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
  135. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +23 -13
  136. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -1
  137. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +1 -2
  138. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
  139. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +1 -2
  140. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
  141. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +10 -6
  142. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +45 -17
  143. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
  144. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +61 -19
  145. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +8 -11
  146. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -1
  147. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +9 -16
  148. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
  149. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +25 -10
  150. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +10 -8
  151. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +1 -0
  152. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +19 -7
  153. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +4 -2
  154. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -1
  155. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +4 -2
  156. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts +4 -0
  157. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts.map +1 -1
  158. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.js +7 -0
  159. package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +1 -1
  160. package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +1 -0
  161. package/src/shade/renderer/light/GPULightCollection.d.ts +9 -1
  162. package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
  163. package/src/shade/renderer/light/GPULightCollection.js +41 -0
  164. package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts +37 -0
  165. package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts.map +1 -0
  166. package/src/shade/renderer/light/environment/shader_project_environment_sh.js +105 -0
  167. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  168. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  169. package/src/shade/renderer/material/GPUMaterialManager.js +2 -0
  170. package/src/shade/renderer/particles/DESIGN.md +69 -18
  171. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +7 -1
  172. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  173. package/src/shade/renderer/particles/GPUParticleSystem.js +1247 -1244
  174. package/src/shade/renderer/particles/ParticleConstants.d.ts +1 -3
  175. package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
  176. package/src/shade/renderer/particles/ParticleConstants.js +1 -3
  177. package/src/shade/renderer/particles/graph_particles_avboit.d.ts +7 -1
  178. package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
  179. package/src/shade/renderer/particles/graph_particles_avboit.js +9 -0
  180. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts +3 -4
  181. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
  182. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +7 -6
  183. package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts +15 -9
  184. package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts.map +1 -1
  185. package/src/shade/renderer/particles/shaders/chunk_particle_lighting.js +29 -11
  186. package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.d.ts +24 -0
  187. package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.d.ts.map +1 -0
  188. package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.js +45 -0
  189. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +3 -0
  190. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
  191. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +38 -0
  192. package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
  193. package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +190 -185
  194. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +45 -0
  195. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -0
  196. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +99 -0
  197. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +4 -4
  198. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -36
  199. package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts +15 -0
  200. package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts.map +1 -0
  201. package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.js +103 -0
  202. package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts +3 -0
  203. package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts.map +1 -1
  204. package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.js +6 -1
  205. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +26 -0
  206. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -0
  207. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +91 -0
  208. package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts +22 -0
  209. package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts.map +1 -0
  210. package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.js +102 -0
  211. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts +2 -1
  212. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  213. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +28 -24
  214. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +8 -0
  215. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
  216. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -0
  217. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +8 -1
  218. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
  219. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +9 -0
  220. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  221. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +32 -28
  222. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  223. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +9 -105
  224. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +5 -0
  225. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
  226. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +11 -0
  227. package/src/shade/renderer/scene/GPUSceneContext.d.ts +11 -3
  228. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  229. package/src/shade/renderer/scene/GPUSceneContext.js +93 -21
  230. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +4 -1
  231. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  232. package/src/shade/renderer/scene/rows/GPUSceneRows.js +5 -23
  233. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  234. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +63 -0
  235. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts +12 -0
  236. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts.map +1 -0
  237. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.js +11 -0
  238. package/src/shade/renderer/shadow/map/Shadowmap.d.ts +15 -0
  239. package/src/shade/renderer/shadow/map/Shadowmap.d.ts.map +1 -1
  240. package/src/shade/renderer/shadow/map/Shadowmap.js +17 -0
  241. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts +25 -0
  242. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts.map +1 -0
  243. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.js +22 -0
  244. package/src/shade/renderer/shadow/map/shadowmap_update_score.d.ts.map +1 -1
  245. package/src/shade/renderer/shadow/map/shadowmap_update_score.js +5 -2
  246. package/src/shade/renderer/texture/TextureManager.d.ts +2 -1
  247. package/src/shade/renderer/texture/TextureManager.d.ts.map +1 -1
  248. package/src/shade/renderer/texture/TextureManager.js +4 -1
  249. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +1 -1
  250. package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts +9 -1
  251. package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts.map +1 -1
  252. package/src/shade/renderer/util/Uint32BufferSamplingStats.js +55 -5
  253. package/src/shade/renderer/view/ViewManager.d.ts +7 -1
  254. package/src/shade/renderer/view/ViewManager.d.ts.map +1 -1
  255. package/src/shade/renderer/view/ViewManager.js +17 -1
  256. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
  257. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +1 -0
  258. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +13 -3
  259. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
  260. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +9 -1
  261. package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +39 -0
  262. package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts.map +1 -0
  263. package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +107 -0
  264. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts +15 -0
  265. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts.map +1 -0
  266. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.js +44 -0
  267. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts +19 -0
  268. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts.map +1 -0
  269. package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.js +48 -0
  270. package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts +29 -0
  271. package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts.map +1 -0
  272. package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.js +90 -0
  273. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts +10 -0
  274. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts.map +1 -0
  275. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.js +55 -0
  276. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts +10 -0
  277. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts.map +1 -0
  278. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.js +47 -0
  279. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts +10 -0
  280. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts.map +1 -0
  281. package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.js +63 -0
  282. package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts +17 -0
  283. package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts.map +1 -0
  284. package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.js +26 -0
  285. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +8 -1
  286. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
  287. package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +50 -2
  288. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
  289. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +488 -436
  290. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts +1 -1
  291. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
  292. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +254 -63
  293. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +0 -20
  294. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +0 -1
  295. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +0 -35
  296. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +0 -12
  297. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +0 -1
  298. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +0 -17
  299. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +0 -14
  300. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +0 -1
  301. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +0 -18
  302. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +0 -52
  303. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +0 -1
  304. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +0 -58
  305. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +0 -47
  306. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +0 -1
  307. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +0 -58
  308. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +0 -16
  309. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +0 -1
  310. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +0 -21
  311. package/editor/particles/rebuildParticleEmitter.d.ts +0 -11
  312. package/editor/particles/rebuildParticleEmitter.d.ts.map +0 -1
  313. package/editor/particles/rebuildParticleEmitter.js +0 -31
  314. package/editor/process/ParticleEmitterRebuildProcess.d.ts +0 -66
  315. package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +0 -1
  316. package/editor/process/ParticleEmitterRebuildProcess.js +0 -217
  317. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +0 -18
  318. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +0 -1
  319. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.js +0 -140
  320. package/src/engine/animation/removeEntityGenericEffect.d.ts +0 -18
  321. package/src/engine/animation/removeEntityGenericEffect.d.ts.map +0 -1
  322. package/src/engine/animation/removeEntityGenericEffect.js +0 -160
  323. package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts +0 -16
  324. package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +0 -1
  325. package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +0 -194
  326. package/src/engine/graphics/ecs/sprite/Sprite.d.ts +0 -15
  327. package/src/engine/graphics/ecs/sprite/Sprite.d.ts.map +0 -1
  328. package/src/engine/graphics/ecs/sprite/Sprite.js +0 -14
  329. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts +0 -11
  330. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +0 -1
  331. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +0 -144
  332. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +0 -1
  333. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +0 -61
  334. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +0 -1
  335. package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +0 -229
  336. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts +0 -6
  337. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts.map +0 -1
  338. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js +0 -8
  339. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts +0 -7
  340. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts.map +0 -1
  341. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.js +0 -9
  342. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts +0 -13
  343. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts.map +0 -1
  344. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js +0 -12
  345. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts +0 -3
  346. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts.map +0 -1
  347. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.js +0 -84
  348. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +0 -285
  349. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +0 -1
  350. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +0 -1201
  351. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts +0 -19
  352. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts.map +0 -1
  353. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js +0 -67
  354. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -197
  355. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +0 -1
  356. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +0 -398
  357. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts +0 -5
  358. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts.map +0 -1
  359. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.js +0 -4
  360. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +0 -162
  361. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +0 -1
  362. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -472
  363. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +0 -10
  364. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +0 -1
  365. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +0 -37
  366. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts +0 -9
  367. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts.map +0 -1
  368. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.js +0 -25
  369. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -19
  370. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +0 -1
  371. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +0 -28
  372. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -19
  373. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +0 -1
  374. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.js +0 -162
  375. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts +0 -5
  376. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +0 -1
  377. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +0 -103
  378. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts +0 -8
  379. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts.map +0 -1
  380. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +0 -28
  381. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +0 -2
  382. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +0 -1
  383. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +0 -2
  384. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +0 -2
  385. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +0 -1
  386. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +0 -2
  387. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -60
  388. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +0 -1
  389. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +0 -128
  390. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +0 -47
  391. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +0 -1
  392. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +0 -77
  393. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -45
  394. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +0 -1
  395. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +0 -93
  396. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +0 -95
  397. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +0 -1
  398. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +0 -239
  399. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts +0 -3
  400. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts.map +0 -1
  401. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts +0 -6
  402. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts.map +0 -1
  403. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_TURBO.d.ts.map +0 -1
  404. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_VIRIDIS.d.ts.map +0 -1
  405. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts +0 -13
  406. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts.map +0 -1
  407. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.js +0 -28
  408. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts +0 -9
  409. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts.map +0 -1
  410. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.js +0 -24
  411. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts +0 -13
  412. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts.map +0 -1
  413. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.js +0 -27
  414. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts +0 -33
  415. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts.map +0 -1
  416. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.js +0 -80
  417. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +0 -49
  418. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +0 -1
  419. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +0 -135
  420. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts +0 -7
  421. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts.map +0 -1
  422. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.js +0 -14
  423. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts +0 -41
  424. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +0 -1
  425. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +0 -59
  426. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts +0 -4
  427. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts.map +0 -1
  428. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.js +0 -56
  429. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts +0 -4
  430. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts.map +0 -1
  431. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.js +0 -84
  432. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts +0 -4
  433. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +0 -1
  434. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +0 -80
  435. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts +0 -29
  436. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +0 -1
  437. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +0 -43
  438. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts +0 -5
  439. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts.map +0 -1
  440. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js +0 -104
  441. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts +0 -9
  442. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map +0 -1
  443. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js +0 -11
  444. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts +0 -9
  445. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map +0 -1
  446. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.js +0 -64
  447. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts +0 -9
  448. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +0 -1
  449. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +0 -172
  450. package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +0 -1
  451. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +0 -20
  452. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +0 -1
  453. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +0 -84
  454. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +0 -81
  455. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +0 -1
  456. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +0 -200
  457. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +0 -6
  458. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts.map +0 -1
  459. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.js +0 -8
  460. package/src/engine/graphics/particles/particular/engine/utils/volume/lut_to_sampler.d.ts.map +0 -1
  461. package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -20
  462. package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +0 -1
  463. package/src/engine/graphics/particles/particular/group/Operation.js +0 -20
  464. package/src/engine/graphics/particles/particular/group/OperationType.d.ts +0 -7
  465. package/src/engine/graphics/particles/particular/group/OperationType.d.ts.map +0 -1
  466. package/src/engine/graphics/particles/particular/group/OperationType.js +0 -9
  467. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -27
  468. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +0 -1
  469. package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +0 -27
  470. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts +0 -8
  471. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts.map +0 -1
  472. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.js +0 -11
  473. package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts +0 -7
  474. package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts.map +0 -1
  475. package/src/engine/graphics/particles/particular/group/ParticleDataType.js +0 -10
  476. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -24
  477. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +0 -1
  478. package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +0 -48
  479. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts +0 -7
  480. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts.map +0 -1
  481. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.js +0 -20
  482. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts +0 -6
  483. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts.map +0 -1
  484. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +0 -162
  485. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts +0 -8
  486. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map +0 -1
  487. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js +0 -19
  488. package/src/engine/graphics3/ParticleEmitterSystem.d.ts +0 -77
  489. package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +0 -1
  490. package/src/engine/graphics3/ParticleEmitterSystem.js +0 -307
  491. package/src/engine/graphics3/ParticleEmitterSystem3.d.ts +0 -10
  492. package/src/engine/graphics3/ParticleEmitterSystem3.d.ts.map +0 -1
  493. package/src/engine/graphics3/ParticleEmitterSystem3.js +0 -10
  494. package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts +0 -61
  495. package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts.map +0 -1
  496. package/src/engine/graphics3/particles/GPUParticularRenderer.js +0 -627
  497. package/src/engine/graphics3/particles/particle_gpu_records.d.ts +0 -85
  498. package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +0 -1
  499. package/src/engine/graphics3/particles/particle_gpu_records.js +0 -227
  500. package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts +0 -35
  501. package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +0 -1
  502. package/src/shade/renderer/particles/shaders/shader_particle_render.js +0 -135
  503. /package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.d.ts +0 -0
@@ -1,13 +1,23 @@
1
1
  import { assert } from "../../../../../core/assert.js";
2
2
  import { BufferResourceDescriptor } from "../../../../device/graph/BufferResourceDescriptor.js";
3
- import { noop } from "../../../../../core/function/noop.js";
4
3
  import { vgeo_cut_feedback_layout } from "./cut/vgeo_cut_feedback_layout.js";
5
4
 
6
5
  /**
7
6
  * @typedef {import("./GPUVirtualGeometryPool.js").GPUVirtualGeometryPool} GPUVirtualGeometryPool
7
+ * @typedef {import("./VGeoViewCut.js").VGeoViewCut} VGeoViewCut
8
8
  * @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
9
9
  */
10
10
 
11
+ /**
12
+ * The most views one frame's feedback is laid out for. A view past it shares the last slot, which
13
+ * merges its counters and its want slice with that view's and loses nothing else; the bound exists
14
+ * so that a frame drawing many point lights for the first time — first draws bypass the shadow
15
+ * budget — cannot grow the buffer without limit.
16
+ *
17
+ * @type {number}
18
+ */
19
+ const SLOT_CEILING = 64;
20
+
11
21
  /**
12
22
  * What one frame of virtual geometry needs that is not a page: the threshold, the feedback buffer
13
23
  * every view writes into, and the parameters every pass reads.
@@ -18,9 +28,16 @@ import { vgeo_cut_feedback_layout } from "./cut/vgeo_cut_feedback_layout.js";
18
28
  * virtual geometry is view-dependent by construction — but everything here is shared between them,
19
29
  * which is exactly what §4 means by "the setup is shared rather than the result".
20
30
  *
21
- * **The feedback buffer is per frame and not per invocation**, and that is what dedups a touch
22
- * across the buckets and passes a frame is split into. Each expansion site gets its own claim
23
- * bitmask (different instance sets) and writes into this one buffer.
31
+ * **A frame spans every graph of a render.** The renderer opens it before the shadow maps are drawn
32
+ * and closes it after the main view's graph is recorded, and each shadow map records into a
33
+ * `FrameGraph` of its own (SHADOW_PLAN_2026_09_28 §2.1). So the feedback buffer is not a transient of
34
+ * any one graph: it is a buffer this runtime owns, **imported** into each graph that cuts, and the
35
+ * first graph of a frame to import it clears it. Graphs are encoded in the order they are recorded
36
+ * into one encoder, which is the only ordering the frame needs between them.
37
+ *
38
+ * **Every view that cuts takes a slot** (§2.4): its own counters, its own want slice and its own
39
+ * stamp tag, so one view's list running out cannot silence another's, and a reading can say which
40
+ * view needed more wavefronts. The view the frame is opened for is slot 0.
24
41
  *
25
42
  * @author Alex Goldring
26
43
  * @copyright Company Named Limited (c) 2026
@@ -31,14 +48,11 @@ export class GPUVirtualGeometryRuntime {
31
48
  */
32
49
  #pool;
33
50
 
34
-
35
-
36
51
  /**
37
52
  * @type {number}
38
53
  */
39
54
  #want_capacity;
40
55
 
41
-
42
56
  /**
43
57
  * @type {number}
44
58
  */
@@ -59,11 +73,6 @@ export class GPUVirtualGeometryRuntime {
59
73
  */
60
74
  #iteration_ceiling;
61
75
 
62
- /**
63
- * @type {number}
64
- */
65
- #iteration_escalations = 0;
66
-
67
76
  /**
68
77
  * @type {number}
69
78
  */
@@ -71,6 +80,7 @@ export class GPUVirtualGeometryRuntime {
71
80
 
72
81
  /**
73
82
  * Pixels of permitted error — the single quality/perf lever, and a runtime dial by design §4.
83
+ * A view cuts at this times its own {@link VGeoViewCut#tau_scale}.
74
84
  * @type {number}
75
85
  */
76
86
  tau = 1;
@@ -81,10 +91,15 @@ export class GPUVirtualGeometryRuntime {
81
91
  cull_enabled = true;
82
92
 
83
93
  /**
84
- * This frame's feedback resource, or -1 outside a frame.
85
- * @type {number}
94
+ * @type {boolean}
86
95
  */
87
- #feedback = -1;
96
+ #frame_open = false;
97
+
98
+ /**
99
+ * The feedback buffer, persistent and re-made only when a frame's layout outgrows it.
100
+ * @type {GPUBuffer|null}
101
+ */
102
+ #feedback_buffer = null;
88
103
 
89
104
  /**
90
105
  * @type {ReturnType<vgeo_cut_feedback_layout>|undefined}
@@ -92,10 +107,43 @@ export class GPUVirtualGeometryRuntime {
92
107
  #layout;
93
108
 
94
109
  /**
95
- * @type {FrameGraph|undefined}
110
+ * The current version of the feedback buffer in each graph that has imported it this frame.
111
+ * @type {Map<FrameGraph, number>}
112
+ */
113
+ #imports = new Map();
114
+
115
+ /**
116
+ * Whether a graph of this frame has already recorded the clear.
117
+ * @type {boolean}
118
+ */
119
+ #cleared = false;
120
+
121
+ /**
122
+ * This frame's slot for each view that has cut in it.
123
+ * @type {Map<VGeoViewCut, number>}
124
+ */
125
+ #slot_of = new Map();
126
+
127
+ /**
128
+ * This frame's views, by slot; a slot shared past the layout holds more than one.
129
+ * @type {VGeoViewCut[][]}
96
130
  */
97
- #graph;
131
+ #slots = [];
98
132
 
133
+ /**
134
+ * The most slots any frame has asked for, which is what the next frame is laid out for — and
135
+ * never fewer than two, so that a view past the layout always has a slot to share that is not
136
+ * the frame's own view's. Sharing slot 0 merged a cascade's counters into the main view's reading
137
+ * and escalated the main view's wavefront bound on the cascade's remainder.
138
+ * @type {number}
139
+ */
140
+ #slot_high_water = 2;
141
+
142
+ /**
143
+ * The view the last frame was opened for.
144
+ * @type {VGeoViewCut|undefined}
145
+ */
146
+ #frame_view;
99
147
 
100
148
  /**
101
149
  * @type {number}
@@ -117,7 +165,7 @@ export class GPUVirtualGeometryRuntime {
117
165
  * overriding the derivation below
118
166
  * @param {number} [options.queue_capacity] traversal items one wavefront may hold
119
167
  * @param {number} [options.max_iterations] wavefronts before the descent is abandoned, to start
120
- * with; the runtime raises it from what the cut reports
168
+ * with; each view raises its own from what its cut reports
121
169
  * @param {number} [options.max_iteration_ceiling] as far as that raising may go
122
170
  * @param {number} [options.descent_steps] steps of the descent one traversal dispatch runs
123
171
  * before handing back what it still holds; see the traversal kernel for why it cannot
@@ -153,10 +201,10 @@ export class GPUVirtualGeometryRuntime {
153
201
  */
154
202
  queue_capacity = 1 << 16,
155
203
  /*
156
- Where the wavefront bound *starts*. It is raised by the runtime itself when a
157
- reading says the descent could not finish — see {@link note_incomplete_descent}
158
- — so this is the cost a scene pays until it has been told otherwise rather than
159
- a limit anyone has to get right in advance.
204
+ Where every view's wavefront bound *starts*. Each view raises its own when a
205
+ reading says its descent could not finish — see
206
+ `VGeoViewCut.note_incomplete_descent` — so this is the cost a view pays until it
207
+ has been told otherwise rather than a limit anyone has to get right in advance.
160
208
 
161
209
  Eight is what almost every cut needs: one container at a modest viewport drains
162
210
  in six. A converted scene at 3441×1440 does not, and nothing on the host can
@@ -199,8 +247,6 @@ export class GPUVirtualGeometryRuntime {
199
247
  this.#max_iterations = max_iterations;
200
248
  this.#iteration_ceiling = Math.max(max_iterations, max_iteration_ceiling);
201
249
  this.#descent_steps = descent_steps;
202
-
203
-
204
250
  }
205
251
 
206
252
  /**
@@ -234,11 +280,8 @@ export class GPUVirtualGeometryRuntime {
234
280
  }
235
281
 
236
282
  /**
237
- * Wavefronts the descent may run, as the runtime currently understands this scene.
238
- *
239
- * A **high-water mark**, not a setting: it starts where the host put it and is raised by
240
- * {@link note_incomplete_descent} from what the cut reports. `graph_vgeo_expand_instances_to_meshlets`
241
- * reads it while it is recording passes, so a rise lands on the next frame.
283
+ * Wavefronts a view's descent starts with — each view raises its own from what its cut reports
284
+ * (`VGeoViewCut.note_incomplete_descent`), and cuts at the larger of the two.
242
285
  *
243
286
  * @returns {number}
244
287
  */
@@ -247,64 +290,14 @@ export class GPUVirtualGeometryRuntime {
247
290
  }
248
291
 
249
292
  /**
250
- * Times the bound has been raised. Zero for the whole life of almost every scene; a small
251
- * number, once, for one that needed more than it was given.
293
+ * As far as a view's wavefront bound may be raised.
252
294
  *
253
295
  * @returns {number}
254
296
  */
255
- get iteration_escalations() {
256
- return this.#iteration_escalations;
257
- }
258
-
259
- /**
260
- * @returns {number}
261
- */
262
297
  get iteration_ceiling() {
263
298
  return this.#iteration_ceiling;
264
299
  }
265
300
 
266
- /**
267
- * A reading saying the descent stopped with work still queued — raise the bound and keep it
268
- * raised.
269
- *
270
- * **This is the only place the engine can learn it.** How many wavefronts a cut needs is a
271
- * function of the frontier's *breadth*, which is a function of the scene, the viewpoint and the
272
- * render target together; the kernel cannot know it before it runs and the host cannot know it
273
- * at all. So the bound is guessed low, and the one reading that says the guess was wrong —
274
- * `VGEO_CUT_STAT.QUEUE_REMAINING`, non-zero exactly when items were abandoned — pays for
275
- * correcting it. It is the same shape as the rasterizer's meshlet counts, which cannot be known
276
- * before the expansion runs either and are grown from what the frame reported.
277
- *
278
- * **Doubling, because the reading does not say how much more was needed.** A remainder is a
279
- * count of *items*, and what they cost in wavefronts depends on how they spill; there is no
280
- * ratio to convert one into the other. So it goes up by a factor until it drains, which is at
281
- * most three steps from 8 to the ceiling.
282
- *
283
- * **Never lowered.** A frame that drained is evidence about that frame, not that the scene got
284
- * smaller — and a bound that fell back would re-learn the same lesson every time the camera
285
- * turned away and back, at a hole a time. An unused wavefront is an empty indirect dispatch,
286
- * which is the cheap side of that trade.
287
- *
288
- * What it costs when it is wrong is bounded by the readback: the cut is capped at two readings
289
- * in flight and skips frames when saturated, so the scene draws with a hole for the few frames
290
- * between the first truncated descent and the reading that reports it — and then never again.
291
- *
292
- * @param {number} remaining items the descent still held when it was abandoned
293
- * @returns {boolean} whether the bound moved
294
- */
295
- note_incomplete_descent(remaining) {
296
- assert.isNonNegativeInteger(remaining, 'remaining');
297
-
298
- if (remaining === 0 || this.#max_iterations >= this.#iteration_ceiling) {
299
- return false;
300
- }
301
-
302
- this.#max_iterations = Math.min(this.#max_iterations * 2, this.#iteration_ceiling);
303
- this.#iteration_escalations++;
304
-
305
- return true;
306
- }
307
-
308
301
  /**
309
302
  * Steps of the descent one traversal dispatch runs.
310
303
  *
@@ -317,7 +310,7 @@ export class GPUVirtualGeometryRuntime {
317
310
  /**
318
311
  * Settable, like tau, and for the same reason: it is a quality-of-schedule dial whose right
319
312
  * value is a property of the asset's depth and the scene's breadth together rather than of the
320
- * engine. `begin_frame` re-writes the params every frame, so a change lands on the next one.
313
+ * engine. Every view writes its params at record time, so a change lands on the next frame.
321
314
  *
322
315
  * @param {number} value
323
316
  */
@@ -329,32 +322,31 @@ export class GPUVirtualGeometryRuntime {
329
322
  }
330
323
 
331
324
  /**
332
- * This frame's feedback resource. Every expansion site writes into it and one readback reads it.
333
- * @returns {number}
325
+ * Whether a frame is open — whether a rasterization path recording now may cut.
326
+ *
327
+ * @returns {boolean}
334
328
  */
335
- get feedback() {
336
- return this.#feedback;
329
+ get frame_open() {
330
+ return this.#frame_open;
337
331
  }
338
332
 
339
333
  /**
340
- * Hand back the version of the feedback resource that an expansion left behind.
341
- *
342
- * A frame is cut once per bucket per HZB pass per view, and every one of those writes into the
343
- * *same* feedback buffer — which is exactly what dedups a touch across them. But a FrameGraph
344
- * resource is versioned: the handle `begin_frame` created is version 0, and a second expansion
345
- * that wrote version 0 again after the first had produced version 65 would be reading stale
346
- * contents while claiming not to. The graph says so, loudly, and it is right to.
334
+ * The view the last frame was opened for, which is slot 0 of that frame's feedback.
347
335
  *
348
- * So the runtime carries the *current* version and each expansion publishes what it produced.
349
- * The readback then reads the last one, which is the only version that has seen every view.
350
- *
351
- * @param {number} handle
352
- * @returns {void}
336
+ * @returns {VGeoViewCut|undefined}
353
337
  */
354
- publish_feedback(handle) {
355
- assert.isNonNegativeInteger(handle, 'handle');
338
+ get frame_view() {
339
+ return this.#frame_view;
340
+ }
356
341
 
357
- this.#feedback = handle;
342
+ /**
343
+ * The feedback buffer every view of a frame writes into, or null before the first frame and
344
+ * after {@link destroy}.
345
+ *
346
+ * @returns {GPUBuffer|null}
347
+ */
348
+ get feedback_buffer() {
349
+ return this.#feedback_buffer;
358
350
  }
359
351
 
360
352
  /**
@@ -365,12 +357,12 @@ export class GPUVirtualGeometryRuntime {
365
357
  }
366
358
 
367
359
  /**
368
- * Open a frame: publish the page tables, size the feedback buffer against what is resident, and
369
- * write the parameters every pass of every view will read.
360
+ * Open a frame: publish the page tables, lay the feedback buffer out for the views the frame is
361
+ * expected to have, and take slot 0 for the view it is rendered for.
370
362
  *
371
- * The sizing happens here rather than at construction because one of its terms moves with
372
- * residency — one touch bit per page-table row — and a frame is the coarsest granularity at
373
- * which it holds still.
363
+ * The sizing happens here rather than at construction because two of its terms move — one
364
+ * touch bit per page-table row follows residency, and the slot count follows the most views any
365
+ * frame has cut in — and a frame is the coarsest granularity at which they hold still.
374
366
  *
375
367
  * **The pool's frame advances here, before the flush**, and not at `end_frame`. The frame
376
368
  * number is what stamps a page row's `visible_from` — the frame whose flush publishes the
@@ -379,34 +371,43 @@ export class GPUVirtualGeometryRuntime {
379
371
  * frame's reading, exactly (RUNTIME_PLAN_2026_09_14 §2.4). It is also the clock both tiers'
380
372
  * protect windows read, and it moves whether or not a readback is scheduled this frame.
381
373
  *
382
- * **A frame has no projection.** It used to take one, and wrote it into a params buffer
383
- * every view then shared — so a shadow cascade cut against whichever view opened the
384
- * frame. `projection_k` is a property of a render target and a camera, which is to say of
385
- * a view, and it lives on {@link VGeoViewCut} with the rest of what a view owns alone.
374
+ * **A frame has no projection and no graph.** Each view writes its own projection
375
+ * ({@link VGeoViewCut}), and each graph that cuts imports the feedback buffer itself
376
+ * ({@link feedback_in}).
377
+ *
378
+ * Opening a frame that is already open starts it again: a render that threw before closing its
379
+ * frame leaves nothing behind that the next one can be confused by.
386
380
  *
387
381
  * @param {Object} options
388
- * @param {FrameGraph} options.graph
389
- * @returns {number} the feedback resource
382
+ * @param {VGeoViewCut} options.view the view the frame is rendered for
383
+ * @returns {void}
390
384
  */
391
- begin_frame({ graph }) {
392
- assert.defined(graph, 'graph');
385
+ begin_frame({ view }) {
386
+ assert.defined(view, 'view');
393
387
 
394
388
  this.#pool.advance_frame();
395
389
  this.#pool.flush();
396
390
 
391
+ const slot_count = Math.min(this.#slot_high_water, SLOT_CEILING);
392
+
397
393
  this.#layout = vgeo_cut_feedback_layout({
398
394
  page_row_capacity: this.#pool.page_row_capacity,
399
395
  want_capacity: this.#want_capacity,
396
+ slot_count,
400
397
  });
401
398
 
402
- const spawn = graph.add('vgeo/frame', {}, noop);
399
+ this.#ensure_feedback_buffer(this.#layout.word_count * 4);
403
400
 
404
- this.#feedback = spawn.create('vgeo feedback', BufferResourceDescriptor.empty(
405
- this.#layout.word_count * 4,
406
- GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC
407
- ));
401
+ this.#imports.clear();
402
+ this.#cleared = false;
408
403
 
409
- this.#graph = graph;
404
+ this.#slot_of.clear();
405
+ this.#slots = [];
406
+
407
+ this.#frame_view = view;
408
+ this.#frame_open = true;
409
+
410
+ this.slot_of(view);
410
411
 
411
412
  /*
412
413
  Nothing until an expansion site says what it was handed. Zero is the safe start: a kernel
@@ -415,8 +416,150 @@ export class GPUVirtualGeometryRuntime {
415
416
  */
416
417
  this.#instance_capacity = 0;
417
418
  this.#meshlet_capacity = 0;
419
+ }
420
+
421
+ /**
422
+ * @param {number} bytes
423
+ */
424
+ #ensure_feedback_buffer(bytes) {
425
+ const existing = this.#feedback_buffer;
426
+
427
+ if (existing !== null && existing.size >= bytes) {
428
+ return;
429
+ }
430
+
431
+ existing?.destroy();
432
+
433
+ // to the next power of two, so a tier filling a page row at a time re-makes it rarely
434
+ const size = Math.max(256, 2 ** Math.ceil(Math.log2(bytes)));
435
+
436
+ this.#feedback_buffer = this.#pool.device.createBuffer({
437
+ label: 'vgeo feedback',
438
+ size,
439
+ usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST,
440
+ });
441
+ }
442
+
443
+ /**
444
+ * This frame's slot for a view, taking the next one the first time the view cuts in the frame.
445
+ *
446
+ * A view past the slots the frame was laid out for shares the last one — never slot 0, which is
447
+ * the frame's own view's — and the next frame is laid out with room for it. A shared slot's
448
+ * counters are the sum of its views', so its reading lands on each of them but escalates none
449
+ * (see `VGeoFeedbackLoop`).
450
+ *
451
+ * @param {VGeoViewCut} view
452
+ * @returns {number}
453
+ */
454
+ slot_of(view) {
455
+ assert.equal(this.#frame_open, true, 'a slot is a slot of an open frame');
456
+
457
+ const known = this.#slot_of.get(view);
458
+
459
+ if (known !== undefined) {
460
+ return known;
461
+ }
462
+
463
+ const requested = this.#slot_of.size;
464
+
465
+ this.#slot_high_water = Math.max(this.#slot_high_water, requested + 1);
466
+
467
+ const slot = Math.min(requested, this.#layout.slot_count - 1);
468
+
469
+ this.#slot_of.set(view, slot);
470
+
471
+ if (this.#slots[slot] === undefined) {
472
+ this.#slots[slot] = [];
473
+ }
474
+
475
+ this.#slots[slot].push(view);
476
+
477
+ return slot;
478
+ }
479
+
480
+ /**
481
+ * The tag a slot's view writes into the want stamps, unique to that view in this frame and never
482
+ * zero — see `VGEO_CUT_PARAMS_STRUCT.frame_tag`.
483
+ *
484
+ * @param {number} slot
485
+ * @returns {number}
486
+ */
487
+ frame_tag_of(slot) {
488
+ return ((this.#pool.frame * SLOT_CEILING + slot + 1) >>> 0) || 1;
489
+ }
490
+
491
+ /**
492
+ * This frame's views, by slot — what a reading of this frame's feedback is about. A copy, since
493
+ * the reading lands frames later and the table is rebuilt every frame.
494
+ *
495
+ * @returns {VGeoViewCut[][]}
496
+ */
497
+ frame_slots() {
498
+ return this.#slots.map(views => views.slice());
499
+ }
500
+
501
+ /**
502
+ * The feedback buffer as a resource of `graph`, at the version that graph last wrote.
503
+ *
504
+ * The first call for a graph imports the buffer into it; if no graph of this frame has yet, it
505
+ * also records the clear — the counters and the touch bits, which is everything a kernel adds
506
+ * to — so the first graph encoded is the one that clears, before anything of this frame writes.
507
+ *
508
+ * @param {FrameGraph} graph
509
+ * @returns {number} resource handle
510
+ */
511
+ feedback_in(graph) {
512
+ assert.equal(this.#frame_open, true, 'the feedback buffer is a buffer of an open frame');
513
+
514
+ const known = this.#imports.get(graph);
515
+
516
+ if (known !== undefined) {
517
+ return known;
518
+ }
519
+
520
+ const buffer = this.#feedback_buffer;
521
+
522
+ let handle = graph.import_resource(
523
+ 'vgeo feedback', BufferResourceDescriptor.fromBuffer(buffer), buffer
524
+ );
525
+
526
+ if (!this.#cleared) {
527
+ const bytes = this.#layout.clear_word_count * 4;
528
+
529
+ const data = {};
530
+
531
+ const pass = graph.add('vgeo/frame clear', data, (data, resources, context) => {
532
+ context.encoder.clearBuffer(resources.get(data.feedback), 0, bytes);
533
+ });
534
+
535
+ handle = data.feedback = pass.write(handle);
536
+
537
+ this.#cleared = true;
538
+ }
418
539
 
419
- return this.#feedback;
540
+ this.#imports.set(graph, handle);
541
+
542
+ return handle;
543
+ }
544
+
545
+ /**
546
+ * Hand back the version of the feedback resource a graph's expansion left behind.
547
+ *
548
+ * A FrameGraph resource is versioned: the handle an import produced is its first version, and a
549
+ * second expansion that wrote that version again after the first had produced a later one would
550
+ * be reading stale contents while claiming not to. The graph says so, loudly, and it is right to.
551
+ * So the runtime carries each graph's current version and each expansion publishes what it
552
+ * produced; the readback then reads the last one.
553
+ *
554
+ * @param {FrameGraph} graph
555
+ * @param {number} handle
556
+ * @returns {void}
557
+ */
558
+ publish_feedback(graph, handle) {
559
+ assert.isNonNegativeInteger(handle, 'handle');
560
+ assert.equal(this.#imports.has(graph), true, 'the graph never imported the feedback buffer');
561
+
562
+ this.#imports.set(graph, handle);
420
563
  }
421
564
 
422
565
  /**
@@ -427,10 +570,9 @@ export class GPUVirtualGeometryRuntime {
427
570
  * defaulted to 1 << 20 against a meshlet collection whose engine default is 2e5, so `vg_draw`
428
571
  * bounds-checked against a number five times the buffer it was writing into (REVIEW_LEDGER M6).
429
572
  *
430
- * One params buffer serves the whole frame, so a frame with sites of different sizes takes the
431
- * **minimum** — conservative, and the direction every other bound in the cut fails in. Written
432
- * at record time, like everything else here, so the last value published before submit is what
433
- * every pass of the frame executes against.
573
+ * A frame with sites of different sizes takes the **minimum** — conservative, and the direction
574
+ * every other bound in the cut fails in. Each view writes its params at record time from what
575
+ * has been declared so far, which is never more than its own site was handed.
434
576
  *
435
577
  * @param {Object} options
436
578
  * @param {number} options.instance_capacity records the VG instance buffer holds
@@ -465,29 +607,29 @@ export class GPUVirtualGeometryRuntime {
465
607
  }
466
608
 
467
609
  /**
468
- * The graph this frame was opened on.
469
- *
470
- * A cut writes into the feedback resource `begin_frame` created, and a resource handle belongs
471
- * to one graph — so a rasterization path running on a *different* graph inside the same frame
472
- * (a shadow view builds its own) would be naming a resource that graph has never heard of. The
473
- * seam checks this and skips, which is also design §9's position: one cut per view, and shadow
474
- * cuts are out of scope for v1.
610
+ * Close a frame. Nothing may cut until the next opens; reading it is {@link VGeoFeedbackLoop}'s,
611
+ * which schedules the readback while the last graph is still being recorded.
475
612
  *
476
- * @returns {FrameGraph|undefined}
613
+ * @returns {void}
477
614
  */
478
- get frame_graph() {
479
- return this.#graph;
615
+ end_frame() {
616
+ this.#frame_open = false;
617
+ this.#imports.clear();
480
618
  }
481
619
 
482
-
483
620
  /**
484
- * Close a frame. The feedback resource stops being valid; reading it is
485
- * {@link VGeoFeedbackLoop}'s, which schedules the readback while the graph is still being built.
621
+ * Release the feedback buffer, which is the one device resource this makes, and close whatever
622
+ * frame is open so that nothing cuts into the buffer afterwards.
623
+ *
624
+ * The pool is not this runtime's to release: it was handed one, and whoever made it tears it
625
+ * down — after this, since a frame of this runtime writes into the pool's tables.
486
626
  *
487
627
  * @returns {void}
488
628
  */
489
- end_frame() {
490
- this.#feedback = -1;
491
- this.#graph = undefined;
629
+ destroy() {
630
+ this.end_frame();
631
+
632
+ this.#feedback_buffer?.destroy();
633
+ this.#feedback_buffer = null;
492
634
  }
493
635
  }
@@ -214,6 +214,36 @@ Two things this pass could not prove below the drive, written down rather than c
214
214
  reaches the residency manager and that a page arriving after an abort installs nothing. It cannot
215
215
  prove that a host tears the loop down, because there is one host and it is a demo. This is M12's
216
216
  shape exactly, and it stays open until an engine-side owner exists.
217
+
218
+ **Closed, in two halves (2026-09-28).** *Ownership*, `28035083b`: the scene context constructs the
219
+ loop and the renderer opens and closes each VG frame (SHADOW_PLAN_2026_09_28 §2.1). *Teardown*,
220
+ `7a9e14fea`: `GPUSceneContext.destroy()` releases everything `enable_virtual_geometry` built, in
221
+ dependency order — the loop and the residency, the fetcher and its workers (the context made it,
222
+ so the residency never released it), then the runtime's feedback buffer (through the runtime's
223
+ new `destroy()`) and the pool — idempotently, and as a no-op when VG was never enabled. The
224
+ scene's own TLAS, volumetrics, volumetric light map and probe-volume mesh BVH were not released
225
+ either way, which was not VG's and predated it; `fab3fd38e` (2026-09-29) releases them, and
226
+ `3685e5bec` stops the scene's teardown giving its rows back one at a time. The hosts' `pagehide`
227
+ stops the frame loop and destroys the renderer and then its device, and nothing VG-specific
228
+ (`87add5e70`, `f9107e835`).
229
+
230
+ What it took besides, each red first:
231
+ - `c3fe2bf3f`: a fetch still queued in the residency's gate started after its container was
232
+ unregistered, and behind a destroyed fetcher it spawned the worker pool again.
233
+ - An adversarial review of the above found four more. `e82476c26`: a reading in flight at
234
+ teardown landed on destroyed views and an emptied residency, or was logged as a failed readback;
235
+ a destroyed loop now drops it. `1beafcb9e`: a throw partway through `enable_virtual_geometry`
236
+ left a runtime with no loop, and `destroy()` then threw before the rest of the scene; the four
237
+ are installed together now. `3d241c331`: a destroyed fetcher's next `fetch()` spawned the pool
238
+ again; it refuses now. `f9107e835`: the hosts released neither the loop nor the device.
239
+
240
+ Tested by `scene/GPUSceneContext.destroy.spec.js` (buffers on the software device, aborted reads,
241
+ terminated workers, a failed enable, a second destroy) and the residency, loop and fetcher specs'
242
+ own tests. Each teardown call removed in turn turns a spec red except the scene's call to the
243
+ loop's `destroy()`: the scene spec schedules no reading, and the loop's spec is what holds that
244
+ method. Tier 4: `vgeo_runtime` under headless Chrome, 126 frames and 7 worker fetches in, a
245
+ `pagehide` left no VG, no feedback buffer, no resident page, nothing in flight and a frame counter
246
+ that stopped.
217
247
  - **U2 — nothing below the drive executes a cut through the seam.** The software device runs copies
218
248
  and not shaders, so `graph_vgeo_expand.spec.js` proves what the seam *records* — the passes, the
219
249
  resource behind each handle, the version chain, the capacities that reach the runtime — and
@@ -258,7 +258,10 @@ reader keeps decode, its page map, and quarantine.
258
258
  `GPUSceneContext.enable_virtual_geometry` constructs the pool, the runtime, **and the residency and
259
259
  the feedback loop** *(rev 2)*, from an options object with a `residency` key rather than one
260
260
  spread; the playground stops building any of them and wires only the two frame extensions. That
261
- closes REVIEW_LEDGER U1: an engine host gets the loop by enabling virtual geometry.
261
+ closes REVIEW_LEDGER U1: an engine host gets the loop by enabling virtual geometry. *(2026-09-28:
262
+ construction only — hosts still drove the frame and tore the loop down by hand. The engine drives
263
+ it since SHADOW_PLAN_2026_09_28 §2.1, `28035083b`, and releases it since `7a9e14fea`; REVIEW_LEDGER
264
+ U1 records both.)*
262
265
 
263
266
  ### 4.1 State
264
267