@woosh/meep-engine 3.27.0 → 3.29.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 (648) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/package.json +1 -1
  3. package/src/core/binary/BitSet.d.ts +16 -0
  4. package/src/core/binary/BitSet.d.ts.map +1 -1
  5. package/src/core/binary/BitSet.js +159 -49
  6. package/src/core/binary/allocator/OffsetAllocator.d.ts +48 -0
  7. package/src/core/binary/allocator/OffsetAllocator.d.ts.map +1 -1
  8. package/src/core/binary/allocator/OffsetAllocator.js +208 -9
  9. package/src/core/binary/compression/compress_bytes.d.ts +20 -0
  10. package/src/core/binary/compression/compress_bytes.d.ts.map +1 -0
  11. package/src/core/binary/compression/compress_bytes.js +35 -0
  12. package/src/core/binary/compression/decompress_bytes_into.d.ts +30 -0
  13. package/src/core/binary/compression/decompress_bytes_into.d.ts.map +1 -0
  14. package/src/core/binary/compression/decompress_bytes_into.js +87 -0
  15. package/src/core/binary/compression/deflate_decompress_bound.d.ts +27 -0
  16. package/src/core/binary/compression/deflate_decompress_bound.d.ts.map +1 -0
  17. package/src/core/binary/compression/deflate_decompress_bound.js +32 -0
  18. package/src/core/geom/3d/mat4/m4_linear_determinant.d.ts +15 -0
  19. package/src/core/geom/3d/mat4/m4_linear_determinant.d.ts.map +1 -0
  20. package/src/core/geom/3d/mat4/m4_linear_determinant.js +24 -0
  21. package/src/core/geom/3d/mat4/m4_normal_matrix3.d.ts +4 -2
  22. package/src/core/geom/3d/mat4/m4_normal_matrix3.d.ts.map +1 -1
  23. package/src/core/geom/3d/mat4/m4_normal_matrix3.js +21 -11
  24. package/src/core/geom/3d/quadric/quadric_attribute_add.d.ts +24 -0
  25. package/src/core/geom/3d/quadric/quadric_attribute_add.d.ts.map +1 -0
  26. package/src/core/geom/3d/quadric/quadric_attribute_add.js +31 -0
  27. package/src/core/geom/3d/quadric/quadric_attribute_reduce.d.ts +46 -0
  28. package/src/core/geom/3d/quadric/quadric_attribute_reduce.d.ts.map +1 -0
  29. package/src/core/geom/3d/quadric/quadric_attribute_reduce.js +104 -0
  30. package/src/core/geom/3d/quadric/quadric_attribute_set_from_triangle.d.ts +62 -0
  31. package/src/core/geom/3d/quadric/quadric_attribute_set_from_triangle.d.ts.map +1 -0
  32. package/src/core/geom/3d/quadric/quadric_attribute_set_from_triangle.js +158 -0
  33. package/src/core/geom/3d/quadric/quadric_attribute_size.d.ts +21 -0
  34. package/src/core/geom/3d/quadric/quadric_attribute_size.d.ts.map +1 -0
  35. package/src/core/geom/3d/quadric/quadric_attribute_size.js +24 -0
  36. package/src/core/geom/3d/quadric/quadric_attribute_solve.d.ts +34 -0
  37. package/src/core/geom/3d/quadric/quadric_attribute_solve.d.ts.map +1 -0
  38. package/src/core/geom/3d/quadric/quadric_attribute_solve.js +55 -0
  39. package/src/core/geom/3d/quadric/quadric_attribute_sub.d.ts +28 -0
  40. package/src/core/geom/3d/quadric/quadric_attribute_sub.d.ts.map +1 -0
  41. package/src/core/geom/3d/quadric/quadric_attribute_sub.js +35 -0
  42. package/src/core/geom/3d/topology/struct/binary/BinaryDataBlock.d.ts +15 -0
  43. package/src/core/geom/3d/topology/struct/binary/BinaryDataBlock.d.ts.map +1 -1
  44. package/src/core/geom/3d/topology/struct/binary/BinaryDataBlock.js +35 -0
  45. package/src/core/geom/3d/topology/struct/binary/BtWedgeSet.d.ts +93 -0
  46. package/src/core/geom/3d/topology/struct/binary/BtWedgeSet.d.ts.map +1 -0
  47. package/src/core/geom/3d/topology/struct/binary/BtWedgeSet.js +128 -0
  48. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_wedge_attribute_quadrics.d.ts +38 -0
  49. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_wedge_attribute_quadrics.d.ts.map +1 -0
  50. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_wedge_attribute_quadrics.js +113 -0
  51. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.d.ts +47 -1
  52. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.d.ts.map +1 -1
  53. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.js +677 -8
  54. package/src/core/geom/3d/topology/struct/binary/io/bt_wedges_live_count.d.ts +22 -0
  55. package/src/core/geom/3d/topology/struct/binary/io/bt_wedges_live_count.d.ts.map +1 -0
  56. package/src/core/geom/3d/topology/struct/binary/io/bt_wedges_live_count.js +46 -0
  57. package/src/core/geom/3d/topology/struct/binary/io/bt_wedges_per_vertex.d.ts +19 -0
  58. package/src/core/geom/3d/topology/struct/binary/io/bt_wedges_per_vertex.d.ts.map +1 -0
  59. package/src/core/geom/3d/topology/struct/binary/io/bt_wedges_per_vertex.js +49 -0
  60. package/src/core/graph/layout/layered/BoxLayoutOptions.d.ts +63 -0
  61. package/src/core/graph/layout/layered/BoxLayoutOptions.d.ts.map +1 -0
  62. package/src/core/graph/layout/layered/BoxLayoutOptions.js +80 -0
  63. package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/LayoutBoxGraph.d.ts +35 -0
  64. package/src/core/graph/layout/layered/LayoutBoxGraph.d.ts.map +1 -0
  65. package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/LayoutBoxGraph.js +53 -1
  66. package/src/core/graph/layout/layered/layout_assign_coordinates.d.ts.map +1 -0
  67. package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_assign_coordinates.js +72 -68
  68. package/src/core/graph/layout/layered/layout_assign_layers.d.ts.map +1 -0
  69. package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_assign_layers.js +4 -2
  70. package/src/core/graph/layout/layered/layout_break_cycles.d.ts.map +1 -0
  71. package/src/core/graph/layout/layered/layout_insert_lanes.d.ts.map +1 -0
  72. package/src/core/graph/layout/layered/layout_order_layers.d.ts.map +1 -0
  73. package/src/core/graph/layout/layered/layout_orient_links.d.ts.map +1 -0
  74. package/src/core/model/node-graph/visual/layout/NodeGraphLayoutOptions.d.ts +7 -51
  75. package/src/core/model/node-graph/visual/layout/NodeGraphLayoutOptions.d.ts.map +1 -1
  76. package/src/core/model/node-graph/visual/layout/NodeGraphLayoutOptions.js +8 -69
  77. package/src/core/model/node-graph/visual/layout/layout_build_problem.js +1 -1
  78. package/src/core/model/node-graph/visual/layout/layout_node_graph.js +6 -6
  79. package/src/core/model/node-graph/visual/layout/route_grid_build.js +1 -1
  80. package/src/engine/Engine.d.ts.map +1 -1
  81. package/src/engine/Engine.js +38 -1
  82. package/src/engine/graphics3/DebugDrawSystem.d.ts +7 -5
  83. package/src/engine/graphics3/DebugDrawSystem.d.ts.map +1 -1
  84. package/src/engine/graphics3/DebugDrawSystem.js +206 -203
  85. package/src/engine/graphics3/DecalSystem.d.ts +4 -5
  86. package/src/engine/graphics3/DecalSystem.d.ts.map +1 -1
  87. package/src/engine/graphics3/DecalSystem.js +5 -5
  88. package/src/engine/graphics3/FogOfWarSystem.d.ts +7 -12
  89. package/src/engine/graphics3/FogOfWarSystem.d.ts.map +1 -1
  90. package/src/engine/graphics3/FogOfWarSystem.js +8 -12
  91. package/src/engine/graphics3/GraphicsEngine.d.ts +5 -1
  92. package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
  93. package/src/engine/graphics3/GraphicsEngine.js +834 -830
  94. package/src/engine/graphics3/prefab/prefab_instantiate.js +230 -230
  95. package/src/shade/RENDERER_CONTRACT.md +31 -17
  96. package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +1 -1
  97. package/src/shade/playground/caldera/README.md +529 -0
  98. package/src/shade/playground/caldera/caldera_format.d.ts +151 -0
  99. package/src/shade/playground/caldera/caldera_format.d.ts.map +1 -0
  100. package/src/shade/playground/caldera/caldera_format.js +241 -0
  101. package/src/shade/playground/caldera/index.html +126 -0
  102. package/src/shade/playground/caldera/main.d.ts.map +1 -0
  103. package/src/shade/playground/caldera/main.js +1565 -0
  104. package/src/shade/playground/mesh_row_ceiling/README.md +85 -0
  105. package/src/shade/playground/mesh_row_ceiling/index.html +31 -0
  106. package/src/shade/playground/mesh_row_ceiling/main.d.ts +2 -0
  107. package/src/shade/playground/mesh_row_ceiling/main.d.ts.map +1 -0
  108. package/src/shade/playground/mesh_row_ceiling/main.js +389 -0
  109. package/src/shade/playground/vgeo_runtime/README.md +32 -16
  110. package/src/shade/playground/vgeo_runtime/main.js +21 -7
  111. package/src/shade/playground/{vgeo_viewer → vgeo_runtime}/sample_asset.d.ts +3 -3
  112. package/src/shade/playground/vgeo_runtime/sample_asset.d.ts.map +1 -0
  113. package/src/shade/playground/{vgeo_viewer → vgeo_runtime}/sample_asset.js +12 -11
  114. package/src/shade/playground/vgeo_scene/README.md +487 -0
  115. package/src/shade/playground/vgeo_scene/index.html +144 -0
  116. package/src/shade/playground/vgeo_scene/main.d.ts +2 -0
  117. package/src/shade/playground/vgeo_scene/main.d.ts.map +1 -0
  118. package/src/shade/playground/vgeo_scene/main.js +2217 -0
  119. package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
  120. package/src/shade/renderer/GraphicsContext.js +6 -0
  121. package/src/shade/renderer/Renderer.d.ts +6 -1
  122. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  123. package/src/shade/renderer/Renderer.js +28 -2
  124. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  125. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +100 -8
  126. package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +70 -35
  127. package/src/shade/renderer/extension/RenderExtension.d.ts +15 -18
  128. package/src/shade/renderer/extension/RenderExtension.d.ts.map +1 -1
  129. package/src/shade/renderer/extension/RenderExtension.js +15 -19
  130. package/src/shade/renderer/extension/RenderExtensionRegistry.d.ts +5 -5
  131. package/src/shade/renderer/extension/RenderExtensionRegistry.d.ts.map +1 -1
  132. package/src/shade/renderer/extension/RenderExtensionRegistry.js +29 -166
  133. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  134. package/src/shade/renderer/geometry/GPUGeometryManager.js +73 -16
  135. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
  136. package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +18 -3
  137. package/src/shade/renderer/geometry/meshlet/COMPACTION_PLAN_2026_09_16.md +663 -0
  138. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts +100 -5
  139. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts.map +1 -1
  140. package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.js +688 -81
  141. package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts.map +1 -1
  142. package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +3 -29
  143. package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts +22 -0
  144. package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts.map +1 -0
  145. package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.js +49 -0
  146. package/src/shade/renderer/geometry/virtual/ATTRIBUTE_PLAN_2026_09_18.md +540 -0
  147. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +159 -66
  148. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +40 -21
  149. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +15 -14
  150. package/src/shade/renderer/geometry/virtual/WEDGE_PLAN_2026_09_18.md +358 -0
  151. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +58 -8
  152. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
  153. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +64 -10
  154. package/src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.d.ts.map +1 -1
  155. package/src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.js +5 -9
  156. package/src/shade/renderer/geometry/virtual/build/level/VGeoContribution.d.ts +40 -0
  157. package/src/shade/renderer/geometry/virtual/build/level/VGeoContribution.d.ts.map +1 -0
  158. package/src/shade/renderer/geometry/virtual/build/level/VGeoContribution.js +24 -0
  159. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.d.ts +91 -0
  160. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.d.ts.map +1 -0
  161. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.js +91 -0
  162. package/src/shade/renderer/geometry/virtual/build/level/VGeoGroupRepack.d.ts +24 -0
  163. package/src/shade/renderer/geometry/virtual/build/level/VGeoGroupRepack.d.ts.map +1 -0
  164. package/src/shade/renderer/geometry/virtual/build/level/VGeoGroupRepack.js +25 -0
  165. package/src/shade/renderer/geometry/virtual/build/level/VGeoGroupStep.d.ts +77 -0
  166. package/src/shade/renderer/geometry/virtual/build/level/VGeoGroupStep.d.ts.map +1 -0
  167. package/src/shade/renderer/geometry/virtual/build/level/VGeoGroupStep.js +84 -0
  168. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevel.d.ts.map +1 -0
  169. package/src/shade/renderer/geometry/virtual/build/{VGeoLevelOptions.d.ts → level/VGeoLevelOptions.d.ts} +19 -6
  170. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts.map +1 -0
  171. package/src/shade/renderer/geometry/virtual/build/{VGeoLevelOptions.js → level/VGeoLevelOptions.js} +20 -7
  172. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelSummary.d.ts.map +1 -0
  173. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster.d.ts +19 -0
  174. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster.d.ts.map +1 -0
  175. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster.js +58 -0
  176. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.d.ts +18 -0
  177. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.d.ts.map +1 -0
  178. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.js +116 -0
  179. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts +18 -0
  180. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -0
  181. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +545 -0
  182. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.d.ts +16 -0
  183. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.d.ts.map +1 -0
  184. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.js +110 -0
  185. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_levels.d.ts +11 -0
  186. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_levels.d.ts.map +1 -0
  187. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_levels.js +308 -0
  188. package/src/shade/renderer/geometry/virtual/build/{vgeo_build_root_group.d.ts → level/vgeo_build_root_group.d.ts} +1 -1
  189. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_root_group.d.ts.map +1 -0
  190. package/src/shade/renderer/geometry/virtual/build/{vgeo_build_root_group.js → level/vgeo_build_root_group.js} +1 -1
  191. package/src/shade/renderer/geometry/virtual/build/level/vgeo_compute_group_boundary.d.ts +26 -0
  192. package/src/shade/renderer/geometry/virtual/build/level/vgeo_compute_group_boundary.d.ts.map +1 -0
  193. package/src/shade/renderer/geometry/virtual/build/level/vgeo_compute_group_boundary.js +123 -0
  194. package/src/shade/renderer/geometry/virtual/build/level/vgeo_error_bands.d.ts +26 -0
  195. package/src/shade/renderer/geometry/virtual/build/level/vgeo_error_bands.d.ts.map +1 -0
  196. package/src/shade/renderer/geometry/virtual/build/level/vgeo_error_bands.js +78 -0
  197. package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.d.ts +24 -0
  198. package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.d.ts.map +1 -0
  199. package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.js +337 -0
  200. package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.d.ts +29 -0
  201. package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.d.ts.map +1 -0
  202. package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.js +147 -0
  203. package/src/shade/renderer/geometry/virtual/build/level/vgeo_stitch_frontier.d.ts +37 -0
  204. package/src/shade/renderer/geometry/virtual/build/level/vgeo_stitch_frontier.d.ts.map +1 -0
  205. package/src/shade/renderer/geometry/virtual/build/level/vgeo_stitch_frontier.js +243 -0
  206. package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.d.ts +29 -0
  207. package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.d.ts.map +1 -0
  208. package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.js +117 -0
  209. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_CREASE_ANGLE.d.ts +46 -0
  210. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_CREASE_ANGLE.d.ts.map +1 -0
  211. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_CREASE_ANGLE.js +45 -0
  212. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_DEFAULT_ATTRIBUTE_WEIGHT_RATIOS.d.ts +64 -0
  213. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_DEFAULT_ATTRIBUTE_WEIGHT_RATIOS.d.ts.map +1 -0
  214. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_DEFAULT_ATTRIBUTE_WEIGHT_RATIOS.js +68 -0
  215. package/src/shade/renderer/geometry/virtual/build/{VirtualGeometryMesh.d.ts → mesh/VirtualGeometryMesh.d.ts} +13 -8
  216. package/src/shade/renderer/geometry/virtual/build/mesh/VirtualGeometryMesh.d.ts.map +1 -0
  217. package/src/shade/renderer/geometry/virtual/build/{VirtualGeometryMesh.js → mesh/VirtualGeometryMesh.js} +40 -18
  218. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_layout.d.ts +58 -0
  219. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_layout.d.ts.map +1 -0
  220. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_layout.js +79 -0
  221. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_read.d.ts +39 -0
  222. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_read.d.ts.map +1 -0
  223. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_read.js +68 -0
  224. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_write.d.ts +53 -0
  225. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_write.d.ts.map +1 -0
  226. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_attribute_vector_write.js +243 -0
  227. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.d.ts +45 -0
  228. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.d.ts.map +1 -0
  229. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.js +300 -0
  230. package/src/shade/renderer/geometry/virtual/build/{vgeo_compute_vertex_tangents.d.ts → mesh/vgeo_compute_vertex_tangents.d.ts} +12 -8
  231. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_tangents.d.ts.map +1 -0
  232. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_tangents.js +151 -0
  233. package/src/shade/renderer/geometry/virtual/build/{vgeo_normalize_source.d.ts → mesh/vgeo_normalize_source.d.ts} +8 -1
  234. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.d.ts.map +1 -0
  235. package/src/shade/renderer/geometry/virtual/build/{vgeo_normalize_source.js → mesh/vgeo_normalize_source.js} +27 -12
  236. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_resolve_attribute_weights.d.ts +38 -0
  237. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_resolve_attribute_weights.d.ts.map +1 -0
  238. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_resolve_attribute_weights.js +81 -0
  239. package/src/shade/renderer/geometry/virtual/build/{vgeo_assemble_pages.d.ts → page/vgeo_assemble_pages.d.ts} +1 -1
  240. package/src/shade/renderer/geometry/virtual/build/page/vgeo_assemble_pages.d.ts.map +1 -0
  241. package/src/shade/renderer/geometry/virtual/build/{vgeo_assemble_pages.js → page/vgeo_assemble_pages.js} +9 -9
  242. package/src/shade/renderer/geometry/virtual/build/{vgeo_build_page_nodes.d.ts → page/vgeo_build_page_nodes.d.ts} +1 -1
  243. package/src/shade/renderer/geometry/virtual/build/page/vgeo_build_page_nodes.d.ts.map +1 -0
  244. package/src/shade/renderer/geometry/virtual/build/{vgeo_build_page_nodes.js → page/vgeo_build_page_nodes.js} +4 -4
  245. package/src/shade/renderer/geometry/virtual/build/page/vgeo_page_node_count.d.ts.map +1 -0
  246. package/src/shade/renderer/geometry/virtual/build/{vgeo_page_node_count.js → page/vgeo_page_node_count.js} +2 -2
  247. package/src/shade/renderer/geometry/virtual/build/{VGeoFaceGraph.d.ts → partition/VGeoFaceGraph.d.ts} +23 -5
  248. package/src/shade/renderer/geometry/virtual/build/partition/VGeoFaceGraph.d.ts.map +1 -0
  249. package/src/shade/renderer/geometry/virtual/build/{VGeoFaceGraph.js → partition/VGeoFaceGraph.js} +28 -21
  250. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts.map +1 -0
  251. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_graph.d.ts.map +1 -0
  252. package/src/shade/renderer/geometry/virtual/build/{vgeo_partition_graph.js → partition/vgeo_partition_graph.js} +2 -2
  253. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_subgraph.d.ts +41 -0
  254. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_subgraph.d.ts.map +1 -0
  255. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_subgraph.js +92 -0
  256. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set.d.ts.map +1 -0
  257. package/src/shade/renderer/geometry/virtual/build/{vgeo_split_face_set.js → partition/vgeo_split_face_set.js} +13 -56
  258. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts.map +1 -0
  259. package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.js +371 -0
  260. package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_bounding_sphere.d.ts.map +1 -0
  261. package/src/shade/renderer/geometry/virtual/build/{vgeo_bounding_sphere.js → sphere/vgeo_bounding_sphere.js} +3 -3
  262. package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_containing_sphere.d.ts.map +1 -0
  263. package/src/shade/renderer/geometry/virtual/build/{vgeo_containing_sphere.js → sphere/vgeo_containing_sphere.js} +3 -3
  264. package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_sphere_inflate_to_contain.d.ts.map +1 -0
  265. package/src/shade/renderer/geometry/virtual/build/{vgeo_sphere_inflate_to_contain.js → sphere/vgeo_sphere_inflate_to_contain.js} +1 -1
  266. package/src/shade/renderer/geometry/virtual/build/submesh/VGeoGatheredFaces.d.ts +39 -0
  267. package/src/shade/renderer/geometry/virtual/build/submesh/VGeoGatheredFaces.d.ts.map +1 -0
  268. package/src/shade/renderer/geometry/virtual/build/submesh/VGeoGatheredFaces.js +42 -0
  269. package/src/shade/renderer/geometry/virtual/build/submesh/VGeoSubmesh.d.ts +37 -0
  270. package/src/shade/renderer/geometry/virtual/build/submesh/VGeoSubmesh.d.ts.map +1 -0
  271. package/src/shade/renderer/geometry/virtual/build/submesh/VGeoSubmesh.js +39 -0
  272. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_extract_submesh.d.ts +23 -0
  273. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_extract_submesh.d.ts.map +1 -0
  274. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_extract_submesh.js +135 -0
  275. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_gather_faces.d.ts +24 -0
  276. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_gather_faces.d.ts.map +1 -0
  277. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_gather_faces.js +95 -0
  278. package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_narrow_indices.d.ts.map +1 -0
  279. package/src/shade/renderer/geometry/virtual/build/{vgeo_narrow_indices.js → submesh/vgeo_narrow_indices.js} +3 -3
  280. package/src/shade/renderer/geometry/virtual/build/vgeo_build.d.ts +6 -2
  281. package/src/shade/renderer/geometry/virtual/build/vgeo_build.d.ts.map +1 -1
  282. package/src/shade/renderer/geometry/virtual/build/vgeo_build.js +37 -16
  283. package/src/shade/renderer/geometry/virtual/build/vgeo_subtree_bounds.d.ts +32 -0
  284. package/src/shade/renderer/geometry/virtual/build/vgeo_subtree_bounds.d.ts.map +1 -0
  285. package/src/shade/renderer/geometry/virtual/build/vgeo_subtree_bounds.js +93 -0
  286. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +20 -6
  287. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
  288. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +22 -8
  289. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_attributes_read.d.ts +8 -2
  290. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_attributes_read.d.ts.map +1 -1
  291. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_attributes_read.js +8 -2
  292. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_copy_corner.d.ts +16 -0
  293. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_copy_corner.d.ts.map +1 -0
  294. package/src/shade/renderer/geometry/virtual/format/attribute/{vgeo_layers_copy_vertex.js → vgeo_layers_copy_corner.js} +8 -8
  295. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_declare.d.ts +18 -7
  296. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_declare.d.ts.map +1 -1
  297. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_declare.js +19 -8
  298. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_like.d.ts +3 -3
  299. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_like.js +3 -3
  300. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_mesh_wedges.d.ts +27 -0
  301. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_mesh_wedges.d.ts.map +1 -0
  302. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_mesh_wedges.js +97 -0
  303. package/src/shade/renderer/geometry/virtual/format/cluster/VGEO_CLUSTER_OFFSET.d.ts +7 -3
  304. package/src/shade/renderer/geometry/virtual/format/cluster/VGEO_CLUSTER_OFFSET.d.ts.map +1 -1
  305. package/src/shade/renderer/geometry/virtual/format/cluster/VGEO_CLUSTER_OFFSET.js +21 -11
  306. package/src/shade/renderer/geometry/virtual/format/cluster/VGEO_CLUSTER_OFFSET_V4.d.ts +21 -0
  307. package/src/shade/renderer/geometry/virtual/format/cluster/VGEO_CLUSTER_OFFSET_V4.d.ts.map +1 -0
  308. package/src/shade/renderer/geometry/virtual/format/cluster/VGEO_CLUSTER_OFFSET_V4.js +41 -0
  309. package/src/shade/renderer/geometry/virtual/format/dag/VirtualGeometryCluster.d.ts +19 -1
  310. package/src/shade/renderer/geometry/virtual/format/dag/VirtualGeometryCluster.d.ts.map +1 -1
  311. package/src/shade/renderer/geometry/virtual/format/dag/VirtualGeometryCluster.js +20 -1
  312. package/src/shade/renderer/geometry/virtual/format/frame/VGEO_CODEC_DEFLATE.d.ts +25 -0
  313. package/src/shade/renderer/geometry/virtual/format/frame/VGEO_CODEC_DEFLATE.d.ts.map +1 -0
  314. package/src/shade/renderer/geometry/virtual/format/frame/VGEO_CODEC_DEFLATE.js +24 -0
  315. package/src/shade/renderer/geometry/virtual/format/frame/VGEO_CODEC_LZ4.d.ts +5 -0
  316. package/src/shade/renderer/geometry/virtual/format/frame/VGEO_CODEC_LZ4.d.ts.map +1 -1
  317. package/src/shade/renderer/geometry/virtual/format/frame/VGEO_CODEC_LZ4.js +5 -0
  318. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_codec_name.d.ts.map +1 -1
  319. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_codec_name.js +5 -0
  320. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_decode_frame_blob.d.ts +10 -3
  321. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_decode_frame_blob.d.ts.map +1 -1
  322. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_decode_frame_blob.js +37 -3
  323. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_encode_frame_blob.d.ts +21 -13
  324. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_encode_frame_blob.d.ts.map +1 -1
  325. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_encode_frame_blob.js +37 -13
  326. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_frame_decode_bound.d.ts +8 -2
  327. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_frame_decode_bound.d.ts.map +1 -1
  328. package/src/shade/renderer/geometry/virtual/format/frame/vgeo_frame_decode_bound.js +14 -2
  329. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FORMAT_VERSION.d.ts +18 -0
  330. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FORMAT_VERSION.d.ts.map +1 -1
  331. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FORMAT_VERSION.js +19 -1
  332. package/src/shade/renderer/geometry/virtual/format/header/VGEO_HEADER_OFFSET.js +6 -0
  333. package/src/shade/renderer/geometry/virtual/format/header/VGEO_MAX_LEVEL_COUNT.d.ts +21 -0
  334. package/src/shade/renderer/geometry/virtual/format/header/VGEO_MAX_LEVEL_COUNT.d.ts.map +1 -0
  335. package/src/shade/renderer/geometry/virtual/format/header/VGEO_MAX_LEVEL_COUNT.js +20 -0
  336. package/src/shade/renderer/geometry/virtual/format/header/VGEO_MIN_READER_VERSION.d.ts +9 -0
  337. package/src/shade/renderer/geometry/virtual/format/header/VGEO_MIN_READER_VERSION.d.ts.map +1 -1
  338. package/src/shade/renderer/geometry/virtual/format/header/VGEO_MIN_READER_VERSION.js +10 -1
  339. package/src/shade/renderer/geometry/virtual/format/page/VGEO_GROUP_OFFSET.d.ts +15 -0
  340. package/src/shade/renderer/geometry/virtual/format/page/VGEO_GROUP_OFFSET.d.ts.map +1 -0
  341. package/src/shade/renderer/geometry/virtual/format/page/VGEO_GROUP_OFFSET.js +15 -0
  342. package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET.d.ts +1 -2
  343. package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET.js +10 -3
  344. package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET_V5.d.ts +20 -0
  345. package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET_V5.d.ts.map +1 -0
  346. package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET_V5.js +43 -0
  347. package/src/shade/renderer/geometry/virtual/format/payload/vgeo_encode_cluster_payload.d.ts +32 -2
  348. package/src/shade/renderer/geometry/virtual/format/payload/vgeo_encode_cluster_payload.d.ts.map +1 -1
  349. package/src/shade/renderer/geometry/virtual/format/payload/vgeo_encode_cluster_payload.js +15 -7
  350. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
  351. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +2 -2
  352. package/src/shade/renderer/geometry/virtual/format/read/VGeoDirectory.d.ts +6 -4
  353. package/src/shade/renderer/geometry/virtual/format/read/VGeoDirectory.d.ts.map +1 -1
  354. package/src/shade/renderer/geometry/virtual/format/read/VGeoDirectory.js +6 -4
  355. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +13 -2
  356. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
  357. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +13 -2
  358. package/src/shade/renderer/geometry/virtual/format/read/VGeoPageFetcherCore.d.ts +5 -1
  359. package/src/shade/renderer/geometry/virtual/format/read/VGeoPageFetcherCore.d.ts.map +1 -1
  360. package/src/shade/renderer/geometry/virtual/format/read/VGeoPageFetcherCore.js +14 -1
  361. package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.d.ts.map +1 -1
  362. package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js +1 -0
  363. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_directory.d.ts +4 -1
  364. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_directory.d.ts.map +1 -1
  365. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_directory.js +53 -11
  366. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
  367. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +7 -3
  368. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts +12 -2
  369. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
  370. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +120 -37
  371. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts +6 -2
  372. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
  373. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +130 -47
  374. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts +2 -2
  375. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
  376. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +60 -22
  377. package/src/shade/renderer/geometry/virtual/runtime/CULL_PLAN_2026_09_16.md +385 -0
  378. package/src/shade/renderer/geometry/virtual/runtime/CUT_PLAN_2026_09_14.md +21 -2
  379. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +52 -2
  380. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  381. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +97 -1
  382. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +4 -4
  383. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  384. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +10 -0
  385. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  386. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +9 -0
  387. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
  388. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +59 -34
  389. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +8 -8
  390. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
  391. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +45 -88
  392. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.d.ts +19 -0
  393. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.d.ts.map +1 -0
  394. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.js +116 -0
  395. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts +31 -0
  396. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -0
  397. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +99 -0
  398. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_queue.d.ts +17 -0
  399. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_queue.d.ts.map +1 -0
  400. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_queue.js +39 -0
  401. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.d.ts.map +1 -1
  402. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.js +7 -63
  403. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
  404. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +13 -30
  405. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
  406. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +53 -71
  407. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +1 -0
  408. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +22 -4
  409. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +7 -2
  410. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -1
  411. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +8 -3
  412. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +1 -0
  413. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +10 -0
  414. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +1 -1
  415. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +13 -11
  416. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -1
  417. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +13 -11
  418. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -1
  419. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +4 -0
  420. package/src/shade/renderer/global_illumination/sharc/shader/shader_sharc_evict.d.ts.map +1 -1
  421. package/src/shade/renderer/global_illumination/sharc/shader/shader_sharc_evict.js +3 -4
  422. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts +6 -2
  423. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts.map +1 -1
  424. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.js +90 -12
  425. package/src/shade/renderer/gpu_primitive/indirect/WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.d.ts +22 -0
  426. package/src/shade/renderer/gpu_primitive/indirect/WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.d.ts.map +1 -0
  427. package/src/shade/renderer/gpu_primitive/indirect/WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.js +21 -0
  428. package/src/shade/renderer/loader/gltf/load_gltf.d.ts.map +1 -1
  429. package/src/shade/renderer/loader/gltf/load_gltf.js +0 -19
  430. package/src/shade/renderer/material/chunk_material_draw_side.d.ts +14 -0
  431. package/src/shade/renderer/material/chunk_material_draw_side.d.ts.map +1 -0
  432. package/src/shade/renderer/material/chunk_material_draw_side.js +34 -0
  433. package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
  434. package/src/shade/renderer/material/standard/fragment_gbuffer.js +8 -1
  435. package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
  436. package/src/shade/renderer/particles/shaders/shader_particle_emit.js +13 -8
  437. package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
  438. package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +3 -6
  439. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
  440. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +13 -1
  441. package/src/shade/renderer/rasterize/bucket/construct_primitive_state.d.ts +19 -5
  442. package/src/shade/renderer/rasterize/bucket/construct_primitive_state.d.ts.map +1 -1
  443. package/src/shade/renderer/rasterize/bucket/construct_primitive_state.js +23 -5
  444. package/src/shade/renderer/rasterize/bucket/filter_materials_by_bucket.d.ts.map +1 -1
  445. package/src/shade/renderer/rasterize/bucket/filter_materials_by_bucket.js +12 -5
  446. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  447. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +4 -12
  448. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +22 -0
  449. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts.map +1 -0
  450. package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -0
  451. package/src/shade/renderer/rasterize/bucket/shader_read_out_bucket.d.ts +0 -2
  452. package/src/shade/renderer/rasterize/bucket/shader_read_out_bucket.d.ts.map +1 -1
  453. package/src/shade/renderer/rasterize/bucket/shader_read_out_bucket.js +4 -5
  454. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts +15 -0
  455. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts.map +1 -0
  456. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.js +35 -0
  457. package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_mesh_filter_2way.d.ts.map +1 -1
  458. package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_mesh_filter_2way.js +5 -3
  459. package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_meshlet_filter_1way.d.ts.map +1 -1
  460. package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_meshlet_filter_1way.js +11 -4
  461. package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_meshlet_filter_1way_full.d.ts.map +1 -1
  462. package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_meshlet_filter_1way_full.js +4 -3
  463. package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.d.ts +10 -1
  464. package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.d.ts.map +1 -1
  465. package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.js +38 -29
  466. package/src/shade/renderer/rasterize/expand/bucket/chunk_rasterization_material_bucket.d.ts +5 -0
  467. package/src/shade/renderer/rasterize/expand/bucket/chunk_rasterization_material_bucket.d.ts.map +1 -1
  468. package/src/shade/renderer/rasterize/expand/bucket/chunk_rasterization_material_bucket.js +63 -55
  469. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts.map +1 -1
  470. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.js +3 -0
  471. package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_count_by_rasterization_bucket.d.ts.map +1 -1
  472. package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_count_by_rasterization_bucket.js +94 -90
  473. package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_extract_bucket.d.ts.map +1 -1
  474. package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_extract_bucket.js +13 -5
  475. package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_rasterization_bucket_sort.d.ts.map +1 -1
  476. package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_rasterization_bucket_sort.js +96 -89
  477. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts.map +1 -1
  478. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.js +3 -1
  479. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_two_way.d.ts.map +1 -1
  480. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_two_way.js +4 -1
  481. package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts.map +1 -1
  482. package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.js +1 -0
  483. package/src/shade/renderer/rasterize/expand/mesh/shader_mesh_expand_to_meshlets_prefix.d.ts.map +1 -1
  484. package/src/shade/renderer/rasterize/expand/mesh/shader_mesh_expand_to_meshlets_prefix.js +100 -89
  485. package/src/shade/renderer/rasterize/expand/mesh/shader_prefix_sum_to_command.d.ts.map +1 -1
  486. package/src/shade/renderer/rasterize/expand/mesh/shader_prefix_sum_to_command.js +31 -7
  487. package/src/shade/renderer/rasterize/expand/pass0/pass_mesh_cull.d.ts.map +1 -1
  488. package/src/shade/renderer/rasterize/expand/pass0/pass_mesh_cull.js +1 -7
  489. package/src/shade/renderer/rasterize/expand/pass1/filter_meshlets.2-way.compute.d.ts.map +1 -1
  490. package/src/shade/renderer/rasterize/expand/pass1/filter_meshlets.2-way.compute.js +161 -153
  491. package/src/shade/renderer/rasterize/fast/graph_extract_meshes_from_bucket.d.ts.map +1 -1
  492. package/src/shade/renderer/rasterize/fast/graph_extract_meshes_from_bucket.js +2 -7
  493. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  494. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +44 -53
  495. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.d.ts.map +1 -1
  496. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.js +6 -2
  497. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.d.ts.map +1 -1
  498. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.js +6 -2
  499. package/src/shade/renderer/rasterize/forward/vertex_shader_chunk.d.ts.map +1 -1
  500. package/src/shade/renderer/rasterize/forward/vertex_shader_chunk.js +19 -2
  501. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_PLAN_2026_09_03.md +7 -4
  502. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
  503. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +3 -2
  504. package/src/shade/renderer/rasterize/native/chunk_rasterize_triangle.d.ts.map +1 -1
  505. package/src/shade/renderer/rasterize/native/chunk_rasterize_triangle.js +15 -4
  506. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
  507. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +16 -5
  508. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_pass_descriptor.d.ts.map +1 -1
  509. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_pass_descriptor.js +16 -5
  510. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
  511. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +2 -1
  512. package/src/shade/renderer/rasterize/native/rasterization_shader_resources.d.ts.map +1 -1
  513. package/src/shade/renderer/rasterize/native/rasterization_shader_resources.js +4 -0
  514. package/src/shade/renderer/rasterize/native/viz/viz_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
  515. package/src/shade/renderer/rasterize/native/viz/viz_rasterization_alpha_tested_pass_descriptor.js +16 -7
  516. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  517. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +81 -95
  518. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  519. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +26 -39
  520. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  521. package/src/shade/renderer/scene/GPUSceneContext.js +2 -0
  522. package/src/shade/renderer/scene/NODE3D_STRUCT.d.ts +19 -0
  523. package/src/shade/renderer/scene/NODE3D_STRUCT.d.ts.map +1 -1
  524. package/src/shade/renderer/scene/NODE3D_STRUCT.js +34 -0
  525. package/src/shade/renderer/scene/chunk_node3d_flags.d.ts +9 -0
  526. package/src/shade/renderer/scene/chunk_node3d_flags.d.ts.map +1 -0
  527. package/src/shade/renderer/scene/chunk_node3d_flags.js +23 -0
  528. package/src/shade/renderer/scene/chunk_scene_database_access.d.ts.map +1 -1
  529. package/src/shade/renderer/scene/chunk_scene_database_access.js +15 -1
  530. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  531. package/src/shade/renderer/scene/rows/GPUSceneRows.js +9 -1
  532. package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_compute_normal_matrix_from_m4.d.ts +7 -0
  533. package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_compute_normal_matrix_from_m4.d.ts.map +1 -1
  534. package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_compute_normal_matrix_from_m4.js +16 -4
  535. package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.d.ts +12 -0
  536. package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.d.ts.map +1 -0
  537. package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.js +18 -0
  538. package/src/shade/renderer/shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.d.ts +24 -0
  539. package/src/shade/renderer/shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.d.ts.map +1 -0
  540. package/src/shade/renderer/shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.js +33 -0
  541. package/src/shade/renderer/shadow/map/DEFAULT_SHADOWMAP_UPDATE_BUDGET.d.ts +25 -0
  542. package/src/shade/renderer/shadow/map/DEFAULT_SHADOWMAP_UPDATE_BUDGET.d.ts.map +1 -0
  543. package/src/shade/renderer/shadow/map/DEFAULT_SHADOWMAP_UPDATE_BUDGET.js +24 -0
  544. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +10 -0
  545. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  546. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +30 -21
  547. package/src/core/model/node-graph/visual/layout/LayoutBoxGraph.d.ts.map +0 -1
  548. package/src/core/model/node-graph/visual/layout/layout_assign_coordinates.d.ts.map +0 -1
  549. package/src/core/model/node-graph/visual/layout/layout_assign_layers.d.ts.map +0 -1
  550. package/src/core/model/node-graph/visual/layout/layout_break_cycles.d.ts.map +0 -1
  551. package/src/core/model/node-graph/visual/layout/layout_insert_lanes.d.ts.map +0 -1
  552. package/src/core/model/node-graph/visual/layout/layout_order_layers.d.ts.map +0 -1
  553. package/src/core/model/node-graph/visual/layout/layout_orient_links.d.ts.map +0 -1
  554. package/src/shade/playground/vgeo_viewer/README.md +0 -150
  555. package/src/shade/playground/vgeo_viewer/cut_geometry.d.ts +0 -61
  556. package/src/shade/playground/vgeo_viewer/cut_geometry.d.ts.map +0 -1
  557. package/src/shade/playground/vgeo_viewer/cut_geometry.js +0 -460
  558. package/src/shade/playground/vgeo_viewer/index.html +0 -77
  559. package/src/shade/playground/vgeo_viewer/main.d.ts.map +0 -1
  560. package/src/shade/playground/vgeo_viewer/main.js +0 -1343
  561. package/src/shade/playground/vgeo_viewer/sample_asset.d.ts.map +0 -1
  562. package/src/shade/playground/vgeo_viewer/select_cut.d.ts +0 -173
  563. package/src/shade/playground/vgeo_viewer/select_cut.d.ts.map +0 -1
  564. package/src/shade/playground/vgeo_viewer/select_cut.js +0 -481
  565. package/src/shade/renderer/geometry/virtual/build/VGeoFaceGraph.d.ts.map +0 -1
  566. package/src/shade/renderer/geometry/virtual/build/VGeoGatheredFaces.d.ts +0 -24
  567. package/src/shade/renderer/geometry/virtual/build/VGeoGatheredFaces.d.ts.map +0 -1
  568. package/src/shade/renderer/geometry/virtual/build/VGeoGatheredFaces.js +0 -25
  569. package/src/shade/renderer/geometry/virtual/build/VGeoLevel.d.ts.map +0 -1
  570. package/src/shade/renderer/geometry/virtual/build/VGeoLevelOptions.d.ts.map +0 -1
  571. package/src/shade/renderer/geometry/virtual/build/VGeoLevelSummary.d.ts.map +0 -1
  572. package/src/shade/renderer/geometry/virtual/build/VGeoSubmesh.d.ts +0 -20
  573. package/src/shade/renderer/geometry/virtual/build/VGeoSubmesh.d.ts.map +0 -1
  574. package/src/shade/renderer/geometry/virtual/build/VGeoSubmesh.js +0 -20
  575. package/src/shade/renderer/geometry/virtual/build/VirtualGeometryMesh.d.ts.map +0 -1
  576. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +0 -1
  577. package/src/shade/renderer/geometry/virtual/build/vgeo_bounding_sphere.d.ts.map +0 -1
  578. package/src/shade/renderer/geometry/virtual/build/vgeo_build_levels.d.ts +0 -36
  579. package/src/shade/renderer/geometry/virtual/build/vgeo_build_levels.d.ts.map +0 -1
  580. package/src/shade/renderer/geometry/virtual/build/vgeo_build_levels.js +0 -1786
  581. package/src/shade/renderer/geometry/virtual/build/vgeo_build_page_nodes.d.ts.map +0 -1
  582. package/src/shade/renderer/geometry/virtual/build/vgeo_build_root_group.d.ts.map +0 -1
  583. package/src/shade/renderer/geometry/virtual/build/vgeo_compute_vertex_normals.d.ts +0 -29
  584. package/src/shade/renderer/geometry/virtual/build/vgeo_compute_vertex_normals.d.ts.map +0 -1
  585. package/src/shade/renderer/geometry/virtual/build/vgeo_compute_vertex_normals.js +0 -75
  586. package/src/shade/renderer/geometry/virtual/build/vgeo_compute_vertex_tangents.d.ts.map +0 -1
  587. package/src/shade/renderer/geometry/virtual/build/vgeo_compute_vertex_tangents.js +0 -143
  588. package/src/shade/renderer/geometry/virtual/build/vgeo_containing_sphere.d.ts.map +0 -1
  589. package/src/shade/renderer/geometry/virtual/build/vgeo_extract_submesh.d.ts +0 -14
  590. package/src/shade/renderer/geometry/virtual/build/vgeo_extract_submesh.d.ts.map +0 -1
  591. package/src/shade/renderer/geometry/virtual/build/vgeo_extract_submesh.js +0 -41
  592. package/src/shade/renderer/geometry/virtual/build/vgeo_gather_faces.d.ts +0 -12
  593. package/src/shade/renderer/geometry/virtual/build/vgeo_gather_faces.d.ts.map +0 -1
  594. package/src/shade/renderer/geometry/virtual/build/vgeo_gather_faces.js +0 -71
  595. package/src/shade/renderer/geometry/virtual/build/vgeo_graph_components.d.ts.map +0 -1
  596. package/src/shade/renderer/geometry/virtual/build/vgeo_narrow_indices.d.ts.map +0 -1
  597. package/src/shade/renderer/geometry/virtual/build/vgeo_normalize_source.d.ts.map +0 -1
  598. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +0 -1
  599. package/src/shade/renderer/geometry/virtual/build/vgeo_partition_graph.d.ts.map +0 -1
  600. package/src/shade/renderer/geometry/virtual/build/vgeo_sphere_inflate_to_contain.d.ts.map +0 -1
  601. package/src/shade/renderer/geometry/virtual/build/vgeo_split_face_set.d.ts.map +0 -1
  602. package/src/shade/renderer/geometry/virtual/build/vgeo_split_face_set_packed.d.ts.map +0 -1
  603. package/src/shade/renderer/geometry/virtual/build/vgeo_split_face_set_packed.js +0 -207
  604. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_copy_vertex.d.ts +0 -16
  605. package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_copy_vertex.d.ts.map +0 -1
  606. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts +0 -258
  607. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts.map +0 -1
  608. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts +0 -49
  609. package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts.map +0 -1
  610. package/src/shade/renderer/loader/gltf/fix_up_material_sides.d.ts +0 -10
  611. package/src/shade/renderer/loader/gltf/fix_up_material_sides.d.ts.map +0 -1
  612. package/src/shade/renderer/loader/gltf/fix_up_material_sides.js +0 -109
  613. package/src/shade/renderer/rasterize/expand/graph_triangles_filter_by_material_side.d.ts +0 -17
  614. package/src/shade/renderer/rasterize/expand/graph_triangles_filter_by_material_side.d.ts.map +0 -1
  615. package/src/shade/renderer/rasterize/expand/graph_triangles_filter_by_material_side.js +0 -78
  616. package/src/shade/renderer/rasterize/expand/shader_filter_triangle_by_material_side.d.ts +0 -3
  617. package/src/shade/renderer/rasterize/expand/shader_filter_triangle_by_material_side.d.ts.map +0 -1
  618. package/src/shade/renderer/rasterize/expand/shader_filter_triangle_by_material_side.js +0 -100
  619. package/src/shade/renderer/rasterize/forward/chunk_material_side_should_draw.d.ts +0 -8
  620. package/src/shade/renderer/rasterize/forward/chunk_material_side_should_draw.d.ts.map +0 -1
  621. package/src/shade/renderer/rasterize/forward/chunk_material_side_should_draw.js +0 -26
  622. package/src/shade/renderer/shader/chunk/jobs/chunk_job_system.d.ts +0 -3
  623. package/src/shade/renderer/shader/chunk/jobs/chunk_job_system.d.ts.map +0 -1
  624. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_assign_coordinates.d.ts +0 -0
  625. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_assign_layers.d.ts +0 -0
  626. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_break_cycles.d.ts +0 -0
  627. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_break_cycles.js +0 -0
  628. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_insert_lanes.d.ts +0 -0
  629. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_insert_lanes.js +0 -0
  630. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_order_layers.d.ts +0 -0
  631. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_order_layers.js +0 -0
  632. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_orient_links.d.ts +0 -0
  633. /package/src/core/{model/node-graph/visual/layout → graph/layout/layered}/layout_orient_links.js +0 -0
  634. /package/src/shade/playground/{vgeo_viewer → caldera}/main.d.ts +0 -0
  635. /package/src/shade/renderer/geometry/virtual/build/{VGeoLevel.d.ts → level/VGeoLevel.d.ts} +0 -0
  636. /package/src/shade/renderer/geometry/virtual/build/{VGeoLevel.js → level/VGeoLevel.js} +0 -0
  637. /package/src/shade/renderer/geometry/virtual/build/{VGeoLevelSummary.d.ts → level/VGeoLevelSummary.d.ts} +0 -0
  638. /package/src/shade/renderer/geometry/virtual/build/{VGeoLevelSummary.js → level/VGeoLevelSummary.js} +0 -0
  639. /package/src/shade/renderer/geometry/virtual/build/{vgeo_page_node_count.d.ts → page/vgeo_page_node_count.d.ts} +0 -0
  640. /package/src/shade/renderer/geometry/virtual/build/{vgeo_graph_components.d.ts → partition/vgeo_graph_components.d.ts} +0 -0
  641. /package/src/shade/renderer/geometry/virtual/build/{vgeo_graph_components.js → partition/vgeo_graph_components.js} +0 -0
  642. /package/src/shade/renderer/geometry/virtual/build/{vgeo_partition_graph.d.ts → partition/vgeo_partition_graph.d.ts} +0 -0
  643. /package/src/shade/renderer/geometry/virtual/build/{vgeo_split_face_set.d.ts → partition/vgeo_split_face_set.d.ts} +0 -0
  644. /package/src/shade/renderer/geometry/virtual/build/{vgeo_split_face_set_packed.d.ts → partition/vgeo_split_face_set_packed.d.ts} +0 -0
  645. /package/src/shade/renderer/geometry/virtual/build/{vgeo_bounding_sphere.d.ts → sphere/vgeo_bounding_sphere.d.ts} +0 -0
  646. /package/src/shade/renderer/geometry/virtual/build/{vgeo_containing_sphere.d.ts → sphere/vgeo_containing_sphere.d.ts} +0 -0
  647. /package/src/shade/renderer/geometry/virtual/build/{vgeo_sphere_inflate_to_contain.d.ts → sphere/vgeo_sphere_inflate_to_contain.d.ts} +0 -0
  648. /package/src/shade/renderer/geometry/virtual/build/{vgeo_narrow_indices.d.ts → submesh/vgeo_narrow_indices.d.ts} +0 -0
