@woosh/meep-engine 3.59.0 → 3.60.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 (326) hide show
  1. package/package.json +1 -1
  2. package/src/shade/playground/probe_clipmap/index.html +12 -0
  3. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  4. package/src/shade/playground/probe_clipmap/main.js +5 -0
  5. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  6. package/src/shade/renderer/Renderer.js +4 -6
  7. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +63 -1
  8. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  9. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +228 -16
  10. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +27 -4
  11. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
  12. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +526 -23
  13. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts +11 -0
  14. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts.map +1 -0
  15. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.js +21 -0
  16. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts +65 -0
  17. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts.map +1 -0
  18. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +376 -0
  19. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts +7 -3
  20. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts.map +1 -1
  21. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.js +70 -6
  22. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts +20 -0
  23. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts.map +1 -0
  24. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.js +80 -0
  25. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts +18 -0
  26. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts.map +1 -0
  27. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.js +113 -0
  28. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts +47 -0
  29. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts.map +1 -0
  30. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.js +80 -0
  31. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +91 -0
  32. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts.map +1 -0
  33. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +902 -0
  34. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts +16 -0
  35. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts.map +1 -0
  36. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.js +67 -0
  37. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts +17 -0
  38. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts.map +1 -0
  39. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.js +145 -0
  40. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts +12 -0
  41. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts.map +1 -0
  42. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.js +105 -0
  43. package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.d.ts.map +1 -1
  44. package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.js +2 -1
  45. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +3 -9
  46. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  47. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +13 -31
  48. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +764 -48
  49. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md +410 -0
  50. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +3 -2
  51. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  52. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +4 -3
  53. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +41 -17
  54. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  55. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +57 -33
  56. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +11 -3
  57. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts.map +1 -1
  58. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js +13 -4
  59. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +9 -18
  60. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  61. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +8 -10
  62. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts +12 -0
  63. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map +1 -1
  64. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js +28 -0
  65. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -29
  66. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  67. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +1 -74
  68. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +161 -0
  69. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -0
  70. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +219 -0
  71. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.d.ts +1 -8
  72. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.d.ts.map +1 -1
  73. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.js +1 -9
  74. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts +40 -12
  75. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts.map +1 -1
  76. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js +373 -31
  77. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -1
  78. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts.map +1 -1
  79. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js +2 -1
  80. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +15 -8
  81. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts.map +1 -1
  82. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +28 -14
  83. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts +23 -0
  84. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -0
  85. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +66 -0
  86. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts +29 -0
  87. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts.map +1 -0
  88. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +210 -0
  89. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_command.d.ts +29 -0
  90. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_command.d.ts.map +1 -0
  91. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_command.js +86 -0
  92. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts +41 -0
  93. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts.map +1 -0
  94. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js +439 -0
  95. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts +23 -0
  96. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts.map +1 -0
  97. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +135 -0
  98. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.d.ts +3 -1
  99. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.d.ts.map +1 -1
  100. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.js +12 -3
  101. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +21 -18
  102. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  103. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +254 -73
  104. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +149 -8
  105. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  106. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +181 -13
  107. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +179 -7
  108. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  109. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +412 -31
  110. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +4 -4
  111. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
  112. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +4 -3
  113. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +36 -10
  114. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  115. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +218 -29
  116. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +5 -1
  117. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts.map +1 -1
  118. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +24 -14
  119. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts +15 -6
  120. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts.map +1 -1
  121. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.js +21 -22
  122. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts +36 -0
  123. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts.map +1 -0
  124. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.js +257 -0
  125. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +18 -7
  126. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -1
  127. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +157 -51
  128. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts +23 -0
  129. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts.map +1 -0
  130. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.js +110 -0
  131. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +24 -2
  132. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts.map +1 -1
  133. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js +90 -10
  134. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts +45 -0
  135. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts.map +1 -0
  136. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.js +205 -0
  137. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.js +1 -1
  138. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.d.ts +16 -3
  139. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.d.ts.map +1 -1
  140. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.js +55 -10
  141. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.d.ts +19 -4
  142. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.d.ts.map +1 -1
  143. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.js +60 -6
  144. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +4 -8
  145. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  146. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +21 -36
  147. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +21 -14
  148. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  149. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +100 -30
  150. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts +6 -2
  151. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts.map +1 -1
  152. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.js +26 -10
  153. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +3 -2
  154. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts.map +1 -1
  155. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +12 -12
  156. package/src/shade/renderer/gpu_primitive/sort/SORT_DIGIT_SETTINGS_STRUCT.d.ts +10 -0
  157. package/src/shade/renderer/gpu_primitive/sort/SORT_DIGIT_SETTINGS_STRUCT.d.ts.map +1 -0
  158. package/src/shade/renderer/gpu_primitive/sort/SORT_DIGIT_SETTINGS_STRUCT.js +21 -0
  159. package/src/shade/renderer/gpu_primitive/sort/SORT_PASS_SETTINGS_STRUCT.d.ts +5 -2
  160. package/src/shade/renderer/gpu_primitive/sort/SORT_PASS_SETTINGS_STRUCT.d.ts.map +1 -1
  161. package/src/shade/renderer/gpu_primitive/sort/SORT_PASS_SETTINGS_STRUCT.js +31 -23
  162. package/src/shade/renderer/gpu_primitive/sort/SORT_SIZE_STRUCT.d.ts +10 -0
  163. package/src/shade/renderer/gpu_primitive/sort/SORT_SIZE_STRUCT.d.ts.map +1 -0
  164. package/src/shade/renderer/gpu_primitive/sort/SORT_SIZE_STRUCT.js +22 -0
  165. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_constants.d.ts +9 -0
  166. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_constants.d.ts.map +1 -0
  167. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_constants.js +18 -0
  168. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_digit.d.ts +8 -3
  169. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_digit.d.ts.map +1 -1
  170. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_digit.js +41 -32
  171. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_histogram_tile.d.ts +31 -0
  172. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_histogram_tile.d.ts.map +1 -0
  173. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_histogram_tile.js +71 -0
  174. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_scatter_tile.d.ts +47 -0
  175. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_scatter_tile.d.ts.map +1 -0
  176. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_scatter_tile.js +210 -0
  177. package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +5 -4
  178. package/src/shade/renderer/gpu_primitive/sort/defs.d.ts.map +1 -1
  179. package/src/shade/renderer/gpu_primitive/sort/defs.js +5 -4
  180. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +56 -15
  181. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
  182. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +410 -61
  183. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram.d.ts +4 -1
  184. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram.d.ts.map +1 -1
  185. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram.js +16 -42
  186. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram_indirect.d.ts +15 -0
  187. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram_indirect.d.ts.map +1 -0
  188. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram_indirect.js +60 -0
  189. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_prepare.d.ts +25 -0
  190. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_prepare.d.ts.map +1 -0
  191. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_prepare.js +89 -0
  192. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter.d.ts +3 -8
  193. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter.d.ts.map +1 -1
  194. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter.js +28 -160
  195. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter_indirect.d.ts +12 -0
  196. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter_indirect.d.ts.map +1 -0
  197. package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter_indirect.js +74 -0
  198. package/src/shade/renderer/gpu_primitive/sort/verify_radix_sort.d.ts +3 -1
  199. package/src/shade/renderer/gpu_primitive/sort/verify_radix_sort.d.ts.map +1 -1
  200. package/src/shade/renderer/gpu_primitive/sort/verify_radix_sort.js +387 -188
  201. package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.js +1 -1
  202. package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.js +1 -1
  203. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
  204. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +90 -72
  205. package/src/shade/renderer/material/resident/RESIDENT_MATERIAL_TEXTURE_LAYOUT.d.ts +5 -0
  206. package/src/shade/renderer/material/resident/RESIDENT_MATERIAL_TEXTURE_LAYOUT.d.ts.map +1 -1
  207. package/src/shade/renderer/material/resident/RESIDENT_MATERIAL_TEXTURE_LAYOUT.js +9 -0
  208. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts +13 -0
  209. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts.map +1 -0
  210. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.js +14 -0
  211. package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.d.ts +10 -0
  212. package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.d.ts.map +1 -0
  213. package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.js +15 -0
  214. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_tangent_normal.d.ts +4 -3
  215. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_tangent_normal.d.ts.map +1 -1
  216. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_tangent_normal.js +6 -5
  217. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture.d.ts +17 -2
  218. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture.d.ts.map +1 -1
  219. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture.js +25 -57
  220. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_exact.d.ts +13 -0
  221. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_exact.d.ts.map +1 -0
  222. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_exact.js +70 -0
  223. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_stochastic.d.ts +10 -0
  224. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_stochastic.d.ts.map +1 -0
  225. package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_stochastic.js +59 -0
  226. package/src/shade/renderer/path_tracer/shader/chunk_indirect_texture_load.d.ts +12 -0
  227. package/src/shade/renderer/path_tracer/shader/chunk_indirect_texture_load.d.ts.map +1 -0
  228. package/src/shade/renderer/path_tracer/shader/chunk_indirect_texture_load.js +49 -0
  229. package/src/shade/renderer/path_tracer/shader/chunk_ray_hit_to_opacity.d.ts.map +1 -1
  230. package/src/shade/renderer/path_tracer/shader/chunk_ray_hit_to_opacity.js +1 -0
  231. package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.d.ts.map +1 -1
  232. package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.js +1 -0
  233. package/src/shade/renderer/path_tracer/shader/chunk_sample_material.d.ts.map +1 -1
  234. package/src/shade/renderer/path_tracer/shader/chunk_sample_material.js +2 -1
  235. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts +7 -0
  236. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
  237. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +15 -6
  238. package/src/shade/renderer/scene/GPUSceneContext.d.ts +7 -1
  239. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  240. package/src/shade/renderer/scene/GPUSceneContext.js +26 -1
  241. package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.d.ts +7 -7
  242. package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.d.ts.map +1 -1
  243. package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.js +262 -294
  244. package/src/shade/renderer/shader/chunk/filter/MULTISCALE_MEAN_STRUCT.d.ts +9 -0
  245. package/src/shade/renderer/shader/chunk/filter/MULTISCALE_MEAN_STRUCT.d.ts.map +1 -0
  246. package/src/shade/renderer/shader/chunk/filter/MULTISCALE_MEAN_STRUCT.js +21 -0
  247. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +43 -0
  248. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -0
  249. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +87 -0
  250. package/src/shade/renderer/shader/chunk/noise/r/chunk_r2_canonical.d.ts +7 -1
  251. package/src/shade/renderer/shader/chunk/noise/r/chunk_r2_canonical.d.ts.map +1 -1
  252. package/src/shade/renderer/shader/chunk/noise/r/chunk_r2_canonical.js +1 -1
  253. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.d.ts +21 -0
  254. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.d.ts.map +1 -0
  255. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.js +42 -0
  256. package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
  257. package/src/shade/wgsl/emulator/CPUBitmapData.d.ts +19 -0
  258. package/src/shade/wgsl/emulator/CPUBitmapData.d.ts.map +1 -1
  259. package/src/shade/wgsl/emulator/CPUBitmapData.js +27 -0
  260. package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
  261. package/src/shade/wgsl/emulator/WGSLLanguageCore.js +39 -18
  262. package/src/view/elements/progress/segmented/GhostTrail.d.ts +56 -0
  263. package/src/view/elements/progress/segmented/GhostTrail.d.ts.map +1 -0
  264. package/src/view/elements/progress/segmented/GhostTrail.js +98 -0
  265. package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.d.ts +3 -1
  266. package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.d.ts.map +1 -1
  267. package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.js +3 -1
  268. package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.d.ts +11 -0
  269. package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.d.ts.map +1 -0
  270. package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.js +15 -0
  271. package/src/view/elements/progress/segmented/SegmentDefinition.d.ts +3 -0
  272. package/src/view/elements/progress/segmented/SegmentDefinition.d.ts.map +1 -1
  273. package/src/view/elements/progress/segmented/SegmentDefinition.js +3 -0
  274. package/src/view/elements/progress/segmented/SegmentTier.d.ts +38 -0
  275. package/src/view/elements/progress/segmented/SegmentTier.d.ts.map +1 -0
  276. package/src/view/elements/progress/segmented/SegmentTier.js +50 -0
  277. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +155 -10
  278. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
  279. package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +427 -101
  280. package/src/view/elements/progress/segmented/playground/index.html +78 -0
  281. package/src/view/elements/progress/segmented/playground/main.d.ts +2 -0
  282. package/src/view/elements/progress/segmented/playground/main.d.ts.map +1 -0
  283. package/src/view/elements/progress/segmented/playground/main.js +173 -0
  284. package/src/view/elements/progress/segmented/segment_cell_layout.d.ts +48 -0
  285. package/src/view/elements/progress/segmented/segment_cell_layout.d.ts.map +1 -0
  286. package/src/view/elements/progress/segmented/segment_cell_layout.js +75 -0
  287. package/src/view/elements/progress/segmented/segment_notch_place.d.ts +18 -0
  288. package/src/view/elements/progress/segmented/segment_notch_place.d.ts.map +1 -0
  289. package/src/view/elements/progress/segmented/segment_notch_place.js +28 -0
  290. package/src/view/elements/progress/segmented/segment_tick_positions.d.ts +32 -0
  291. package/src/view/elements/progress/segmented/segment_tick_positions.d.ts.map +1 -0
  292. package/src/view/elements/progress/segmented/segment_tick_positions.js +103 -0
  293. package/src/view/elements/progress/segmented/segmented-resource-bar.css +142 -0
  294. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.d.ts +0 -35
  295. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.d.ts.map +0 -1
  296. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.js +0 -238
  297. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts +0 -99
  298. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts.map +0 -1
  299. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.js +0 -139
  300. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts +0 -65
  301. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts.map +0 -1
  302. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.js +0 -393
  303. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts +0 -17
  304. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts.map +0 -1
  305. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.js +0 -36
  306. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts +0 -29
  307. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts.map +0 -1
  308. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.js +0 -108
  309. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts +0 -31
  310. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts.map +0 -1
  311. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.js +0 -113
  312. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts +0 -36
  313. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts.map +0 -1
  314. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.js +0 -85
  315. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts +0 -23
  316. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts.map +0 -1
  317. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.js +0 -273
  318. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts +0 -13
  319. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts.map +0 -1
  320. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.js +0 -151
  321. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts +0 -13
  322. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts.map +0 -1
  323. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.js +0 -133
  324. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts +0 -22
  325. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts.map +0 -1
  326. package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.js +0 -135
