@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,161 @@
1
+ /**
2
+ * Entries a record holds, and instances a batch samples at once: a lane each.
3
+ * @type {number}
4
+ */
5
+ export const MESH_BRICK_BATCH: number;
6
+ /**
7
+ * Nodes a walk keeps on a level of its frontier; the rest are handed on to the next round. Eight
8
+ * nodes a lane a level at most.
9
+ *
10
+ * Measured on Zorah's TLAS (12,608 leaves, 27 levels deep), the widest level of a cell's walk is
11
+ * 758 nodes at cascade 2 and 2,410 at cascade 5; at this frontier and tasks of
12
+ * {@link MESH_BRICK_BATCH} nodes every walk ends in its third round. The frontier is 4 KiB of the
13
+ * walk's 5.1 KiB of workgroup memory, and the iGPU's walk is bound by how many workgroups that memory
14
+ * lets in: against 1,024 nodes, which ended every walk in its second round, the walks of a full
15
+ * rebuild of Zorah's windows went from 71.1 to 43.0 ms there, and stayed even on the 4090.
16
+ * @type {number}
17
+ */
18
+ export const MESH_BRICK_FRONTIER: number;
19
+ /**
20
+ * Words of a record's header: its build slot, then how many entries it holds.
21
+ * @type {number}
22
+ */
23
+ export const MESH_BRICK_RECORD_HEADER_WORDS: number;
24
+ /**
25
+ * Words of a task or batch record.
26
+ * @type {number}
27
+ */
28
+ export const MESH_BRICK_RECORD_WORDS: number;
29
+ /**
30
+ * Rounds of walks the provider starts with: the walk from the root, and one for what it hands on.
31
+ * @type {number}
32
+ */
33
+ export const MESH_BRICK_ROUNDS: number;
34
+ /**
35
+ * Rounds a walk of a TLAS over at most 2^20 leaves can need. A task starts from at most
36
+ * {@link MESH_BRICK_BATCH} nodes and hands on only past {@link MESH_BRICK_FRONTIER}, eight times as
37
+ * many, so a chain of k rounds needs a level 64·8^(k-1) nodes wide; 2^20 leaves allow k = 6.
38
+ * @type {number}
39
+ */
40
+ export const MESH_BRICK_ROUND_LIMIT: number;
41
+ /**
42
+ * The first of a build slot's object words.
43
+ * @type {number}
44
+ */
45
+ export const MESH_BRICK_ACCUMULATOR_OBJECTS: number;
46
+ /**
47
+ * The word of the cell's flags for the frame, {@link MESH_BRICK_FLAG_TOUCHED} and
48
+ * {@link MESH_BRICK_FLAG_UNFINISHED}. The walk that sets the first of them lists the cell for the
49
+ * resolve: most taken cells set none, and the resolve never reads them.
50
+ * @type {number}
51
+ */
52
+ export const MESH_BRICK_ACCUMULATOR_FLAGS: number;
53
+ /**
54
+ * Words of a build slot's accumulators.
55
+ * @type {number}
56
+ */
57
+ export const MESH_BRICK_ACCUMULATOR_WORDS: number;
58
+ /**
59
+ * A batch of the cell was made: the resolve merges its texel and object words.
60
+ * @type {number}
61
+ */
62
+ export const MESH_BRICK_FLAG_TOUCHED: number;
63
+ /**
64
+ * A walk of the cell did not finish: a record it could not take, a level past the walk's budget, or
65
+ * nodes past the frontier in the last round. The resolve asks for the cell again
66
+ * (`BRICK_STAGING_RETRY_WORD`).
67
+ * @type {number}
68
+ */
69
+ export const MESH_BRICK_FLAG_UNFINISHED: number;
70
+ /**
71
+ * Batch records the walks asked for, ever.
72
+ * @type {number}
73
+ */
74
+ export const MESH_BRICK_STATISTIC_BATCHES: number;
75
+ /**
76
+ * Batch records asked for past the capacity, ever: their rows were not sampled, and their cells asked for again.
77
+ * @type {number}
78
+ */
79
+ export const MESH_BRICK_STATISTIC_BATCHES_DROPPED: number;
80
+ /**
81
+ * Task records the walks asked for, ever.
82
+ * @type {number}
83
+ */
84
+ export const MESH_BRICK_STATISTIC_TASKS: number;
85
+ /**
86
+ * Task records asked for past the capacity, ever.
87
+ * @type {number}
88
+ */
89
+ export const MESH_BRICK_STATISTIC_TASKS_DROPPED: number;
90
+ /**
91
+ * Times a walk of the last round had nodes past its frontier, ever: the host adds a round.
92
+ * @type {number}
93
+ */
94
+ export const MESH_BRICK_STATISTIC_ROUNDS_SHORT: number;
95
+ /**
96
+ * Times a walk reached its level budget with nodes left, ever: a tree deeper than an LBVH builds.
97
+ * @type {number}
98
+ */
99
+ export const MESH_BRICK_STATISTIC_LEVELS_SHORT: number;
100
+ /**
101
+ * Cells asked for again because a walk of theirs did not finish, ever.
102
+ * @type {number}
103
+ */
104
+ export const MESH_BRICK_STATISTIC_CELLS_RETRIED: number;
105
+ /**
106
+ * The most batch records a frame asked for.
107
+ * @type {number}
108
+ */
109
+ export const MESH_BRICK_STATISTIC_BATCHES_PEAK: number;
110
+ /**
111
+ * The most task records a round asked for.
112
+ * @type {number}
113
+ */
114
+ export const MESH_BRICK_STATISTIC_TASKS_PEAK: number;
115
+ /**
116
+ * The most cells a frame listed for the resolve.
117
+ * @type {number}
118
+ */
119
+ export const MESH_BRICK_STATISTIC_RESOLVES_PEAK: number;
120
+ /**
121
+ * Words of the statistics.
122
+ * @type {number}
123
+ */
124
+ export const MESH_BRICK_STATISTIC_WORDS: number;
125
+ /**
126
+ * The frame's batch records asked for so far: the next one's index.
127
+ * @type {number}
128
+ */
129
+ export const MESH_BRICK_COUNTER_BATCHES: number;
130
+ /**
131
+ * Two words, the frame's task records asked for so far in each half of the task buffer. Round r reads
132
+ * half `(r - 1) & 1` and writes half `r & 1`; the walk from the root writes half 0.
133
+ * @type {number}
134
+ */
135
+ export const MESH_BRICK_COUNTER_TASKS: number;
136
+ /**
137
+ * Workgroups of the round being dispatched: its tasks, as many as the capacity holds.
138
+ * @type {number}
139
+ */
140
+ export const MESH_BRICK_COUNTER_ROUND_GROUPS: number;
141
+ /**
142
+ * Workgroups of the batch pass: the frame's batches, as many as the capacity holds.
143
+ * @type {number}
144
+ */
145
+ export const MESH_BRICK_COUNTER_BATCH_GROUPS: number;
146
+ /**
147
+ * The frame's cells listed for the resolve so far: the next one's place on `mesh_brick_resolves`.
148
+ * @type {number}
149
+ */
150
+ export const MESH_BRICK_COUNTER_RESOLVES: number;
151
+ /**
152
+ * Workgroups of the resolve: the frame's listed cells.
153
+ * @type {number}
154
+ */
155
+ export const MESH_BRICK_COUNTER_RESOLVE_GROUPS: number;
156
+ /**
157
+ * Words of the counters: the statistics, then the frame's counters.
158
+ * @type {number}
159
+ */
160
+ export const MESH_BRICK_COUNTER_WORDS: number;
161
+ //# sourceMappingURL=MESH_BRICK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MESH_BRICK.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,+BAFU,MAAM,CAE0C;AAE1D;;;;;;;;;;;GAWG;AACH,kCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,6CAFU,MAAM,CAEgC;AAEhD;;;GAGG;AACH,sCAFU,MAAM,CAEyE;AAEzF;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;;;GAKG;AACH,qCAFU,MAAM,CAEiI;AAUjJ;;;GAGG;AACH,6CAFU,MAAM,CAEyD;AAEzE;;;;;GAKG;AACH,2CAFU,MAAM,CAEgF;AAEhG;;;GAGG;AACH,2CAFU,MAAM,CAE6D;AAE7E;;;GAGG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;;;GAKG;AACH,yCAFU,MAAM,CAE4B;AAO5C;;;GAGG;AACH,2CAFU,MAAM,CAE8B;AAE9C;;;GAGG;AACH,mDAFU,MAAM,CAEsC;AAEtD;;;GAGG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,yCAFU,MAAM,CAE6B;AAE7C;;;GAGG;AACH,yCAFU,MAAM,CAEqD;AAErE;;;;GAIG;AACH,uCAFU,MAAM,CAEuD;AAEvE;;;GAGG;AACH,8CAFU,MAAM,CAE4D;AAE5E;;;GAGG;AACH,8CAFU,MAAM,CAEmE;AAEnF;;;GAGG;AACH,0CAFU,MAAM,CAE+D;AAE/E;;;GAGG;AACH,gDAFU,MAAM,CAEiE;AAEjF;;;GAGG;AACH,uCAFU,MAAM,CAE8D"}
@@ -0,0 +1,219 @@
1
+ import { MESH_SDF_BRICK_TEXEL_COUNT } from "../../../../geometry/sdf/MESH_SDF.js";
2
+ import { BRICK_CELL_WORKGROUP_SIZE, BRICK_OBJECT_CELLS } from "../BRICK_CLIPMAP.js";
3
+
4
+ /*
5
+ The mesh provider's device state (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7, as S9 built it).
6
+
7
+ A taken cell's instances are gathered whole by a walk of the TLAS (`shader_mesh_brick_gather`), a
8
+ workgroup a walk, and leave it in batch records of up to MESH_BRICK_BATCH rows. A walk keeps
9
+ MESH_BRICK_FRONTIER nodes a level and hands the nodes past them on in task records of up to
10
+ MESH_BRICK_BATCH nodes, each a walk of its own in the next round. Every batch is sampled by a
11
+ workgroup of its own (`shader_mesh_brick_batch`) and merged into its cell's accumulators by atomic
12
+ maxima; the accumulators are merged into the staging once a cell, for the cells a walk listed
13
+ (`shader_mesh_brick_resolve`).
14
+
15
+ A record, task or batch, is MESH_BRICK_RECORD_WORDS words: its build slot, how many entries it
16
+ holds, then the entries, TLAS nodes for a task and `meshes` rows for a batch.
17
+ */
18
+
19
+ /**
20
+ * Entries a record holds, and instances a batch samples at once: a lane each.
21
+ * @type {number}
22
+ */
23
+ export const MESH_BRICK_BATCH = BRICK_CELL_WORKGROUP_SIZE;
24
+
25
+ /**
26
+ * Nodes a walk keeps on a level of its frontier; the rest are handed on to the next round. Eight
27
+ * nodes a lane a level at most.
28
+ *
29
+ * Measured on Zorah's TLAS (12,608 leaves, 27 levels deep), the widest level of a cell's walk is
30
+ * 758 nodes at cascade 2 and 2,410 at cascade 5; at this frontier and tasks of
31
+ * {@link MESH_BRICK_BATCH} nodes every walk ends in its third round. The frontier is 4 KiB of the
32
+ * walk's 5.1 KiB of workgroup memory, and the iGPU's walk is bound by how many workgroups that memory
33
+ * lets in: against 1,024 nodes, which ended every walk in its second round, the walks of a full
34
+ * rebuild of Zorah's windows went from 71.1 to 43.0 ms there, and stayed even on the 4090.
35
+ * @type {number}
36
+ */
37
+ export const MESH_BRICK_FRONTIER = 512;
38
+
39
+ /**
40
+ * Words of a record's header: its build slot, then how many entries it holds.
41
+ * @type {number}
42
+ */
43
+ export const MESH_BRICK_RECORD_HEADER_WORDS = 2;
44
+
45
+ /**
46
+ * Words of a task or batch record.
47
+ * @type {number}
48
+ */
49
+ export const MESH_BRICK_RECORD_WORDS = MESH_BRICK_RECORD_HEADER_WORDS + MESH_BRICK_BATCH;
50
+
51
+ /**
52
+ * Rounds of walks the provider starts with: the walk from the root, and one for what it hands on.
53
+ * @type {number}
54
+ */
55
+ export const MESH_BRICK_ROUNDS = 2;
56
+
57
+ /**
58
+ * Rounds a walk of a TLAS over at most 2^20 leaves can need. A task starts from at most
59
+ * {@link MESH_BRICK_BATCH} nodes and hands on only past {@link MESH_BRICK_FRONTIER}, eight times as
60
+ * many, so a chain of k rounds needs a level 64·8^(k-1) nodes wide; 2^20 leaves allow k = 6.
61
+ * @type {number}
62
+ */
63
+ export const MESH_BRICK_ROUND_LIMIT = 1 + Math.ceil(Math.log2((1 << 20) / MESH_BRICK_BATCH) / Math.log2(MESH_BRICK_FRONTIER / MESH_BRICK_BATCH));
64
+
65
+ /*
66
+ A build slot's accumulators, MESH_BRICK_ACCUMULATOR_WORDS words: a word a texel holding 255 less the
67
+ least byte the batches staged there, a word an object cell holding the largest object key the
68
+ batches bid (`brick_object_key`), and the cell's flags for the frame. A texel or object word is 0
69
+ when nothing reached it, so a buffer the device has zeroed starts empty, and the resolve leaves each
70
+ one it merges at 0 for the next frame; the cell's walk from the root clears the flags.
71
+ */
72
+
73
+ /**
74
+ * The first of a build slot's object words.
75
+ * @type {number}
76
+ */
77
+ export const MESH_BRICK_ACCUMULATOR_OBJECTS = MESH_SDF_BRICK_TEXEL_COUNT;
78
+
79
+ /**
80
+ * The word of the cell's flags for the frame, {@link MESH_BRICK_FLAG_TOUCHED} and
81
+ * {@link MESH_BRICK_FLAG_UNFINISHED}. The walk that sets the first of them lists the cell for the
82
+ * resolve: most taken cells set none, and the resolve never reads them.
83
+ * @type {number}
84
+ */
85
+ export const MESH_BRICK_ACCUMULATOR_FLAGS = MESH_BRICK_ACCUMULATOR_OBJECTS + BRICK_OBJECT_CELLS;
86
+
87
+ /**
88
+ * Words of a build slot's accumulators.
89
+ * @type {number}
90
+ */
91
+ export const MESH_BRICK_ACCUMULATOR_WORDS = MESH_BRICK_ACCUMULATOR_FLAGS + 1;
92
+
93
+ /**
94
+ * A batch of the cell was made: the resolve merges its texel and object words.
95
+ * @type {number}
96
+ */
97
+ export const MESH_BRICK_FLAG_TOUCHED = 1;
98
+
99
+ /**
100
+ * A walk of the cell did not finish: a record it could not take, a level past the walk's budget, or
101
+ * nodes past the frontier in the last round. The resolve asks for the cell again
102
+ * (`BRICK_STAGING_RETRY_WORD`).
103
+ * @type {number}
104
+ */
105
+ export const MESH_BRICK_FLAG_UNFINISHED = 2;
106
+
107
+ /*
108
+ The counters, `mesh_brick_counters`, every word an atomic. The statistics come first and accumulate
109
+ for the provider's life; the frame's counters after them are cleared at the start of every frame.
110
+ */
111
+
112
+ /**
113
+ * Batch records the walks asked for, ever.
114
+ * @type {number}
115
+ */
116
+ export const MESH_BRICK_STATISTIC_BATCHES = 0;
117
+
118
+ /**
119
+ * Batch records asked for past the capacity, ever: their rows were not sampled, and their cells asked for again.
120
+ * @type {number}
121
+ */
122
+ export const MESH_BRICK_STATISTIC_BATCHES_DROPPED = 1;
123
+
124
+ /**
125
+ * Task records the walks asked for, ever.
126
+ * @type {number}
127
+ */
128
+ export const MESH_BRICK_STATISTIC_TASKS = 2;
129
+
130
+ /**
131
+ * Task records asked for past the capacity, ever.
132
+ * @type {number}
133
+ */
134
+ export const MESH_BRICK_STATISTIC_TASKS_DROPPED = 3;
135
+
136
+ /**
137
+ * Times a walk of the last round had nodes past its frontier, ever: the host adds a round.
138
+ * @type {number}
139
+ */
140
+ export const MESH_BRICK_STATISTIC_ROUNDS_SHORT = 4;
141
+
142
+ /**
143
+ * Times a walk reached its level budget with nodes left, ever: a tree deeper than an LBVH builds.
144
+ * @type {number}
145
+ */
146
+ export const MESH_BRICK_STATISTIC_LEVELS_SHORT = 5;
147
+
148
+ /**
149
+ * Cells asked for again because a walk of theirs did not finish, ever.
150
+ * @type {number}
151
+ */
152
+ export const MESH_BRICK_STATISTIC_CELLS_RETRIED = 6;
153
+
154
+ /**
155
+ * The most batch records a frame asked for.
156
+ * @type {number}
157
+ */
158
+ export const MESH_BRICK_STATISTIC_BATCHES_PEAK = 7;
159
+
160
+ /**
161
+ * The most task records a round asked for.
162
+ * @type {number}
163
+ */
164
+ export const MESH_BRICK_STATISTIC_TASKS_PEAK = 8;
165
+
166
+ /**
167
+ * The most cells a frame listed for the resolve.
168
+ * @type {number}
169
+ */
170
+ export const MESH_BRICK_STATISTIC_RESOLVES_PEAK = 9;
171
+
172
+ /**
173
+ * Words of the statistics.
174
+ * @type {number}
175
+ */
176
+ export const MESH_BRICK_STATISTIC_WORDS = 10;
177
+
178
+ /**
179
+ * The frame's batch records asked for so far: the next one's index.
180
+ * @type {number}
181
+ */
182
+ export const MESH_BRICK_COUNTER_BATCHES = MESH_BRICK_STATISTIC_WORDS;
183
+
184
+ /**
185
+ * Two words, the frame's task records asked for so far in each half of the task buffer. Round r reads
186
+ * half `(r - 1) & 1` and writes half `r & 1`; the walk from the root writes half 0.
187
+ * @type {number}
188
+ */
189
+ export const MESH_BRICK_COUNTER_TASKS = MESH_BRICK_COUNTER_BATCHES + 1;
190
+
191
+ /**
192
+ * Workgroups of the round being dispatched: its tasks, as many as the capacity holds.
193
+ * @type {number}
194
+ */
195
+ export const MESH_BRICK_COUNTER_ROUND_GROUPS = MESH_BRICK_COUNTER_TASKS + 2;
196
+
197
+ /**
198
+ * Workgroups of the batch pass: the frame's batches, as many as the capacity holds.
199
+ * @type {number}
200
+ */
201
+ export const MESH_BRICK_COUNTER_BATCH_GROUPS = MESH_BRICK_COUNTER_ROUND_GROUPS + 1;
202
+
203
+ /**
204
+ * The frame's cells listed for the resolve so far: the next one's place on `mesh_brick_resolves`.
205
+ * @type {number}
206
+ */
207
+ export const MESH_BRICK_COUNTER_RESOLVES = MESH_BRICK_COUNTER_BATCH_GROUPS + 1;
208
+
209
+ /**
210
+ * Workgroups of the resolve: the frame's listed cells.
211
+ * @type {number}
212
+ */
213
+ export const MESH_BRICK_COUNTER_RESOLVE_GROUPS = MESH_BRICK_COUNTER_RESOLVES + 1;
214
+
215
+ /**
216
+ * Words of the counters: the statistics, then the frame's counters.
217
+ * @type {number}
218
+ */
219
+ export const MESH_BRICK_COUNTER_WORDS = MESH_BRICK_COUNTER_RESOLVE_GROUPS + 1;
@@ -1,12 +1,5 @@
1
1
  /**
2
- * Instances a cell's mesh provider samples at most (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7): the
3
- * rest are dropped and counted, and a dropped instance can leave a hole. Coarse cascades are where
4
- * it binds.
5
- * @type {number}
6
- */
7
- export const MESH_BRICK_INSTANCE_LIMIT: number;
8
- /**
9
- * An instance as the mesh provider samples it, made once a cell (§7.7):
2
+ * An instance as the mesh provider samples it, made once a batch (§7.7):
10
3
  * - `to_local_0..2`: the rows of the inverse of the instance's `node.global`, from the world into the
11
4
  * geometry's space;
12
5
  * - `box_min`, `box_max`: the row's world box, for the box test;
@@ -1 +1 @@
1
- {"version":3,"file":"MESH_BRICK_INSTANCE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wCAFU,MAAM,CAE4B;AAE5C;;;;;;;;;;;;GAYG;AACH,yCAFU,YAAY,CAYE;6BAjCK,yCAAyC"}
1
+ {"version":3,"file":"MESH_BRICK_INSTANCE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,yCAFU,YAAY,CAYE;6BAzBK,yCAAyC"}
@@ -2,15 +2,7 @@ import { f32, u32, vec3f, vec4f } from "../../../../shader/type/WEBGPU_WGSL_PRIM
2
2
  import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
3
3
 
4
4
  /**
5
- * Instances a cell's mesh provider samples at most (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7): the
6
- * rest are dropped and counted, and a dropped instance can leave a hole. Coarse cascades are where
7
- * it binds.
8
- * @type {number}
9
- */
10
- export const MESH_BRICK_INSTANCE_LIMIT = 64;
11
-
12
- /**
13
- * An instance as the mesh provider samples it, made once a cell (§7.7):
5
+ * An instance as the mesh provider samples it, made once a batch (§7.7):
14
6
  * - `to_local_0..2`: the rows of the inverse of the instance's `node.global`, from the world into the
15
7
  * geometry's space;
16
8
  * - `box_min`, `box_max`: the row's world box, for the box test;
@@ -1,17 +1,26 @@
1
1
  /**
2
- * @typedef {import("../GPUBrickClipmap.js").BrickProviderContext} BrickProviderContext
3
- * @typedef {import("../../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
4
- */
5
- /**
6
- * The world's bricks from the meshes' cached fields (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7): a
7
- * {@link BrickProvider} like any plugin, registered first. Per taken cell, the instances in the SDF
8
- * world whose boxes reach it, each sampled at the level of its field that suits the cascade, merged
9
- * into the staging by the minimum of the bytes, with the nearest instance's row as each 2³ cell's
10
- * object.
2
+ * The world's bricks from the meshes' cached fields (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7, as S9
3
+ * built it): a {@link BrickProvider} like any plugin, registered first. Every instance in the SDF world
4
+ * whose box comes within the band of a taken cell is sampled there, at the level of its field that
5
+ * suits the cascade, however many reach the cell.
6
+ *
7
+ * A frame is one pass of dispatches, every one sized by a count on the device:
8
+ * - **walks** (`shader_mesh_brick_gather`), {@link rounds} of them: the taken cells' TLAS walks from the
9
+ * root, a workgroup a cell, then the walks of what each round handed on;
10
+ * - **batches** (`shader_mesh_brick_batch`): a workgroup a batch of up to 64 rows the walks found,
11
+ * merged into the cell's accumulators by atomic maxima;
12
+ * - **resolve** (`shader_mesh_brick_resolve`): a workgroup a cell the walks listed, one a batch reached
13
+ * or a walk of which did not finish, merging its accumulators into the staging by the provider
14
+ * contract (§7.6), and asking again for a cell whose walk did not finish. Most taken cells have no
15
+ * instance near them, and are not listed;
16
+ * - **commands** (`shader_mesh_brick_command`), a thread before each dispatch but the walks from the
17
+ * root: what the passes before it asked for, as its dispatch.
11
18
  *
12
- * It reads the view's scene through the context: the TLAS over the mesh rows, the scene database and
13
- * the geometry caches. A cell's instances past {@link MESH_BRICK_INSTANCE_LIMIT} are dropped; they and
14
- * whatever the gather itself dropped are counted in {@link statistics}.
19
+ * What the device asked for past a capacity, and walks the last round could not finish, are counted in
20
+ * {@link statistics}. The counts are read back each frame, and a later frame grows what held work back:
21
+ * a buffer to the power of two at or past the most asked for, the rounds by one up to
22
+ * {@link MESH_BRICK_ROUND_LIMIT}. The cells that lost work are asked for again meanwhile, so nothing is
23
+ * lost for longer than the growth takes.
15
24
  */