@@ -8,11 +8,11 @@
8
8
  * @param {number} [major]
9
9
  * @param {number} [minor]
10
10
  * @param {number} [page_size] target decoded bytes per page
11
- * @returns {{source: VGeoByteSource, build_ms: number}}
11
+ * @returns {Promise<{source: VGeoByteSource, build_ms: number}>}
12
12
  */
13
- export function vgeo_sample_source(major?: number, minor?: number, page_size?: number): {
13
+ export function vgeo_sample_source(major?: number, minor?: number, page_size?: number): Promise<{
14
14
  source: VGeoByteSource;
15
15
  build_ms: number;
16
- };
16
+ }>;
17
17
  import { VGeoByteSource } from "../../renderer/geometry/virtual/format/read/VGeoByteSource.js";
18
18
  //# sourceMappingURL=sample_asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample_asset.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/vgeo_runtime/sample_asset.js"],"names":[],"mappings":"AA2GA;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,UACN,MAAM,cACN,MAAM,GACJ,QAAQ;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,CAiB/D;+BA3HM,+DAA+D"}
@@ -12,7 +12,7 @@ import {
12
12
  } from "../../renderer/geometry/virtual/format/read/VGeoByteSource.js";
13
13
 
14
14
  /**
15
- * A `.vgeo` built in the page, so the viewer has something to open without a file.
15
+ * A `.vgeo` built in the page, so there is something to open without a file.
16
16
  *
17
17
  * The builder is environment-agnostic by design (`VIRTUAL_GEOMETRY_DESIGN.md` §8) — typed arrays and
18
18
  * topology, no file or process API anywhere under it — so the same call the node CLI makes runs here.
@@ -31,8 +31,8 @@ import {
31
31
  *
32
32
  * Curvature is what makes it a useful sample rather than a shape: a flat face simplifies at zero
33
33
  * quadric cost, so a box would produce a DAG whose every step records no error and whose every
34
- * threshold selects the same cut. A torus has an error at every level, which is the thing the viewer
35
- * is drawing.
34
+ * threshold selects the same cut. A torus has an error at every level, which is the thing the cut
35
+ * is selecting against.
36
36
  *
37
37
  * @param {number} major segments the long way round
38
38
  * @param {number} minor segments around the tube
@@ -61,12 +61,13 @@ function torus(major, minor) {
61
61
  `CullPolicy.Standard` means by a front face and what `vgeo_compute_vertex_normals` takes the
62
62
  sign of its normals from.
63
63
 
64
- It was the other way round, and both of the pages that build this were blind to it: the viewer
65
- draws its cut with `cullMode: 'none'` and colours it per cluster, so neither the culling nor
66
- the shading could report it. The moment the same sample went through the engine's material
67
- path — `playground/vgeo_runtime/`, where a `Front`-sided material culls back faces — the torus
64
+ It was the other way round, and the CPU viewer this sample was written for could not see it:
65
+ that page drew its cut with `cullMode: 'none'` and coloured it per cluster, so neither the
66
+ culling nor the shading could report it. The moment the same sample went through the engine's
67
+ material path — this page, where a `Front`-sided material culls back faces — the torus
68
68
  rendered as its own far inner wall with the near surface missing, and the normals pointed into
69
- the tube so what survived was lit from inside.
69
+ the tube so what survived was lit from inside. The viewer has since been retired; this is the
70
+ only page that builds it now, and it is the one that could have caught it.
70
71
 
71
72
  The winding of a sample is not a detail of the sample. Everything downstream of the builder
72
73
  carries it: the cluster's triangles are stored in this order, the DAG's simplification
@@ -114,16 +115,16 @@ function torus(major, minor) {
114
115
  * @param {number} [major]
115
116
  * @param {number} [minor]
116
117
  * @param {number} [page_size] target decoded bytes per page
117
- * @returns {{source: VGeoByteSource, build_ms: number}}
118
+ * @returns {Promise<{source: VGeoByteSource, build_ms: number}>}
118
119
  */
