@woosh/meep-engine 3.58.0 → 3.59.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 (609) hide show
  1. package/editor/particles/effect/ParticleEffectDocument.d.ts +162 -43
  2. package/editor/particles/effect/ParticleEffectDocument.d.ts.map +1 -1
  3. package/editor/particles/effect/ParticleEffectDocument.js +450 -43
  4. package/editor/particles/effect/ParticleReferenceSimulation.d.ts +12 -3
  5. package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
  6. package/editor/particles/effect/ParticleReferenceSimulation.js +78 -23
  7. package/editor/particles/effect/make_starter_particle_effect.js +17 -17
  8. package/editor/view/particles/effect/ParticleEmitterInspectorView.d.ts +3 -3
  9. package/editor/view/particles/effect/ParticleEmitterInspectorView.d.ts.map +1 -1
  10. package/editor/view/particles/effect/ParticleEmitterInspectorView.js +224 -67
  11. package/editor/view/particles/effect/ParticleGraphEditorView.d.ts.map +1 -1
  12. package/editor/view/particles/effect/ParticleGraphEditorView.js +44 -11
  13. package/editor/view/particles/effect/ParticleNodeParametersView.d.ts +2 -1
  14. package/editor/view/particles/effect/ParticleNodeParametersView.d.ts.map +1 -1
  15. package/editor/view/particles/effect/ParticleNodeParametersView.js +46 -16
  16. package/editor/view/particles/effect/ParticlePreviewView.js +2 -2
  17. package/editor/view/particles/effect/particle-editor.css +77 -68
  18. package/package.json +1 -1
  19. package/src/engine/Engine.d.ts.map +1 -1
  20. package/src/engine/Engine.js +2 -2
  21. package/src/engine/ecs/EntityManager.d.ts +29 -5
  22. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  23. package/src/engine/ecs/EntityManager.js +37 -1
  24. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  25. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +4 -0
  26. package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts +74 -17
  27. package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts.map +1 -1
  28. package/src/engine/graphics/ecs/particles/ParticleEffect.js +156 -25
  29. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts +13 -3
  30. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts.map +1 -1
  31. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.js +59 -13
  32. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts +3 -3
  33. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.js +9 -9
  34. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_2_3.d.ts +15 -0
  35. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_2_3.d.ts.map +1 -0
  36. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_2_3.js +78 -0
  37. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +2 -0
  38. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
  39. package/src/engine/graphics/ecs/trail3d/Trail3D.js +2 -0
  40. package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.js +1 -1
  41. package/src/engine/graphics/ecs/trail3d/seed_trail_tube.js +1 -1
  42. package/src/engine/graphics/trail/tube/TubeX.d.ts +5 -3
  43. package/src/engine/graphics/trail/tube/TubeX.d.ts.map +1 -1
  44. package/src/engine/graphics/trail/tube/TubeX.js +5 -3
  45. package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts +3 -2
  46. package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts.map +1 -1
  47. package/src/engine/graphics/trail/tube/tube_attributes_spec.js +9 -8
  48. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +65 -4
  49. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  50. package/src/engine/graphics3/GPUParticleEmitterSystem.js +1351 -904
  51. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +1 -1
  52. package/src/engine/graphics3/trail/trail_tube_write_geometry.js +13 -13
  53. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  54. package/src/generation/foliage/FOLIAGE_DESIGN.md +26 -5
  55. package/src/generation/foliage/LOD_REWORK_BRIEF_2026_10_27.md +35 -0
  56. package/src/generation/foliage/SELF_ORGANIZING_FRAMEWORK_BRIEF_2026_10_26.md +2 -1
  57. package/src/generation/foliage/TWO_FRONT_ENDS_BRIEF_2026_10_28.md +552 -0
  58. package/src/generation/foliage/analysis/tree_crown_opacity.d.ts.map +1 -1
  59. package/src/generation/foliage/analysis/tree_crown_opacity.js +2 -1
  60. package/src/generation/foliage/analysis/tree_render_cost.d.ts +5 -3
  61. package/src/generation/foliage/analysis/tree_render_cost.d.ts.map +1 -1
  62. package/src/generation/foliage/analysis/tree_render_cost.js +8 -7
  63. package/src/generation/foliage/asset/TreeAsset.d.ts +17 -0
  64. package/src/generation/foliage/asset/TreeAsset.d.ts.map +1 -1
  65. package/src/generation/foliage/asset/TreeAsset.js +20 -0
  66. package/src/generation/foliage/asset/TreeSpeciesCache.d.ts +69 -0
  67. package/src/generation/foliage/asset/TreeSpeciesCache.d.ts.map +1 -0
  68. package/src/generation/foliage/asset/TreeSpeciesCache.js +147 -0
  69. package/src/generation/foliage/asset/generate_tree.d.ts +10 -0
  70. package/src/generation/foliage/asset/generate_tree.d.ts.map +1 -1
  71. package/src/generation/foliage/asset/generate_tree.js +57 -29
  72. package/src/generation/foliage/asset/place_tree.d.ts +2 -1
  73. package/src/generation/foliage/asset/place_tree.d.ts.map +1 -1
  74. package/src/generation/foliage/asset/place_tree.js +2 -1
  75. package/src/generation/foliage/asset/tree_lod_plan.d.ts +4 -2
  76. package/src/generation/foliage/asset/tree_lod_plan.d.ts.map +1 -1
  77. package/src/generation/foliage/asset/tree_lod_plan.js +12 -14
  78. package/src/generation/foliage/asset/tree_shoot_instances.d.ts +119 -0
  79. package/src/generation/foliage/asset/tree_shoot_instances.d.ts.map +1 -0
  80. package/src/generation/foliage/asset/tree_shoot_instances.js +410 -0
  81. package/src/generation/foliage/asset/tree_shoot_prototypes.d.ts +155 -0
  82. package/src/generation/foliage/asset/tree_shoot_prototypes.d.ts.map +1 -0
  83. package/src/generation/foliage/asset/tree_shoot_prototypes.js +251 -0
  84. package/src/generation/foliage/config/TreeGrowth.d.ts +10 -0
  85. package/src/generation/foliage/config/TreeGrowth.d.ts.map +1 -0
  86. package/src/generation/foliage/config/TreeGrowth.js +18 -0
  87. package/src/generation/foliage/config/TreeLODConfig.d.ts +6 -0
  88. package/src/generation/foliage/config/TreeLODConfig.d.ts.map +1 -1
  89. package/src/generation/foliage/config/TreeLODConfig.js +7 -0
  90. package/src/generation/foliage/index.d.ts +3 -0
  91. package/src/generation/foliage/index.js +3 -0
  92. package/src/generation/foliage/material/foliage_tile.d.ts +6 -6
  93. package/src/generation/foliage/material/foliage_tile.js +3 -3
  94. package/src/generation/foliage/material/tree_cluster_atlas.d.ts +44 -0
  95. package/src/generation/foliage/material/tree_cluster_atlas.d.ts.map +1 -0
  96. package/src/generation/foliage/material/tree_cluster_atlas.js +37 -0
  97. package/src/generation/foliage/mesh/foliage_collect_attachments.js +2 -2
  98. package/src/generation/foliage/mesh/foliage_scale_spread.d.ts +14 -0
  99. package/src/generation/foliage/mesh/foliage_scale_spread.d.ts.map +1 -0
  100. package/src/generation/foliage/mesh/foliage_scale_spread.js +15 -0
  101. package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts +8 -7
  102. package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts.map +1 -1
  103. package/src/generation/foliage/mesh/tree_cluster_representatives.js +85 -40
  104. package/src/generation/foliage/mesh/tree_clusters.d.ts +26 -5
  105. package/src/generation/foliage/mesh/tree_clusters.d.ts.map +1 -1
  106. package/src/generation/foliage/mesh/tree_clusters.js +52 -39
  107. package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts.map +1 -1
  108. package/src/generation/foliage/mesh/tree_mesh_build_bark.js +32 -54
  109. package/src/generation/foliage/presets/make_tree_species_preset.d.ts +6 -1
  110. package/src/generation/foliage/presets/make_tree_species_preset.d.ts.map +1 -1
  111. package/src/generation/foliage/presets/make_tree_species_preset.js +157 -3
  112. package/src/generation/foliage/skeleton/TreeSkeleton.d.ts +19 -0
  113. package/src/generation/foliage/skeleton/TreeSkeleton.d.ts.map +1 -1
  114. package/src/generation/foliage/skeleton/TreeSkeleton.js +41 -0
  115. package/src/generation/foliage/skeleton/tree_skeleton_compute_joint_mechanics.d.ts +5 -0
  116. package/src/generation/foliage/skeleton/tree_skeleton_compute_joint_mechanics.d.ts.map +1 -1
  117. package/src/generation/foliage/skeleton/tree_skeleton_compute_joint_mechanics.js +8 -1
  118. package/src/generation/foliage/skeleton/tree_skeleton_copy_branches.d.ts +70 -0
  119. package/src/generation/foliage/skeleton/tree_skeleton_copy_branches.d.ts.map +1 -0
  120. package/src/generation/foliage/skeleton/tree_skeleton_copy_branches.js +171 -0
  121. package/src/generation/foliage/skeleton/tree_skeleton_extend_branch.d.ts +17 -0
  122. package/src/generation/foliage/skeleton/tree_skeleton_extend_branch.d.ts.map +1 -0
  123. package/src/generation/foliage/skeleton/tree_skeleton_extend_branch.js +79 -0
  124. package/src/generation/foliage/skeleton/tree_skeleton_fit_crown_frame.d.ts +12 -0
  125. package/src/generation/foliage/skeleton/tree_skeleton_fit_crown_frame.d.ts.map +1 -0
  126. package/src/generation/foliage/skeleton/tree_skeleton_fit_crown_frame.js +56 -0
  127. package/src/generation/foliage/skeleton/tree_skeleton_floor_girth.d.ts +11 -0
  128. package/src/generation/foliage/skeleton/tree_skeleton_floor_girth.d.ts.map +1 -0
  129. package/src/generation/foliage/skeleton/tree_skeleton_floor_girth.js +38 -0
  130. package/src/generation/foliage/skeleton/tree_skeleton_grow.d.ts +4 -11
  131. package/src/generation/foliage/skeleton/tree_skeleton_grow.d.ts.map +1 -1
  132. package/src/generation/foliage/skeleton/tree_skeleton_grow.js +8 -2034
  133. package/src/generation/foliage/skeleton/tree_skeleton_grow_framework.d.ts +22 -0
  134. package/src/generation/foliage/skeleton/tree_skeleton_grow_framework.d.ts.map +1 -0
  135. package/src/generation/foliage/skeleton/tree_skeleton_grow_framework.js +2050 -0
  136. package/src/generation/foliage/skeleton/tree_skeleton_grow_shoots.d.ts +10 -0
  137. package/src/generation/foliage/skeleton/tree_skeleton_grow_shoots.d.ts.map +1 -1
  138. package/src/generation/foliage/skeleton/tree_skeleton_grow_shoots.js +27 -56
  139. package/src/shade/descriptor/pipeline/render/DepthStencilState.d.ts +4 -0
  140. package/src/shade/descriptor/pipeline/render/DepthStencilState.d.ts.map +1 -1
  141. package/src/shade/descriptor/pipeline/render/DepthStencilState.js +170 -144
  142. package/src/shade/descriptor/pipeline/render/MultisampleState.d.ts +4 -0
  143. package/src/shade/descriptor/pipeline/render/MultisampleState.d.ts.map +1 -1
  144. package/src/shade/descriptor/pipeline/render/MultisampleState.js +78 -65
  145. package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
  146. package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +176 -172
  147. package/src/shade/descriptor/pipeline/render/StencilFaceState.d.ts +4 -0
  148. package/src/shade/descriptor/pipeline/render/StencilFaceState.d.ts.map +1 -1
  149. package/src/shade/descriptor/pipeline/render/StencilFaceState.js +107 -88
  150. package/src/shade/playground/particle_ecs/README.md +9 -8
  151. package/src/shade/playground/particle_ecs/bonfire_editor.js +3 -3
  152. package/src/shade/playground/particle_ecs/bonfire_effects.d.ts +6 -6
  153. package/src/shade/playground/particle_ecs/bonfire_effects.js +6 -6
  154. package/src/shade/playground/particle_editor/README.md +14 -11
  155. package/src/shade/playground/particle_system/particle_prototype.js +18 -18
  156. package/src/shade/playground/particle_system/particle_scene.js +13 -13
  157. package/src/shade/playground/probe_clipmap/README.md +42 -0
  158. package/src/shade/playground/probe_clipmap/index.html +178 -0
  159. package/src/shade/playground/probe_clipmap/main.d.ts +8 -0
  160. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -0
  161. package/src/shade/playground/probe_clipmap/main.js +360 -0
  162. package/src/shade/renderer/Renderer.d.ts +3 -1
  163. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  164. package/src/shade/renderer/Renderer.js +94 -38
  165. package/src/shade/renderer/extension/ViewTextures.d.ts +2 -1
  166. package/src/shade/renderer/extension/ViewTextures.d.ts.map +1 -1
  167. package/src/shade/renderer/extension/ViewTextures.js +2 -1
  168. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  169. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  170. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
  171. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  172. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  173. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +34 -12
  174. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  175. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +56 -15
  176. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +2 -2
  177. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  178. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +13 -26
  179. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +25 -2
  180. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
  181. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +54 -32
  182. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.d.ts +14 -0
  183. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.d.ts.map +1 -0
  184. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.js +37 -0
  185. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.d.ts.map +1 -1
  186. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.js +16 -0
  187. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
  188. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -6
  189. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_descent.d.ts +131 -0
  190. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_descent.d.ts.map +1 -0
  191. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_descent.js +467 -0
  192. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +24 -0
  193. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts.map +1 -0
  194. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +111 -0
  195. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_rule.d.ts +42 -0
  196. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_rule.d.ts.map +1 -0
  197. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_rule.js +404 -0
  198. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_stat.d.ts +16 -0
  199. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_stat.d.ts.map +1 -0
  200. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_stat.js +23 -0
  201. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_want.d.ts +17 -0
  202. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_want.d.ts.map +1 -0
  203. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_want.js +65 -0
  204. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
  205. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +14 -70
  206. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
  207. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +13 -773
  208. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_cut_descent.d.ts +55 -0
  209. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_cut_descent.d.ts.map +1 -0
  210. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_cut_descent.js +248 -0
  211. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
  212. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +15 -174
  213. package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_probe_meta_pick2.d.ts.map +1 -1
  214. package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_probe_meta_pick2.js +8 -24
  215. package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_forward_indirect.d.ts.map +1 -1
  216. package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_forward_indirect.js +1 -25
  217. package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.d.ts.map +1 -1
  218. package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.js +5 -23
  219. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +25 -4
  220. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  221. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +126 -8
  222. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +832 -4
  223. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +7 -0
  224. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts.map +1 -1
  225. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js +8 -0
  226. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +16 -0
  227. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  228. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +9 -0
  229. package/src/shade/renderer/global_illumination/probe_clipmap/brick/{mesh/chunk_mesh_brick_object.d.ts → chunk_brick_object.d.ts} +8 -8
  230. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_object.d.ts.map +1 -0
  231. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_object.js +42 -0
  232. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_provider.d.ts +45 -0
  233. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_provider.d.ts.map +1 -0
  234. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_provider.js +93 -0
  235. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.d.ts +0 -7
  236. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.d.ts.map +1 -1
  237. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.js +0 -8
  238. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -4
  239. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts.map +1 -1
  240. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js +5 -8
  241. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.d.ts.map +1 -1
  242. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.js +13 -22
  243. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts +99 -0
  244. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts.map +1 -0
  245. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.js +139 -0
  246. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts +65 -0
  247. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts.map +1 -0
  248. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.js +393 -0
  249. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts +17 -0
  250. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts.map +1 -0
  251. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.js +36 -0
  252. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts +29 -0
  253. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts.map +1 -0
  254. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.js +108 -0
  255. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts +31 -0
  256. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts.map +1 -0
  257. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.js +113 -0
  258. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts +36 -0
  259. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts.map +1 -0
  260. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.js +85 -0
  261. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts +23 -0
  262. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts.map +1 -0
  263. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.js +273 -0
  264. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts +13 -0
  265. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts.map +1 -0
  266. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.js +151 -0
  267. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts +13 -0
  268. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts.map +1 -0
  269. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.js +133 -0
  270. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts +22 -0
  271. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts.map +1 -0
  272. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.js +135 -0
  273. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +20 -6
  274. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  275. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +152 -10
  276. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +7 -0
  277. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  278. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +8 -0
  279. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +14 -2
  280. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  281. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +50 -5
  282. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts +19 -0
  283. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts.map +1 -0
  284. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js +40 -0
  285. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +72 -0
  286. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -0
  287. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +343 -0
  288. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts +29 -0
  289. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -0
  290. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +188 -0
  291. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +26 -0
  292. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts.map +1 -0
  293. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +132 -0
  294. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +4 -0
  295. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  296. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +26 -3
  297. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +3 -0
  298. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts.map +1 -1
  299. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +8 -1
  300. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts +12 -0
  301. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts.map +1 -0
  302. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.js +101 -0
  303. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts +1 -1
  304. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.js +1 -1
  305. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts +15 -0
  306. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -0
  307. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +175 -0
  308. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +26 -0
  309. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -0
  310. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +210 -0
  311. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.d.ts +3 -3
  312. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.js +3 -3
  313. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +2 -1
  314. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  315. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +5 -1
  316. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  317. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +3 -10
  318. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts +5 -9
  319. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts.map +1 -1
  320. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js +9 -110
  321. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +27 -0
  322. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts.map +1 -0
  323. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +110 -0
  324. package/src/shade/renderer/light/world_cluster/chunk_world_light_cluster_lookup.d.ts +13 -0
  325. package/src/shade/renderer/light/world_cluster/chunk_world_light_cluster_lookup.d.ts.map +1 -1
  326. package/src/shade/renderer/light/world_cluster/chunk_world_light_cluster_lookup.js +40 -0
  327. package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts +11 -6
  328. package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts.map +1 -1
  329. package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.js +15 -8
  330. package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.d.ts +9 -2
  331. package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.d.ts.map +1 -1
  332. package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.js +25 -11
  333. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  334. package/src/shade/renderer/particles/DESIGN.md +151 -42
  335. package/src/shade/renderer/particles/EMITTER_GLOBAL_STATE_PLAN_2026_10_29.md +283 -0
  336. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +10 -2
  337. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  338. package/src/shade/renderer/particles/GPUParticleSystem.js +46 -8
  339. package/src/shade/renderer/particles/ParticleConstants.d.ts +23 -6
  340. package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
  341. package/src/shade/renderer/particles/ParticleConstants.js +25 -6
  342. package/src/shade/renderer/particles/bounds/chunk_particle_bounds.js +5 -5
  343. package/src/shade/renderer/particles/bounds/shader_particle_bounds.js +187 -187
  344. package/src/shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.d.ts +20 -9
  345. package/src/shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.d.ts.map +1 -1
  346. package/src/shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.js +36 -10
  347. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts +8 -7
  348. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
  349. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +25 -16
  350. package/src/shade/renderer/particles/data/PARTICLE_FIELD_BINDING.d.ts +51 -0
  351. package/src/shade/renderer/particles/data/PARTICLE_FIELD_BINDING.d.ts.map +1 -0
  352. package/src/shade/renderer/particles/data/PARTICLE_FIELD_BINDING.js +56 -0
  353. package/src/shade/renderer/particles/data/particle_emitter_record.d.ts.map +1 -1
  354. package/src/shade/renderer/particles/data/particle_emitter_record.js +2 -0
  355. package/src/shade/renderer/particles/graph/ParticleGroupBuilder.d.ts +1 -1
  356. package/src/shade/renderer/particles/graph/ParticleGroupBuilder.js +1 -1
  357. package/src/shade/renderer/particles/graph/ParticleNodeDescription.d.ts +22 -11
  358. package/src/shade/renderer/particles/graph/ParticleNodeDescription.d.ts.map +1 -1
  359. package/src/shade/renderer/particles/graph/ParticleNodeDescription.js +14 -11
  360. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts +4 -4
  361. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts.map +1 -1
  362. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.js +59 -24
  363. package/src/shade/renderer/particles/graph/ParticleValueType.d.ts +3 -3
  364. package/src/shade/renderer/particles/graph/ParticleValueType.js +287 -287
  365. package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts +13 -6
  366. package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts.map +1 -1
  367. package/src/shade/renderer/particles/graph/compile_particle_graph.js +46 -27
  368. package/src/shade/renderer/particles/graph/infer_particle_graph_types.d.ts +8 -2
  369. package/src/shade/renderer/particles/graph/infer_particle_graph_types.d.ts.map +1 -1
  370. package/src/shade/renderer/particles/graph/infer_particle_graph_types.js +240 -234
  371. package/src/shade/renderer/particles/graph/make_particle_group.d.ts +1 -1
  372. package/src/shade/renderer/particles/graph/make_particle_group.js +1 -1
  373. package/src/shade/renderer/particles/graph/particle_graph_authoring.d.ts +3 -2
  374. package/src/shade/renderer/particles/graph/particle_graph_authoring.d.ts.map +1 -1
  375. package/src/shade/renderer/particles/graph/particle_graph_authoring.js +3 -2
  376. package/src/shade/renderer/particles/graph/particle_graph_distributions.js +170 -170
  377. package/src/shade/renderer/particles/graph/particle_graph_json.d.ts +25 -16
  378. package/src/shade/renderer/particles/graph/particle_graph_json.d.ts.map +1 -1
  379. package/src/shade/renderer/particles/graph/particle_graph_json.js +16 -2
  380. package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts +29 -15
  381. package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts.map +1 -1
  382. package/src/shade/renderer/particles/graph/particle_node_parameters.js +54 -22
  383. package/src/shade/renderer/particles/graph/particle_node_presentation.d.ts.map +1 -1
  384. package/src/shade/renderer/particles/graph/particle_node_presentation.js +18 -8
  385. package/src/shade/renderer/particles/graph/validate_particle_graph.d.ts +9 -2
  386. package/src/shade/renderer/particles/graph/validate_particle_graph.d.ts.map +1 -1
  387. package/src/shade/renderer/particles/graph/validate_particle_graph.js +70 -32
  388. package/src/shade/renderer/particles/graph_particles.d.ts +9 -4
  389. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  390. package/src/shade/renderer/particles/graph_particles.js +27 -4
  391. package/src/shade/renderer/particles/isa/InstructionStream.d.ts +7 -6
  392. package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -1
  393. package/src/shade/renderer/particles/isa/InstructionStream.js +17 -16
  394. package/src/shade/renderer/particles/isa/ParticleAssembler.d.ts +17 -0
  395. package/src/shade/renderer/particles/isa/ParticleAssembler.d.ts.map +1 -1
  396. package/src/shade/renderer/particles/isa/ParticleAssembler.js +35 -0
  397. package/src/shade/renderer/particles/isa/ParticleProgram.d.ts +26 -6
  398. package/src/shade/renderer/particles/isa/ParticleProgram.d.ts.map +1 -1
  399. package/src/shade/renderer/particles/isa/ParticleProgram.js +61 -9
  400. package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts +55 -4
  401. package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts.map +1 -1
  402. package/src/shade/renderer/particles/isa/ParticleVMISA.js +79 -10
  403. package/src/shade/renderer/particles/isa/particle_assembly.d.ts +20 -6
  404. package/src/shade/renderer/particles/isa/particle_assembly.d.ts.map +1 -1
  405. package/src/shade/renderer/particles/isa/particle_assembly.js +136 -25
  406. package/src/shade/renderer/particles/isa/particle_link_global_fields.d.ts +20 -0
  407. package/src/shade/renderer/particles/isa/particle_link_global_fields.d.ts.map +1 -0
  408. package/src/shade/renderer/particles/isa/particle_link_global_fields.js +46 -0
  409. package/src/shade/renderer/particles/isa/validate_particle_program.js +8 -8
  410. package/src/shade/renderer/particles/layout/ParticleLayout.d.ts +62 -28
  411. package/src/shade/renderer/particles/layout/ParticleLayout.d.ts.map +1 -1
  412. package/src/shade/renderer/particles/layout/ParticleLayout.js +102 -62
  413. package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.d.ts.map +1 -1
  414. package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.js +2 -0
  415. package/src/shade/renderer/particles/optimizer/dag/particle_vector_groups.js +1 -1
  416. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lift.js +4 -3
  417. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lower.js +2 -2
  418. package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.d.ts +3 -3
  419. package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.js +11 -11
  420. package/src/shade/renderer/particles/optimizer/optimize_particle_program.d.ts +4 -4
  421. package/src/shade/renderer/particles/optimizer/optimize_particle_program.d.ts.map +1 -1
  422. package/src/shade/renderer/particles/optimizer/optimize_particle_program.js +5 -4
  423. package/src/shade/renderer/particles/optimizer/particle_integer_bounds.d.ts +1 -1
  424. package/src/shade/renderer/particles/optimizer/particle_integer_bounds.js +1 -1
  425. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts +4 -4
  426. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts.map +1 -1
  427. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.js +13 -11
  428. package/src/shade/renderer/particles/optimizer/particle_program_fuzz.js +7 -7
  429. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts +3 -2
  430. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
  431. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +5 -4
  432. package/src/shade/renderer/particles/optimizer/pass_allocate_registers.d.ts.map +1 -1
  433. package/src/shade/renderer/particles/optimizer/pass_dedup_constants.d.ts.map +1 -1
  434. package/src/shade/renderer/particles/optimizer/pass_eliminate_dead_code.d.ts.map +1 -1
  435. package/src/shade/renderer/particles/optimizer/pass_eliminate_dead_code.js +51 -51
  436. package/src/shade/renderer/particles/optimizer/pass_fold_constants.d.ts.map +1 -1
  437. package/src/shade/renderer/particles/optimizer/pass_fold_constants.js +5 -5
  438. package/src/shade/renderer/particles/optimizer/pass_inline_constants.d.ts.map +1 -1
  439. package/src/shade/renderer/particles/optimizer/pass_narrow_widths.d.ts.map +1 -1
  440. package/src/shade/renderer/particles/optimizer/pass_pack_registers.d.ts.map +1 -1
  441. package/src/shade/renderer/particles/optimizer/pass_peephole.d.ts.map +1 -1
  442. package/src/shade/renderer/particles/optimizer/pass_propagate_copies.d.ts.map +1 -1
  443. package/src/shade/renderer/particles/optimizer/pass_schedule.d.ts.map +1 -1
  444. package/src/shade/renderer/particles/optimizer/pass_schedule.js +2 -2
  445. package/src/shade/renderer/particles/optimizer/pass_share_subexpressions.d.ts.map +1 -1
  446. package/src/shade/renderer/particles/optimizer/pass_share_subexpressions.js +5 -4
  447. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +93 -22
  448. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
  449. package/src/shade/renderer/particles/runtime/EmitterRegistry.js +336 -29
  450. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts +43 -3
  451. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts.map +1 -1
  452. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.js +43 -3
  453. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +56 -26
  454. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
  455. package/src/shade/renderer/particles/runtime/ParticleEmitter.js +89 -33
  456. package/src/shade/renderer/particles/runtime/ParticleGlobalFields.d.ts +85 -0
  457. package/src/shade/renderer/particles/runtime/ParticleGlobalFields.d.ts.map +1 -0
  458. package/src/shade/renderer/particles/runtime/ParticleGlobalFields.js +221 -0
  459. package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts +143 -18
  460. package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts.map +1 -1
  461. package/src/shade/renderer/particles/runtime/ProgramHeap.js +378 -28
  462. package/src/shade/renderer/particles/runtime/create_particle_effect.d.ts +19 -7
  463. package/src/shade/renderer/particles/runtime/create_particle_effect.d.ts.map +1 -1
  464. package/src/shade/renderer/particles/runtime/create_particle_effect.js +22 -9
  465. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +8 -8
  466. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +1 -1
  467. package/src/shade/renderer/particles/shaders/chunk_particle_setup_context.d.ts +3 -0
  468. package/src/shade/renderer/particles/shaders/chunk_particle_setup_context.d.ts.map +1 -1
  469. package/src/shade/renderer/particles/shaders/chunk_particle_setup_context.js +4 -0
  470. package/src/shade/renderer/particles/shaders/shader_particle_field_bind.d.ts +30 -0
  471. package/src/shade/renderer/particles/shaders/shader_particle_field_bind.d.ts.map +1 -0
  472. package/src/shade/renderer/particles/shaders/shader_particle_field_bind.js +121 -0
  473. package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.d.ts.map +1 -1
  474. package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.js +3 -1
  475. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +12 -4
  476. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
  477. package/src/shade/renderer/particles/vm/ParticleVMReference.js +48 -11
  478. package/src/shade/renderer/particles/vm/chunk_particle_vm.d.ts.map +1 -1
  479. package/src/shade/renderer/particles/vm/chunk_particle_vm.js +36 -14
  480. package/src/shade/renderer/postprocess/PostProcess.d.ts.map +1 -1
  481. package/src/shade/renderer/postprocess/PostProcess.js +2 -1
  482. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +31 -19
  483. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
  484. package/src/shade/renderer/postprocess/gtao/GTAO.js +44 -30
  485. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
  486. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +16 -2
  487. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  488. package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
  489. package/src/shade/renderer/postprocess/nss/NSS.js +4 -3
  490. package/src/shade/renderer/postprocess/ssr/SSR.d.ts +7 -1
  491. package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
  492. package/src/shade/renderer/postprocess/ssr/SSR.js +16 -0
  493. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts +20 -2
  494. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts.map +1 -1
  495. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +53 -3
  496. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +10 -2
  497. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
  498. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +31 -3
  499. package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
  500. package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +17 -11
  501. package/src/shade/renderer/postprocess/taa/TAA.d.ts +4 -2
  502. package/src/shade/renderer/postprocess/taa/TAA.d.ts.map +1 -1
  503. package/src/shade/renderer/postprocess/taa/TAA.js +6 -1
  504. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
  505. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +10 -5
  506. package/src/shade/renderer/postprocess/taa/shader_taa.d.ts.map +1 -1
  507. package/src/shade/renderer/postprocess/taa/shader_taa.js +15 -12
  508. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
  509. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +26 -17
  510. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts +4 -3
  511. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts.map +1 -1
  512. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +6 -4
  513. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts +12 -0
  514. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts.map +1 -0
  515. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.js +57 -0
  516. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +4 -2
  517. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
  518. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +4 -2
  519. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +8 -2
  520. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
  521. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +28 -15
  522. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.d.ts +2 -1
  523. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.d.ts.map +1 -1
  524. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.js +19 -3
  525. package/src/shade/renderer/rasterize/native/graph_rasterize_meshes_alpha_tested.d.ts.map +1 -1
  526. package/src/shade/renderer/rasterize/native/graph_rasterize_meshes_alpha_tested.js +4 -2
  527. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +3 -1
  528. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
  529. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +27 -14
  530. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts +2 -1
  531. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts.map +1 -1
  532. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.js +19 -3
  533. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_bounds.d.ts +2 -8
  534. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_bounds.d.ts.map +1 -1
  535. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_bounds.js +25 -52
  536. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_positions.d.ts +15 -0
  537. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_positions.d.ts.map +1 -0
  538. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_positions.js +52 -0
  539. package/src/shade/renderer/shader/chunk/geometry/triangle/TRIANGLE_POSITIONS_STRUCT.d.ts +7 -0
  540. package/src/shade/renderer/shader/chunk/geometry/triangle/TRIANGLE_POSITIONS_STRUCT.d.ts.map +1 -0
  541. package/src/shade/renderer/shader/chunk/geometry/triangle/TRIANGLE_POSITIONS_STRUCT.js +12 -0
  542. package/src/shade/renderer/shader/chunk/grid/chunk_index_to_grid2d_reciprocal.d.ts +22 -0
  543. package/src/shade/renderer/shader/chunk/grid/chunk_index_to_grid2d_reciprocal.d.ts.map +1 -0
  544. package/src/shade/renderer/shader/chunk/grid/chunk_index_to_grid2d_reciprocal.js +37 -0
  545. package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.d.ts.map +1 -1
  546. package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.js +26 -60
  547. package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.d.ts +23 -0
  548. package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.d.ts.map +1 -0
  549. package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.js +54 -0
  550. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts +25 -0
  551. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts.map +1 -0
  552. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.js +43 -0
  553. package/src/shade/renderer/shader/chunk/random/chunk_jitter_from_vectors.d.ts +14 -0
  554. package/src/shade/renderer/shader/chunk/random/chunk_jitter_from_vectors.d.ts.map +1 -0
  555. package/src/shade/renderer/shader/chunk/random/chunk_jitter_from_vectors.js +37 -0
  556. package/src/shade/renderer/shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.d.ts +27 -0
  557. package/src/shade/renderer/shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.d.ts.map +1 -0
  558. package/src/shade/renderer/shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.js +61 -0
  559. package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.d.ts +21 -0
  560. package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.d.ts.map +1 -0
  561. package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.js +41 -0
  562. package/src/shade/renderer/texture/util/texture_fill_rectangle.d.ts.map +1 -1
  563. package/src/shade/renderer/texture/util/texture_fill_rectangle.js +282 -267
  564. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +8 -4
  565. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
  566. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +36 -36
  567. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +6 -1
  568. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
  569. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +498 -484
  570. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +15 -2
  571. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
  572. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +57 -3
  573. package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.d.ts.map +1 -1
  574. package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.js +197 -191
  575. package/src/shade/renderer/volumetrics/taa/shader_volumetrics_taa.js +4 -4
  576. package/src/shade/renderer/water/GPUWaterRenderer.d.ts +2 -1
  577. package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
  578. package/src/shade/renderer/water/GPUWaterRenderer.js +5 -1
  579. package/src/shade/renderer/water/chunk_water_gi.d.ts +13 -3
  580. package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
  581. package/src/shade/renderer/water/chunk_water_gi.js +47 -5
  582. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  583. package/src/shade/renderer/water/shader_water.d.ts +3 -2
  584. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  585. package/src/shade/renderer/water/shader_water.js +9 -3
  586. package/src/shade/renderer/geometry/sdf/SDF_BUILD_SETTINGS_STRUCT.d.ts +0 -3
  587. package/src/shade/renderer/geometry/sdf/SDF_BUILD_SETTINGS_STRUCT.d.ts.map +0 -1
  588. package/src/shade/renderer/geometry/sdf/SFD_BUILD_WORKGROUP_SIZE.d.ts +0 -2
  589. package/src/shade/renderer/geometry/sdf/SFD_BUILD_WORKGROUP_SIZE.d.ts.map +0 -1
  590. package/src/shade/renderer/geometry/sdf/chunk_blas_query_sdf.d.ts +0 -8
  591. package/src/shade/renderer/geometry/sdf/chunk_blas_query_sdf.d.ts.map +0 -1
  592. package/src/shade/renderer/geometry/sdf/chunk_blas_query_volume_sign.d.ts +0 -3
  593. package/src/shade/renderer/geometry/sdf/chunk_blas_query_volume_sign.d.ts.map +0 -1
  594. package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts +0 -3
  595. package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts.map +0 -1
  596. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_object.d.ts.map +0 -1
  597. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_object.js +0 -42
  598. package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.d.ts +0 -31
  599. package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.d.ts.map +0 -1
  600. package/src/shade/renderer/shadow/vsm/VSMMoverTracker.d.ts +0 -42
  601. package/src/shade/renderer/shadow/vsm/VSMMoverTracker.d.ts.map +0 -1
  602. package/src/shade/renderer/shadow/vsm/VSM_MOVER_LAYOUT.d.ts +0 -54
  603. package/src/shade/renderer/shadow/vsm/VSM_MOVER_LAYOUT.d.ts.map +0 -1
  604. package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.d.ts +0 -14
  605. package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.d.ts.map +0 -1
  606. package/src/shade/renderer/shadow/vsm/shader/shader_vsm_movers.d.ts +0 -30
  607. package/src/shade/renderer/shadow/vsm/shader/shader_vsm_movers.d.ts.map +0 -1
  608. package/src/shade/renderer/shadow/vsm/shader/shader_vsm_skinned_movers.d.ts +0 -23
  609. package/src/shade/renderer/shadow/vsm/shader/shader_vsm_skinned_movers.d.ts.map +0 -1
