@woosh/meep-engine 3.32.0 → 3.34.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 (465) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/editor/Editor.d.ts.map +1 -1
  3. package/editor/Editor.js +0 -3
  4. package/editor/ecs/component/prototypeObjectEditor.js +1 -165
  5. package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -1
  6. package/editor/ecs/component/registerBasicTypeEditors.js +0 -5
  7. package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -1
  8. package/editor/ecs/component/registerEngineComponentEditors.js +0 -20
  9. package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -1
  10. package/editor/process/SymbolicDisplayProcess.js +100 -106
  11. package/editor/prototypeEditorShell.d.ts.map +1 -1
  12. package/editor/prototypeEditorShell.js +190 -186
  13. package/editor/templates/entity_templates.d.ts.map +1 -1
  14. package/editor/templates/entity_templates.js +10 -27
  15. package/editor/view/makeEntityDecorators.js +2 -2
  16. package/package.json +1 -1
  17. package/src/core/collection/table/RowFirstTable.d.ts +8 -0
  18. package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
  19. package/src/core/collection/table/RowFirstTable.js +40 -11
  20. package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.d.ts +3 -3
  21. package/src/core/geom/3d/aabb/MovingBoundingBox.d.ts.map +1 -0
  22. package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.js +5 -5
  23. package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts +3 -0
  24. package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts.map +1 -0
  25. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGBA_LUT_HEATMAP_IR.js +1 -1
  26. package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts +6 -0
  27. package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts.map +1 -0
  28. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_INFERNO.js +1 -1
  29. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.d.ts +1 -1
  30. package/src/core/math/lookup/RGB_LUT_TURBO.d.ts.map +1 -0
  31. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.js +1 -1
  32. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.d.ts +1 -1
  33. package/src/core/math/lookup/RGB_LUT_VIRIDIS.d.ts.map +1 -0
  34. package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.js +1 -1
  35. package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
  36. package/src/engine/animation/AnimatedActions.js +2 -4
  37. package/src/engine/animation/AnimationUtils.d.ts +1 -17
  38. package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
  39. package/src/engine/animation/AnimationUtils.js +138 -246
  40. package/src/engine/ecs/EntityManager.d.ts +1 -1
  41. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  42. package/src/engine/ecs/EntityManager.js +2 -2
  43. package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +268 -275
  44. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  45. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +0 -10
  46. package/src/engine/graphics/geometry/distribute_points_on_indexed_triangles.d.ts.map +1 -0
  47. package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.js +3 -3
  48. package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.d.ts +1 -1
  49. package/src/engine/graphics/texture/sampler/lut_to_sampler.d.ts.map +1 -0
  50. package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.js +1 -1
  51. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -3
  52. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  53. package/src/engine/graphics3/GPUParticleEmitterSystem.js +0 -3
  54. package/src/engine/network/NetworkSession.d.ts +1 -1
  55. package/src/engine/network/NetworkSession.js +1 -1
  56. package/src/engine/physics/cloth/MEASUREMENTS.md +115 -0
  57. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  58. package/src/engine/physics/cloth/solver/cloth_contact_find.js +2 -0
  59. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +9 -0
  60. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  61. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +30 -7
  62. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  63. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  64. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +12 -2
  65. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +11 -2
  66. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  67. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +14 -7
  68. package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts +6 -15
  69. package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts.map +1 -1
  70. package/src/engine/sound/ecs/audio/SpatialAudioIndex.js +161 -174
  71. package/src/shade/device/mock/SoftwareGPUBuffer.d.ts +5 -3
  72. package/src/shade/device/mock/SoftwareGPUBuffer.d.ts.map +1 -1
  73. package/src/shade/device/mock/SoftwareGPUBuffer.js +32 -3
  74. package/src/shade/device/mock/SoftwareGPURenderPassEncoder.d.ts +20 -3
  75. package/src/shade/device/mock/SoftwareGPURenderPassEncoder.d.ts.map +1 -1
  76. package/src/shade/device/mock/SoftwareGPURenderPassEncoder.js +21 -3
  77. package/src/shade/playground/caldera/main.js +73 -60
  78. package/src/shade/playground/vgeo_runtime/main.js +25 -77
  79. package/src/shade/playground/vgeo_scene/main.js +2231 -2217
  80. package/src/shade/renderer/GraphicsContext.d.ts +18 -0
  81. package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
  82. package/src/shade/renderer/GraphicsContext.js +63 -40
  83. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  84. package/src/shade/renderer/Renderer.js +38 -0
  85. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +8 -0
  86. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  87. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +21 -0
  88. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.d.ts +6 -5
  89. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.d.ts.map +1 -1
  90. package/src/shade/renderer/buffer/GPUBufferReadbackAllocator.js +241 -240
  91. package/src/shade/renderer/buffer/GPUBufferStagingAllocator.d.ts +51 -0
  92. package/src/shade/renderer/buffer/GPUBufferStagingAllocator.d.ts.map +1 -1
  93. package/src/shade/renderer/buffer/GPUBufferStagingAllocator.js +214 -28
  94. package/src/shade/renderer/dynamic/DynamicMeshAVBOITChannel.d.ts +2 -1
  95. package/src/shade/renderer/dynamic/DynamicMeshAVBOITChannel.d.ts.map +1 -1
  96. package/src/shade/renderer/dynamic/DynamicMeshAVBOITChannel.js +19 -17
  97. package/src/shade/renderer/dynamic/GPUDynamicMeshDrawList.d.ts +70 -0
  98. package/src/shade/renderer/dynamic/GPUDynamicMeshDrawList.d.ts.map +1 -0
  99. package/src/shade/renderer/dynamic/GPUDynamicMeshDrawList.js +257 -0
  100. package/src/shade/renderer/dynamic/GPUDynamicMeshRenderer.d.ts.map +1 -1
  101. package/src/shade/renderer/dynamic/GPUDynamicMeshRenderer.js +19 -34
  102. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.d.ts +6 -20
  103. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.d.ts.map +1 -1
  104. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.js +42 -36
  105. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts +2 -1
  106. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts.map +1 -1
  107. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.js +4 -3
  108. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_vertex.d.ts +4 -3
  109. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_vertex.d.ts.map +1 -1
  110. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_vertex.js +7 -4
  111. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts +14 -15
  112. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts.map +1 -1
  113. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.js +49 -83
  114. package/src/shade/renderer/dynamic/shader_dynamic_mesh.d.ts +19 -3
  115. package/src/shade/renderer/dynamic/shader_dynamic_mesh.d.ts.map +1 -1
  116. package/src/shade/renderer/dynamic/shader_dynamic_mesh.js +26 -6
  117. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts +2 -1
  118. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts.map +1 -1
  119. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.js +12 -6
  120. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts +3 -2
  121. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts.map +1 -1
  122. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.js +21 -13
  123. package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -1
  124. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  125. package/src/shade/renderer/geometry/GPUGeometryManager.js +9 -10
  126. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +5 -0
  127. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
  128. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +11 -0
  129. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +12 -0
  130. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
  131. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +25 -0
  132. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +115 -101
  133. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  134. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +282 -140
  135. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +30 -0
  136. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +4 -1
  137. package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +536 -0
  138. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +6 -2
  139. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  140. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +68 -19
  141. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +2 -1
  142. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  143. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +17 -1
  144. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +4 -0
  145. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
  146. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +42 -12
  147. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +93 -12
  148. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
  149. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +166 -20
  150. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
  151. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -7
  152. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
  153. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +12 -5
  154. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
  155. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -2
  156. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
  157. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +23 -13
  158. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -1
  159. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +1 -2
  160. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
  161. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +1 -2
  162. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
  163. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +10 -6
  164. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +45 -17
  165. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
  166. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +61 -19
  167. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +8 -11
  168. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -1
  169. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +9 -16
  170. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
  171. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +25 -10
  172. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +10 -8
  173. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +1 -0
  174. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +19 -7
  175. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +4 -2
  176. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -1
  177. package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +4 -2
  178. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts +4 -0
  179. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts.map +1 -1
  180. package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.js +7 -0
  181. package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +1 -1
  182. package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +1 -0
  183. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  184. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  185. package/src/shade/renderer/material/GPUMaterialManager.js +2 -0
  186. package/src/shade/renderer/particles/DESIGN.md +4 -10
  187. package/src/shade/renderer/particles/ParticleConstants.d.ts +1 -3
  188. package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
  189. package/src/shade/renderer/particles/ParticleConstants.js +1 -3
  190. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts +3 -4
  191. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
  192. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +3 -4
  193. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  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/AVBOIT_LEDGER.md +20 -0
  215. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  216. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +32 -28
  217. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  218. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +9 -105
  219. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +5 -0
  220. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
  221. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +11 -0
  222. package/src/shade/renderer/scene/GPUSceneContext.d.ts +11 -3
  223. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  224. package/src/shade/renderer/scene/GPUSceneContext.js +93 -21
  225. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +4 -1
  226. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  227. package/src/shade/renderer/scene/rows/GPUSceneRows.js +5 -23
  228. package/src/shade/renderer/shader/type/serde/write_gpu_typed_buffer.d.ts.map +1 -1
  229. package/src/shade/renderer/shader/type/serde/write_gpu_typed_buffer.js +8 -1
  230. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  231. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +63 -0
  232. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts +12 -0
  233. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts.map +1 -0
  234. package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.js +11 -0
  235. package/src/shade/renderer/shadow/map/Shadowmap.d.ts +15 -0
  236. package/src/shade/renderer/shadow/map/Shadowmap.d.ts.map +1 -1
  237. package/src/shade/renderer/shadow/map/Shadowmap.js +17 -0
  238. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts +25 -0
  239. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts.map +1 -0
  240. package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.js +22 -0
  241. package/src/shade/renderer/shadow/map/shadowmap_update_score.d.ts.map +1 -1
  242. package/src/shade/renderer/shadow/map/shadowmap_update_score.js +5 -2
  243. package/src/shade/renderer/texture/TextureManager.d.ts +2 -1
  244. package/src/shade/renderer/texture/TextureManager.d.ts.map +1 -1
  245. package/src/shade/renderer/texture/TextureManager.js +4 -1
  246. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +1 -1
  247. package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts +9 -1
  248. package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts.map +1 -1
  249. package/src/shade/renderer/util/Uint32BufferSamplingStats.js +55 -5
  250. package/src/shade/renderer/view/ViewManager.d.ts +7 -1
  251. package/src/shade/renderer/view/ViewManager.d.ts.map +1 -1
  252. package/src/shade/renderer/view/ViewManager.js +17 -1
  253. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
  254. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +1 -0
  255. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +0 -20
  256. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +0 -1
  257. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +0 -35
  258. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +0 -12
  259. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +0 -1
  260. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +0 -17
  261. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +0 -14
  262. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +0 -1
  263. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +0 -18
  264. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +0 -52
  265. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +0 -1
  266. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +0 -58
  267. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +0 -47
  268. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +0 -1
  269. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +0 -58
  270. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +0 -16
  271. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +0 -1
  272. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +0 -21
  273. package/editor/particles/rebuildParticleEmitter.d.ts +0 -11
  274. package/editor/particles/rebuildParticleEmitter.d.ts.map +0 -1
  275. package/editor/particles/rebuildParticleEmitter.js +0 -31
  276. package/editor/process/ParticleEmitterRebuildProcess.d.ts +0 -66
  277. package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +0 -1
  278. package/editor/process/ParticleEmitterRebuildProcess.js +0 -217
  279. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +0 -18
  280. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +0 -1
  281. package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.js +0 -140
  282. package/src/engine/animation/removeEntityGenericEffect.d.ts +0 -18
  283. package/src/engine/animation/removeEntityGenericEffect.d.ts.map +0 -1
  284. package/src/engine/animation/removeEntityGenericEffect.js +0 -160
  285. package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts +0 -16
  286. package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +0 -1
  287. package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +0 -194
  288. package/src/engine/graphics/ecs/sprite/Sprite.d.ts +0 -12
  289. package/src/engine/graphics/ecs/sprite/Sprite.d.ts.map +0 -1
  290. package/src/engine/graphics/ecs/sprite/Sprite.js +0 -11
  291. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts +0 -8
  292. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +0 -1
  293. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +0 -141
  294. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +0 -1
  295. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +0 -61
  296. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +0 -1
  297. package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +0 -229
  298. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts +0 -6
  299. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts.map +0 -1
  300. package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js +0 -8
  301. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts +0 -7
  302. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts.map +0 -1
  303. package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.js +0 -9
  304. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts +0 -13
  305. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts.map +0 -1
  306. package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js +0 -12
  307. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts +0 -3
  308. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts.map +0 -1
  309. package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.js +0 -84
  310. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +0 -285
  311. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +0 -1
  312. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +0 -1201
  313. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts +0 -19
  314. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts.map +0 -1
  315. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js +0 -67
  316. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -197
  317. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +0 -1
  318. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +0 -398
  319. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts +0 -5
  320. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts.map +0 -1
  321. package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.js +0 -4
  322. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +0 -162
  323. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +0 -1
  324. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -472
  325. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +0 -10
  326. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +0 -1
  327. package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +0 -37
  328. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts +0 -9
  329. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts.map +0 -1
  330. package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.js +0 -25
  331. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -19
  332. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +0 -1
  333. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +0 -28
  334. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -19
  335. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +0 -1
  336. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.js +0 -162
  337. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts +0 -5
  338. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +0 -1
  339. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +0 -103
  340. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts +0 -8
  341. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts.map +0 -1
  342. package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +0 -28
  343. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +0 -2
  344. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +0 -1
  345. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +0 -2
  346. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +0 -2
  347. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +0 -1
  348. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +0 -2
  349. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -60
  350. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +0 -1
  351. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +0 -128
  352. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +0 -47
  353. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +0 -1
  354. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +0 -77
  355. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -45
  356. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +0 -1
  357. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +0 -93
  358. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +0 -95
  359. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +0 -1
  360. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +0 -239
  361. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts +0 -3
  362. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts.map +0 -1
  363. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts +0 -6
  364. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts.map +0 -1
  365. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_TURBO.d.ts.map +0 -1
  366. package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_VIRIDIS.d.ts.map +0 -1
  367. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts +0 -13
  368. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts.map +0 -1
  369. package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.js +0 -28
  370. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts +0 -9
  371. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts.map +0 -1
  372. package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.js +0 -24
  373. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts +0 -13
  374. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts.map +0 -1
  375. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.js +0 -27
  376. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts +0 -33
  377. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts.map +0 -1
  378. package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.js +0 -80
  379. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +0 -49
  380. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +0 -1
  381. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +0 -135
  382. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts +0 -7
  383. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts.map +0 -1
  384. package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.js +0 -14
  385. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts +0 -41
  386. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +0 -1
  387. package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +0 -59
  388. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts +0 -4
  389. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts.map +0 -1
  390. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.js +0 -56
  391. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts +0 -4
  392. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts.map +0 -1
  393. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.js +0 -84
  394. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts +0 -4
  395. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +0 -1
  396. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +0 -80
  397. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts +0 -29
  398. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +0 -1
  399. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +0 -43
  400. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts +0 -5
  401. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts.map +0 -1
  402. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js +0 -104
  403. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts +0 -9
  404. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map +0 -1
  405. package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js +0 -11
  406. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts +0 -9
  407. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map +0 -1
  408. package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.js +0 -64
  409. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts +0 -9
  410. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +0 -1
  411. package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +0 -172
  412. package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +0 -1
  413. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +0 -20
  414. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +0 -1
  415. package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +0 -84
  416. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +0 -81
  417. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +0 -1
  418. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +0 -200
  419. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +0 -6
  420. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts.map +0 -1
  421. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.js +0 -8
  422. package/src/engine/graphics/particles/particular/engine/utils/volume/lut_to_sampler.d.ts.map +0 -1
  423. package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -20
  424. package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +0 -1
  425. package/src/engine/graphics/particles/particular/group/Operation.js +0 -20
  426. package/src/engine/graphics/particles/particular/group/OperationType.d.ts +0 -7
  427. package/src/engine/graphics/particles/particular/group/OperationType.d.ts.map +0 -1
  428. package/src/engine/graphics/particles/particular/group/OperationType.js +0 -9
  429. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -27
  430. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +0 -1
  431. package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +0 -27
  432. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts +0 -8
  433. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts.map +0 -1
  434. package/src/engine/graphics/particles/particular/group/ParticleAttributeType.js +0 -11
  435. package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts +0 -7
  436. package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts.map +0 -1
  437. package/src/engine/graphics/particles/particular/group/ParticleDataType.js +0 -10
  438. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -24
  439. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +0 -1
  440. package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +0 -48
  441. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts +0 -7
  442. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts.map +0 -1
  443. package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.js +0 -20
  444. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts +0 -6
  445. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts.map +0 -1
  446. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +0 -162
  447. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts +0 -8
  448. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map +0 -1
  449. package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js +0 -19
  450. package/src/engine/graphics3/ParticleEmitterSystem.d.ts +0 -77
  451. package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +0 -1
  452. package/src/engine/graphics3/ParticleEmitterSystem.js +0 -307
  453. package/src/engine/graphics3/ParticleEmitterSystem3.d.ts +0 -10
  454. package/src/engine/graphics3/ParticleEmitterSystem3.d.ts.map +0 -1
  455. package/src/engine/graphics3/ParticleEmitterSystem3.js +0 -10
  456. package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts +0 -61
  457. package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts.map +0 -1
  458. package/src/engine/graphics3/particles/GPUParticularRenderer.js +0 -627
  459. package/src/engine/graphics3/particles/particle_gpu_records.d.ts +0 -85
  460. package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +0 -1
  461. package/src/engine/graphics3/particles/particle_gpu_records.js +0 -227
  462. package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts +0 -35
  463. package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +0 -1
  464. package/src/shade/renderer/particles/shaders/shader_particle_render.js +0 -135
  465. /package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.d.ts +0 -0