16
25
  export class MeshSDFBrickProvider {
17
26
  /**
@@ -19,9 +28,28 @@ export class MeshSDFBrickProvider {
19
28
  */
20
29
  constructor(device: GPUDevice);
21
30
  /**
31
+ * Counts that accumulate for the provider's life, {@link MESH_BRICK_STATISTIC_WORDS} words at the start
32
+ * of the buffer (`MESH_BRICK.js`): the records asked for and the ones past a capacity, walks left
33
+ * unfinished, cells asked for again, the most records a frame and a round asked for, and the most
34
+ * cells a frame listed for the resolve.
22
35
  * @returns {GPUBuffer}
23
36
  */
24
37
  get statistics(): GPUBuffer;
38
+ /**
39
+ * Rounds of walks a frame runs: two at first, one more each time the last round could not finish a walk.
40
+ * @returns {number}
41
+ */
42
+ get rounds(): number;
43
+ /**
44
+ * Task records a half of the task buffer holds.
45
+ * @returns {number}
46
+ */
47
+ get task_capacity(): number;
48
+ /**
49
+ * Batch records a frame can sample.
50
+ * @returns {number}
51
+ */
52
+ get batch_capacity(): number;
25
53
  /**
26
54
  * @param {FrameGraph} graph
27
55
  * @param {BrickProviderContext} context
@@ -1 +1 @@
1
- {"version":3,"file":"MeshSDFBrickProvider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH;IAuBI;;OAEG;IACH,+BAUC;IAED;;OAEG;IACH,4BAEC;IAED;;;OAGG;IACH,0BAHW,UAAU,WACV,oBAAoB,QAgB9B;IA+BD,gBAOC;;CACJ;mCArHY,OAAO,uBAAuB,EAAE,oBAAoB;yBACpD,OAAO,oEAAoE,EAAE,UAAU"}
1
+ {"version":3,"file":"MeshSDFBrickProvider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js"],"names":[],"mappings":"AA0DA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAyDI;;OAEG;IACH,+BAmBC;IAED;;;;;;OAMG;IACH,4BAEC;IAED;;;OAGG;IACH,qBAEC;IAED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;OAGG;IACH,0BAHW,UAAU,WACV,oBAAoB,QAsC9B;IAsND,gBAYC;;CACJ;mCA/aY,OAAO,uBAAuB,EAAE,oBAAoB;yBACpD,OAAO,oEAAoE,EAAE,UAAU"}