@@ -38,7 +38,8 @@ export class ViewTextures extends FrameRecord {
38
38
  }
39
39
 
40
40
  /**
41
- * Last frame's depth, which reprojection-shaped effects need.
41
+ * Last frame's depth, which reprojection-shaped effects need. At the size last frame was drawn
42
+ * at, which after a resolution change is not {@link depth}'s: address it in its own grid.
42
43
  *
43
44
  * @returns {number}
44
45
  */
@@ -143,7 +143,7 @@ export class GPUFluidCascade {
143
143
  * @param {*} _resources
144
144
  * @param {{encoder: ShadeGPUCommandContext}} context
145
145
  */
146
- static "__#275@#execute_restrict"(record: object, _resources: any, context: {
146
+ static "__#277@#execute_restrict"(record: object, _resources: any, context: {
147
147
  encoder: ShadeGPUCommandContext;
148
148
  }): void;
149
149
  /**
@@ -151,7 +151,7 @@ export class GPUFluidCascade {
151
151
  * @param {*} _resources
152
152
  * @param {{encoder: ShadeGPUCommandContext}} context
153
153
  */
154
- static "__#275@#execute_fill"(record: object, _resources: any, context: {
154
+ static "__#277@#execute_fill"(record: object, _resources: any, context: {
155
155
  encoder: ShadeGPUCommandContext;
156
156
  }): void;
157
157
  /**
@@ -159,7 +159,7 @@ export class GPUFluidCascade {
159
159
  * @param {import("../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources} resources
160
160
  * @param {{encoder: ShadeGPUCommandContext}} context
161
161
  */
162
- static "__#275@#execute"(record: object, resources: import("../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources, context: {
162
+ static "__#277@#execute"(record: object, resources: import("../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources, context: {
163
163
  encoder: ShadeGPUCommandContext;
164
164
  }): void;
165
165
  /**
@@ -63,7 +63,7 @@ export class GPUFluidCascadeStack {
63
63
  * @param {*} _resources
64
64
  * @param {{encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
65
65
  */
66
- static "__#277@#execute_publish"(pass: object, _resources: any, context: {
66
+ static "__#279@#execute_publish"(pass: object, _resources: any, context: {
67
67
  encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
68
68
  }): void;
69
69
  /**
@@ -90,19 +90,19 @@ export class GPUFluidForcing {
90
90
  * @param {number} clear_size bytes cleared from 0 when the pool reuses the buffer
91
91
  * @returns {BufferResourceDescriptor}
92
92
  */
93
- static "__#278@#descriptor"(kept: BufferResourceDescriptor[], role: number, size: number, usage: number, clear_size: number): BufferResourceDescriptor;
93
+ static "__#280@#descriptor"(kept: BufferResourceDescriptor[], role: number, size: number, usage: number, clear_size: number): BufferResourceDescriptor;
94
94
  /**
95
95
  * @param {object} record
96
96
  * @param {FramePassResources} resources
97
97
  * @param {{encoder: ShadeGPUCommandContext}} context
98
98
  */
99
- static "__#278@#execute_extract"(record: object, resources: FramePassResources, context: {
99
+ static "__#280@#execute_extract"(record: object, resources: FramePassResources, context: {
100
100
  encoder: ShadeGPUCommandContext;
101
101
  }): void;
102
- static "__#278@#execute_clear"(record: any, _resources: any, context: any): void;
103
- static "__#278@#execute_query"(record: any, resources: any, context: any): void;
104
- static "__#278@#execute_command"(record: any, resources: any, context: any): void;
105
- static "__#278@#execute_apply"(record: any, resources: any, context: any): void;
102
+ static "__#280@#execute_clear"(record: any, _resources: any, context: any): void;
103
+ static "__#280@#execute_query"(record: any, resources: any, context: any): void;
104
+ static "__#280@#execute_command"(record: any, resources: any, context: any): void;
105
+ static "__#280@#execute_apply"(record: any, resources: any, context: any): void;
106
106
  /**
107
107
  * @param {object} options
108
108
  * @param {GPUDevice} options.device
@@ -41,7 +41,7 @@ export class GPUFluidPressureSolve {
41
41
  * @param {*} _resources
42
42
  * @param {{encoder: ShadeGPUCommandContext}} context
43
43
  */
44
- static "__#274@#execute"(data: {
44
+ static "__#276@#execute"(data: {
45
45
  solve: GPUFluidPressureSolve;
46
46
  arm: number;
47
47
  count: number;
@@ -49,7 +49,7 @@ export class GPUFluidQueries {
49
49
  * @param {import("../../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources} resources
50
50
  * @param {{encoder: import("../../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
51
51
  */
52
- static "__#279@#execute"(pass: object, resources: import("../../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources, context: {
52
+ static "__#281@#execute"(pass: object, resources: import("../../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources, context: {
53
53
  encoder: import("../../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
54
54
  }): void;
55
55
  /**
@@ -17,7 +17,8 @@
17
17
  *
18
18
  * **Every view that cuts takes a slot** (§2.4): its own counters, its own want slice and its own
19
19
  * stamp tag, so one view's list running out cannot silence another's, and a reading can say which
20
- * view needed more wavefronts. The view the frame is opened for is slot 0.
20
+ * view needed more wavefronts. The view the frame is opened for is slot 0. A slot's taker is any
21
+ * {@link VGeoFeedbackConsumer}, a view's cut or a cut that is not a view's.
21
22
  *
22
23
  * @author Alex Goldring
23
24
  * @copyright Company Named Limited (c) 2026
@@ -165,17 +166,17 @@ export class GPUVirtualGeometryRuntime {
165
166
  view: VGeoViewCut;
166
167
  }): void;
167
168
  /**
168
- * This frame's slot for a view, taking the next one the first time the view cuts in the frame.
169
+ * This frame's slot for a consumer, taking the next one the first time it cuts in the frame.
169
170
  *
170
- * A view past the slots the frame was laid out for shares the last one — never slot 0, which is
171
- * the frame's own view's — and the next frame is laid out with room for it. A shared slot's
172
- * counters are the sum of its views', so its reading lands on each of them but escalates none
173
- * (see `VGeoFeedbackLoop`).
171
+ * A consumer past the slots the frame was laid out for shares the last one — never slot 0, which
172
+ * is the frame's own view's — and the next frame is laid out with room for it. A shared slot's
173
+ * counters are the sum of its consumers', so its reading lands on each of them, told it was
174
+ * shared (see `VGeoFeedbackLoop`).
174
175
  *
175
- * @param {VGeoViewCut} view
176
+ * @param {VGeoFeedbackConsumer} view
176
177
  * @returns {number}
177
178
  */
178
- slot_of(view: VGeoViewCut): number;
179
+ slot_of(view: VGeoFeedbackConsumer): number;
179
180
  /**
180
181
  * The tag a slot's view writes into the want stamps, unique to that view in this frame and never
181
182
  * zero — see `VGEO_CUT_PARAMS_STRUCT.frame_tag`.
@@ -185,12 +186,22 @@ export class GPUVirtualGeometryRuntime {
185
186
  */
186
187
  frame_tag_of(slot: number): number;
187
188
  /**
188
- * This frame's views, by slot — what a reading of this frame's feedback is about. A copy, since
189
- * the reading lands frames later and the table is rebuilt every frame.
189
+ * Fill the fields of a cut's `VGEO_CUT_PARAMS_STRUCT` that are the frame's and its slot's rather
190
+ * than the cut's own: the arena's stride, where the frame's touch bits and the slot's counters and
191
+ * wants are, and the slot's stamp tag.
190
192
  *
191
- * @returns {VGeoViewCut[][]}
193
+ * @param {Object} params written in place
194
+ * @param {number} slot this frame's, from {@link slot_of}
195
+ * @returns {Object} params
192
196
  */
193
- frame_slots(): VGeoViewCut[][];
197
+ fill_slot_params(params: any, slot: number): any;
198
+ /**
199
+ * This frame's consumers, by slot — what a reading of this frame's feedback is about. A copy,
200
+ * since the reading lands frames later and the table is rebuilt every frame.
201
+ *
202
+ * @returns {VGeoFeedbackConsumer[][]}
203
+ */
204
+ frame_slots(): VGeoFeedbackConsumer[][];
194
205
  /**
195
206
  * The feedback buffer as a resource of `graph`, at the version that graph last wrote.
196
207
  *
@@ -267,4 +278,15 @@ export class GPUVirtualGeometryRuntime {
267
278
  export type GPUVirtualGeometryPool = import("./GPUVirtualGeometryPool.js").GPUVirtualGeometryPool;
268
279
  export type VGeoViewCut = import("./VGeoViewCut.js").VGeoViewCut;
269
280
  export type FrameGraph = import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
281
+ /**
282
+ * What takes a slot of a frame's feedback ({@link GPUVirtualGeometryRuntimeslot_of }): a cut that writes its
283
+ * counters and its wants there, and reads its counters back when the reading lands.
284
+ */
285
+ export type VGeoFeedbackConsumer = {
286
+ /**
287
+ * the reading,
288
+ * where its slot's counters start in it, whether another consumer shared the slot, and the runtime
289
+ */
290
+ read_feedback: (arg0: Uint32Array, arg1: number, arg2: boolean, arg3: GPUVirtualGeometryRuntime) => void;
291
+ };
270
292
  //# sourceMappingURL=GPUVirtualGeometryRuntime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GPUVirtualGeometryRuntime.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAmHI;;;;;;;;;;;;;;;OAeG;IACH;QAd2C,IAAI,EAApC,sBAAsB;QACL,aAAa,GAA9B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QAEW,mBAAmB,GAApC,MAAM;QAEW,cAAc,GAA/B,MAAM;QACW,cAAc,GAA/B,MAAM;QAEW,qBAAqB,GAAtC,MAAM;QACW,aAAa,GAA9B,MAAM;OAgFhB;IA3KD;;;;OAIG;IACH,KAFU,MAAM,CAER;IAER;;OAEG;IACH,cAFU,OAAO,CAEG;IAmKpB;;OAEG;IACH,yEAEC;IAED;;;;OAIG;IACH,4BAEC;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,kCAEC;IAED;;;;;OAKG;IACH,6BAEC;IAED;;;;OAIG;IACH,gCAEC;IAWD;;;;;;OAMG;IACH,iCAKC;IArBD;;;;OAIG;IACH,4BAEC;IAgBD;;;;OAIG;IACH,0BAEC;IAED;;;;OAIG;IACH,yDAEC;IAED;;;;;OAKG;IACH,2BAEC;IAED;;OAEG;IACH;;;;;;;;MAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH;QAHgC,IAAI,EAAzB,WAAW;QACT,IAAI,CAqChB;IAwBD;;;;;;;;;;OAUG;IACH,cAHW,WAAW,GACT,MAAM,CA0BlB;IAED;;;;;;OAMG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;OAKG;IACH,eAFa,WAAW,EAAE,EAAE,CAI3B;IAED;;;;;;;;;OASG;IACH,mBAHW,UAAU,GACR,MAAM,CAkClB;IAED;;;;;;;;;;;;OAYG;IACH,wBAJW,UAAU,UACV,MAAM,GACJ,IAAI,CAOhB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH;QAJ2B,iBAAiB,EAAjC,MAAM;QACU,gBAAgB,EAAhC,MAAM;QACJ,IAAI,CAgBhB;IAED;;OAEG;IACH,gCAEC;IAED;;OAEG;IACH,+BAEC;IAED;;;;;OAKG;IACH,aAFa,IAAI,CAKhB;IAED;;;;;;;;OAQG;IACH,WAFa,IAAI,CAOhB;;CACJ;qCA3nBY,OAAO,6BAA6B,EAAE,sBAAsB;0BAC5D,OAAO,kBAAkB,EAAE,WAAW;yBACtC,OAAO,iEAAiE,EAAE,UAAU"}
1
+ {"version":3,"file":"GPUVirtualGeometryRuntime.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IAmHI;;;;;;;;;;;;;;;OAeG;IACH;QAd2C,IAAI,EAApC,sBAAsB;QACL,aAAa,GAA9B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QAEW,mBAAmB,GAApC,MAAM;QAEW,cAAc,GAA/B,MAAM;QACW,cAAc,GAA/B,MAAM;QAEW,qBAAqB,GAAtC,MAAM;QACW,aAAa,GAA9B,MAAM;OAgFhB;IA3KD;;;;OAIG;IACH,KAFU,MAAM,CAER;IAER;;OAEG;IACH,cAFU,OAAO,CAEG;IAmKpB;;OAEG;IACH,yEAEC;IAED;;;;OAIG;IACH,4BAEC;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,kCAEC;IAED;;;;;OAKG;IACH,6BAEC;IAED;;;;OAIG;IACH,gCAEC;IAWD;;;;;;OAMG;IACH,iCAKC;IArBD;;;;OAIG;IACH,4BAEC;IAgBD;;;;OAIG;IACH,0BAEC;IAED;;;;OAIG;IACH,yDAEC;IAED;;;;;OAKG;IACH,2BAEC;IAED;;OAEG;IACH;;;;;;;;MAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH;QAHgC,IAAI,EAAzB,WAAW;QACT,IAAI,CAqChB;IAwBD;;;;;;;;;;OAUG;IACH,cAHW,oBAAoB,GAClB,MAAM,CA0BlB;IAED;;;;;;OAMG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;;;OAQG;IACH,oCAHW,MAAM,OAkBhB;IAED;;;;;OAKG;IACH,eAFa,oBAAoB,EAAE,EAAE,CAIpC;IAED;;;;;;;;;OASG;IACH,mBAHW,UAAU,GACR,MAAM,CAkClB;IAED;;;;;;;;;;;;OAYG;IACH,wBAJW,UAAU,UACV,MAAM,GACJ,IAAI,CAOhB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH;QAJ2B,iBAAiB,EAAjC,MAAM;QACU,gBAAgB,EAAhC,MAAM;QACJ,IAAI,CAgBhB;IAED;;OAEG;IACH,gCAEC;IAED;;OAEG;IACH,+BAEC;IAED;;;;;OAKG;IACH,aAFa,IAAI,CAKhB;IAED;;;;;;;;OAQG;IACH,WAFa,IAAI,CAOhB;;CACJ;qCA/pBY,OAAO,6BAA6B,EAAE,sBAAsB;0BAC5D,OAAO,kBAAkB,EAAE,WAAW;yBACtC,OAAO,iEAAiE,EAAE,UAAU;;;;;;;;;;0BAQ1E,WAAW,QAAE,MAAM,QAAE,OAAO,QAAE,yBAAyB,KAAG,IAAI"}
@@ -1,6 +1,11 @@
1
1
  import { assert } from "../../../../../core/assert.js";
2
2
  import { BufferResourceDescriptor } from "../../../../device/graph/BufferResourceDescriptor.js";
3
- import { vgeo_cut_feedback_layout } from "./cut/vgeo_cut_feedback_layout.js";
3
+ import {
4
+ vgeo_cut_feedback_layout,
5
+ vgeo_feedback_slot_stats,
6
+ vgeo_feedback_slot_want_count,
7
+ vgeo_feedback_slot_wants
8
+ } from "./cut/vgeo_cut_feedback_layout.js";
4
9
 
5
10
  /**
6
11
  * @typedef {import("./GPUVirtualGeometryPool.js").GPUVirtualGeometryPool} GPUVirtualGeometryPool
@@ -8,6 +13,15 @@ import { vgeo_cut_feedback_layout } from "./cut/vgeo_cut_feedback_layout.js";
8
13
  * @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
9
14
  */
10
15
 
16
+ /**
17
+ * What takes a slot of a frame's feedback ({@link GPUVirtualGeometryRuntime#slot_of}): a cut that writes its
18
+ * counters and its wants there, and reads its counters back when the reading lands.
19
+ *
20
+ * @typedef {Object} VGeoFeedbackConsumer
21
+ * @property {function(Uint32Array, number, boolean, GPUVirtualGeometryRuntime): void} read_feedback the reading,
22
+ * where its slot's counters start in it, whether another consumer shared the slot, and the runtime
23
+ */
24
+
11
25
  /**
12
26
  * The most views one frame's feedback is laid out for. A view past it shares the last slot, which
13
27
  * merges its counters and its want slice with that view's and loses nothing else; the bound exists
@@ -37,7 +51,8 @@ const SLOT_CEILING = 64;
37
51
  *
38
52
  * **Every view that cuts takes a slot** (§2.4): its own counters, its own want slice and its own
39
53
  * 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.
54
+ * view needed more wavefronts. The view the frame is opened for is slot 0. A slot's taker is any
55
+ * {@link VGeoFeedbackConsumer}, a view's cut or a cut that is not a view's.
41
56
  *
42
57
  * @author Alex Goldring
43
58
  * @copyright Company Named Limited (c) 2026
@@ -119,14 +134,14 @@ export class GPUVirtualGeometryRuntime {
119
134
  #cleared = false;
120
135
 
121
136
  /**
122
- * This frame's slot for each view that has cut in it.
123
- * @type {Map<VGeoViewCut, number>}
137
+ * This frame's slot for each consumer that has cut in it.
138
+ * @type {Map<VGeoFeedbackConsumer, number>}
124
139
  */
125
140
  #slot_of = new Map();
126
141
 
127
142
  /**
128
- * This frame's views, by slot; a slot shared past the layout holds more than one.
129
- * @type {VGeoViewCut[][]}
143
+ * This frame's consumers, by slot; a slot shared past the layout holds more than one.
144
+ * @type {VGeoFeedbackConsumer[][]}
130
145
  */
131
146
  #slots = [];
132
147
 
@@ -444,14 +459,14 @@ export class GPUVirtualGeometryRuntime {
444
459
  }
445
460
 
446
461
  /**
447
- * This frame's slot for a view, taking the next one the first time the view cuts in the frame.
462
+ * This frame's slot for a consumer, taking the next one the first time it cuts in the frame.
448
463
  *
449
- * A view past the slots the frame was laid out for shares the last one — never slot 0, which is
450
- * the frame's own view's — and the next frame is laid out with room for it. A shared slot's
451
- * counters are the sum of its views', so its reading lands on each of them but escalates none
452
- * (see `VGeoFeedbackLoop`).
464
+ * A consumer past the slots the frame was laid out for shares the last one — never slot 0, which
465
+ * is the frame's own view's — and the next frame is laid out with room for it. A shared slot's
466
+ * counters are the sum of its consumers', so its reading lands on each of them, told it was
467
+ * shared (see `VGeoFeedbackLoop`).
453
468
  *
454
- * @param {VGeoViewCut} view
469
+ * @param {VGeoFeedbackConsumer} view
455
470
  * @returns {number}
456
471
  */
457
472
  slot_of(view) {
@@ -492,10 +507,36 @@ export class GPUVirtualGeometryRuntime {
492
507
  }
493
508
 
494
509
  /**
495
- * This frame's views, by slot — what a reading of this frame's feedback is about. A copy, since
496
- * the reading lands frames later and the table is rebuilt every frame.
510
+ * Fill the fields of a cut's `VGEO_CUT_PARAMS_STRUCT` that are the frame's and its slot's rather
511
+ * than the cut's own: the arena's stride, where the frame's touch bits and the slot's counters and
512
+ * wants are, and the slot's stamp tag.
513
+ *
514
+ * @param {Object} params written in place
515
+ * @param {number} slot this frame's, from {@link slot_of}
516
+ * @returns {Object} params
517
+ */
518
+ fill_slot_params(params, slot) {
519
+ const layout = this.#layout;
520
+
521
+ assert.defined(layout, 'feedback_layout — begin_frame must have run');
522
+ assert.lessThan(slot, layout.slot_count, 'slot');
523
+
524
+ params.page_slot_words = this.#pool.page_slot_words;
525
+ params.touch_bits_base = layout.touch_bits_base;
526
+ params.stats_base = vgeo_feedback_slot_stats(slot);
527
+ params.want_count_offset = vgeo_feedback_slot_want_count(slot);
528
+ params.want_base = vgeo_feedback_slot_wants(layout, slot);
529
+ params.want_capacity = layout.slot_want_capacity;
530
+ params.frame_tag = this.frame_tag_of(slot);
531
+
532
+ return params;
533
+ }
534
+
535
+ /**
536
+ * This frame's consumers, by slot — what a reading of this frame's feedback is about. A copy,
537
+ * since the reading lands frames later and the table is rebuilt every frame.
497
538
  *
498
- * @returns {VGeoViewCut[][]}
539
+ * @returns {VGeoFeedbackConsumer[][]}
499
540
  */
500
541
  frame_slots() {
501
542
  return this.#slots.map(views => views.slice());
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
3
- * @typedef {import("./VGeoViewCut.js").VGeoViewCut} VGeoViewCut
3
+ * @typedef {import("./GPUVirtualGeometryRuntime.js").VGeoFeedbackConsumer} VGeoFeedbackConsumer
4
4
  * @typedef {import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime} GPUVirtualGeometryRuntime
5
5
  * @typedef {import("./VGeoResidency.js").VGeoResidency} VGeoResidency
6
6
  * @typedef {import("./cut/vgeo_cut_feedback_layout.js").vgeo_cut_feedback_layout} vgeo_cut_feedback_layout
@@ -96,7 +96,7 @@ export class VGeoFeedbackLoop {
96
96
  #private;
97
97
  }
98
98
  export type FrameGraph = import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
99
- export type VGeoViewCut = import("./VGeoViewCut.js").VGeoViewCut;
99
+ export type VGeoFeedbackConsumer = import("./GPUVirtualGeometryRuntime.js").VGeoFeedbackConsumer;
100
100
  export type GPUVirtualGeometryRuntime = import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime;
101
101
  export type VGeoResidency = import("./VGeoResidency.js").VGeoResidency;
102
102
  export type vgeo_cut_feedback_layout = typeof import("./cut/vgeo_cut_feedback_layout.js").vgeo_cut_feedback_layout;
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoFeedbackLoop.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IA4CI;;;;;;OAMG;IACH;QAL8C,OAAO,EAA1C,yBAAyB;QACF,SAAS,EAAhC,aAAa;QACI,aAAa,GAA9B,MAAM;OAUhB;IAED;;OAEG;IACH,4DAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;;;;OAOG;IACH,6BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,+BAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;;OAKG;IACH,YAHW,UAAU,GACR,OAAO,CAwEnB;IA4CD;;;;OAIG;IACH,SAFa,IAAI,CAIhB;IAED;;;;;;;;;OASG;IACH,WAFa,IAAI,CAMhB;;CACJ;yBA3RY,OAAO,iEAAiE,EAAE,UAAU;0BACpF,OAAO,kBAAkB,EAAE,WAAW;wCACtC,OAAO,gCAAgC,EAAE,yBAAyB;4BAClE,OAAO,oBAAoB,EAAE,aAAa"}
1
+ {"version":3,"file":"VGeoFeedbackLoop.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IA4CI;;;;;;OAMG;IACH;QAL8C,OAAO,EAA1C,yBAAyB;QACF,SAAS,EAAhC,aAAa;QACI,aAAa,GAA9B,MAAM;OAUhB;IAED;;OAEG;IACH,4DAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;;;;OAOG;IACH,6BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,+BAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;;OAKG;IACH,YAHW,UAAU,GACR,OAAO,CAwEnB;IAgCD;;;;OAIG;IACH,SAFa,IAAI,CAIhB;IAED;;;;;;;;;OASG;IACH,WAFa,IAAI,CAMhB;;CACJ;yBA/QY,OAAO,iEAAiE,EAAE,UAAU;mCACpF,OAAO,gCAAgC,EAAE,oBAAoB;wCAC7D,OAAO,gCAAgC,EAAE,yBAAyB;4BAClE,OAAO,oBAAoB,EAAE,aAAa"}
@@ -1,12 +1,11 @@
1
1
  import { assert } from "../../../../../core/assert.js";
2
2
  import { graph_read_buffer } from "../../../buffer/graph_read_buffer.js";
3
- import { VGEO_CUT_STAT } from "./layout/VGEO_CUT_STAT.js";
4
3
  import { VGEO_CUT_STAT_COUNT } from "./layout/VGEO_CUT_STAT_COUNT.js";
5
4
  import { vgeo_feedback_slot_stats } from "./cut/vgeo_cut_feedback_layout.js";
6
5
 
7
6
  /**
8
7
  * @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
9
- * @typedef {import("./VGeoViewCut.js").VGeoViewCut} VGeoViewCut
8
+ * @typedef {import("./GPUVirtualGeometryRuntime.js").VGeoFeedbackConsumer} VGeoFeedbackConsumer
10
9
  * @typedef {import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime} GPUVirtualGeometryRuntime
11
10
  * @typedef {import("./VGeoResidency.js").VGeoResidency} VGeoResidency
12
11
  * @typedef {import("./cut/vgeo_cut_feedback_layout.js").vgeo_cut_feedback_layout} vgeo_cut_feedback_layout
@@ -181,9 +180,9 @@ export class VGeoFeedbackLoop {
181
180
  const reading_frame = this.#runtime.pool.frame;
182
181
 
183
182
  /*
184
- And which views it is about, by slot. The table is rebuilt every frame and the set of views
185
- changes — a point light's faces are in the shadow budget one frame and out the next — so a
186
- reading that asked for "the" table when it landed would hand one view's counters to another.
183
+ And which consumers it is about, by slot. The table is rebuilt every frame and the set of
184
+ views changes — a point light's faces are in the shadow budget one frame and out the next — so
185
+ a reading that asked for "the" table when it landed would hand one view's counters to another.
187
186
  */
188
187
  const slots = this.#runtime.frame_slots();
189
188
 
@@ -226,34 +225,22 @@ export class VGeoFeedbackLoop {
226
225
  * @param {Uint32Array} words
227
226
  * @param {ReturnType<vgeo_cut_feedback_layout>} layout the frame's own, not the current one
228
227
  * @param {number} reading_frame the frame this reading is about
229
- * @param {VGeoViewCut[][]} slots the frame's views, by slot
228
+ * @param {VGeoFeedbackConsumer[][]} slots the frame's consumers, by slot
230
229
  */
231
230
  #apply(words, layout, reading_frame, slots) {
232
231
  for (let slot = 0; slot < slots.length; slot++) {
233
- const base = vgeo_feedback_slot_stats(slot);
232
+ const consumers = slots[slot];
234
233
 
235
234
  /*
236
- A slot two views shared — they were past the frame's layout — holds the sum of their
237
- counters, so a remainder in it says one of them ran out and not which. Escalating both
238
- would raise a bound that was never binding, for good; each has a slot of its own next
239
- frame, and escalates from that.
235
+ The consumer owns what its counters mean; the loop's job here is the same as with a
236
+ want, which is to carry the reading to whoever it is about. A slot two consumers shared
237
+ — they were past the frame's layout — holds the sum of their counters, which each is
238
+ told.
240
239
  */
241
- const remaining = slots[slot].length === 1 ? words[base + VGEO_CUT_STAT.QUEUE_REMAINING] : 0;
240
+ const shared = consumers.length > 1;
242
241
 
243
- for (const view of slots[slot]) {
244
- for (let i = 0; i < VGEO_CUT_STAT_COUNT; i++) {
245
- view.stats[i] = words[base + i];
246
- }
247
-
248
- /*
249
- One counter is not a statistic, it is an instruction. `QUEUE_REMAINING` is non-zero
250
- exactly when the descent ran out of wavefronts and abandoned subtrees it had not
251
- expanded — a hole in the picture rather than a coarser surface — and this is the only
252
- moment anything on the host learns it. The view owns what to do about it; the loop's
253
- job here is the same as with a want, which is to carry the reading to whoever it is
254
- about.
255
- */
256
- view.note_incomplete_descent(remaining, this.#runtime);
242
+ for (const consumer of consumers) {
243
+ consumer.read_feedback(words, vgeo_feedback_slot_stats(slot), shared, this.#runtime);
257
244
  }
258
245
  }
259
246
 
@@ -173,23 +173,46 @@ export class VGeoViewCut {
173
173
  * @returns {boolean} whether the bound moved
174
174
  */
175
175
  note_incomplete_descent(remaining: number, runtime: GPUVirtualGeometryRuntime): boolean;
176
+ /**
177
+ * Take this view's slot of a reading: its counters, and what they say about its descent.
178
+ *
179
+ * One counter is not a statistic, it is an instruction. `QUEUE_REMAINING` is non-zero exactly
180
+ * when the descent ran out of wavefronts and abandoned subtrees it had not expanded — a hole in
181
+ * the picture rather than a coarser surface — and this is the only moment anything on the host
182
+ * learns it.
183
+ *
184
+ * A slot two views shared — they were past the frame's layout — holds the sum of their counters,
185
+ * so a remainder in it says one of them ran out and not which. Escalating both would raise a
186
+ * bound that was never binding, for good; each has a slot of its own next frame, and escalates
187
+ * from that.
188
+ *
189
+ * @param {Uint32Array} words the reading
190
+ * @param {number} base where this slot's counters start in it
191
+ * @param {boolean} shared whether another consumer shared the slot
192
+ * @param {GPUVirtualGeometryRuntime} runtime
193
+ */
194
+ read_feedback(words: Uint32Array, base: number, shared: boolean, runtime: GPUVirtualGeometryRuntime): void;
176
195
  /**
177
196
  * Publish the frame's shared settings and this view's own, as one uniform.
178
197
  *
179
198
  * Everything but the projection, the threshold's scale, the slot and `flags` is a property of the
180
199
  * runtime or the frame, so it is read from the runtime at write time rather than mirrored here —
181
- * a second copy of `tau` is a second thing to forget to update.
200
+ * a second copy of `tau` is a second thing to forget to update. The slot's own fields are the
201
+ * runtime's to fill ({@link GPUVirtualGeometryRuntime#fill_slot_params}).
182
202
  *
183
203
  * @param {Object} options
184
204
  * @param {GPUVirtualGeometryRuntime} options.runtime inside an open frame
185
205
  * @param {number} options.slot this view's slot in the frame's feedback
186
206
  * @param {boolean} [options.coarsen] whether this view's cut may walk up
207
+ * @param {number} [options.tau] the threshold, for a cut whose records carry an error scale of their own rather
208
+ * than a view's pixels; `runtime.tau × tau_scale` otherwise
187
209
  * @returns {void}
188
210
  */
189
- write_params({ runtime, slot, coarsen }: {
211
+ write_params({ runtime, slot, coarsen, tau }: {
190
212
  runtime: GPUVirtualGeometryRuntime;
191
213
  slot: number;
192
214
  coarsen?: boolean;
215
+ tau?: number;
193
216
  }): void;
194
217
  destroy(): void;
195
218
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoViewCut.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js"],"names":[],"mappings":"AAsBA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IA6EI;;;;OAIG;IACH;QAH8B,MAAM;QACR,KAAK,GAAtB,MAAM;OAehB;IAhDD;;;;;;;OAOG;IACH,WAFU,MAAM,CAEF;IAed;;;;OAIG;IACH,OAFU,WAAW,CAEwB;IAsB7C;;;;OAIG;IACH,+BAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,8BAEC;IAED;;;;OAIG;IACH,2BAEC;IAED;;OAEG;IACH,kCAEC;IAED;;;;;;;;;;;;;;;OAeG;IACH,kBAFa,IAAI,CAchB;IAED;;;;;;;;;;OAUG;IACH,mCAHW,MAAM,GACJ,IAAI,CAkBhB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH;QAL2B,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACqB,iBAAiB,EAA5C,UAAU,MAAM,CAAC;QACf,IAAI,CAmBhB;IAED;;;;;;OAMG;IACH,0BAHW,yBAAyB,GACvB,MAAM,CAIlB;IAED;;;;OAIG;IACH,oCAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,mCAJW,MAAM,WACN,yBAAyB,GACvB,OAAO,CAgBnB;IAED;;;;;;;;;;;;OAYG;IACH;QAL8C,OAAO,EAA1C,yBAAyB;QACT,IAAI,EAApB,MAAM;QACY,OAAO,GAAzB,OAAO;QACL,IAAI,CAmChB;IAED,gBAIC;;CACJ;wCA5XY,OAAO,gCAAgC,EAAE,yBAAyB"}
1
+ {"version":3,"file":"VGeoViewCut.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js"],"names":[],"mappings":"AAkBA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IAoFI;;;;OAIG;IACH;QAH8B,MAAM;QACR,KAAK,GAAtB,MAAM;OAehB;IAvDD;;;;;;;OAOG;IACH,WAFU,MAAM,CAEF;IAed;;;;OAIG;IACH,OAFU,WAAW,CAEwB;IA6B7C;;;;OAIG;IACH,+BAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,8BAEC;IAED;;;;OAIG;IACH,2BAEC;IAED;;OAEG;IACH,kCAEC;IAED;;;;;;;;;;;;;;;OAeG;IACH,kBAFa,IAAI,CAchB;IAED;;;;;;;;;;OAUG;IACH,mCAHW,MAAM,GACJ,IAAI,CAkBhB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH;QAL2B,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACqB,iBAAiB,EAA5C,UAAU,MAAM,CAAC;QACf,IAAI,CAmBhB;IAED;;;;;;OAMG;IACH,0BAHW,yBAAyB,GACvB,MAAM,CAIlB;IAED;;;;OAIG;IACH,oCAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,mCAJW,MAAM,WACN,yBAAyB,GACvB,OAAO,CAgBnB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,qBALW,WAAW,QACX,MAAM,UACN,OAAO,WACP,yBAAyB,QAQnC;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAP8C,OAAO,EAA1C,yBAAyB;QACT,IAAI,EAApB,MAAM;QACY,OAAO,GAAzB,OAAO;QACU,GAAG,GAApB,MAAM;QAEJ,IAAI,CAyBhB;IAED,gBAIC;;CACJ;wCAtZY,OAAO,gCAAgC,EAAE,yBAAyB"}
@@ -2,11 +2,7 @@ import { assert } from "../../../../../core/assert.js";
2
2
  import { VGEO_CUT_FLAG_COARSEN } from "./cut/VGEO_CUT_FLAG_COARSEN.js";
3
3
  import { VGEO_CUT_FLAG_CULL } from "./cut/VGEO_CUT_FLAG_CULL.js";
4
4
  import { VGEO_CUT_PARAMS_STRUCT } from "./cut/VGEO_CUT_PARAMS_STRUCT.js";
5
- import {
6
- vgeo_feedback_slot_stats,
7
- vgeo_feedback_slot_want_count,
8
- vgeo_feedback_slot_wants
9
- } from "./cut/vgeo_cut_feedback_layout.js";
5
+ import { VGEO_CUT_STAT } from "./layout/VGEO_CUT_STAT.js";
10
6
  import { VGEO_CUT_STAT_COUNT } from "./layout/VGEO_CUT_STAT_COUNT.js";
11
7
  import { vgeo_frontier_words } from "./vgeo_frontier_words.js";
12
8
  import { write_gpu_typed_buffer } from "../../../shader/type/serde/write_gpu_typed_buffer.js";
@@ -124,6 +120,13 @@ export class VGeoViewCut {
124
120
  */
125
121
  stats = new Uint32Array(VGEO_CUT_STAT_COUNT);
126
122
 
123
+ /**
124
+ * The params' fields as {@link write_params} last wrote them, kept so writing them allocates nothing.
125
+ *
126
+ * @type {Object}
127
+ */
128
+ #params_fields = {};
129
+
127
130
  /**
128
131
  * @param {Object} options
129
132
  * @param {GPUDevice} options.device
@@ -348,48 +351,67 @@ export class VGeoViewCut {
348
351
  return true;
349
352
  }
350
353
 
354
+ /**
355
+ * Take this view's slot of a reading: its counters, and what they say about its descent.
356
+ *
357
+ * One counter is not a statistic, it is an instruction. `QUEUE_REMAINING` is non-zero exactly
358
+ * when the descent ran out of wavefronts and abandoned subtrees it had not expanded — a hole in
359
+ * the picture rather than a coarser surface — and this is the only moment anything on the host
360
+ * learns it.
361
+ *
362
+ * A slot two views shared — they were past the frame's layout — holds the sum of their counters,
363
+ * so a remainder in it says one of them ran out and not which. Escalating both would raise a
364
+ * bound that was never binding, for good; each has a slot of its own next frame, and escalates
365
+ * from that.
366
+ *
367
+ * @param {Uint32Array} words the reading
368
+ * @param {number} base where this slot's counters start in it
369
+ * @param {boolean} shared whether another consumer shared the slot
370
+ * @param {GPUVirtualGeometryRuntime} runtime
371
+ */
372
+ read_feedback(words, base, shared, runtime) {
373
+ for (let i = 0; i < VGEO_CUT_STAT_COUNT; i++) {
374
+ this.stats[i] = words[base + i];
375
+ }
376
+
377
+ this.note_incomplete_descent(shared ? 0 : words[base + VGEO_CUT_STAT.QUEUE_REMAINING], runtime);
378
+ }
379
+
351
380
  /**
352
381
  * Publish the frame's shared settings and this view's own, as one uniform.
353
382
  *
354
383
  * Everything but the projection, the threshold's scale, the slot and `flags` is a property of the
355
384
  * runtime or the frame, so it is read from the runtime at write time rather than mirrored here —
356
- * a second copy of `tau` is a second thing to forget to update.
385
+ * a second copy of `tau` is a second thing to forget to update. The slot's own fields are the
386
+ * runtime's to fill ({@link GPUVirtualGeometryRuntime#fill_slot_params}).
357
387
  *
358
388
  * @param {Object} options
359
389
  * @param {GPUVirtualGeometryRuntime} options.runtime inside an open frame
360
390
  * @param {number} options.slot this view's slot in the frame's feedback
361
391
  * @param {boolean} [options.coarsen] whether this view's cut may walk up
392
+ * @param {number} [options.tau] the threshold, for a cut whose records carry an error scale of their own rather
393
+ * than a view's pixels; `runtime.tau × tau_scale` otherwise
362
394
  * @returns {void}
363
395
  */
364
- write_params({ runtime, slot, coarsen = false }) {
396
+ write_params({ runtime, slot, coarsen = false, tau = undefined }) {
365
397
  assert.defined(runtime, 'runtime');
366
398
  assert.isNonNegativeInteger(slot, 'slot');
367
399
 
368
- const layout = runtime.feedback_layout;
369
-
370
- assert.defined(layout, 'runtime.feedback_layout — begin_frame must have run');
371
- assert.lessThan(slot, layout.slot_count, 'slot');
372
-
373
- write_gpu_typed_buffer({
374
- tau: runtime.tau * this.tau_scale,
375
- projection_k: this.#projection_k,
376
- distance_weight: this.#distance_weight,
377
- queue_capacity: runtime.queue_capacity,
378
- claim_word_count: runtime.claim_word_capacity,
379
- descent_steps: runtime.descent_steps,
380
- page_slot_words: runtime.pool.page_slot_words,
381
- touch_bits_base: layout.touch_bits_base,
382
- stats_base: vgeo_feedback_slot_stats(slot),
383
- want_count_offset: vgeo_feedback_slot_want_count(slot),
384
- want_base: vgeo_feedback_slot_wants(layout, slot),
385
- want_capacity: layout.slot_want_capacity,
386
- frontier_word_count: this.#frontier_word_count,
387
- frame_tag: runtime.frame_tag_of(slot),
388
- instance_capacity: runtime.instance_capacity,
389
- meshlet_capacity: runtime.meshlet_capacity,
390
- flags: (runtime.cull_enabled ? VGEO_CUT_FLAG_CULL : 0)
391
- | (coarsen ? VGEO_CUT_FLAG_COARSEN : 0),
392
- }, VGEO_CUT_PARAMS_STRUCT, this.#scratch, 0);
400
+ const params = runtime.fill_slot_params(this.#params_fields, slot);
401
+
402
+ params.tau = tau ?? runtime.tau * this.tau_scale;
403
+ params.projection_k = this.#projection_k;
404
+ params.distance_weight = this.#distance_weight;
405
+ params.queue_capacity = runtime.queue_capacity;
406
+ params.claim_word_count = runtime.claim_word_capacity;
407
+ params.descent_steps = runtime.descent_steps;
408
+ params.frontier_word_count = this.#frontier_word_count;
409
+ params.instance_capacity = runtime.instance_capacity;
410
+ params.meshlet_capacity = runtime.meshlet_capacity;
411
+ params.flags = (runtime.cull_enabled ? VGEO_CUT_FLAG_CULL : 0)
412
+ | (coarsen ? VGEO_CUT_FLAG_COARSEN : 0);
413
+
414
+ write_gpu_typed_buffer(params, VGEO_CUT_PARAMS_STRUCT, this.#scratch, 0);
393
415
 
394
416
  this.#device.queue.writeBuffer(
395
417
  this.#params, 0, this.#scratch, 0, VGEO_CUT_PARAMS_STRUCT.aligned_size
@@ -0,0 +1,14 @@
1
+ /**
2
+ * What the cut's rule says about one cluster ({@link chunk_vgeo_cut_rule }'s `vg_cut_cluster`). A traversal acts on
3
+ * it: the camera's draws, wants and claims, a box cut takes the cluster's triangles.
4
+ */
5
+ export type VGEO_CUT_VERDICT = number;
6
+ export namespace VGEO_CUT_VERDICT {
7
+ let NONE: number;
8
+ let BELOW: number;
9
+ let TAKE: number;
10
+ let CLAMP: number;
11
+ let HELD: number;
12
+ let REFINE: number;
13
+ }
14
+ //# sourceMappingURL=VGEO_CUT_VERDICT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VGEO_CUT_VERDICT.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.js"],"names":[],"mappings":";;;;+BAMU,MAAM"}