@@ -0,0 +1,142 @@
1
+ /*
2
+ Default styling for SegmentedResourceBarView.
3
+
4
+ Theming: every colour, notch height and the ghost go through a --segmented-bar-* custom property with a
5
+ fallback, so a game re-skins the bar by defining the properties on the bar or any ancestor, without overriding a
6
+ selector. Each notch carries its tier's class_name; the three classes below are the ones SEGMENT_TIERS_DEFAULT
7
+ uses, and a game's own tiers may reuse them or style their own.
8
+
9
+ Import this from a style entry point, never from a logic module. Give the bar its width and height there; keep
10
+ borders off the bar itself (use box-shadow or an outline), so the fill and the notches share one box.
11
+
12
+ The ghost's hold and ease are driven from script, which reads prefers-reduced-motion: under it the ghost holds,
13
+ then snaps.
14
+ */
15
+
16
+ .ui-segmented-resource-bar-view {
17
+ position: relative;
18
+ overflow: hidden;
19
+ height: var(--segmented-bar-height, 12px);
20
+ background: var(--segmented-bar-background, rgba(0, 0, 0, 0.6));
21
+ box-shadow: var(--segmented-bar-frame, 0 0 0 1px rgba(0, 0, 0, 0.8));
22
+ }
23
+
24
+ .ui-segmented-resource-bar-view > .ghost {
25
+ position: absolute;
26
+ top: 0;
27
+ bottom: 0;
28
+ left: 0;
29
+ width: 0;
30
+ background: var(--segmented-bar-ghost-color, rgba(255, 236, 196, 0.85));
31
+ }
32
+
33
+ .ui-segmented-resource-bar-view > .fill-container,
34
+ .ui-segmented-resource-bar-view > .notches,
35
+ .ui-segmented-resource-bar-view > .cells {
36
+ position: absolute;
37
+ top: 0;
38
+ right: 0;
39
+ bottom: 0;
40
+ left: 0;
41
+ }
42
+
43
+ .ui-segmented-resource-bar-view > .notches,
44
+ .ui-segmented-resource-bar-view > .highlights {
45
+ pointer-events: none;
46
+ }
47
+
48
+ .ui-segmented-resource-bar-view .fill {
49
+ position: absolute;
50
+ top: 0;
51
+ bottom: 0;
52
+ background: var(--segmented-bar-fill-color, #3fae4a);
53
+ }
54
+
55
+ /* the second and third stacked values, e.g. shield over health */
56
+ .ui-segmented-resource-bar-view .fill.value-1 {
57
+ background: var(--segmented-bar-fill-1-color, #d8d8d8);
58
+ }
59
+
60
+ .ui-segmented-resource-bar-view .fill.value-2 {
61
+ background: var(--segmented-bar-fill-2-color, #7a5fd0);
62
+ }
63
+
64
+ /* notches */
65
+
66
+ .ui-segmented-resource-bar-view .notch {
67
+ position: absolute;
68
+ top: 0;
69
+ height: var(--segmented-bar-tick-height, 100%);
70
+ background: var(--segmented-bar-tick-color, rgba(0, 0, 0, 0.6));
71
+ box-shadow: var(--segmented-bar-tick-highlight, none);
72
+ }
73
+
74
+ .ui-segmented-resource-bar-view .notch.segment-tier-minor {
75
+ height: var(--segmented-bar-tick-minor-height, 45%);
76
+ background: var(--segmented-bar-tick-minor-color, rgba(0, 0, 0, 0.4));
77
+ }
78
+
79
+ .ui-segmented-resource-bar-view .notch.segment-tier-major {
80
+ height: var(--segmented-bar-tick-major-height, 100%);
81
+ background: var(--segmented-bar-tick-major-color, rgba(0, 0, 0, 0.6));
82
+ }
83
+
84
+ .ui-segmented-resource-bar-view .notch.segment-tier-super {
85
+ height: var(--segmented-bar-tick-super-height, 100%);
86
+ background: var(--segmented-bar-tick-super-color, rgba(0, 0, 0, 0.85));
87
+ }
88
+
89
+ /* cells */
90
+
91
+ .ui-segmented-resource-bar-view.mode-cells {
92
+ /* the gaps between cells show the bar through them */
93
+ background: var(--segmented-bar-cell-gap-color, transparent);
94
+ box-shadow: none;
95
+ }
96
+
97
+ .ui-segmented-resource-bar-view .cell {
98
+ position: absolute;
99
+ top: 0;
100
+ bottom: 0;
101
+ overflow: hidden;
102
+ background: var(--segmented-bar-cell-empty-color, rgba(0, 0, 0, 0.55));
103
+ }
104
+
105
+ .ui-segmented-resource-bar-view .cell-ghost,
106
+ .ui-segmented-resource-bar-view .cell-fill {
107
+ position: absolute;
108
+ top: 0;
109
+ bottom: 0;
110
+ left: 0;
111
+ width: 0;
112
+ }
113
+
114
+ .ui-segmented-resource-bar-view .cell-ghost {
115
+ background: var(--segmented-bar-ghost-color, rgba(255, 236, 196, 0.85));
116
+ }
117
+
118
+ .ui-segmented-resource-bar-view .cell-fill {
119
+ background: var(--segmented-bar-cell-filled-color, #e8c25a);
120
+ }
121
+
122
+ /* a cell filling up one at a time, e.g. a round being loaded */
123
+ .ui-segmented-resource-bar-view .cell.partial > .cell-fill {
124
+ background: var(--segmented-bar-cell-partial-color, rgba(232, 194, 90, 0.6));
125
+ }
126
+
127
+ /* highlights (the view's `highlights` list) */
128
+
129
+ .ui-segmented-resource-bar-view > .highlights {
130
+ position: absolute;
131
+ top: 0;
132
+ right: 0;
133
+ bottom: 0;
134
+ left: 0;
135
+ }
136
+
137
+ .ui-segmented-resource-bar-view .highlight {
138
+ position: absolute;
139
+ top: 0;
140
+ bottom: 0;
141
+ background: var(--segmented-bar-highlight-color, rgba(255, 255, 255, 0.25));
142
+ }
@@ -1,35 +0,0 @@
1
- /**
2
- * Words of the mesh provider's statistics, every one an atomic that accumulates.
3
- */
4
- export const MESH_BRICK_STATISTIC_INSTANCES_DROPPED: 0;
5
- export const MESH_BRICK_STATISTIC_CANDIDATES_DROPPED: 1;
6
- export const MESH_BRICK_STATISTIC_NODES_DROPPED: 2;
7
- export const MESH_BRICK_STATISTIC_WORDS: 4;
8
- /**
9
- * @type {WebGPUStruct}
10
- */
11
- export const MESH_BRICK_PROVIDER_SETTINGS: WebGPUStruct;
12
- /**
13
- * The mesh provider's pass (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7): a 64-lane workgroup a taken
14
- * cell, dispatched by take.
15
- *
16
- * **Gather.** A cooperative TLAS query with the cell grown by the cascade's band, every leaf filtered
17
- * by `mesh_brick_accept`: in the SDF world, resident, at least half a voxel across. Up to
18
- * {@link MESH_BRICK_INSTANCE_LIMIT} instances, a lane each, go into workgroup memory; past it they are
19
- * dropped and counted, as are candidates and subtrees the query itself dropped.
20
- *
21
- * **512 texels, eight a lane**, each `mesh_brick_texel`: the minimum over the instances of their
22
- * sampled distance, and its row. A lane merges its texels into its two staging words, which no other
23
- * thread touches (contract 1), as the byte minimum (contract 2).
24
- *
25
- * **Objects** (contract 3): per 2³-texel cell, the provider's row at its own nearest texel replaces the
26
- * staged object when the provider's cell minimum is below the staged one from before the merge; ties
27
- * keep the staged object. A cell's four lanes fold their texels in through workgroup atomics, and the
28
- * last of them decides, so that no lane waits on another.
29
- *
30
- * @type {ComputeShader}
31
- */
32
- export const shader_mesh_brick_provider: ComputeShader;
33
- import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
34
- import { ComputeShader } from "../../../../shader/ComputeShader.js";
35
- //# sourceMappingURL=shader_mesh_brick_provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shader_mesh_brick_provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.js"],"names":[],"mappings":"AAiCA;;GAEG;AACH,uDAAwD;AACxD,wDAAyD;AACzD,mDAAoD;AACpD,2CAA4C;AAE5C;;GAEG;AACH,2CAFU,YAAY,CAOU;AAoKhC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,yCAFU,aAAa,CAMpB;6BA1N0B,yCAAyC;8BAJxC,qCAAqC"}
@@ -1,238 +0,0 @@
1
- import { assert } from "../../../../../../core/assert.js";
2
- import { WebGPUExtensionType } from "../../../../../descriptor/WebGPUExtensionType.js";
3
- import {
4
- MESH_SDF_ATLAS_RESOURCE,
5
- MESH_SDF_HEADERS_RESOURCE,
6
- MESH_SDF_INDIRECTION_RESOURCE,
7
- MESH_SDF_SAMPLER_RESOURCE
8
- } from "../../../../geometry/sdf/MESH_SDF_RESOURCES.js";
9
- import { BVH2_NODE_STRUCT } from "../../../../shader/chunk/bvh/BVH2_NODE_STRUCT.js";
10
- import { BVH_STRUCT } from "../../../../shader/chunk/bvh/BVH_STRUCT.js";
11
- import { chunk_bvh_query_aabb_cooperative } from "../../../../shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.js";
12
- import { BVH_QUERY_AABB_WORKGROUP_SIZE } from "../../../../shader/chunk/bvh/chunk_bvh_query_aabb_frontier.js";
13
- import { CLIPMAP_LEVEL_ARRAY } from "../../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
14
- import { chunk_folded_workgroup_index } from "../../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
15
- import { CodeChunk } from "../../../../shader/compiler/CodeChunk.js";
16
- import { ComputeShader } from "../../../../shader/ComputeShader.js";
17
- import { ShaderResourceSetDescriptor } from "../../../../shader/resource/ShaderResourceSetDescriptor.js";
18
- import { atomic_u32, u32 } from "../../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
19
- import { WebGPUArray } from "../../../../shader/type/WebGPUArray.js";
20
- import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
21
- import { BRICK_CELL_WORKGROUP_SIZE, BRICK_OBJECT_CELLS_PER_AXIS } from "../BRICK_CLIPMAP.js";
22
- import { chunk_brick_object } from "../chunk_brick_object.js";
23
- import { chunk_brick_provider } from "../chunk_brick_provider.js";
24
- import {
25
- BRICK_RING_RESOURCE,
26
- BRICK_STAGING_RESOURCE,
27
- BRICK_TAKE_RESOURCE,
28
- chunk_brick_clipmap
29
- } from "../chunk_brick_clipmap.js";
30
- import { chunk_mesh_brick_instance } from "./chunk_mesh_brick_instance.js";
31
- import { chunk_mesh_brick_texel } from "./chunk_mesh_brick_texel.js";
32
- import { MESH_BRICK_INSTANCE_LIMIT, MESH_BRICK_INSTANCE_STRUCT } from "./MESH_BRICK_INSTANCE_STRUCT.js";
33
-
34
- /**
35
- * Words of the mesh provider's statistics, every one an atomic that accumulates.
36
- */
37
- export const MESH_BRICK_STATISTIC_INSTANCES_DROPPED = 0;
38
- export const MESH_BRICK_STATISTIC_CANDIDATES_DROPPED = 1;
39
- export const MESH_BRICK_STATISTIC_NODES_DROPPED = 2;
40
- export const MESH_BRICK_STATISTIC_WORDS = 4;
41
-
42
- /**
43
- * @type {WebGPUStruct}
44
- */
45
- export const MESH_BRICK_PROVIDER_SETTINGS = WebGPUStruct.from({
46
- /** keys `brick_ring` holds, a power of two */
47
- ring_capacity: u32,
48
- /** cells a cascade's window has a side */
49
- resolution: u32,
50
- }, "MeshBrickProviderSettings");
51
-
52
- // the gather is the whole workgroup's: a cell's workgroup is the query's
53
- assert.equal(BRICK_CELL_WORKGROUP_SIZE, BVH_QUERY_AABB_WORKGROUP_SIZE, 'a taken cell\'s workgroup runs the cooperative query');
54
-
55
- const resources = new ShaderResourceSetDescriptor();
56
-
57
- resources.setImmediate("settings", MESH_BRICK_PROVIDER_SETTINGS);
58
-
59
- resources.createGroup()
60
- .add(BRICK_TAKE_RESOURCE)
61
- .add(BRICK_RING_RESOURCE)
62
- .add(BRICK_STAGING_RESOURCE)
63
- .addUniform("brick_levels", CLIPMAP_LEVEL_ARRAY)
64
- .addStorageBuffer("mesh_brick_statistics", WebGPUArray.from(atomic_u32), true);
65
-
66
- resources.createGroup()
67
- .addStorageBuffer("tlas", BVH_STRUCT)
68
- .addStorageBuffer("scene_database", WebGPUArray.from(u32))
69
- .add(MESH_SDF_HEADERS_RESOURCE)
70
- .add(MESH_SDF_INDIRECTION_RESOURCE)
71
- .add(MESH_SDF_ATLAS_RESOURCE)
72
- .add(MESH_SDF_SAMPLER_RESOURCE);
73
-
74
- const body = CodeChunk.from(
75
- //language=WGSL
76
- `
77
- const MESH_BRICK_INSTANCE_LIMIT = ${MESH_BRICK_INSTANCE_LIMIT}u;
78
-
79
- /** the cascade's voxel, the same for the whole workgroup: what the gather's resolution cull weighs a box by */
80
- var<private> mesh_brick_voxel: f32;
81
-
82
- var<workgroup> instances: array<${MESH_BRICK_INSTANCE_STRUCT.wgsl_ref}, ${MESH_BRICK_INSTANCE_LIMIT}>;
83
- var<workgroup> cell_taken: u32;
84
-
85
- /** per object cell: its nearest texel's key, its staged minimum (as 255 less the byte), and its lanes done */
86
- var<workgroup> object_best: array<atomic<u32>, ${BRICK_OBJECT_CELLS_PER_AXIS ** 3}>;
87
- var<workgroup> object_staged: array<atomic<u32>, ${BRICK_OBJECT_CELLS_PER_AXIS ** 3}>;
88
- var<workgroup> object_lanes: array<atomic<u32>, ${BRICK_OBJECT_CELLS_PER_AXIS ** 3}>;
89
-
90
- fn bvh_query_aabb_node(index: u32) -> ${BVH2_NODE_STRUCT.wgsl_ref} {
91
- return tlas.nodes[index];
92
- }
93
-
94
- fn bvh_query_aabb_accept_leaf(payload: u32, bounds: array<f32, 6>) -> bool {
95
- return mesh_brick_accept(payload, bounds, mesh_brick_voxel);
96
- }
97
-
98
- fn mesh_brick_instance_at(i: u32) -> ${MESH_BRICK_INSTANCE_STRUCT.wgsl_ref} {
99
- return instances[i];
100
- }
101
-
102
- @compute @workgroup_size(${BRICK_CELL_WORKGROUP_SIZE})
103
- fn main(
104
- @builtin(workgroup_id) workgroup_id: vec3<u32>,
105
- @builtin(local_invocation_index) lane: u32,
106
- ) {
107
- let build = folded_workgroup_index(workgroup_id);
108
-
109
- if (lane == 0u) {
110
- cell_taken = brick_take[BRICK_TAKE_COUNT];
111
- }
112
-
113
- // a folded dispatch's tail leaves whole
114
- if (build >= workgroupUniformLoad(&cell_taken)) {
115
- return;
116
- }
117
-
118
- let at = brick_provider_cell(brick_provider_key(build, settings.ring_capacity), settings.resolution);
119
-
120
- let voxel = at.voxel;
121
- let band = at.band;
122
- let corner = at.corner;
123
- let far = at.far;
124
-
125
- mesh_brick_voxel = voxel;
126
-
127
- // every instance whose box comes within the band of the cell
128
- let gathered = bvh_query_aabb_cooperative(tlas.root, array<f32, 6>(corner.x - band, corner.y - band, corner.z - band, far.x + band, far.y + band, far.z + band), lane);
129
- let count = min(gathered.candidate_count, MESH_BRICK_INSTANCE_LIMIT);
130
-
131
- if (lane < count) {
132
- instances[lane] = mesh_brick_instance(bvh_query_aabb_candidates[lane], voxel);
133
- }
134
-
135
- if (lane == 0u) {
136
- if (gathered.candidate_count > count) {
137
- atomicAdd(&mesh_brick_statistics[${MESH_BRICK_STATISTIC_INSTANCES_DROPPED}u], gathered.candidate_count - count);
138
- }
139
-
140
- if (gathered.candidates_dropped > 0u) {
141
- atomicAdd(&mesh_brick_statistics[${MESH_BRICK_STATISTIC_CANDIDATES_DROPPED}u], gathered.candidates_dropped);
142
- }
143
-
144
- if (gathered.nodes_dropped > 0u) {
145
- atomicAdd(&mesh_brick_statistics[${MESH_BRICK_STATISTIC_NODES_DROPPED}u], gathered.nodes_dropped);
146
- }
147
- }
148
-
149
- workgroupBarrier();
150
-
151
- // eight texels a lane, x fastest, at y = lane mod 8 and z = lane / 8: the staging's two words
152
- let y = lane % 8u;
153
- let z = lane / 8u;
154
- let first = build * BRICK_STAGING_WORDS + 2u * lane;
155
-
156
- var best = vec4<u32>(0u);
157
- var staged_min = vec4<u32>(255u);
158
-
159
- for (var w = 0u; w < 2u; w++) {
160
- var word = brick_staging[first + w];
161
-
162
- for (var b = 0u; b < 4u; b++) {
163
- let x = 4u * w + b;
164
- let shift = 8u * b;
165
- let staged = (word >> shift) & 0xffu;
166
-
167
- let texel = mesh_brick_texel(corner + vec3<f32>(f32(x), f32(y), f32(z)) * voxel, count);
168
- let byte = brick_encode(texel.distance, band);
169
-
170
- // contract 2: the encoding is monotone, so the minimum of the bytes is the byte of the minimum
171
- word = (word & ~(0xffu << shift)) | (min(staged, byte) << shift);
172
-
173
- // the object cell's two texels of this lane
174
- let o = x / 2u;
175
-
176
- staged_min[o] = min(staged_min[o], staged);
177
- best[o] = max(best[o], brick_object_key(byte, texel.row));
178
- }
179
-
180
- brick_staging[first + w] = word;
181
- }
182
-
183
- // contract 3, per object cell: its four lanes each fold in their texels, and the last decides
184
- for (var o = 0u; o < ${BRICK_OBJECT_CELLS_PER_AXIS}u; o++) {
185
- let object = o + ${BRICK_OBJECT_CELLS_PER_AXIS}u * ((y / 2u) + ${BRICK_OBJECT_CELLS_PER_AXIS}u * (z / 2u));
186
-
187
- atomicMax(&object_best[object], best[o]);
188
- atomicMax(&object_staged[object], 255u - staged_min[o]);
189
-
190
- if (atomicAdd(&object_lanes[object], 1u) != 3u) {
191
- continue;
192
- }
193
-
194
- // the provider's cell minimum against the staged one from before its merge: ties keep the staged
195
- let nearest = atomicLoad(&object_best[object]);
196
-
197
- if (brick_object_key_byte(nearest) < 255u - atomicLoad(&object_staged[object])) {
198
- brick_staging[build * BRICK_STAGING_WORDS + BRICK_STAGING_DISTANCE_WORDS + object] = brick_object_key_row(nearest);
199
- }
200
- }
201
- }
202
- `, [
203
- chunk_brick_clipmap,
204
- chunk_brick_provider,
205
- chunk_folded_workgroup_index,
206
- chunk_bvh_query_aabb_cooperative,
207
- chunk_mesh_brick_instance,
208
- chunk_mesh_brick_texel,
209
- chunk_brick_object,
210
- ]);
211
-
212
- body.addExtension(WebGPUExtensionType.Subgroups);
213
-
214
- /**
215
- * The mesh provider's pass (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7): a 64-lane workgroup a taken
216
- * cell, dispatched by take.
217
- *
218
- * **Gather.** A cooperative TLAS query with the cell grown by the cascade's band, every leaf filtered
219
- * by `mesh_brick_accept`: in the SDF world, resident, at least half a voxel across. Up to
220
- * {@link MESH_BRICK_INSTANCE_LIMIT} instances, a lane each, go into workgroup memory; past it they are
221
- * dropped and counted, as are candidates and subtrees the query itself dropped.
222
- *
223
- * **512 texels, eight a lane**, each `mesh_brick_texel`: the minimum over the instances of their
224
- * sampled distance, and its row. A lane merges its texels into its two staging words, which no other
225
- * thread touches (contract 1), as the byte minimum (contract 2).
226
- *
227
- * **Objects** (contract 3): per 2³-texel cell, the provider's row at its own nearest texel replaces the
228
- * staged object when the provider's cell minimum is below the staged one from before the merge; ties
229
- * keep the staged object. A cell's four lanes fold their texels in through workgroup atomics, and the
230
- * last of them decides, so that no lane waits on another.
231
- *
232
- * @type {ComputeShader}
233
- */
234
- export const shader_mesh_brick_provider = ComputeShader.from({
235
- label: "Brick Clipmap Mesh Provider",
236
- resources,
237
- body,
238
- });
@@ -1,99 +0,0 @@
1
- /**
2
- * The provider's settings, an immediate of each of its passes.
3
- * @type {WebGPUStruct}
4
- */
5
- export const VGEO_BRICK_SETTINGS: WebGPUStruct;
6
- /**
7
- * Where a pair record keeps the box it is cut against: the cell grown by the field's band, in the instance's
8
- * object space, lower xyz then upper xyz, in the words a view's record keeps its frustum in.
9
- * @type {number}
10
- */
11
- export const VGEO_BRICK_PAIR_BOX: number;
12
- /**
13
- * Where a pair record keeps its taken cell: the first word a view's record leaves free.
14
- * @type {number}
15
- */
16
- export const VGEO_BRICK_PAIR_BUILD: number;
17
- /**
18
- * Pair records a frame holds, for each cell of its take budget; past them, pairs are dropped and counted.
19
- * @type {number}
20
- */
21
- export const VGEO_BRICK_PAIRS_PER_CELL: number;
22
- /**
23
- * Clusters a taken cell's list holds; past them, clusters are dropped and counted.
24
- * @type {number}
25
- */
26
- export const VGEO_BRICK_CELL_CLUSTERS: number;
27
- /**
28
- * A waiting cell: its key, then what the first cluster of its cut that stood something in waits on, and what wants
29
- * it. The page it waits on is `PAGE` of the geometry whose page lookup starts at `LOOKUP`, and `GROUP` is the group in
30
- * that page. The want for that page goes through the page the cluster was found in: `SOURCE` is its row, `SOURCE_PAGE`
31
- * its own page index in the geometry, `REF` the entry of its child table naming the page, and `ERROR` the cluster's
32
- * projected error, as the want's priority (`vg_want`). A group held back carries no want, as in the cut, whose rule
33
- * leaves a held verdict's `REF` and `ERROR` at zero: the clamp beside it wants the page that holds it back.
34
- */
35
- export const VGEO_BRICK_WAIT_OFFSET: Readonly<{
36
- KEY: 0;
37
- LOOKUP: 1;
38
- PAGE: 2;
39
- GROUP: 3;
40
- SOURCE: 4;
41
- SOURCE_PAGE: 5;
42
- REF: 6;
43
- ERROR: 7;
44
- }>;
45
- /**
46
- * Words of a waiting cell.
47
- * @type {number}
48
- */
49
- export const VGEO_BRICK_WAIT_WORDS: number;
50
- /**
51
- * A taken cell's list: its header, then from `ENTRIES` a cluster's pair and meshlet row each. The header holds the
52
- * clusters taken (a count that runs past what the list holds), how many of them stood in for a page or a group not
53
- * there yet, and from `WAIT` the cell as a waiting cell's words ({@link VGEO_BRICK_WAIT_OFFSET}): its key, then the
54
- * first stand-in's wait, which the distances copy onto the waiting list whole.
55
- */
56
- export const VGEO_BRICK_CELL_OFFSET: Readonly<{
57
- COUNT: 0;
58
- WAITS: 1;
59
- WAIT: 2;
60
- KEY: number;
61
- ENTRIES: number;
62
- }>;
63
- /**
64
- * Words of a taken cell's list.
65
- * @type {number}
66
- */
67
- export const VGEO_BRICK_CELL_WORDS: number;
68
- /**
69
- * Waiting cells the provider holds, for each cell of the take budget; past them, a cell that stood a cluster in is
70
- * dropped and counted, and is not built again when its page arrives.
71
- * @type {number}
72
- */
73
- export const VGEO_BRICK_WAITS_PER_CELL: number;
74
- /**
75
- * Triangles of a taken cell's cut that its distances are made from, in workgroup memory (§7.8, chosen): past
76
- * them, triangles are dropped and counted, and a dropped triangle can leave a hole. A texel's distance is a loop
77
- * over them.
78
- * @type {number}
79
- */
80
- export const VGEO_BRICK_CELL_TRIANGLES: number;
81
- /**
82
- * Lanes of the distance pass, a workgroup a taken cell: a lane a triangle, of as many of the cell's clusters at a
83
- * time as the lanes hold whole, then the cell's texels shared out evenly.
84
- * @type {number}
85
- */
86
- export const VGEO_BRICK_DISTANCE_WORKGROUP_SIZE: number;
87
- /**
88
- * Words of the provider's statistics, every one an atomic that accumulates: pairs dropped (the records were full,
89
- * or the instance's transform flattens it), candidates and subtrees the gather's query dropped, triangles the
90
- * distance pass dropped past {@link VGEO_BRICK_CELL_TRIANGLES}, and waiting cells dropped past the waiting list.
91
- */
92
- export const VGEO_BRICK_STATISTIC_PAIRS_DROPPED: 0;
93
- export const VGEO_BRICK_STATISTIC_CANDIDATES_DROPPED: 1;
94
- export const VGEO_BRICK_STATISTIC_NODES_DROPPED: 2;
95
- export const VGEO_BRICK_STATISTIC_TRIANGLES_DROPPED: 3;
96
- export const VGEO_BRICK_STATISTIC_WAITS_DROPPED: 4;
97
- export const VGEO_BRICK_STATISTIC_WORDS: 8;
98
- import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
99
- //# sourceMappingURL=VGEO_BRICK.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VGEO_BRICK.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,kCAFU,YAAY,CAWE;AAExB;;;;GAIG;AACH,kCAFU,MAAM,CAEgD;AAEhE;;;GAGG;AACH,oCAFU,MAAM,CAE8D;AAI9E;;;GAGG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,uCAFU,MAAM,CAE2B;AAE3C;;;;;;;GAOG;AACH;;;;;;;;;GASG;AAEH;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;;;GAKG;AACH;;;;;;GAMG;AAEH;;;GAGG;AACH,oCAFU,MAAM,CAEmF;AAEnG;;;;GAIG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;;GAKG;AACH,wCAFU,MAAM,CAE6B;AAE7C;;;;GAIG;AACH,iDAFU,MAAM,CAEsE;AAKtF;;;;GAIG;AACH,mDAAoD;AACpD,wDAAyD;AACzD,mDAAoD;AACpD,uDAAwD;AACxD,mDAAoD;AACpD,2CAA4C;6BApIf,yCAAyC"}
@@ -1,139 +0,0 @@
1
- import { assert } from "../../../../../../core/assert.js";
2
- import { MESH_SDF_BRICK_TEXEL_COUNT } from "../../../../geometry/sdf/MESH_SDF.js";
3
- import { VGEO_MAX_CLUSTER_TRIANGLE_COUNT } from "../../../../geometry/virtual/format/cluster/VGEO_MAX_CLUSTER_TRIANGLE_COUNT.js";
4
- import { VGEO_INSTANCE_OFFSET } from "../../../../geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js";
5
- import { VGEO_INSTANCE_WORDS } from "../../../../geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js";
6
- import { u32 } from "../../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
7
- import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
8
-
9
- /*
10
- The vgeo brick provider's layouts (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8).
11
-
12
- A pair is a taken cell and a vgeo instance whose box reaches it. Its record is a cut's instance record
13
- (VGEO_INSTANCE_OFFSET), so the camera cut's seed and descent run it unchanged; what a view keeps for its own
14
- culls, the pair keeps for the box's.
15
- */
16
-
17
- /**
18
- * The provider's settings, an immediate of each of its passes.
19
- * @type {WebGPUStruct}
20
- */
21
- export const VGEO_BRICK_SETTINGS = WebGPUStruct.from({
22
- /** keys `brick_ring` holds, a power of two */
23
- ring_capacity: u32,
24
- /** cells a cascade's window has a side */
25
- resolution: u32,
26
- /** pair records the frame holds */
27
- pair_capacity: u32,
28
- /** waiting cells a waiting list holds */
29
- wait_capacity: u32,
30
- }, "VGeoBrickSettings");
31
-
32
- /**
33
- * Where a pair record keeps the box it is cut against: the cell grown by the field's band, in the instance's
34
- * object space, lower xyz then upper xyz, in the words a view's record keeps its frustum in.
35
- * @type {number}
36
- */
37
- export const VGEO_BRICK_PAIR_BOX = VGEO_INSTANCE_OFFSET.FRUSTUM;
38
-
39
- /**
40
- * Where a pair record keeps its taken cell: the first word a view's record leaves free.
41
- * @type {number}
42
- */
43
- export const VGEO_BRICK_PAIR_BUILD = VGEO_INSTANCE_OFFSET.DISTANCE_WEIGHT + 1;
44
-
45
- assert.lessThan(VGEO_BRICK_PAIR_BUILD, VGEO_INSTANCE_WORDS, 'a pair record keeps its cell inside the record');
46
-
47
- /**
48
- * Pair records a frame holds, for each cell of its take budget; past them, pairs are dropped and counted.
49
- * @type {number}
50
- */
51
- export const VGEO_BRICK_PAIRS_PER_CELL = 8;
52
-
53
- /**
54
- * Clusters a taken cell's list holds; past them, clusters are dropped and counted.
55
- * @type {number}
56
- */
57
- export const VGEO_BRICK_CELL_CLUSTERS = 64;
58
-
59
- /**
60
- * A waiting cell: its key, then what the first cluster of its cut that stood something in waits on, and what wants
61
- * it. The page it waits on is `PAGE` of the geometry whose page lookup starts at `LOOKUP`, and `GROUP` is the group in
62
- * that page. The want for that page goes through the page the cluster was found in: `SOURCE` is its row, `SOURCE_PAGE`
63
- * its own page index in the geometry, `REF` the entry of its child table naming the page, and `ERROR` the cluster's
64
- * projected error, as the want's priority (`vg_want`). A group held back carries no want, as in the cut, whose rule
65
- * leaves a held verdict's `REF` and `ERROR` at zero: the clamp beside it wants the page that holds it back.
66
- */
67
- export const VGEO_BRICK_WAIT_OFFSET = Object.freeze({
68
- KEY: 0,
69
- LOOKUP: 1,
70
- PAGE: 2,
71
- GROUP: 3,
72
- SOURCE: 4,
73
- SOURCE_PAGE: 5,
74
- REF: 6,
75
- ERROR: 7,
76
- });
77
-
78
- /**
79
- * Words of a waiting cell.
80
- * @type {number}
81
- */
82
- export const VGEO_BRICK_WAIT_WORDS = 8;
83
-
84
- /**
85
- * A taken cell's list: its header, then from `ENTRIES` a cluster's pair and meshlet row each. The header holds the
86
- * clusters taken (a count that runs past what the list holds), how many of them stood in for a page or a group not
87
- * there yet, and from `WAIT` the cell as a waiting cell's words ({@link VGEO_BRICK_WAIT_OFFSET}): its key, then the
88
- * first stand-in's wait, which the distances copy onto the waiting list whole.
89
- */
90
- export const VGEO_BRICK_CELL_OFFSET = Object.freeze({
91
- COUNT: 0,
92
- WAITS: 1,
93
- WAIT: 2,
94
- KEY: 2 + VGEO_BRICK_WAIT_OFFSET.KEY,
95
- ENTRIES: 2 + VGEO_BRICK_WAIT_WORDS,
96
- });
97
-
98
- /**
99
- * Words of a taken cell's list.
100
- * @type {number}
101
- */
102
- export const VGEO_BRICK_CELL_WORDS = VGEO_BRICK_CELL_OFFSET.ENTRIES + 2 * VGEO_BRICK_CELL_CLUSTERS;
103
-
104
- /**
105
- * Waiting cells the provider holds, for each cell of the take budget; past them, a cell that stood a cluster in is
106
- * dropped and counted, and is not built again when its page arrives.
107
- * @type {number}
108
- */
109
- export const VGEO_BRICK_WAITS_PER_CELL = 4;
110
-
111
- /**
112
- * Triangles of a taken cell's cut that its distances are made from, in workgroup memory (§7.8, chosen): past
113
- * them, triangles are dropped and counted, and a dropped triangle can leave a hole. A texel's distance is a loop
114
- * over them.
115
- * @type {number}
116
- */
117
- export const VGEO_BRICK_CELL_TRIANGLES = 256;
118
-
119
- /**
120
- * Lanes of the distance pass, a workgroup a taken cell: a lane a triangle, of as many of the cell's clusters at a
121
- * time as the lanes hold whole, then the cell's texels shared out evenly.
122
- * @type {number}
123
- */
124
- export const VGEO_BRICK_DISTANCE_WORKGROUP_SIZE = 2 * VGEO_MAX_CLUSTER_TRIANGLE_COUNT;
125
-
126
- assert.equal(MESH_SDF_BRICK_TEXEL_COUNT % VGEO_BRICK_DISTANCE_WORKGROUP_SIZE, 0, 'the distance pass shares a cell\'s texels out evenly');
127
- assert.lessThanOrEqual(VGEO_BRICK_DISTANCE_WORKGROUP_SIZE, 256, 'the distance pass\'s workgroup is within WebGPU\'s default invocation limit');
128
-
129
- /**
130
- * Words of the provider's statistics, every one an atomic that accumulates: pairs dropped (the records were full,
131
- * or the instance's transform flattens it), candidates and subtrees the gather's query dropped, triangles the
132
- * distance pass dropped past {@link VGEO_BRICK_CELL_TRIANGLES}, and waiting cells dropped past the waiting list.
133
- */
134
- export const VGEO_BRICK_STATISTIC_PAIRS_DROPPED = 0;
135
- export const VGEO_BRICK_STATISTIC_CANDIDATES_DROPPED = 1;
136
- export const VGEO_BRICK_STATISTIC_NODES_DROPPED = 2;
137
- export const VGEO_BRICK_STATISTIC_TRIANGLES_DROPPED = 3;
138
- export const VGEO_BRICK_STATISTIC_WAITS_DROPPED = 4;
139
- export const VGEO_BRICK_STATISTIC_WORDS = 8;