@@ -0,0 +1,536 @@
1
+ # Virtual geometry casts shadows — the plan
2
+
3
+ **Closed 2026-09-29.** Everything below is done, withdrawn or measured moot, and §5 is what it
4
+ deliberately leaves out.
5
+
6
+ **2026-09-28, revision 3**, after an adversarial pass over revision 2 (three reviewers against the
7
+ code; §6 is the ledger, and the sections it changed say so). **S1–S5 are done, S6 is withdrawn, and shadow
8
+ views cut at twice the camera's τ; §7 is what each step measured.** It changes no decision in
9
+ `VIRTUAL_GEOMETRY_DESIGN.md` — §4 already pins one cut per view and withdrew the claim that shadow
10
+ views could reuse the camera's — and it takes `RUNTIME_PLAN.md` §9's "no shadow-view cuts" out of
11
+ the list of things v1 does not do.
12
+
13
+ ## Decided
14
+
15
+ 1. **One cut per view, and a shadow view is a view.** Cascades, spots and a point light's cube faces
16
+ go through the same seam, the same per-view state and the same rules as the main view. Nothing in
17
+ the VG runtime knows which kind of view it is cutting for.
18
+ 2. **The engine owns the VG frame.** It is a core feature; a host does not open, read or close it.
19
+ 3. **VG shadows are not optional.** How is open; whether is not.
20
+ 4. **Proxies are not built now, and the architecture leaves room for them.** Nanite-style proxies
21
+ drawn in place of a cut for some views, behind a switch, may come later; §2.6 is where they would
22
+ go and what this work must not close off.
23
+ 5. **The order is §4's.**
24
+ 6. **Shadow views cut at twice the camera's τ** *(after S4)*. The shadow context sets
25
+ `tau_scale` to 2 on every view it owns (`SHADOWMAP_VGEO_TAU_SCALE`); §7.2 is the price.
26
+ 7. **No batched cascade cut** *(after S5)*. Cascades are boxes fitted to separate slices of the view
27
+ frustum — misaligned, overlapping only at the blend margins — so one descent over all three
28
+ shares no traversal work, only dispatches. §3 item 2 and S6 are withdrawn.
29
+
30
+ Revision 1 argued from a measured match between a cascade's texel and the screen pixel at the far end
31
+ of its slice. That argument is withdrawn: what a view's cut needs is a function of what projects into
32
+ *that* view, and §1 says why the camera's view says nothing about it.
33
+
34
+ ## 0. What is true today — measured
35
+
36
+ ### 0.1 Virtual geometry receives shadows and never casts them
37
+
38
+ Measured on `playground/vgeo_scene` with the textured Zorah rebuild (1,012 containers, 12,597
39
+ instances, the scene's own sun), headless Chrome on the 4090, 1556×592. Each condition is a
40
+ 32-frame average after TAA has settled; the column is the fraction of pixels that go more than 16
41
+ luma darker when shadows are switched on.
42
+
43
+ | view | only VG in view | plus two ordinary `BoxGeometry` casters |
44
+ |---|---:|---:|
45
+ | authored | 0 | 0.110% |
46
+ | oblique | 0 | 0.076% |
47
+ | plan | 0 | 0.106% |
48
+
49
+ Two identical captures differ by the same 0 at that threshold, so the VG column is noise. The boxes'
50
+ shadows land on VG ground and are the only thing in the on/off difference; the dome and the
51
+ greenhouse, under a sun 52° above the horizon, leave nothing on it.
52
+
53
+ Before the far-plane fix of 2026-09-28 the page hid every shadow, not only VG's: `look()` set
54
+ `camera.far = distance × 2000`, and `DirectionalLightShadowmap.update` takes `camera.far` as its
55
+ shadow distance, so from the authored viewpoint the nearest cascade spanned 0–5.8 km. The page now
56
+ fits the far plane to the world's bounding sphere, capped at twenty times the orbit distance, and
57
+ the numbers above are from that version.
58
+
59
+ ### 0.2 Why, in the code
60
+
61
+ Three things each stop it, in the order a frame meets them:
62
+
63
+ - **The frame is not open yet.** `Renderer.render` calls `sm.select_for_draw` / `sm.draw` before it
64
+ creates the `Shading` graph, and the VG frame is opened by the host's `RenderExtension` at
65
+ `FramePhase.FrameStart` — on that graph. Every shadow view is recorded while
66
+ `runtime.feedback === -1`, and `graph_vgeo_expand_if_enabled` returns at its first check.
67
+ - **The graph is not the frame's.** Each shadow map records on a `new FrameGraph("shadows")` of its
68
+ own, and the feedback buffer is a transient of the `Shading` graph. Were the frame open, the
69
+ second check (`runtime.frame_graph !== graph`, REVIEW_LEDGER M13) would skip anyway, and must:
70
+ the handle names a resource that graph has never heard of.
71
+ - **An orthographic view has no projection the cut can take.** `VGeoViewCut.set_projection` reads
72
+ `view.camera.camera.fov`; a cascade's `OrthographicCamera` has none, and `vg_project` divides by a
73
+ distance that means nothing to a parallel projection.
74
+
75
+ Nothing else stops it. The seam already sits in both rasterization paths shadow views use —
76
+ `graph_rasterize_scene` for cascades and spots, `graph_rasterize_scene_fast` for a point light's cube faces — and
77
+ every `GPUViewContext`, shadow views included, already owns a `VGeoViewCut`. The cascade fit's
78
+ caster range (`shader_csm_caster_range`) already reads every `meshes` row's world bounds, VG rows
79
+ among them, so the near planes already reach VG casters.
80
+
81
+ ### 0.3 What a cut costs now
82
+
83
+ `GPUProfileSession` at `TIMING`, 90 frames, medians, the same page, `max_iterations` 16 (escalated),
84
+ `descent_steps` 24:
85
+
86
+ | | authored | oblique |
87
+ |---|---:|---:|
88
+ | GPU frame, sum of spans | 2,903 µs | 2,931 µs |
89
+ | `VGeo cut traverse`, 48 dispatches | 984 µs | 814 µs |
90
+ | `VGeo cut queue prepare`, 48 dispatches | 60 µs | 60 µs |
91
+ | collect + seed, 3 each | 29 µs | 35 µs |
92
+ | per site: traverse | 815 / 120 / 46 µs | 630 / 98 / 70 µs |
93
+
94
+ The main view records **three cut sites** — the per-opaque-bucket seam of
95
+ `graph_rasterize_partial_opaque` plus the one in `graph_rasterize_remaining_opaque` — and the work
96
+ is almost all in the first. A site with nothing to do still pays its ladder: sixteen traverse
97
+ dispatches at ~3 µs, sixteen prepares, collect, seed, the scan and the remainder, about **80 µs**.
98
+ The cut is already the largest line in the frame, over a third of it.
99
+
100
+ ## 1. Why a shadow view needs its own cut
101
+
102
+ **A cut is a function of what projects into the view it is drawn into, and a caster's projection into
103
+ a shadow map has nothing to do with its projection onto the screen.** A small object high above the
104
+ observer is a speck to the camera — or outside its frustum altogether — and throws a large shadow on
105
+ the ground in front of it. That shadow needs the caster's fine levels; the camera's cut holds its
106
+ coarse ones where the camera sees it at all, and nothing where the camera does not. No property of
107
+ the camera's view bounds what a shadow view needs, so a shadow view gets its own cut exactly as the
108
+ main view does, with its own projection and its own threshold in the units of its own render target.
109
+
110
+ It follows that **a shadow view is a streaming client in its own right.** Its demand is not a subset
111
+ of the camera's — the speck in the sky wants pages the camera will never ask for — so its wants reach
112
+ residency on the same terms as the main view's (§2.4), and residency, which is already scene-wide,
113
+ arbitrates between them.
114
+
115
+ **This is what the references do.** Unreal's Nanite renders every virtual-shadow-map view with its
116
+ own culling and LOD, against that view's resolution; Bevy's meshlet renderer runs a full cull and
117
+ raster per shadow view, and its LOD test reads the bound view's own projection and viewport. Neither
118
+ reuses the camera's cut. The one reference that does, NVIDIA's `vk_lod_clusters`, traces its shadow
119
+ rays against the camera's cut and documents the cost: off-screen instances cast from a coarser level,
120
+ and their shadows change when they come into view.
121
+
122
+ **Self-shadowing is measured, not argued.** A surface that is both receiver and caster is drawn at
123
+ the camera's level in the G-buffer and at the shadow view's level in the map. The receiver bias in
124
+ `chunk_sample_shadowmap_atlas_for_light` is a normal offset and a slope-scaled depth offset in texels,
125
+ over a 5×5 filter; whether that absorbs the mismatch is S3's measurement (§4), and a new bias term is
126
+ added only if it fails.
127
+
128
+ ## 2. What changes
129
+
130
+ ### 2.1 The engine owns the VG frame *(rev 3)*
131
+
132
+ The renderer opens the frame for a scene with virtual geometry enabled, **before the shadow block and
133
+ outside its `if`** — so a frame with shadows off still opens and closes — and schedules the readback
134
+ and closes the frame inside the `Shading` graph's recording, after the last phase and before
135
+ `encodeGraph`, in a `finally` so a throwing phase cannot leave it open. `VGeoFrameStart` and
136
+ `VGeoFrameEnd` are deleted from **all three** hosts — `vgeo_scene`, `vgeo_runtime` and `caldera`. That
137
+ closes REVIEW_LEDGER U1: `GPUSceneContext` constructs the runtime, residency and `VGeoFeedbackLoop`
138
+ today, and nothing in the engine drives them. The frame is opened *for* the view being rendered, which
139
+ takes slot 0 (§2.4); that is the frame's own view, not a kind of view.
140
+
141
+ The feedback buffer stops being a graph transient. It becomes a buffer the runtime owns
142
+ (`STORAGE | COPY_SRC | COPY_DST`), re-made when its layout grows, and **imported** into each graph that
143
+ cuts via `FrameGraph.import_resource` — a write to an imported resource marks the pass side-effecting,
144
+ so nothing is culled. The seam asks the runtime for the graph's handle (`feedback_in(graph)`), and the
145
+ first graph of a frame to import it records a pass that **clears the counter and touch words in-stream**
146
+ (`clearBuffer`, no upload; the want records need no clearing). M13's hazard — a handle from one graph
147
+ named in another — then cannot be written. Ordering between graphs needs nothing: `encodeGraph`
148
+ compiles and executes each graph into the frame's one encoder as it is handed over, and there is one
149
+ submit per render.
150
+
151
+ `GraphicsEngine.render_to_sampler` renders eight times per call and each is a frame, which is the
152
+ right semantics — each is a render of a view — and it advances the residency's protect clock eight
153
+ times; noted, not changed.
154
+
155
+ ### 2.2 The cut takes an orthographic projection *(rev 3)*
156
+
157
+ **One derivation, from the projection matrix the view actually draws with** — no camera-type branch in
158
+ the seam, and no widths the old setter could not take:
159
+
160
+ k = ½ · max(width · |P[0]|, height · |P[5]|) w = −P[11]
161
+
162
+ For this engine's infinite reverse-Z perspective that is `height / (2 tan(fov/2))` and `w = 1`; for its
163
+ reverse-Z orthographic, `height / (top − bottom)` on the finer axis and `w = 0`. Anything else asserts.
164
+ `vg_project` divides by `w · d + (1 − w)` and tests **that** for `≤ 0`, so an orthographic camera whose
165
+ transform sits inside a root sphere — a cascade's centre usually does — is not taken as an eye inside
166
+ the sphere.
167
+
168
+ The weight lives **in the instance record** (`VGEO_INSTANCE_OFFSET.DISTANCE_WEIGHT`), not only in the
169
+ params, so the traversal never reads a per-view uniform for it. The collect's scale term is
170
+ `k · σmax / (w · σmin + 1 − w)`: σmax/σmin in perspective, as today, and σmax alone orthographically,
171
+ where no distance cancels a scale. `vgeo_select_cut` gets the same term.
172
+
173
+ **The proof has to discriminate the scale term, not just the formula** *(rev 3)*: the oracle has no
174
+ instance transform, so agreement alone would check the GPU against the same formula it was given. S1
175
+ adds a direct collect check at a uniform scale of 7 (σmax = 7 against σmax/σmin = 1) and a metamorphic
176
+ one — an instance scaled by s in an orthographic view cuts exactly like an unscaled one at s times the
177
+ extent — plus the orthographic frustum held against `construct_frustum_planes`.
178
+
179
+ Bevy's `lod_error_is_imperceptible` has this shape, and its orthographic arm is where its bug was: PR
180
+ #19318 fixed a metric that had left shadows visibly faceted.
181
+
182
+ ### 2.3 τ is the runtime's, scaled per view *(rev 3)*
183
+
184
+ Revision 2 made τ an absolute per-view value. That splits the one quality lever — the playgrounds'
185
+ slider sets `runtime.tau`, and an absolute shadow τ of 2 becomes *finer* than the main view the moment
186
+ the slider goes to 4 — and the reference it cited is relative. So a view carries **`tau_scale`**,
187
+ default 1, and cuts at `runtime.tau × tau_scale`. Whoever owns a view may set it; nothing in the runtime
188
+ knows what kind of view it is. Unreal's `r.Shadow.NaniteLODBias` (default 1, scale 2^−bias) is the
189
+ data point for shadow views; S4 measures before anything but 1 is set.
190
+
191
+ **Shadow views default to 2** *(after S4)*: the shadow context sets it on every view it owns
192
+ (`SHADOWMAP_VGEO_TAU_SCALE`), and the runtime still knows nothing of what kind of view it cuts for.
193
+ At 2 the cascades draw 39% of the clusters they do at 1, and false light against a fine reference
194
+ rises 2.3–4.7× (§7.2).
195
+
196
+ ### 2.4 Feedback is per view *(rev 3)*
197
+
198
+ Each view that cuts in a frame takes a **slot**. Per slot, the layout carries a header — the want
199
+ counter and the stats block — and a want slice; the touch bits after the headers stay shared, since a
200
+ page any view draws from is a page in use. The view's params hold its offsets (`stats_base`,
201
+ `want_count_offset`, `want_base`, `want_capacity`), so this is parameters, not bindings: every kernel
202
+ that writes feedback already binds `params`, and the traverse is at its tenth storage buffer with no
203
+ eleventh. `want_capacity` keeps its meaning — pages one frame may ask for across every view — and is
204
+ divided evenly among the slots, so the readback does not grow with the view count.
205
+
206
+ - **Slots.** The frame's own view is slot 0. Other views take the next slot the first time they cut
207
+ in the frame. The layout is sized to a **high-water mark** of slots used, like `max_iterations`: a
208
+ view beyond it shares the last slot for that frame, and the next frame has room. The mark is capped,
209
+ so a frame that draws many point lights for the first time — first draws bypass the shadow budget —
210
+ cannot grow the buffer without bound.
211
+ - **Wants: one stamp tag per (frame, slot).** The stamp was taken *before* the capacity check, so a
212
+ full shadow slice burned the stamp of every page it could not write and the main view, recording
213
+ later, could not ask for it that frame; and the recorded priority was the first writer's. With a
214
+ tag per view, each view dedups its own wants and records them in its own slice; a page two views want
215
+ appears twice, and `VGeoResidency` already collapses the second (the page is pending or resident by
216
+ then).
217
+ - **Priority is error over the view's own τ**, so a want at twice its view's threshold ranks the same
218
+ whether that view counts screen pixels or texels. Eviction stays LRU over touches; refusals per slot
219
+ are what S4 measures.
220
+ - **Escalation is per view.** `max_iterations` moves from the runtime onto `VGeoViewCut`, starting
221
+ from the runtime's and raised from that view's own slot. One far cascade or one cube face of a point light that
222
+ needed more wavefronts must not double every site's ladder for the life of the scene. The readback
223
+ closes over the slot → view table with the layout, since it lands frames later and the set of views
224
+ changes.
225
+ - **Stats** are per slot; `VGeoFeedbackLoop.stats` is slot 0's, which is what the panels show, and each
226
+ view's last reading is on its `VGeoViewCut`.
227
+
228
+ ### 2.5 What does not change
229
+
230
+ The seam's call sites, the record type, the HZB meshlet filter, the draw, the shadow atlas, the
231
+ cascade fit and the caster range.
232
+
233
+ **Cached local maps** *(rev 3)*. A spot or point map drawn once is kept until `shadowmap_update_score`
234
+ re-selects it. Its first draw is forced at creation, when little but the roots is resident, and between
235
+ redraws it touches nothing, so the LRU evicts exactly the pages only it needs. Left alone it would keep
236
+ a root-level cut indefinitely. So a map whose own views' last reading was **clamped**, and under which
237
+ pages have installed since, is re-selected like an invalid one. That keys on the map's own incomplete
238
+ cut rather than on every LOD change, which is what keeps it clear of the invalidation storm Unreal's
239
+ `r.Nanite.VSMInvalidateOnLODDelta` warns about.
240
+
241
+ ### 2.6 Room for proxies — not built
242
+
243
+ A proxy is a fixed, cheap stand-in for a whole geometry — Nanite's fallback mesh — drawn **instead of**
244
+ a cut for a view that does not justify one. If it comes, it comes as a per-view choice, and this work
245
+ keeps the two places it would need open:
246
+
247
+ - **The choice is made per (instance, view).** Today that is the seam, which already receives the view:
248
+ it would either cut or append the instances' proxy meshlets.
249
+ - **A proxy's meshlets would hang off the VG geometry row, never off `VirtualGeometry.meshlets`.**
250
+ `meshlets.count` is zero for a virtual geometry, and that is what keeps static expansion from
251
+ drawing a VG instance in every view; filling it with a proxy would draw the proxy *and* the cut
252
+ everywhere.
253
+
254
+ That room is for **raster** views *(rev 3)*: ray-traced shadows read `geometries.blas`, built from
255
+ static meshlets, so a proxy for RT needs the BLAS builder to take an input from the VG row as well.
256
+
257
+ ## 3. Cost *(rev 3)*
258
+
259
+ **Sites** *(before S5)*. A view cuts once per active opaque bucket in phase one plus once in phase two (standard
260
+ path: cascades and spots, ~3 sites each), and once per active bucket in the fast path (a point light's cube faces:
261
+ two active buckets make 12 sites for a cube light and 8 for a tetrahedral one). S5 made it two per
262
+ standard view and one per face (§7.3). An empty site is ~80 µs at
263
+ `max_iterations` 16 and ~225 µs at the ceiling of 64.
264
+
265
+ **Work.** The three cascades are 1740² + 2 × 1440² ≈ 7.3 Mpx against the 0.92 Mpx main view that §0.3
266
+ measured, and a cut is a function of pixels, so "a cascade costs what the camera's cut does" is a floor
267
+ rather than an estimate. S4 measures it, with the raster cost of the extra clusters beside it.
268
+
269
+ 1. **One cut per view** — CUT_PLAN §7 6b, decided and not done, and **extended to the fast path**:
270
+ filter instances once, cut once, sort the meshlets by bucket, then loop the buckets for raster
271
+ alone. That is two sites per standard view and one per cube face.
272
+ 2. **One ladder for the cascades — withdrawn.** It would have run one descent over all three
273
+ cascades. They are not one frustum and not nested ones: each is a box fitted to its own slice of
274
+ the view frustum, misaligned with the others and overlapping only at the blend margins, so a shared
275
+ descent shares no traversal work. What it would share is dispatch overhead — 0.2–0.3 ms after S5
276
+ (§7.4) — for a change inside the traverse.
277
+
278
+ ## 4. Order, and what each step leaves proved *(rev 3)*
279
+
280
+ **Correctness first, on by default, then cost.** VG shadows are not optional, so they land for every
281
+ scene with virtual geometry with no switch to turn them off. Each step is red-then-green against a spec
282
+ or a scripted headless measurement.
283
+
284
+ - **S1 — orthographic projection (§2.2).** Agreement spec: orthographic views against the oracle; the
285
+ σmax collect check; the metamorphic scale check; the orthographic frustum. `VGeoViewCut` derives k and
286
+ w from the projection matrix, with its own spec. The seam takes it from the view's camera.
287
+ - **S2 — the engine owns the frame; feedback is per view (§2.1, §2.3, §2.4).** This is the step that
288
+ turns shadow cuts on. Emulator tier: two views in one run write their own stats and want slices, a
289
+ full slice does not stop another view asking for the same page, and priority is over τ. Recording
290
+ tier: the seam on a second graph within an open frame records its cut against the same imported
291
+ buffer, and only the first graph clears it. Headless: all three playgrounds still stream.
292
+ - **S3 — the shadows are right.** Proved against the tree before S2, where every one of these is red.
293
+ TAA off and single frames, the shadow term measured against a reference with shadow views at a
294
+ quarter of the τ: false-shadow and false-lit pixels on light-facing receivers.
295
+ - a caster outside the camera frustum (behind the camera) casts into view;
296
+ - spot, cube and tetrahedral point lights over VG, including a cached map converging (§2.5);
297
+ - a yaw sweep over a still scene: frame-to-frame XOR of the shadow mask, VG against an ordinary
298
+ mesh of the same size, since unstabilized cascades refit — and change `k` — every frame;
299
+ - per slot: `QUEUE_DROPPED`, `INSTANCES_DROPPED`, `MESHLETS_DROPPED` all zero, `QUEUE_REMAINING`
300
+ zero after escalation.
301
+ - **S4 — measure.** Per view (the cut's scope and the `VGeoViewCut` label carry the view's name): cut
302
+ time, drawn clusters, wants, refusals; spot, cube and tetra lights; a frame spawning N point lights;
303
+ shadow views at `tau_scale` 1, 2, 4 — a default other than 1 only if S3's checks pass at it.
304
+ - **S5 — one cut per view (6b), standard and fast paths.**
305
+ - **S6 — one ladder for the cascades: withdrawn** (§3 item 2).
306
+
307
+ ## 5. Not in this
308
+
309
+ - **Proxies** (§2.6), beyond keeping the room.
310
+ - **Non-opaque VG casters.** An alpha-tested VG instance draws nothing in the main view either
311
+ (design §9); the shadow path's alpha-tested bucket inherits that.
312
+ - **Ray-traced and SDF shadows** (`shadow/ray`, `shadow/sdf`). VG × RT is design §9's future work.
313
+ - **Screen-space contact shadows** already see VG — they trace the depth buffer.
314
+ - **Releasing VG on scene teardown** was a defect of its own. It was fixed separately:
315
+ `GPUSceneContext.destroy()` releases what `enable_virtual_geometry` built (7a9e14fea, and
316
+ REVIEW_LEDGER U1).
317
+
318
+ ## 6. Adversarial review of revision 2 — the ledger
319
+
320
+ Three reviewers, one each on the frame and feedback, the kernel, and the shadow path and cost; each
321
+ finding checked against the code before it was taken.
322
+
323
+ | # | finding | disposition |
324
+ |---|---|---|
325
+ | 1 | want stamp taken before the capacity check: a full shadow slice silences the main view's want for that page; first writer's priority wins (all three) | §2.4: stamp tag per (frame, slot); priority over the view's τ |
326
+ | 2 | absolute per-view τ splits the one lever and inverts at a raised slider | §2.3: `tau_scale` |
327
+ | 3 | one `max_iterations` for the frame lets one hungry view double every site forever | §2.4: per view |
328
+ | 4 | S2 already turns shadows on, so S3 cannot be red after it; the software device cannot prove a readback | §4: S3 proved against the pre-S2 tree; slot writes proved at the emulator tier |
329
+ | 5 | Caldera is a third host; a second `begin_frame` mid-render would split `frame_tag` | §2.1 |
330
+ | 6 | the oracle has no instance transform, so agreement cannot catch a wrong scale term; the seam still reads `fov` | §2.2, S1: σmax and metamorphic checks; projection from the matrix |
331
+ | 7 | `vg_project`'s eye-inside test must be on the denominator — a cascade's centre sits inside root spheres | §2.2 |
332
+ | 8 | "no change inside the traverse" for a batched cut is false; cascades and local maps are in separate graphs; the multi-view collect moves the proxy choice | §3.2 scoped to cascades and called a traverse change; §2.6 restated per (instance, view) |
333
+ | 9 | a point light's cube faces cut per bucket in the fast path, first draws bypass the budget, cascades are 7.3 Mpx | §3 |
334
+ | 10 | 6b as written covers only the standard path | §3.1: and the fast path |
335
+ | 11 | a cached local map keeps its first, root-level cut | §2.5: re-select a map whose cut was clamped once pages have installed |
336
+ | 12 | the S3 probe cannot see speckle through TAA, never looks for leaks, sweeps the wrong τ, and misses off-frustum casters, local lights and stability | §4 S3 |
337
+ | 13 | clearing by `writeBuffer` uploads the whole buffer, and the usage lacks `COPY_DST` | §2.1: in-stream clear of the counter and touch words |
338
+ | 14 | `end_frame` needs a `finally`; the open has to sit outside the shadows-enabled `if` | §2.1 |
339
+ | 15 | per-view attribution impossible: identical scope names, `VGeoViewCut` labelled before its view is | §4 S4 |
340
+ | 16 | proxies as described are raster-only | §2.6 |
341
+ | 17 | unstabilized cascades change `k` every frame, so shadow LOD may pop under camera motion | **measured, no action (§7.6)**: `k` moves and the cut follows, but the picture does not flicker beyond what a frozen-`k` cut — an ordinary mesh, to the map — does. `k` is not quantized |
342
+ | 18 | a point light's cube faces render at a fixed 512² each and are then remapped into the light's octahedral atlas slot, 128² by default and sized by the resolution policy — so each face cuts for texels the slot does not keep | **withdrawn, not a VG issue.** It is the remap's resolution match between cube faces and the octahedral encoding, and a VG knob would only paper over it |
343
+ | 19 | the orthographic far plane is finite and skipped: casters behind a slice's receivers refine and want pages | **withdrawn, measured (§7.5)**: a cascade's far plane is the far corner of its view slice in light space, and testing it culls nothing worth having |
344
+ | 20 | the exact orthographic factor is the largest singular value of the projected 2×3 | declined: σmax is a conservative bound and exact for uniform scale |
345
+
346
+ ## 7. What the steps found
347
+
348
+ All of it is Zorah (§0.1's page, scene and viewpoints) on the 4090 in headless Chrome, at 1556×592.
349
+ Costs come from `GPUProfileSession` at `TIMING`, as medians over 48 frames. **This GPU runs in two
350
+ modes about 2× apart.** It switches between launches and now and then mid-run, so absolute numbers do
351
+ not compare across runs, or even across the rows of one table. Every cost claimed here is a
352
+ difference within a pair taken in one Chrome, and only pairs taken in one mode are quoted.
353
+
354
+ ### 7.1 Shadows are cast (S3)
355
+
356
+ The table is §0.1's: the fraction of pixels that go more than 16 luma darker when shadows are switched
357
+ on, only VG in view, against the tree before S2.
358
+
359
+ | view | before | after |
360
+ |---|---:|---:|
361
+ | authored | 0 | 3.99% |
362
+ | oblique | 0 | 0.31% |
363
+ | plan | 0 | 1.95% |
364
+
365
+ - **A caster behind the camera casts into view.** From inside the throne room, 39% of the pixels
366
+ darken.
367
+ - **Local lights, with the sun off.** Pixels darkened: 4.5% under a cube point light, 4.1% under a
368
+ tetrahedral one, 0.22% under a spot. In every slot `QUEUE_DROPPED`, `INSTANCES_DROPPED`,
369
+ `MESHLETS_DROPPED` and `QUEUE_REMAINING` are zero.
370
+ - **Cached maps (§2.5).** Twelve point lights spawned in one frame reach zero clamped maps within
371
+ 14 s, with nothing else fetching.
372
+ - **At rest, nothing moves.** Across consecutive settled frames, no pixel changes in the authored view.
373
+ In the plan view, fewer than one pixel in 100,000 changes by more than 4 luma, and that holds with
374
+ shadows on and off alike.
375
+ - **Under camera motion, VG shadows flicker no more than ordinary geometry's** (§7.6).
376
+ - **Self-shadowing (§1) needs no new bias.** The main view's `tau_scale` was swept 1 → 8, which makes
377
+ the G-buffer up to 8× coarser than the maps.
378
+ - Authored: the fraction of darker pixels holds at 6.98–6.99%, with no isolated acne.
379
+ - Oblique: 0.79% at 1 and 0.89% at 2, then 1.17% at 4 and 2.29% at 8.
380
+ - Isolated dark pixels do not grow anywhere in the sweep.
381
+
382
+ So the existing bias absorbs about a 2× mismatch, and the default adds none beyond what the two
383
+ projections make. Measured the other way round, against shadow views at τ × ¼, shadow views at τ × 1
384
+ leave 0.003–0.012% false shadow and 0.006–0.154% false light.
385
+
386
+ ### 7.2 What shadows cost, and τ (S4)
387
+
388
+ **The first S4 run found a defect in S2**, fixed in 3f9cce3cc. The first frames were laid out for one
389
+ slot, so the cascades shared slot 0 with the frame's view. The sum of their remainders escalated the
390
+ main view to 32 wavefronts, for good. Now the floor is two slots, a view past the layout never shares
391
+ slot 0, and a shared slot escalates nobody.
392
+
393
+ **Where the time goes**, read within single frames so the modes cannot move it. The frame is the
394
+ authored view with shadows on, after S5:
395
+
396
+ - The cut is half of it: 2.67 of 5.27 ms.
397
+ - Of that cut, the three cascades take 1.88 ms and the camera 0.74 ms.
398
+ - Cascade 0 alone is 0.82 ms and draws 113k clusters, against the camera's 32k.
399
+
400
+ Per-site ladders are the smaller part (§7.4).
401
+
402
+ **`tau_scale` on the cascades** (`shadow_tau`, TAA and auto exposure off; the reference is every
403
+ cascade at τ × ¼):
404
+
405
+ | view | false light ×1 | ×2 | ×4 |
406
+ |---|---:|---:|---:|
407
+ | authored | 0.006% | 0.028% | 0.040% |
408
+ | oblique | 0.154% | 0.349% | 0.454% |
409
+ | plan | 0.153% | 0.400% | 0.530% |
410
+
411
+ ×2 draws 36% of ×1's clusters in cascade 0 and cuts the depth raster by about 60%. Across the three
412
+ views it also multiplies the false light by 2.3–4.7×, and false light is sunlit ground under a caster.
413
+ **Shadow views default to 2** — Alex's call on these numbers. The clusters and raster are the saving,
414
+ and the false light is the price.
415
+
416
+ ### 7.3 One cut per view (S5)
417
+
418
+ - **Standard path, phase one.** The HZB filter appends every opaque bucket to one positive set, as it
419
+ already did the maybe set. That set is expanded, cut and meshlet-filtered once, then sorted by bucket
420
+ and drawn a bucket at a time (`graph_meshlets_rasterize_by_bucket`).
421
+ - **Fast path.** The opaque buckets are not neighbours in its bucket-sorted meshes, so it gathers them
422
+ into one collection first (`shader_gather_bucket`). Each bucket lands after the gathered buckets
423
+ below it, read off their headers, with no atomics.
424
+ - **Both paths, and phase two,** sort only when there is more than one bucket to separate.
425
+
426
+ Paired, before (3f9cce3cc) and after in one Chrome, ABBA twice. The ranges are over the pairs taken in
427
+ the fast mode, and the slow mode's pairs save proportionally the same.
428
+
429
+ | | cut sites | frame saved | cut saved |
430
+ |---|---:|---:|---:|
431
+ | authored, shadows on | 12 → 8 | 1.0–1.1 ms of 6.2 | 0.9–1.2 ms |
432
+ | oblique, shadows on | 12 → 8 | 0.6–1.6 ms of 10.2 | 1.2–1.7 ms |
433
+ | authored, shadows off | 3 → 2 | 0.3–1.0 ms | 0.2–0.7 ms |
434
+ | oblique, shadows off | 3 → 2 | 0.02–0.13 ms | 0.09–0.11 ms |
435
+
436
+ **Nothing else changed:**
437
+
438
+ - The two trees' pictures differ by nothing at any threshold, in all four conditions.
439
+ - Every view draws the same number of clusters.
440
+ - Every counter of every face of a cube and a tetrahedral point light is the same, from drawn to
441
+ culled-by-LOD.
442
+
443
+ The second bucket's site disappears and the first barely grows, because nearly all of what the second
444
+ site cost was its ladder. Cascade 0 goes from [807, 328, 71] µs to [820, 69] µs.
445
+
446
+ ### 7.4 S6 is withdrawn
447
+
448
+ After S5 each view is left with **one ladder per phase**, and an empty ladder costs 40–75 µs. That
449
+ ladder is all a batched cascade cut could have shared: the cascades are disjoint boxes over separate
450
+ slices of the view frustum (§3 item 2), so the descent's own work — where the cascades' cost is —
451
+ would be the same.
452
+
453
+ What would reduce that work is fewer clusters per cascade. Two levers exist:
454
+
455
+ - `tau_scale` — now 2 on shadow views (§7.2).
456
+ - Starting each view's descent from its previous frontier. `VGeoViewCut` already keeps a frontier
457
+ (CUT_PLAN 6c), and the seam does not read it.
458
+
459
+ Neither is proposed here.
460
+
461
+ ### 7.5 A cascade's far plane culls nothing worth having
462
+
463
+ Ledger 19 said the untested orthographic far plane lets casters behind a cascade's receivers refine.
464
+ That was argued, not measured. A cascade's far plane is `extents.z1`, the far corner of its view
465
+ slice in light space, so anything behind it sits below everything the slice covers.
466
+
467
+ Measured with shadow views at `tau_scale` 2. The collect's fifth plane was swapped for orthographic
468
+ views only, one Chrome launch per arm: the near plane as shipped, no plane, the far plane, then the
469
+ near plane again.
470
+
471
+ - **The near plane culls nothing either.** The caster range pushes it behind every caster by
472
+ construction, so "no plane" matches "near" on every counter.
473
+ - **So the far arm is the far plane's whole effect.** Across the three viewpoints and three cascades,
474
+ every counter — drawn, items, pages, clusters tested, frustum culls — is identical in all four arms,
475
+ but one: oblique cascade 0, which draws 65 clusters, draws 14.
476
+ - **The pictures are identical to the pixel** in every arm.
477
+
478
+ ### 7.6 Cascade refits do not make VG shadows flicker (ledger 17)
479
+
480
+ Cascades are not stabilized, so every camera move refits them and changes each cascade's `k`. The
481
+ question was whether VG's shadow cuts re-selecting on every refit make the shadows flicker more than
482
+ an ordinary caster's.
483
+
484
+ **Method.** A moving view camera would put its own motion into every frame-to-frame difference, so
485
+ the view stands still and only the camera the cascades are fitted from moves. It yaws
486
+ A·sin(2πk/48), one step per rendered frame, so every change in the picture comes from the refit.
487
+
488
+ - **Two arms over the identical sequence.** In one, VG's shadow cuts are live. In the other, every
489
+ shadow view's `k` is frozen at the unwobbled fit: `set_projection` becomes a no-op. A cut with
490
+ `k` frozen is an ordinary mesh as far as the map is concerned, so live minus frozen is VG's own
491
+ flicker. Freezing `k` is also exactly the remedy this ledger row named.
492
+ - **Measurement conditions.** TAA and auto exposure are off, and shadow views are at `tau_scale` 2.
493
+ Each frame is captured inside the render wrapper, so the two arms' phases line up. Metrics cover the
494
+ central 80% of the screen. A second live arm reproduced the first to the pixel.
495
+
496
+ Per frame, the fraction of pixels that change by more than 8 luma:
497
+
498
+ | view | ±3°: live | ±3°: frozen | ±10°: live | ±10°: frozen |
499
+ |---|---:|---:|---:|---:|
500
+ | authored | 0 | 0 | 0.0002% | 0 |
501
+ | oblique | 0.033% | 0.033% | — | — |
502
+ | plan | 0.009% | 0.006% | 0.018% | 0.013% |
503
+
504
+ Over the ±3° sweep, cascade 0's `k` runs 67–78 and it draws 35k–47k clusters, so the cut does follow
505
+ the refit — and the picture barely notices. At ±10°, about 1.3° a frame and roughly a fast turn, VG's
506
+ own share is 0.005% of the screen per frame.
507
+
508
+ **The metric can see VG flicker when there is some.** As a positive control, with no wobble, every
509
+ shadow view's `tau_scale` alternated between 2 and 16 each frame: cascade 0 drew 3.7k and 42k clusters
510
+ in turn. That flickers 0.17% of the screen per frame in the authored view and 0.33% in the plan view.
511
+
512
+ ## References
513
+
514
+ Read 2026-09-28. Unreal's source is not public; its facts here come from Epic's documentation and
515
+ from a UE 5.4.4 console-variable reference that reproduces source locations.
516
+
517
+ - Epic, *Virtual Shadow Maps in Unreal Engine* — per-view Nanite rendering, one pass per light
518
+ class, 17 directional clipmap levels, page caching and invalidation.
519
+ https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine
520
+ - `r.Shadow.NaniteLODBias`, default 1, scale 2^−bias (ShadowSceneRenderer.cpp:50, :103 in 5.4.4).
521
+ https://indxzero.github.io/ue544cvarwiki/articles/r.shadow.nanitelodbias/
522
+ - `r.Nanite.VSMInvalidateOnLODDelta`, default 0, experimental (NaniteCullRaster.cpp:117).
523
+ https://indxzero.github.io/ue544cvarwiki/articles/r.nanite.vsminvalidateonloddelta/
524
+ - Epic, *Hardware Ray Tracing* — ray-traced shadows trace the Nanite fallback mesh.
525
+ https://dev.epicgames.com/documentation/en-us/unreal-engine/hardware-ray-tracing-in-unreal-engine
526
+ - Bevy, `crates/bevy_pbr/src/meshlet/cull_shared.wesl` (`lod_error_is_imperceptible`) and
527
+ `visibility_buffer_raster_node.rs` (one full cull and raster per shadow view).
528
+ https://github.com/bevyengine/bevy/tree/main/crates/bevy_pbr/src/meshlet
529
+ - Bevy PR #19318, the orthographic LOD metric fix. https://github.com/bevyengine/bevy/pull/19318
530
+ - jms55, *Virtual Geometry in Bevy 0.15* — "render all views at once" listed as shadow performance
531
+ work. https://jms55.github.io/posts/2024-11-14-virtual-geometry-bevy-0-15/
532
+ - NVIDIA `vk_lod_clusters` — one traversal from the camera, shadow rays traced against it; and
533
+ `vk_tessellated_clusters`' README on off-screen shadows changing when instances become visible.
534
+ https://github.com/nvpro-samples/vk_lod_clusters · https://github.com/nvpro-samples/vk_tessellated_clusters
535
+ - **Not found in any primary source:** whether and how Nanite's shadow views issue streaming
536
+ requests. §2.4 does not rest on it.
@@ -1,5 +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
4
  * @typedef {import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime} GPUVirtualGeometryRuntime
4
5
  * @typedef {import("./VGeoResidency.js").VGeoResidency} VGeoResidency
5
6
  * @typedef {import("./cut/vgeo_cut_feedback_layout.js").vgeo_cut_feedback_layout} vgeo_cut_feedback_layout
@@ -82,10 +83,12 @@ export class VGeoFeedbackLoop {
82
83
  */
83
84
  abort(): void;
84
85
  /**
85
- * Give up on this loop: the same as {@link abort}, under the name a host tears things down by.
86
+ * Give up on this loop: {@link abort}, and drop every reading still in flight.
86
87
  *
87
88
  * The loop owns no device resource, so there is nothing else to release — what it owns is
88
- * outstanding *work*.
89
+ * outstanding *work*, and a reading is some: it lands frames after its cut, by which time the
90
+ * views it is about and the residency it feeds may be torn down, and the mapping it waits on may
91
+ * have been aborted by that teardown. A destroyed loop schedules nothing more.
89
92
  *
90
93
  * @returns {void}
91
94
  */
@@ -93,6 +96,7 @@ export class VGeoFeedbackLoop {
93
96
  #private;
94
97
  }
95
98
  export type FrameGraph = import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
99
+ export type VGeoViewCut = import("./VGeoViewCut.js").VGeoViewCut;
96
100
  export type GPUVirtualGeometryRuntime = import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime;
97
101
  export type VGeoResidency = import("./VGeoResidency.js").VGeoResidency;
98
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;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IAqCI;;;;;;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,CAuDnB;IAwBD;;;;OAIG;IACH,SAFa,IAAI,CAIhB;IAED;;;;;;;OAOG;IACH,WAFa,IAAI,CAIhB;;CACJ;yBA1OY,OAAO,iEAAiE,EAAE,UAAU;wCACpF,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":"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"}