119
- export function vgeo_sample_source(major = 128, minor = 48, page_size = 16 * 1024) {
120
+ export async function vgeo_sample_source(major = 128, minor = 48, page_size = 16 * 1024) {
120
121
  const options = new VGeoBuildOptions();
121
122
 
122
123
  options.nominal_page_size = page_size;
123
124
 
124
125
  const started = performance.now();
125
126
 
126
- const bytes = vgeo_build(torus(major, minor), options).buffer.raw_bytes;
127
+ const bytes = (await vgeo_build(torus(major, minor), options)).buffer.raw_bytes;
127
128
 
128
129
  const build_ms = performance.now() - started;
129
130
 
@@ -0,0 +1,487 @@
1
+ # `vgeo_scene` — a whole converted scene, one cut
2
+
3
+ Thousands of `.vgeo` containers, tens of thousands of instances, **one** compute cut, drawn through
4
+ the ordinary meshlet pipeline.
5
+
6
+ [`../vgeo_runtime/`](../vgeo_runtime/README.md) is the page that proves the engine seam, and it does
7
+ it with one container framed on its own bounding sphere. That makes it a *viewer*, and by
8
+ construction it cannot show the other half of what
9
+ [`VIRTUAL_GEOMETRY_DESIGN.md`](../../renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md) §1
10
+ claims — that rendering cost is a function of the threshold and the resolution rather than of the
11
+ source, **across every asset in view at once**, with instances sharing pages and one residency
12
+ budget arbitrating between all of them. With one reader there is nothing to arbitrate.
13
+
14
+ So everything here that the runtime page does not do is about breadth:
15
+
16
+ - **One residency, N containers.** Every asset registers with the same `VGeoResidency`, whose two
17
+ budgets are scene-wide by construction: the RAM tier's bytes and the VRAM tier's slots are counted
18
+ across every reader, and a page evicted from one asset is room for another's.
19
+ - **One cut, N instances.** `shader_vgeo_cut_collect` runs over the visible mesh rows and emits one
20
+ instance record per virtual one; the descent is seeded with one item per instance and every cull
21
+ and error test downstream runs in that instance's own object space. Seventeen thousand instances
22
+ are seventeen thousand seeds of **one** wavefront, not seventeen thousand cuts.
23
+ - **Instances share the asset.** A geometry placed by 381 nodes is one reader, one geometry row, one
24
+ page lookup and one set of resident pages — which is `VirtualGeometry.equals`, and most of why
25
+ this is affordable at all.
26
+
27
+ ## Running it
28
+
29
+ Two things: a scene manifest under the asset root, and the dev server.
30
+
31
+ ```
32
+ node tools/geometry/virtual/vgeo_scene.js <manifest.vgeo.json> --camera "..." --sun "..."
33
+ npm run dev --workspace @woosh/meep-engine
34
+ ```
35
+
36
+ Then open `/src/shade/playground/vgeo_scene/index.html`. With no parameters it asks the dev server
37
+ for every `.vgeoscene.json` under the roots it is serving and opens the one scene that is there;
38
+ `?scene=<url>` overrides.
39
+
40
+ **The containers do not have to be in the checkout, and the dev server is what serves them.**
41
+ `tools/dev/vite_test_assets.js` serves `/test_assets/` out of the package's own directory *and* out
42
+ of an external asset root — `MEEP_TEST_ASSETS`, or the nearest `test_assets/` above the package,
43
+ which on this machine is `H:/test_assets` — so Zorah's 51 GiB sit on a drive and are reached at
44
+ `/test_assets/Zorah/…` from the server that is already running. The dev server prints the roots it
45
+ found at startup.
46
+
47
+ **Ranges are what makes that a claim worth checking.** A `.vgeo` is opened out of its head and
48
+ streamed by `Range`, and `vgeo_fetch_byte_source` refuses anything but a `206` naming the range it
49
+ asked for — a `200` is a server ignoring the request and answering the head of the file where the
50
+ reader asked for the middle of a frame, silently and with plausible numbers. That invariant is
51
+ `tools/dev/serve_file_range.js` and there is one of it:
52
+ `tools/geometry/virtual/vgeo_serve.js` — still the answer for a directory under no asset root, or a
53
+ page served from another origin — is the same code plus CORS, where
54
+ `Access-Control-Expose-Headers` is the header that is easy to miss, because a cross-origin
55
+ response's `Content-Range` is invisible to the page without it.
56
+
57
+ ## What a scene manifest is, and what it is not
58
+
59
+ `gltf_to_vgeo.js` already writes everything the page needs — a glTF primitive is one container and
60
+ the nodes that placed it are its instances — but its manifest is a *build report*: every level of
61
+ every DAG, every cluster and group count, the weld distance each geometry settled on. At this scale
62
+ that is twenty-odd megabytes of numbers a renderer has no use for. `vgeo_scene.js` is the projection
63
+ to four fields and a list of matrices: **2.2 MiB for Zorah's 2,966 containers and 17,424 instances**,
64
+ and nothing in it is discovered — it is all in the build manifest or in the containers' own headers.
65
+
66
+ The headers are **read rather than trusted**. A manifest is written by the builder that produced the
67
+ files and a directory is whatever is on disk now, so the probe is what catches a half-finished
68
+ conversion and a container rebuilt at another page size. It costs one head read each and 1.8 s for
69
+ all 2,966.
70
+
71
+ Two fields are neither: `--camera` and `--sun`.
72
+
73
+ - **A bounding box is a bad place to put a camera.** Zorah's instances span 107 km, almost all of it
74
+ terrain, and the town the scene is *about* is forty metres across at the origin — a viewer framed
75
+ on the box opens a hundred kilometres up looking at a speck. The pose belongs to the source, and
76
+ Zorah's own `.cfg` carries one, so it is passed in rather than guessed at either end.
77
+ - **A converted container carries geometry and nothing else.** Design §7: VG is geometry only, so a
78
+ converted set arrives with normals, no material authoring and no lights. The sun is most of what
79
+ there is to shade it with, and the engine's default direction over a scene authored around a
80
+ different one puts every façade a viewer stands in front of into ambient.
81
+
82
+ ## What it measures
83
+
84
+ Zorah, 2,966 containers and 17,424 instances of them, **46.71 GiB** on the server across 947,664
85
+ pages, 1.36 billion source triangles and **10.75 billion instanced** ones. Measured on an
86
+ nvidia/lovelace adapter at a render target of 1578×746, from the scene's authored viewpoint, with a
87
+ **fresh page load per row** — residency is a high-water mark, so a page swept downwards through the
88
+ thresholds reports at every step what the busiest setting it has already been at asked for, and a
89
+ row of this table is only about τ if the page has been at nothing else.
90
+
91
+ | τ (px) | drawn clusters | pages visited | clusters tested | resident pages | bytes read | frame |
92
+ |---:|---:|---:|---:|---:|---:|---:|
93
+ | 0.25 | 387,875 | 79,574 | 1,232,352 | 12,288 *(full)* | 452 MB | 7.3 ms |
94
+ | 0.5 | 182,887 | 51,035 | 617,540 | 9,365 | 242 MB | 5.0 ms |
95
+ | 1 | 84,481 | 31,842 | 279,088 | 6,387 | 128 MB | 4.7 ms |
96
+ | 2 | 45,302 | 22,356 | 139,290 | 4,939 | 76 MB | 4.8 ms |
97
+ | 4 | 28,874 | 17,483 | 79,651 | 4,121 | 52 MB | 5.2 ms |
98
+ | 8 | 21,334 | 15,235 | 56,561 | 3,704 | 40 MB | 4.8 ms |
99
+ | 16 | 18,137 | 14,289 | 45,717 | 3,489 | 35 MB | 6.0 ms |
100
+
101
+ Monotone in τ, and a *fraction* of the asset at every setting: at τ=1 the scene is on screen out of
102
+ **0.67% of its pages** and 128 MB of 46.71 GiB, and at τ=16 out of 0.37% and 35 MB. `clamped` is
103
+ zero at every row but the first, which is the streaming having finished rather than a budget having
104
+ given up — the distinction the `refused` counter beside it exists to make.
105
+
106
+ **τ=0.25 is the budget wall, and it is in the table on purpose.** At the slider's minimum the cut
107
+ wants more than 12,288 page slots, `refused` climbs to 1.1 million, `clamped` stops falling to zero,
108
+ and the cut is then being selected by a **budget** rather than by a threshold — which is the one
109
+ thing this page is not meant to be showing you. It is one slider notch away at all times, and
110
+ `refused` going red is how you know that is what you are looking at. `?pages=` raises the tier.
111
+
112
+ A tour of five viewpoints at τ=1 — a hundred metres up, three hundred out, a nose against one
113
+ façade, the whole 107 km box, and back to the authored pose — held 4.5 to 5.8 ms a frame with
114
+ `clamped`, `refused` and every drop counter at zero throughout, and residency settling at 7,948 of
115
+ 12,288 pages without a single eviction.
116
+
117
+ ## Opening it, and what the first five seconds are
118
+
119
+ Measured cold, three times: **2,966 containers open in about four seconds**, and the whole scene is
120
+ drawing about a second and a half later.
121
+
122
+ The opens are one range request each. §10's always-resident set — header, level table, root frame —
123
+ is 2,560 bytes at the median across this set and 6,528 at the very worst, so the page asks for an
124
+ **8 KB head prefix** rather than the reader's default of 64 KB: every container in the set opens in
125
+ exactly one round trip and the cold read is 7.4 MB of heads instead of 190 MB of over-fetch. The
126
+ byte length comes from the manifest rather than from a `HEAD`, which is 2,966 round trips not spent
127
+ learning something the page was already holding.
128
+
129
+ **About four and a half seconds of that is not this page.** The first frame that draws geometry pays
130
+ the engine's pipeline warm-up, and `vgeo_runtime` — driven the same way, with a thirteen-page torus
131
+ built in-page — sits on exactly the same stall before *its* first frame. It is a fixed cost of a
132
+ cold device under a dev server, it is not a function of the scene, and a bundled build does not pay
133
+ all of it. Containers keep opening underneath it.
134
+
135
+ Containers are **placed as they land** rather than at the end, which costs nothing: a geometry that
136
+ is not registered yet is one the cut does not collect, and both residency tiers recompute their
137
+ budgets per reading rather than at registration, so a scene that grows under the camera is the case
138
+ they were designed for. A container that refuses leaves every other asset exactly as it was and is
139
+ counted — 2,965 of 2,966 is a scene, and the count is what says there is a hole in it.
140
+
141
+ ## The four capacities a scene reaches first
142
+
143
+ These are the page's real finding, because every one of them is an engine default that a
144
+ single-asset page never touches, and two of them degrade *silently*.
145
+
146
+ - **`queue_capacity`, and this is the one that hurt.** At τ=0.5 with 17,424 instances the descent
147
+ pushed past the engine's 65,536 items in flight and `VGEO_CUT_STAT.QUEUE_DROPPED` came back at
148
+ **32,676** — a third of the frontier thrown away. It does not surface as an error or as a visible
149
+ hole; it surfaces as `drawn` wandering over ten thousand clusters between one frame and the next,
150
+ as different subtrees lose the race. At `1 << 18` the same view drops nothing and `drawn` is
151
+ stable, at a cost of 4 MiB a site against 1 MiB.
152
+ - **`lookup_words`** is one word per page of every registered container out of one arena, and the
153
+ default of 65,536 holds a fourteenth of Zorah's 947,664. It is allocated out of an
154
+ `OffsetAllocator` whose bins round *down* — it can refuse an allocation that fits — so this is
155
+ sized to the next power of two above 1.5× the total rather than to the total.
156
+ - **`geometry_capacity`** is one row per container against a default of 256.
157
+ - **`claim_word_capacity`** is one bit per (collected instance, page ordinal of its geometry), and
158
+ the engine derives it from a hint of a thousand instances times the whole tier. At this scale that
159
+ is both too small and too large, and the real bound is knowable exactly: ordinals come out of the
160
+ tier, so `Σ instances × ordinals` is maximised by giving every slot to the most-instanced asset,
161
+ which makes it `max instances of any one geometry × page capacity`. For Zorah that is 381 × the
162
+ tier — a fifth of what the default derivation asks for — doubled here, because an ordinal capacity
163
+ is a high-water mark and a scene that has churned can hold more of them than the tier holds pages.
164
+
165
+ `RasterizationCollectionType.Meshes` is a fifth, and it self-corrects: it grows from what the frame
166
+ reports, so priming it to the instance count only buys the first seconds. But the first seconds are
167
+ when the scene is being placed, and against a default of 1e4 the other 7,424 instances would be
168
+ counted as `instances_dropped` while the collection caught up.
169
+
170
+ ## Two things it approximates, and says so
171
+
172
+ - **Shear.** A transform row carries a TRS and the GPU composes the world from it, so an instance
173
+ whose matrix has shear in it cannot be represented exactly and is placed at the closest
174
+ rigid-plus-scale fit. 391 of Zorah's 17,424 have any and the worst is about eleven degrees off
175
+ orthogonal; the other 17,033 are exact, including the 2,722 reflected ones — `m4_decompose_array`
176
+ folds a negative determinant into a scale axis, so a reflection survives. This is a property of
177
+ the engine's transform model rather than of this page. The reflections surviving is what the next
178
+ section is about.
179
+ - **A material's texture, when it has one.** The containers have no texture coordinates — see the
180
+ next section — so a material is bound as the constants its textures average to rather than as the
181
+ textures themselves.
182
+
183
+ ## Materials, and why they arrive from the side
184
+
185
+ A `.vgeo` carries geometry only, so a converted set has no material authoring in it. For a long time
186
+ this page drew all of it with one grey material and said so here, because the alternative was
187
+ inventing colour.
188
+
189
+ It now reads a **sidecar** instead: `<scene>.vgeomaterials.json`, written by
190
+ [`vgeo_scene_materials.js`](../../../../../tools/geometry/virtual/vgeo_scene_materials.js) out of an
191
+ extraction of the original Unreal project
192
+ ([`tools/ue/`](../../../../../tools/ue/)). It says which material each container is — a `.vgeo` is
193
+ one glTF primitive and a primitive has exactly one material, so the container *is* the bucket — and
194
+ what to shade that material with. It is a separate file from the scene manifest because it answers
195
+ to a separate source, and a scene nobody has extracted a project for is still a scene: the page
196
+ opens with or without one.
197
+
198
+ `?materials=off` refuses it and restores the one-grey-material picture. `?materials=<url>` names one
199
+ explicitly.
200
+
201
+ **What is bound is the constants, not the textures, and that is about the asset.**
202
+ `zorah_main_public.v2.gltf` — the document every container was built from — declares `POSITION` and
203
+ nothing else. No `TEXCOORD_0`, no `NORMAL`; the normals and tangents in the containers were generated
204
+ during conversion. So there is nothing to sample an albedo map *with* until a UV-carrying source is
205
+ built and the containers are made again from it. The constants are measured rather than invented:
206
+ `albedo` is the extracted base colour map's own alpha-weighted mean **in linear space**, multiplied
207
+ by the material's authored tint; roughness comes from the real ORM and metalness from the same map,
208
+ rounded, because metalness is binary per texel and the mean of a map is not a metalness. What a
209
+ surface loses is its detail, not its identity.
210
+
211
+ **The numbers, for Zorah.** 341 material names, of which 146 are in the distributed Unreal sample —
212
+ it ships a subset of the scene the glTF came from, and 191 of the names are nowhere in it. 72 more
213
+ are drawn as the nearest sibling within a narrow family and say so in `approximated_from`. That is
214
+ **218 materials over 2,533 of the 3,163 containers**; the remaining 630 draw as a neutral grey.
215
+
216
+ **They cost about 2.4 ms.** Measured on an nvidia/lovelace adapter at 1578×746 from the authored
217
+ viewpoint, twelve samples each: **5.28 ms** median with one material, **7.7 ms** with 218. That is
218
+ the scene's real shape rather than a price this page chose to pay, and it is worth knowing that a
219
+ material bucket is not free — about eleven microseconds of one, here.
220
+
221
+ ## The indirect light is brighter than the light
222
+
223
+ Extracted materials read paler and less saturated than the maps they came from, and the reason is
224
+ not in the materials. `?env=` and `?sun=` are here to say so in one measurement.
225
+
226
+ `?env=uniform:<v>` replaces the sky with a **constant radiance from every direction** — 64×64 so it
227
+ carries a mip chain, every level the same value — and `?sun=off` takes the only other light away.
228
+ Against a uniform environment the question is closed rather than arguable: nothing can return more
229
+ of a constant field than it reflects.
230
+
231
+ Measured on the `waterjug` sample at `env=uniform:0.5&sun=off&textures=off`, one pixel of the
232
+ surface against one pixel of the background, in the same frame and therefore at the same exposure:
233
+
234
+ | material | surface ÷ environment | should be |
235
+ |---|---:|---:|
236
+ | albedo 0, roughness 0.57 | **2.74** | ~0.05 |
237
+ | albedo 0, roughness 1.0 | **2.69** | ~0.05 |
238
+ | albedo 0.18 | 3.06 | ~0.23 |
239
+ | albedo 1.0 | 4.49 | ~1.0 |
240
+
241
+ **A black, non-metal surface returns 2.7× the only light in the scene.** Tonemapping is monotonic,
242
+ so no curve makes that legitimate — it is energy gain, and it is what puts a constant neutral
243
+ pedestal under every material and washes the colour out of it. It is independent of albedo, of
244
+ roughness, and of the sun; `?env=off` removes it entirely.
245
+
246
+ `indirect_specular` is `radiance * totalScattering` and radiance here is 0.5 by construction, so
247
+ `totalScattering` is coming out near 2.7. `compute_multiscattering_specular` cannot produce that
248
+ from a sane split-sum lookup, so the gain is above it — the LUT's own values, `specular_occlusion`,
249
+ or the specular IBL pass. Not chased further than that.
250
+
251
+ **None of this is about virtual geometry**, which is why it is a note rather than a fix here: it
252
+ reproduces with a constant-colour `StandardShadeMaterial` and no extraction involved.
253
+
254
+ ## Reflected instances — the bug this page was built to show, and where it went
255
+
256
+ 2,722 of Zorah's 17,424 instances have a negative-determinant transform: the courtyard is
257
+ bilaterally symmetric and the left half is the mirror of the right. Until 2026-09-15 every one of
258
+ them rendered with its near surface culled and its far surface showing through, because:
259
+
260
+ 1. A reflection reverses the orientation of every triangle it transforms, so a reflected instance
261
+ presents the **opposite screen-space winding** from the same geometry under a rotation.
262
+ 2. Front-face determination is fixed-function and reads that winding and nothing else.
263
+ 3. `cullMode` is **pipeline state chosen per material bucket**, and the bucket key was three fields
264
+ of a *material* — transparency, topology and side — with `construct_primitive_state` turning the
265
+ third into a cull mode. Nothing from there down to the rasterizer saw a transform.
266
+
267
+ The sign was never lost — `m4_decompose_array` preserves it and the row the GPU composes reflects
268
+ exactly as the source did — it was simply never consulted.
269
+
270
+ **It is consulted now, and not through the bucket key.** A node's row carries
271
+ `NODE3D_GLOBAL_FLAG_MIRRORED`, derived from its composed world matrix by whoever publishes it, and
272
+ every vertex shader over a meshlet emits that instance's triangle corners in the opposite order —
273
+ `triangle_list_reverse_winding`. The draw is non-indexed and the vertex shader resolves its own
274
+ index, so which corner lands where is already the shader's choice; reversing it costs a `select`,
275
+ no second pipeline, and no fourth field in the bucket key. It is what Nanite does for the same
276
+ reason (`FInstanceSceneData::DeterminantSign`, read in `HWRasterizeVS`), and what the glTF spec
277
+ requires of a conformant renderer. The tangent frame's handedness flips with it.
278
+
279
+ The parameters remain, and now read as diagnostics rather than as fixes:
280
+
281
+ - `?mirrored=tint` colours reflected instances red — in this view the **whole left arcade** comes up
282
+ red while the right stays grey. Nothing about which of them is *drawn* changes.
283
+ - `?mirrored=flip` draws them `Back`-sided. This used to be the page's own fix; `Back` is now drawn
284
+ by reversing winding too, so on a reflected instance the two cancel and it reproduces the old bug
285
+ on demand.
286
+ - `?mirrored=double` draws both sides of them — the fix people reach for first, and still the wrong
287
+ one: it doubles the work and gets the shading wrong.
288
+ - `?side=front|back|double` sets the whole scene's side, for the cruder question of whether a
289
+ surface is missing or merely culled.
290
+
291
+ The bug was hard to recognise because `fragment_gbuffer` flips normal, tangent and face normal when
292
+ `dot(world_face_normal, view_direction) < 0` — a test about the *view*, not about the winding — so
293
+ the far wall you were left looking at was correctly lit, and it read as bad geometry rather than as
294
+ a culling problem. Nothing about any of it was virtual-geometry-specific: it reached every mesh
295
+ placed under a mirroring transform, by any loader or prefab.
296
+
297
+ ## Two different things are called flicker here, and they have different causes
298
+
299
+ **A dropout is not a shimmer and they do not measure alike.** A shimmer moves a tenth of a per cent
300
+ of the pixels and comes from the TAA jitter under sub-pixel geometry; a frame missing a large part
301
+ of what the frames either side of it drew moves tens of per cent and comes from the descent running
302
+ out of wavefronts. One section each, below. Measuring the first when asked about the second cost a
303
+ whole pass of this investigation, and the tell that separates them is the amplified frame
304
+ difference: an **edge map** is the shimmer, **solid blobs** are the dropout.
305
+
306
+ ## The shimmer is the TAA jitter, and the geometry is finer than a pixel
307
+
308
+ There is a visible shimmer over the ornament, and it is **exactly 16 frames long**.
309
+
310
+ Measured over 600 consecutive frame pairs at 780×368 samples (~2×2 screen pixels each), camera
311
+ static, everything settled:
312
+
313
+ | | pixels changing >8/255 per frame | >24/255 | worst single step | period |
314
+ |---|---:|---:|---:|---:|
315
+ | as shipped | 350 (0.12%) | 17 | 57/255 | 16 (r=0.97) |
316
+ | τ=16 | 182 (0.06%) | 13 | 69/255 | 16 (r=0.95) |
317
+ | `?mirrored=flip` | 314 (0.11%) | 21 | 56/255 | 16 (r=0.96) |
318
+ | TAA off | **79,391 (27.66%)** | 33,841 | 161/255 | 16 (r=0.97) |
319
+ | jitter pinned | 89 (0.03%) | 3 | 88/255 | 16 (r=0.96) |
320
+
321
+ Sixteen is `TAA.#jitter_sequence_size`, and the attribution follows from the last two rows. **Pin the
322
+ jitter and fifteen frames out of every sixteen go pixel-static** — 18 to 123 changed samples out of
323
+ 287,040, which is the noise floor — against 240 to 470 *every* frame as shipped. The flicker is the
324
+ Halton jitter cycling the projection under geometry whose detail is finer than a pixel, with TAA
325
+ resolving most but not all of it.
326
+
327
+ An amplified `|frame(t) − frame(t−1)|` over eighteen consecutive pairs says the same thing in one
328
+ picture: it is an **edge map**. Every silhouette and every piece of filigree sparkles; the flat
329
+ courtyard floor is dead black. LOD popping would light up in cluster-shaped patches and does not.
330
+
331
+ Three things fall out of it that are worth writing down:
332
+
333
+ - **`feature_taa_enabled = false` does not turn the jitter off.** `Renderer` writes
334
+ `view_ctx.camera.setViewportOffset` from the jitter sequence unconditionally, and only the
335
+ *resolve* is behind the flag. So TAA off is not "no temporal AA", it is "jitter with nothing to
336
+ resolve it": 27.66% of pixels move every frame, which is forty times worse than shipping it on and
337
+ worse than never jittering at all. Anyone A/B-ing TAA on this content is not measuring what they
338
+ think.
339
+ - **The jitter does move the cut, slightly, and it is not where the flicker comes from.** `drawn`
340
+ and `pages visited` are weakly 16-periodic (r=0.34 and r=0.40) because the cut's frustum planes
341
+ come out of the *jittered* view-projection while `projection_k` — the error metric — does not. So
342
+ what moves is which clusters are inside the frustum, by up to 117 of 84,455 (0.14%), confined to
343
+ the screen border. `vgeo_runtime`'s README says the jitter does not move the cut and its τ table is
344
+ identical either way; at this scale that is very nearly true rather than exactly true, and the
345
+ difference is not visible in the diff image.
346
+ - **`GPUViewContext.setJitter` and `setJitterDelta` write the same two fields.** Only the first is
347
+ called, so nothing is broken today; a caller that used the second would silently overwrite the
348
+ jitter with its delta.
349
+
350
+ None of this is the scene's fault and τ=16 halving the count is the proof: less sub-pixel detail,
351
+ less shimmer, same period. It is what a temporal filter does on content authored at a density no
352
+ rasterizer resolves, which is the content virtual geometry exists to put on screen — so it is worth
353
+ knowing that the page's picture has a floor set by TAA rather than by the cut.
354
+
355
+ ## The dropout: the descent's wavefront bound, and how the engine finds it
356
+
357
+ **`max_iterations` starts at 8, and at a large viewport that is the binding bound rather than the
358
+ safety one.** The descent then stops with items still queued, and a queued item is a **subtree that
359
+ was never expanded** — so what it would have drawn is not on screen that frame. It is the one
360
+ degradation of this cut that costs a *hole* rather than a coarser surface, which is why it reads as
361
+ geometry disappearing rather than as anything softening.
362
+
363
+ Reported from a live session at **3441×1440** with `dropped: queue 82` in the panel and `wavefronts`
364
+ jittering between 8 and 13. Reproduced at that pose and viewport, 900 frames, camera static, with
365
+ the bound pinned:
366
+
367
+ | pinned `max_iterations` | `queue_remaining` non-zero | worst | `drawn` swing |
368
+ |---|---:|---:|---:|
369
+ | **8** | **750 of 900 frames** | 13,467 items | **11,857 clusters** |
370
+ | 16 / 32 / 64 | 0 | 0 | 81 |
371
+
372
+ `drawn` going from a swing of 11,857 clusters to **81** is the flicker, in one number. An amplified
373
+ `|frame(t) − frame(t−1)|` says the same thing in a picture: at 8 it is **solid white blobs** — whole
374
+ pieces of carved ornament blinking on and off — and above it those are gone, leaving only the thin
375
+ edge shimmer of the section above. The two phenomena look nothing alike once they are separated.
376
+
377
+ **It is a resolution story, and that is why it took so long to find.** The cut is a function of the
378
+ render target, so the same viewpoint at 1578×746 — a quarter of the pixels — drains inside 8
379
+ wavefronts and never drops an item. Every negative result in this file's earlier drafts was measured
380
+ at that size. A quarter-sized window is not a smaller version of this test.
381
+
382
+ ### The bound raises itself
383
+
384
+ Nothing here pins it. `GPUVirtualGeometryRuntime.note_incomplete_descent` takes the one reading that
385
+ says the descent was truncated and **doubles the bound, permanently**, which is the same shape the
386
+ rasterizer already uses for meshlet counts: a quantity that cannot be known before the work runs,
387
+ learned from what the work reported, kept as a high-water mark.
388
+
389
+ It has to be learned, because how many wavefronts a cut needs is a function of the frontier's
390
+ *breadth* — the scene, the viewpoint and the render target together — and neither the kernel before
391
+ it runs nor the host at any time can compute it. Doubling rather than solving for it, because
392
+ `QUEUE_REMAINING` is a count of *items* and there is no ratio converting those into wavefronts. It
393
+ is never lowered: a frame that drained is evidence about that frame, not that the scene got smaller,
394
+ and a bound that fell back would re-learn the same lesson at a hole a time every time the camera
395
+ turned away and back. An unused wavefront is an empty indirect dispatch, which is the cheap side of
396
+ that trade.
397
+
398
+ **What it costs when it is wrong is one frame.** Measured cold at 3419×1286 on the reported
399
+ viewpoint: `queue_remaining` non-zero on **1 frame of 600**, and zero for the rest of the session.
400
+ The ceiling is 64, so the worst case is three such frames, once, ever.
401
+
402
+ The panel shows `wavefronts` as *used / bound*, with an arrow and a count when the bound has moved,
403
+ because eight wavefronts is a drained descent under a bound of 32 and a truncated one under a bound
404
+ of 8 — and the reading could not tell them apart while it showed only the count.
405
+
406
+ `?iterations=N` pins both the start and the ceiling, which turns the escalation off and reproduces
407
+ the hole on demand: at 8 the same view gives `queue_remaining` on 395 frames of 500 and a `drawn`
408
+ swing of 15,874.
409
+
410
+ **`descent_steps` is the wrong knob for this.** It sets how many levels one dispatch advances, so it
411
+ answers depth; what runs out here is *breadth* — a wave keeps one child per lane and spills the
412
+ rest, and the spill generations are what consume the bound. Measured at the small viewport, 24
413
+ against 48 left `drawn` bit-identical.
414
+
415
+ ### Catching it where it happens
416
+
417
+ `?catch=0.15` arms {@link FlickerCatcher} — a per-frame detector in the page itself. It judges each
418
+ frame against the pair before it **and** the pair after it, taking the smaller of the two
419
+ departures and only when both point the same way. Judging against the median of all four is the
420
+ obvious thing and is wrong: when the picture takes a persistent *step* — the scene streaming in, a
421
+ coarse level replaced by a fine one — two of the four sit on the far side, the median lands between
422
+ the levels, and the frame *before* the step is convicted for being where it always was. Fourteen
423
+ poses each "caught" one that way. On a step the smaller departure is ~0 by construction, which is
424
+ what makes the corrected test score the reported event at 62% and every one of those artifacts at
425
+ or under 1%.
426
+
427
+ It works on **pixels rather than counters**:
428
+ the cut's statistics come from a readback capped at two in flight and skipped on more than half the
429
+ frames, so `drawn` on any given frame is a reading from one to three frames ago and a one-frame
430
+ disappearance need never appear in it at all. That is why the panel's numbers look calm during one.
431
+
432
+ ```
433
+ ?catch=0.15 count them, panel shows a running tally — fly around looking for one
434
+ ?catch=0.15&freeze=1 stop on the first one and leave that frame on screen
435
+ ```
436
+
437
+ **"copy camera link" is how a viewpoint gets out of the browser.** A viewpoint is the one piece of
438
+ state a person has and a session does not: everything else this page can be told is a URL parameter
439
+ already, and a phenomenon that happens "in many places" is not chaseable without one of them. The
440
+ button writes a link that reopens the page where the camera is standing — `?eye=`/`?at=` from the
441
+ live pose, `?tau=` from the slider as it stands rather than as the page was opened, and every other
442
+ parameter left exactly as it was, so a link captured with `?catch=0.15&mirrored=tint` on comes back
443
+ with both still armed. It goes to the clipboard, and to a selected box under the button when a
444
+ browser declines that. `__camera_url()` is the same string for a session with no pointer.
445
+
446
+ **An event carries its own camera link**, captured at the instant it fires, so `__caught()` is
447
+ self-contained: where it happened is the one thing a report of a one-frame dropout cannot be
448
+ reconstructed without, and by the time anybody reads the report the camera may have moved. The held
449
+ frame goes on *under* the panel, so freezing does not hide the readings that explain it.
450
+
451
+ `__caught()` reports what it has seen and the counters for the five frames around the last one;
452
+ `__catch_rows()` is the per-frame log. Freezing also holds the five frames around it, and
453
+ `__show_frame(n)` pages between them — the frame before and the frame itself, side by side, is what
454
+ says whether the geometry went missing or merely moved.
455
+
456
+ It costs a whole-canvas `drawImage` and a small `getImageData` per frame: 4.2 ms a frame becomes
457
+ 10.3 ms here, which is slack on a 60 Hz display and is why the full-resolution ring is only kept
458
+ when `freeze=1` is asked for.
459
+
460
+ ## Driving it
461
+
462
+ `__state()` is the whole surface a headless session needs and the panel shows nothing it does not:
463
+ the scene's counts, the cut's counters, both residency tiers, the render target's size and the
464
+ camera. `__page.runtime.tau` is the threshold, `__look(eye, target)` stands the camera somewhere,
465
+ and `__page.viewpoints` is what the buttons in the panel are.
466
+
467
+ URL parameters, all of them for a session rather than for a person: `?scene=` the manifest (any
468
+ URL, and `/test_assets/…` is the asset root),
469
+ `?tau=` the threshold **before the first container** (see the table above for why a load per row),
470
+ `?pages=` the VRAM tier's slots, `?iterations=` the descent's wavefront ceiling,
471
+ `?eye=x,y,z&at=x,y,z` a viewpoint, `?side=front|back|double` the whole scene's draw side,
472
+ `?mirrored=flip|tint|double` the reflected instances', `?materials=off|<url>` the material sidecar,
473
+ `?textures=off` its maps, `?env=off|uniform:<v>` and `?sun=off` the lighting —
474
+ and `?catch=<fraction>[&freeze=1]` the dropout catcher. `__state().scene.mirrored` is the reflected
475
+ count the panel shows, `__state().scene.materials` and `.materialised` the material counts, and
476
+ `__caught()` the catcher's report.
477
+
478
+ **`T` records a GPU capture and `T` again downloads an `.sgpt`** — the same key and the same module
479
+ (`playground/profile_hotkey.js`) every other playground binds. It answers the question the panel
480
+ cannot: every reading above is a *count* and not one of them is a cost. The capture's note carries
481
+ τ, the container and instance counts, the cut it selected and the resolution, because the same
482
+ 0.4 ms is a triumph at eighty thousand clusters and a scandal at eighteen thousand.
483
+
484
+ The headless recipe is `vgeo_runtime`'s and has not changed — `--enable-unsafe-webgpu` and nothing
485
+ else, pick the CDP target by URL, resize the window rather than the viewport, and poll for `__state`
486
+ rather than trusting `load`. Its README is where those four are written down and why each one costs
487
+ an hour.