@woosh/meep-engine 3.61.1 → 3.61.3

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 (474) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/package.json +1 -1
  3. package/src/engine/network/sim/SimActionExecutor.d.ts +4 -0
  4. package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
  5. package/src/engine/network/sim/SimActionExecutor.js +4 -0
  6. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  7. package/src/generation/foliage/material/foliage_atlas_cutout.d.ts.map +1 -1
  8. package/src/generation/foliage/material/foliage_atlas_cutout.js +21 -5
  9. package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts +8 -0
  10. package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts.map +1 -1
  11. package/src/generation/foliage/mesh/tree_cluster_representatives.js +178 -78
  12. package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts.map +1 -1
  13. package/src/generation/foliage/mesh/tree_mesh_build_bark.js +178 -97
  14. package/src/generation/foliage/skeleton/ShootLightField.d.ts +1 -0
  15. package/src/generation/foliage/skeleton/ShootLightField.d.ts.map +1 -1
  16. package/src/generation/foliage/skeleton/ShootLightField.js +88 -17
  17. package/src/generation/foliage/skeleton/ShootWoodHash.d.ts +5 -2
  18. package/src/generation/foliage/skeleton/ShootWoodHash.d.ts.map +1 -1
  19. package/src/generation/foliage/skeleton/ShootWoodHash.js +191 -25
  20. package/src/shade/playground/probe_clipmap/README.md +3 -4
  21. package/src/shade/playground/probe_clipmap/index.html +5 -13
  22. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  23. package/src/shade/playground/probe_clipmap/main.js +4 -5
  24. package/src/shade/playground/probe_clipmap_box/README.md +55 -0
  25. package/src/shade/playground/probe_clipmap_box/index.html +185 -0
  26. package/src/shade/playground/probe_clipmap_box/main.d.ts +8 -0
  27. package/src/shade/playground/probe_clipmap_box/main.d.ts.map +1 -0
  28. package/src/shade/playground/probe_clipmap_box/main.js +323 -0
  29. package/src/shade/playground/probe_clipmap_box/scene.d.ts +93 -0
  30. package/src/shade/playground/probe_clipmap_box/scene.d.ts.map +1 -0
  31. package/src/shade/playground/probe_clipmap_box/scene.js +256 -0
  32. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  33. package/src/shade/renderer/Renderer.js +56 -12
  34. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  35. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  36. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
  37. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  38. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  39. package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts +10 -0
  40. package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts.map +1 -0
  41. package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.js +54 -0
  42. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +85 -36
  43. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  44. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +813 -412
  45. package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +7 -0
  46. package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts.map +1 -1
  47. package/src/shade/renderer/geometry/sdf/MESH_SDF.js +8 -0
  48. package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts +14 -0
  49. package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts.map +1 -0
  50. package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.js +35 -0
  51. package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.d.ts.map +1 -1
  52. package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.js +0 -4
  53. package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts +55 -10
  54. package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts.map +1 -1
  55. package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.js +86 -16
  56. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts +2 -2
  57. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts.map +1 -1
  58. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.js +28 -2
  59. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts +54 -0
  60. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts.map +1 -0
  61. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.js +146 -0
  62. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
  63. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts.map +1 -1
  64. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +2 -1
  65. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts +18 -0
  66. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts.map +1 -0
  67. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.js +66 -0
  68. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts +17 -0
  69. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts.map +1 -0
  70. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.js +66 -0
  71. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +5 -3
  72. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts.map +1 -1
  73. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +15 -14
  74. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts +2 -1
  75. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts.map +1 -1
  76. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.js +12 -3
  77. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts +21 -0
  78. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts.map +1 -0
  79. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.js +84 -0
  80. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts +53 -0
  81. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts.map +1 -0
  82. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.js +343 -0
  83. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts +3 -3
  84. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts.map +1 -1
  85. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.js +9 -5
  86. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts +2 -2
  87. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts.map +1 -1
  88. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.js +3 -2
  89. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts +69 -0
  90. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts.map +1 -0
  91. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.js +294 -0
  92. package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts +16 -0
  93. package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts.map +1 -0
  94. package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.js +36 -0
  95. package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts +126 -0
  96. package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts.map +1 -0
  97. package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.js +148 -0
  98. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts +10 -0
  99. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts.map +1 -0
  100. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.js +140 -0
  101. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts +8 -0
  102. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts.map +1 -0
  103. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.js +76 -0
  104. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts +9 -0
  105. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts.map +1 -1
  106. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.js +23 -0
  107. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts +13 -0
  108. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts.map +1 -0
  109. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.js +23 -0
  110. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +262 -0
  111. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -0
  112. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +1819 -0
  113. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +118 -0
  114. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts.map +1 -0
  115. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +204 -0
  116. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts +66 -0
  117. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts.map +1 -0
  118. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.js +103 -0
  119. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts +19 -0
  120. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts.map +1 -0
  121. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.js +23 -0
  122. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts +15 -0
  123. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts.map +1 -0
  124. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.js +70 -0
  125. package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts +13 -0
  126. package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts.map +1 -0
  127. package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.js +35 -0
  128. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts +32 -0
  129. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts.map +1 -0
  130. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.js +111 -0
  131. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts +17 -0
  132. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts.map +1 -0
  133. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.js +49 -0
  134. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts +13 -0
  135. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts.map +1 -0
  136. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.js +35 -0
  137. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts +24 -0
  138. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts.map +1 -0
  139. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.js +169 -0
  140. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts +19 -0
  141. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts.map +1 -0
  142. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.js +49 -0
  143. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts +19 -0
  144. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts.map +1 -0
  145. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.js +67 -0
  146. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts +78 -0
  147. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts.map +1 -0
  148. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.js +320 -0
  149. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts +15 -0
  150. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts.map +1 -0
  151. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.js +48 -0
  152. package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts +51 -0
  153. package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts.map +1 -0
  154. package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.js +109 -0
  155. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts +11 -0
  156. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts.map +1 -0
  157. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.js +51 -0
  158. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts +26 -0
  159. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts.map +1 -0
  160. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.js +453 -0
  161. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts +12 -0
  162. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts.map +1 -0
  163. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.js +99 -0
  164. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts +22 -0
  165. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts.map +1 -0
  166. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.js +140 -0
  167. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts +32 -0
  168. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts.map +1 -0
  169. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.js +261 -0
  170. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +2 -2
  171. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +2 -2
  172. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +6 -6
  173. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +7 -7
  174. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.d.ts +12 -0
  175. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.d.ts.map +1 -1
  176. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js +49 -24
  177. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.d.ts +12 -0
  178. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.d.ts.map +1 -1
  179. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js +50 -19
  180. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.d.ts.map +1 -1
  181. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js +6 -2
  182. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +20 -8
  183. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  184. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +89 -20
  185. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +26 -19
  186. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  187. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +226 -148
  188. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +25 -52
  189. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  190. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +29 -69
  191. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +19 -16
  192. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts.map +1 -1
  193. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js +24 -21
  194. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +46 -22
  195. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  196. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +49 -36
  197. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts +3 -2
  198. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map +1 -1
  199. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js +7 -6
  200. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +8 -22
  201. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  202. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +15 -51
  203. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +1 -6
  204. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -1
  205. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +6 -13
  206. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -1
  207. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +0 -2
  208. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts +4 -4
  209. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts.map +1 -1
  210. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +9 -34
  211. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts +4 -6
  212. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts.map +1 -1
  213. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +15 -39
  214. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.d.ts +1 -1
  215. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.js +1 -1
  216. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts +1 -2
  217. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts.map +1 -1
  218. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js +2 -6
  219. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts +2 -2
  220. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts.map +1 -1
  221. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js +5 -2
  222. package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.d.ts +5 -1
  223. package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.js +16 -2
  224. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts +45 -0
  225. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts.map +1 -0
  226. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.js +208 -0
  227. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts +24 -0
  228. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts.map +1 -0
  229. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.js +40 -0
  230. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts +34 -0
  231. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts.map +1 -0
  232. package/src/shade/renderer/global_illumination/probe_clipmap/debug/{graph_probe_clipmap_debug_mesh_cards.js → graph_probe_clipmap_debug_mesh_surfaces.js} +38 -57
  233. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +61 -0
  234. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -0
  235. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +193 -0
  236. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts +67 -0
  237. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts.map +1 -0
  238. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.js +142 -0
  239. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts +32 -0
  240. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts.map +1 -0
  241. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.js +70 -0
  242. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts +30 -0
  243. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts.map +1 -0
  244. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.js +71 -0
  245. package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts +26 -0
  246. package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts.map +1 -0
  247. package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.js +176 -0
  248. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +23 -12
  249. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  250. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +72 -52
  251. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +32 -0
  252. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  253. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +37 -0
  254. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts +10 -0
  255. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts.map +1 -0
  256. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.js +11 -0
  257. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts +11 -0
  258. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts.map +1 -0
  259. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.js +15 -0
  260. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +55 -23
  261. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  262. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +134 -69
  263. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts +43 -0
  264. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts.map +1 -0
  265. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.js +138 -0
  266. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts +21 -0
  267. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts.map +1 -0
  268. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.js +49 -0
  269. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +4 -3
  270. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -1
  271. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +19 -24
  272. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts +2 -2
  273. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
  274. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +14 -19
  275. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts +22 -0
  276. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts.map +1 -0
  277. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.js +50 -0
  278. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +4 -4
  279. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts.map +1 -1
  280. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +8 -8
  281. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +1 -1
  282. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  283. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +8 -4
  284. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +1 -1
  285. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +5 -4
  286. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts.map +1 -1
  287. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +18 -23
  288. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts +1 -1
  289. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts.map +1 -1
  290. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.js +4 -2
  291. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts.map +1 -1
  292. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.js +4 -6
  293. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts +2 -0
  294. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
  295. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +9 -8
  296. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +1 -1
  297. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +2 -2
  298. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +4 -3
  299. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts.map +1 -1
  300. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js +14 -13
  301. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +7 -4
  302. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  303. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +30 -26
  304. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +6 -6
  305. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  306. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +19 -21
  307. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts.map +1 -1
  308. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js +6 -2
  309. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +2 -2
  310. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +6 -6
  311. package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts +14 -0
  312. package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts.map +1 -0
  313. package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js +22 -0
  314. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts +37 -0
  315. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts.map +1 -0
  316. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.js +122 -0
  317. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.d.ts.map +1 -1
  318. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.js +1 -11
  319. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts +8 -0
  320. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts.map +1 -1
  321. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js +6 -4
  322. package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
  323. package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +5 -1
  324. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  325. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +1 -1
  326. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
  327. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +2 -18
  328. package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts +17 -0
  329. package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts.map +1 -0
  330. package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.js +16 -0
  331. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts +1 -1
  332. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.js +1 -1
  333. package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.js +1 -1
  334. package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts +20 -0
  335. package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts.map +1 -0
  336. package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.js +65 -0
  337. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +26 -8
  338. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
  339. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +170 -142
  340. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  341. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts +1 -1
  342. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts.map +1 -1
  343. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.js +5 -8
  344. package/src/shade/renderer/scene/GPUSceneContext.d.ts +1 -1
  345. package/src/shade/renderer/scene/GPUSceneContext.js +1 -1
  346. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +15 -4
  347. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
  348. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +33 -7
  349. package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts +12 -0
  350. package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts.map +1 -0
  351. package/src/shade/renderer/shader/chunk/material/albedo_compress.js +26 -0
  352. package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts +16 -0
  353. package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts.map +1 -0
  354. package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.js +22 -0
  355. package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts +15 -0
  356. package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts.map +1 -0
  357. package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.js +23 -0
  358. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts +16 -0
  359. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts.map +1 -0
  360. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.js +25 -0
  361. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts +25 -0
  362. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts.map +1 -0
  363. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.js +36 -0
  364. package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts +11 -0
  365. package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts.map +1 -0
  366. package/src/shade/renderer/shader/chunk/material/metal_rough_compress.js +38 -0
  367. package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.d.ts +40 -0
  368. package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.d.ts.map +1 -0
  369. package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.js +75 -0
  370. package/src/shade/renderer/shader/chunk/noise/chunk_vdc_radical_inverse.d.ts.map +1 -1
  371. package/src/shade/renderer/shader/chunk/noise/chunk_vdc_radical_inverse.js +3 -1
  372. package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.d.ts +28 -0
  373. package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.d.ts.map +1 -0
  374. package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.js +41 -0
  375. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.d.ts +12 -0
  376. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.d.ts.map +1 -0
  377. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.js +24 -0
  378. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts +20 -0
  379. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts.map +1 -0
  380. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.js +35 -0
  381. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts +28 -0
  382. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts.map +1 -0
  383. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.js +79 -0
  384. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts +25 -0
  385. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts.map +1 -0
  386. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.js +89 -0
  387. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts +31 -0
  388. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts.map +1 -0
  389. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.js +66 -0
  390. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.d.ts.map +1 -1
  391. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.js +2 -0
  392. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts +17 -0
  393. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts.map +1 -0
  394. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.js +34 -0
  395. package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts +18 -0
  396. package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts.map +1 -1
  397. package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.js +31 -23
  398. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +3 -2
  399. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
  400. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +4 -0
  401. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +2 -5
  402. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
  403. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +3 -20
  404. package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
  405. package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +5 -6
  406. package/src/shade/renderer/water/chunk_water_gi.d.ts +1 -1
  407. package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
  408. package/src/shade/renderer/water/chunk_water_gi.js +6 -8
  409. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  410. package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
  411. package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
  412. package/src/shade/wgsl/emulator/WGSLLanguageCore.js +76 -32
  413. package/src/core/math/hash/squirrel3.d.ts +0 -17
  414. package/src/core/math/hash/squirrel3.d.ts.map +0 -1
  415. package/src/core/math/hash/squirrel3.js +0 -30
  416. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +0 -213
  417. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +0 -1
  418. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +0 -1468
  419. package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts +0 -82
  420. package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts.map +0 -1
  421. package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.js +0 -127
  422. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts +0 -24
  423. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts.map +0 -1
  424. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.js +0 -29
  425. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts +0 -12
  426. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts.map +0 -1
  427. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.js +0 -31
  428. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts +0 -11
  429. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts.map +0 -1
  430. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.js +0 -21
  431. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts +0 -29
  432. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts.map +0 -1
  433. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.js +0 -179
  434. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts +0 -17
  435. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts.map +0 -1
  436. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.js +0 -107
  437. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts +0 -65
  438. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts.map +0 -1
  439. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +0 -376
  440. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts +0 -40
  441. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts.map +0 -1
  442. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.js +0 -301
  443. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts +0 -19
  444. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts.map +0 -1
  445. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.js +0 -61
  446. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +0 -18
  447. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts.map +0 -1
  448. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +0 -102
  449. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts +0 -15
  450. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts.map +0 -1
  451. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.js +0 -65
  452. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts +0 -22
  453. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts.map +0 -1
  454. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.js +0 -136
  455. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts +0 -20
  456. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts.map +0 -1
  457. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.js +0 -104
  458. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts +0 -20
  459. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts.map +0 -1
  460. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.js +0 -80
  461. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts +0 -18
  462. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts.map +0 -1
  463. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.js +0 -113
  464. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts +0 -30
  465. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts.map +0 -1
  466. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.js +0 -146
  467. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts +0 -34
  468. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts.map +0 -1
  469. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts +0 -31
  470. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts.map +0 -1
  471. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.js +0 -82
  472. package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.d.ts +0 -12
  473. package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.d.ts.map +0 -1
  474. package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.js +0 -30
@@ -0,0 +1,138 @@
1
+ import { MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
2
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
3
+ import { chunk_brick_clipmap } from "../brick/chunk_brick_clipmap.js";
4
+ import { BRICK_LEVELS_RESOURCE, BRICK_MAP_TEXTURE_RESOURCE } from "../brick/chunk_brick_clipmap_trace.js";
5
+ import {
6
+ chunk_brick_material_metal_rough,
7
+ chunk_brick_material_surface,
8
+ chunk_brick_material_surface_pick
9
+ } from "../material/chunk_brick_material.js";
10
+
11
+ /**
12
+ * The brick of a hit's cascade holding its position: its slot, or no slot, and the position in voxels
13
+ * from its corner; and the material a hit's read gives.
14
+ */
15
+ const brick_at = CodeChunk.from(
16
+ //language=WGSL
17
+ `
18
+ struct ProbeClipmapHitBrick {
19
+ entry: u32,
20
+ local: vec3<f32>,
21
+ }
22
+
23
+ struct ProbeClipmapHitMaterial {
24
+ found: bool,
25
+ albedo: vec3<f32>,
26
+ emissive: vec3<f32>,
27
+ }
28
+
29
+ fn probe_clipmap_hit_brick(position: vec3<f32>, cascade: u32) -> ProbeClipmapHitBrick {
30
+ let level = brick_levels[cascade];
31
+ let resolution = u32(level.size.x);
32
+ let cell = vec3<i32>(floor(position / level.cell_size));
33
+
34
+ var out: ProbeClipmapHitBrick;
35
+
36
+ out.entry = textureLoad(brick_map, brick_clipmap_map_texel(cascade, vec3<u32>(cell) & vec3<u32>(resolution - 1u), resolution), 0).x;
37
+ out.local = (position - vec3<f32>(cell) * level.cell_size) / (level.cell_size / ${MESH_SDF_BRICK_VOXELS}.0);
38
+
39
+ return out;
40
+ }
41
+ `, [chunk_brick_clipmap]);
42
+
43
+ brick_at.requireResource(BRICK_LEVELS_RESOURCE);
44
+ brick_at.requireResource(BRICK_MAP_TEXTURE_RESOURCE);
45
+
46
+ /**
47
+ * The material a probe ray's hit takes its light with:
48
+ *
49
+ * ```wgsl
50
+ * struct ProbeClipmapHitMaterial { found: bool, albedo: vec3<f32>, emissive: vec3<f32> }
51
+ * fn probe_clipmap_hit_material(position: vec3<f32>, normal: vec3<f32>, cascade: u32) -> ProbeClipmapHitMaterial
52
+ * ```
53
+ *
54
+ * The hit is at `position` in brick cascade `cascade`, its field's normal `normal`: the brick holding it,
55
+ * looked up in the brick map at the hit's cascade as the march found it, and its material there
56
+ * (`brick_material_surface`), albedo and emissive. A hit whose brick carries no material for its surface
57
+ * is black, `found` false.
58
+ *
59
+ * @type {CodeChunk}
60
+ */
61
+ export const chunk_probe_clipmap_hit_material = CodeChunk.from(
62
+ //language=WGSL
63
+ `
64
+ fn probe_clipmap_hit_material(position: vec3<f32>, normal: vec3<f32>, cascade: u32) -> ProbeClipmapHitMaterial {
65
+ var out: ProbeClipmapHitMaterial;
66
+
67
+ let brick = probe_clipmap_hit_brick(position, cascade);
68
+
69
+ if (brick_clipmap_entry_holds_slot(brick.entry)) {
70
+ let seen = brick_material_surface(brick.entry, brick.local, normal);
71
+
72
+ out.found = seen.found;
73
+ out.albedo = seen.albedo;
74
+ out.emissive = seen.emissive;
75
+ }
76
+
77
+ return out;
78
+ }
79
+ `, [brick_at, chunk_brick_clipmap, chunk_brick_material_surface]);
80
+
81
+ /**
82
+ * The material a probe ray's hit takes its light with, from one texel of the brick material:
83
+ *
84
+ * ```wgsl
85
+ * fn probe_clipmap_hit_material_pick(position: vec3<f32>, normal: vec3<f32>, cascade: u32, u: f32) -> ProbeClipmapHitMaterial
86
+ * ```
87
+ *
88
+ * As {@link chunk_probe_clipmap_hit_material} finds the hit's brick, one of the texels its blend weighs
89
+ * drawn by `u` in [0, 1) in proportion to its weight (`brick_material_surface_pick`): the blend on
90
+ * average, which a probe's blend of its rays takes.
91
+ *
92
+ * @type {CodeChunk}
93
+ */
94
+ export const chunk_probe_clipmap_hit_material_pick = CodeChunk.from(
95
+ //language=WGSL
96
+ `
97
+ fn probe_clipmap_hit_material_pick(position: vec3<f32>, normal: vec3<f32>, cascade: u32, u: f32) -> ProbeClipmapHitMaterial {
98
+ var out: ProbeClipmapHitMaterial;
99
+
100
+ let brick = probe_clipmap_hit_brick(position, cascade);
101
+
102
+ if (brick_clipmap_entry_holds_slot(brick.entry)) {
103
+ let seen = brick_material_surface_pick(brick.entry, brick.local, normal, u);
104
+
105
+ out.found = seen.found;
106
+ out.albedo = seen.albedo;
107
+ out.emissive = seen.emissive;
108
+ }
109
+
110
+ return out;
111
+ }
112
+ `, [brick_at, chunk_brick_clipmap, chunk_brick_material_surface_pick]);
113
+
114
+ /**
115
+ * A probe ray's hit's metalness and roughness, as {@link chunk_probe_clipmap_hit_material} finds its
116
+ * surface, for the debug views: the GI's light takes none of it yet.
117
+ *
118
+ * ```wgsl
119
+ * fn probe_clipmap_hit_metal_rough(position: vec3<f32>, normal: vec3<f32>, cascade: u32) -> vec3<f32> // (metalness, roughness, 1 if found)
120
+ * ```
121
+ *
122
+ * @type {CodeChunk}
123
+ */
124
+ export const chunk_probe_clipmap_hit_metal_rough = CodeChunk.from(
125
+ //language=WGSL
126
+ `
127
+ fn probe_clipmap_hit_metal_rough(position: vec3<f32>, normal: vec3<f32>, cascade: u32) -> vec3<f32> {
128
+ let brick = probe_clipmap_hit_brick(position, cascade);
129
+
130
+ if (!brick_clipmap_entry_holds_slot(brick.entry)) {
131
+ return vec3<f32>(0.0);
132
+ }
133
+
134
+ let seen = brick_material_metal_rough(brick.entry, brick.local, normal);
135
+
136
+ return vec3<f32>(seen.metal_rough, select(0.0, 1.0, seen.found));
137
+ }
138
+ `, [brick_at, chunk_brick_clipmap, chunk_brick_material_metal_rough]);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * What the fused indirect pass writes of a pixel's indirect light, by {@link PROBE_CLIPMAP_INDIRECT_LOBE}:
3
+ *
4
+ * ```wgsl
5
+ * fn probe_clipmap_indirect_lobe(
6
+ * specular: vec3<f32>, // the radiance resolved by the surface's material and occluded
7
+ * diffuse: vec3<f32>, // the irradiance resolved by the surface's material and occluded
8
+ * radiance: vec3<f32>, // the probes' radiance along the surface's lobe, as sampled
9
+ * irradiance: vec3<f32>, // the probes' irradiance at the bent normal, as sampled
10
+ * ) -> vec3<f32>
11
+ * ```
12
+ *
13
+ * - `Both`, the default: `specular + diffuse`, what the frame adds.
14
+ * - `Diffuse`: `irradiance / π`, the light alone, in radiance units: what a white Lambertian surface would send back.
15
+ * - `Specular`: `radiance`, the light alone.
16
+ *
17
+ * @type {CodeChunkChoice}
18
+ */
19
+ export const chunk_probe_clipmap_indirect_lobe: CodeChunkChoice;
20
+ import { CodeChunkChoice } from "../../../shader/compiler/CodeChunkChoice.js";
21
+ //# sourceMappingURL=chunk_probe_clipmap_indirect_lobe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_probe_clipmap_indirect_lobe.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,gDAFU,eAAe,CAE0E;gCAvBnE,6CAA6C"}
@@ -0,0 +1,49 @@
1
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
2
+ import { CodeChunkChoice } from "../../../shader/compiler/CodeChunkChoice.js";
3
+ import { RECIPROCAL_PI_DECLARATION } from "../../../shader/chunk/math/RECIPROCAL_PI_DECLARATION.js";
4
+ import { PROBE_CLIPMAP_INDIRECT_LOBE } from "./PROBE_CLIPMAP_INDIRECT_LOBE.js";
5
+ import { ProbeClipmapIndirectLobe } from "./ProbeClipmapIndirectLobe.js";
6
+
7
+ /**
8
+ * What the fused indirect pass writes of a pixel's indirect light, by {@link PROBE_CLIPMAP_INDIRECT_LOBE}:
9
+ *
10
+ * ```wgsl
11
+ * fn probe_clipmap_indirect_lobe(
12
+ * specular: vec3<f32>, // the radiance resolved by the surface's material and occluded
13
+ * diffuse: vec3<f32>, // the irradiance resolved by the surface's material and occluded
14
+ * radiance: vec3<f32>, // the probes' radiance along the surface's lobe, as sampled
15
+ * irradiance: vec3<f32>, // the probes' irradiance at the bent normal, as sampled
16
+ * ) -> vec3<f32>
17
+ * ```
18
+ *
19
+ * - `Both`, the default: `specular + diffuse`, what the frame adds.
20
+ * - `Diffuse`: `irradiance / π`, the light alone, in radiance units: what a white Lambertian surface would send back.
21
+ * - `Specular`: `radiance`, the light alone.
22
+ *
23
+ * @type {CodeChunkChoice}
24
+ */
25
+ export const chunk_probe_clipmap_indirect_lobe = CodeChunkChoice.from(PROBE_CLIPMAP_INDIRECT_LOBE);
26
+
27
+ chunk_probe_clipmap_indirect_lobe.add(ProbeClipmapIndirectLobe.Both, CodeChunk.from(
28
+ //language=WGSL
29
+ `
30
+ fn probe_clipmap_indirect_lobe(specular: vec3<f32>, diffuse: vec3<f32>, radiance: vec3<f32>, irradiance: vec3<f32>) -> vec3<f32> {
31
+ return specular + diffuse;
32
+ }
33
+ `));
34
+
35
+ chunk_probe_clipmap_indirect_lobe.add(ProbeClipmapIndirectLobe.Diffuse, CodeChunk.from(
36
+ //language=WGSL
37
+ `
38
+ fn probe_clipmap_indirect_lobe(specular: vec3<f32>, diffuse: vec3<f32>, radiance: vec3<f32>, irradiance: vec3<f32>) -> vec3<f32> {
39
+ return irradiance * RECIPROCAL_PI;
40
+ }
41
+ `, [RECIPROCAL_PI_DECLARATION]));
42
+
43
+ chunk_probe_clipmap_indirect_lobe.add(ProbeClipmapIndirectLobe.Specular, CodeChunk.from(
44
+ //language=WGSL
45
+ `
46
+ fn probe_clipmap_indirect_lobe(specular: vec3<f32>, diffuse: vec3<f32>, radiance: vec3<f32>, irradiance: vec3<f32>) -> vec3<f32> {
47
+ return radiance;
48
+ }
49
+ `));
@@ -37,6 +37,8 @@ export const PROBE_DEPTH_SAMPLER_RESOURCE: ShaderResourceDescriptor;
37
37
  * fn probe_clipmap_depth_moments_in(sampling, depth, slot: u32, direction: vec3<f32>) -> vec2<f32>
38
38
  * ```
39
39
  *
40
+ * - **The cascade**: `probe_clipmap_select_in` by the sampling's `anchor` and `select_half`, as want takes it:
41
+ * boxes on the anchor, so the blend between cascades moves with the anchor, not a window's step at a time.
40
42
  * - **The cage**: `probe_clipmap_cage_in` along mix(n, v, 0.2), as want takes it, so a pixel reads the
41
43
  * probes it wanted.
42
44
  * - **The weights**, visibility only, of the cage's eight corners: a corner without an ALIVE probe weighs
@@ -47,9 +49,8 @@ export const PROBE_DEPTH_SAMPLER_RESOURCE: ShaderResourceDescriptor;
47
49
  * cascade's blend skirt, two of the next one's too, the pairs lerped by the skirt's weight. A cascade
48
50
  * whose corners weigh nothing gives way to the next coarser, without a skirt. With none left the
49
51
  * weights are zero, and the fallback is the caller's (§9.1, step 6).
50
- * - **The SH**: the picked records' Metro L1 structs mixed by their weights; resolved with
51
- * `resolve_irradiance_sh_to_diffuse` at the caller's normal, it gives E/π. `found` says whether any probe
52
- * weighed anything.
52
+ * - **The SH**: the picked records' RGB radiance SH3 mixed by their weights; `sh3_color_get_irradiance_at`
53
+ * at the caller's normal gives E. `found` says whether any probe weighed anything.
53
54
  *
54
55
  * Per cascade read: 8 indirection loads, 8 state words and 8 depth taps, then 2 indirection loads for
55
56
  * the pair; then two records a cascade read for the SH. A depth tile's place takes no integer division
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_probe_clipmap_pick.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js"],"names":[],"mappings":"AAgCA;;;;GAIG;AACH,oCAFU,YAAY,CAuBF;AAEpB;;;GAGG;AACH,sCAFU,wBAAwB,CAE+E;AAEjH;;;GAGG;AACH,8CAFU,wBAAwB,CAEiF;AAEnH;;;GAGG;AACH,6CAFU,iBAAiB,CAQvB;AAEJ;;;GAGG;AACH,2CAFU,wBAAwB,CAE+G;AAOjJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,0CAFU,SAAS,CAyMhB;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,uCAFU,SAAS,CA0BhB;AASH;;;;;;;GAOG;AACH,2CAFU,6BAA6B,CAWG;6BA3Xb,sCAAsC;yCAH1B,sDAAsD;kCAhB7D,qDAAqD;0BAe7D,uCAAuC;8CAEnB,2DAA2D"}
1
+ {"version":3,"file":"chunk_probe_clipmap_pick.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,oCAFU,YAAY,CA2BF;AAEpB;;;GAGG;AACH,sCAFU,wBAAwB,CAE+E;AAEjH;;;GAGG;AACH,8CAFU,wBAAwB,CAEiF;AAEnH;;;GAGG;AACH,6CAFU,iBAAiB,CAQvB;AAEJ;;;GAGG;AACH,2CAFU,wBAAwB,CAE+G;AAOjJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,0CAFU,SAAS,CAiMhB;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,uCAFU,SAAS,CA0BhB;AASH;;;;;;;GAOG;AACH,2CAFU,6BAA6B,CAWG;6BAzXb,sCAAsC;yCAH1B,sDAAsD;kCAb7D,qDAAqD;0BAY7D,uCAAuC;8CAEnB,2DAA2D"}
@@ -1,5 +1,4 @@
1
1
  import { SamplerDescriptor } from "../../../../descriptor/texture/SamplerDescriptor.js";
2
- import { chunk_clipmap_select_finest } from "../../../shader/chunk/clipmap/chunk_clipmap_select_finest.js";
3
2
  import { CLIPMAP_LEVEL_ARRAY } from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
4
3
  import {
5
4
  chunk_uv_octahedral_unit_encode
@@ -7,16 +6,14 @@ import {
7
6
  import { chunk_index_to_grid2d_reciprocal } from "../../../shader/chunk/grid/chunk_index_to_grid2d_reciprocal.js";
8
7
  import { chunk_probe_visibility_weight } from "../../../shader/chunk/light/probe/chunk_probe_visibility_weight.js";
9
8
  import { chunk_pick2_wrs_mat2x4 } from "../../../shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.js";
10
- import {
11
- METRO_L1_IRRADIANCE_STRUCT
12
- } from "../../../shader/chunk/spherical_harmonics/l1i/chunk_convert_to_irradiance_sh.js";
9
+ import { chunk_sh3_color_add_scaled } from "../../../shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.js";
13
10
  import {
14
11
  chunk_texture_octahedral_skirt_uv
15
12
  } from "../../../shader/chunk/texture/octahedral/chunk_texture_octahedral_skirt_uv.js";
16
13
  import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
17
14
  import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
18
15
  import { ShaderResourceGroupDescriptor } from "../../../shader/resource/ShaderResourceGroupDescriptor.js";
19
- import { f32, u32, vec2f } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
16
+ import { f32, u32, vec2f, vec3f } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
20
17
  import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
21
18
  import {
22
19
  chunk_probe_clipmap,
@@ -28,6 +25,7 @@ import {
28
25
  PROBE_STATES_READ_RESOURCE
29
26
  } from "./chunk_probe_clipmap.js";
30
27
  import { chunk_probe_clipmap_cage_in } from "./chunk_probe_clipmap_cage.js";
28
+ import { chunk_probe_clipmap_select_in } from "./chunk_probe_clipmap_select.js";
31
29
  import { PROBE_RECEIVER_BIAS_VIEW } from "./PROBE_CLIPMAP.js";
32
30
 
33
31
  /**
@@ -56,6 +54,10 @@ export const PROBE_SAMPLING_STRUCT = WebGPUStruct.from({
56
54
  radiance_texel: vec2f,
57
55
  /** one over the radiance atlas's tiles a row, rounded to f32 */
58
56
  radiance_tiles_per_row_reciprocal: f32,
57
+ /** where the windows were placed around, world metres: the selection boxes' centre */
58
+ anchor: vec3f,
59
+ /** a selection box's half side, in its cascade's cells */
60
+ select_half: f32,
59
61
  }, "ProbeSampling");
60
62
 
61
63
  /**
@@ -106,6 +108,8 @@ const RECORDS = `ptr<storage, array<${PROBE_RECORD_STRUCT.wgsl_ref}>, read>`;
106
108
  * fn probe_clipmap_depth_moments_in(sampling, depth, slot: u32, direction: vec3<f32>) -> vec2<f32>
107
109
  * ```
108
110
  *
111
+ * - **The cascade**: `probe_clipmap_select_in` by the sampling's `anchor` and `select_half`, as want takes it:
112
+ * boxes on the anchor, so the blend between cascades moves with the anchor, not a window's step at a time.
109
113
  * - **The cage**: `probe_clipmap_cage_in` along mix(n, v, 0.2), as want takes it, so a pixel reads the
110
114
  * probes it wanted.
111
115
  * - **The weights**, visibility only, of the cage's eight corners: a corner without an ALIVE probe weighs
@@ -116,9 +120,8 @@ const RECORDS = `ptr<storage, array<${PROBE_RECORD_STRUCT.wgsl_ref}>, read>`;
116
120
  * cascade's blend skirt, two of the next one's too, the pairs lerped by the skirt's weight. A cascade
117
121
  * whose corners weigh nothing gives way to the next coarser, without a skirt. With none left the
118
122
  * weights are zero, and the fallback is the caller's (§9.1, step 6).
119
- * - **The SH**: the picked records' Metro L1 structs mixed by their weights; resolved with
120
- * `resolve_irradiance_sh_to_diffuse` at the caller's normal, it gives E/π. `found` says whether any probe
121
- * weighed anything.
123
+ * - **The SH**: the picked records' RGB radiance SH3 mixed by their weights; `sh3_color_get_irradiance_at`
124
+ * at the caller's normal gives E. `found` says whether any probe weighed anything.
122
125
  *
123
126
  * Per cascade read: 8 indirection loads, 8 state words and 8 depth taps, then 2 indirection loads for
124
127
  * the pair; then two records a cascade read for the SH. A depth tile's place takes no integer division
@@ -142,7 +145,7 @@ struct ProbeClipmapPair {
142
145
  }
143
146
 
144
147
  struct ProbeClipmapSH {
145
- sh: ${METRO_L1_IRRADIANCE_STRUCT.wgsl_ref},
148
+ sh: array<vec3<f32>, 9>,
146
149
  found: bool,
147
150
  }
148
151
 
@@ -243,7 +246,7 @@ fn probe_clipmap_pick_in(levels: ${LEVELS}, sampling: ${SAMPLING}, indirection:
243
246
  var out: ProbeClipmapPick;
244
247
 
245
248
  let count = (*sampling).cascade_count;
246
- let selection = clipmap_select_finest(levels, count, position, PROBE_BLEND_SKIRT);
249
+ let selection = probe_clipmap_select_in(levels, count, (*sampling).anchor, (*sampling).select_half, position);
247
250
 
248
251
  if (selection.level == CLIPMAP_LEVEL_NONE) {
249
252
  return out;
@@ -292,39 +295,31 @@ fn probe_clipmap_sh_in(records: ${RECORDS}, pick: ProbeClipmapPick) -> ProbeClip
292
295
 
293
296
  // each by name, the slots of a weight of zero not read
294
297
  if (pick.weights.x > 0.0) {
295
- let sh = probe_record_sh_decode((*records)[pick.slots.x].sh);
296
- out.sh.CoCg += pick.weights.x * sh.CoCg;
297
- out.sh.Y += pick.weights.x * sh.Y;
298
+ out.sh = sh3_color_add_scaled(out.sh, probe_record_sh_decode((*records)[pick.slots.x].sh), pick.weights.x);
298
299
  }
299
300
  if (pick.weights.y > 0.0) {
300
- let sh = probe_record_sh_decode((*records)[pick.slots.y].sh);
301
- out.sh.CoCg += pick.weights.y * sh.CoCg;
302
- out.sh.Y += pick.weights.y * sh.Y;
301
+ out.sh = sh3_color_add_scaled(out.sh, probe_record_sh_decode((*records)[pick.slots.y].sh), pick.weights.y);
303
302
  }
304
303
  if (pick.weights.z > 0.0) {
305
- let sh = probe_record_sh_decode((*records)[pick.slots.z].sh);
306
- out.sh.CoCg += pick.weights.z * sh.CoCg;
307
- out.sh.Y += pick.weights.z * sh.Y;
304
+ out.sh = sh3_color_add_scaled(out.sh, probe_record_sh_decode((*records)[pick.slots.z].sh), pick.weights.z);
308
305
  }
309
306
  if (pick.weights.w > 0.0) {
310
- let sh = probe_record_sh_decode((*records)[pick.slots.w].sh);
311
- out.sh.CoCg += pick.weights.w * sh.CoCg;
312
- out.sh.Y += pick.weights.w * sh.Y;
307
+ out.sh = sh3_color_add_scaled(out.sh, probe_record_sh_decode((*records)[pick.slots.w].sh), pick.weights.w);
313
308
  }
314
309
 
315
310
  return out;
316
311
  }
317
312
  `, [
318
313
  chunk_probe_clipmap,
319
- chunk_clipmap_select_finest,
314
+ chunk_probe_clipmap_select_in,
320
315
  chunk_probe_clipmap_cage_in,
321
316
  chunk_index_to_grid2d_reciprocal,
322
317
  chunk_uv_octahedral_unit_encode,
323
318
  chunk_texture_octahedral_skirt_uv,
324
319
  chunk_probe_visibility_weight,
325
320
  chunk_pick2_wrs_mat2x4,
321
+ chunk_sh3_color_add_scaled,
326
322
  PROBE_SAMPLING_STRUCT.declaration_chunk,
327
- METRO_L1_IRRADIANCE_STRUCT.declaration_chunk,
328
323
  ]);
329
324
 
330
325
  chunk_probe_clipmap_pick_in.requireResource(PROBE_DEPTH_SAMPLER_RESOURCE);
@@ -18,8 +18,8 @@
18
18
  * at the cage's diagonal (§8.2), past which no parallax is taken. One bilinear tap of the tile, through
19
19
  * its skirt and the depth's sampler.
20
20
  * - **The rough end** is the probes' SH, mixed by the same shares and resolved for the GGX lobe
21
- * (`resolve_irradiance_sh_to_specular`). The two are blended by `roughness_to_mip_ratio`: SH alone from
22
- * roughness 0.7.
21
+ * (`sh3_color_get_radiance_with_GGX`, as Brick4 resolves its probes). The two are blended by
22
+ * `roughness_to_mip_ratio`: SH alone from roughness 0.7.
23
23
  * - Where no probe weighs anything, nothing is found and the fallback is the caller's.
24
24
  *
25
25
  * @type {CodeChunk}
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_probe_clipmap_sample_radiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,kDAFU,SAAS,CAsIZ;0BA7KmB,uCAAuC"}
1
+ {"version":3,"file":"chunk_probe_clipmap_sample_radiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,kDAFU,SAAS,CAmIZ;0BA1KmB,uCAAuC"}
@@ -4,12 +4,10 @@ import {
4
4
  } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_encode.js";
5
5
  import { chunk_index_to_grid2d_reciprocal } from "../../../shader/chunk/grid/chunk_index_to_grid2d_reciprocal.js";
6
6
  import { chunk_probe_visibility_weight } from "../../../shader/chunk/light/probe/chunk_probe_visibility_weight.js";
7
+ import { chunk_sh3_color_add_scaled } from "../../../shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.js";
7
8
  import {
8
- METRO_L1_IRRADIANCE_STRUCT
9
- } from "../../../shader/chunk/spherical_harmonics/l1i/chunk_convert_to_irradiance_sh.js";
10
- import {
11
- chunk_resolve_irradiance_sh_to_specular
12
- } from "../../../shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.js";
9
+ chunk_sh3_color_get_radiance_with_GGX
10
+ } from "../../../shader/chunk/spherical_harmonics/chunk_sh3_color_get_radiance_with_GGX.js";
13
11
  import {
14
12
  chunk_texture_octahedral_skirt_uv
15
13
  } from "../../../shader/chunk/texture/octahedral/chunk_texture_octahedral_skirt_uv.js";
@@ -48,8 +46,8 @@ import { PROBE_RECEIVER_BIAS_VIEW } from "./PROBE_CLIPMAP.js";
48
46
  * at the cage's diagonal (§8.2), past which no parallax is taken. One bilinear tap of the tile, through
49
47
  * its skirt and the depth's sampler.
50
48
  * - **The rough end** is the probes' SH, mixed by the same shares and resolved for the GGX lobe
51
- * (`resolve_irradiance_sh_to_specular`). The two are blended by `roughness_to_mip_ratio`: SH alone from
52
- * roughness 0.7.
49
+ * (`sh3_color_get_radiance_with_GGX`, as Brick4 resolves its probes). The two are blended by
50
+ * `roughness_to_mip_ratio`: SH alone from roughness 0.7.
53
51
  * - Where no probe weighs anything, nothing is found and the fallback is the caller's.
54
52
  *
55
53
  * @type {CodeChunk}
@@ -66,7 +64,7 @@ struct ProbeClipmapLobe {
66
64
  // the probe's share for the lobe, before the shares are renormalised
67
65
  weight: f32,
68
66
  radiance: vec3<f32>,
69
- sh: ${METRO_L1_IRRADIANCE_STRUCT.wgsl_ref},
67
+ sh: array<vec3<f32>, 9>,
70
68
  }
71
69
 
72
70
  // a slot's radiance toward a direction, and its texels' count of samples in alpha: one bilinear tap of its
@@ -135,39 +133,35 @@ fn probe_clipmap_radiance_of(pick: ProbeClipmapPick, position: vec3<f32>, normal
135
133
 
136
134
  var weight = 0.0;
137
135
  var radiance = vec3<f32>(0.0);
138
- var sh: ${METRO_L1_IRRADIANCE_STRUCT.wgsl_ref};
136
+ var sh: array<vec3<f32>, 9>;
139
137
 
140
138
  // each by name, the slots of a share of zero not read
141
139
  if (pick.weights.x > 0.0) {
142
140
  let probe = probe_clipmap_lobe(pick.slots.x, pick.weights.x, position, normal, bias_direction, lobe);
143
141
  weight += probe.weight;
144
142
  radiance += probe.weight * probe.radiance;
145
- sh.Y += probe.weight * probe.sh.Y;
146
- sh.CoCg += probe.weight * probe.sh.CoCg;
143
+ sh = sh3_color_add_scaled(sh, probe.sh, probe.weight);
147
144
  }
148
145
  if (pick.weights.y > 0.0) {
149
146
  let probe = probe_clipmap_lobe(pick.slots.y, pick.weights.y, position, normal, bias_direction, lobe);
150
147
  weight += probe.weight;
151
148
  radiance += probe.weight * probe.radiance;
152
- sh.Y += probe.weight * probe.sh.Y;
153
- sh.CoCg += probe.weight * probe.sh.CoCg;
149
+ sh = sh3_color_add_scaled(sh, probe.sh, probe.weight);
154
150
  }
155
151
  if (pick.weights.z > 0.0) {
156
152
  let probe = probe_clipmap_lobe(pick.slots.z, pick.weights.z, position, normal, bias_direction, lobe);
157
153
  weight += probe.weight;
158
154
  radiance += probe.weight * probe.radiance;
159
- sh.Y += probe.weight * probe.sh.Y;
160
- sh.CoCg += probe.weight * probe.sh.CoCg;
155
+ sh = sh3_color_add_scaled(sh, probe.sh, probe.weight);
161
156
  }
162
157
  if (pick.weights.w > 0.0) {
163
158
  let probe = probe_clipmap_lobe(pick.slots.w, pick.weights.w, position, normal, bias_direction, lobe);
164
159
  weight += probe.weight;
165
160
  radiance += probe.weight * probe.radiance;
166
- sh.Y += probe.weight * probe.sh.Y;
167
- sh.CoCg += probe.weight * probe.sh.CoCg;
161
+ sh = sh3_color_add_scaled(sh, probe.sh, probe.weight);
168
162
  }
169
163
 
170
- let rough = resolve_irradiance_sh_to_specular(sh.Y / weight, sh.CoCg / weight, lobe, alpha);
164
+ let rough = sh3_color_get_radiance_with_GGX(sh, lobe, alpha) / weight;
171
165
 
172
166
  out.radiance = mix(radiance / weight, rough, roughness_to_mip_ratio(roughness));
173
167
 
@@ -184,7 +178,8 @@ fn probe_clipmap_sample_radiance(position: vec3<f32>, normal: vec3<f32>, view_di
184
178
  chunk_index_to_grid2d_reciprocal,
185
179
  chunk_texture_octahedral_skirt_uv,
186
180
  chunk_uv_octahedral_unit_encode,
187
- chunk_resolve_irradiance_sh_to_specular,
181
+ chunk_sh3_color_add_scaled,
182
+ chunk_sh3_color_get_radiance_with_GGX,
188
183
  chunk_roughness_to_mip_ratio,
189
184
  ]);
190
185
 
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The cascade a point reads, and how far into its blend skirt it is (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.1,
3
+ * "Selection"), in the clipmap whose levels `levels` points at. Want takes it to choose the cascades a pixel
4
+ * wants, and the pick to read them.
5
+ *
6
+ * ```wgsl
7
+ * fn probe_clipmap_select_in(levels: ptr<uniform, ClipmapLevelArray>, count: u32, anchor: vec3<f32>, select_half: f32, position: vec3<f32>) -> ClipmapSelection
8
+ * ```
9
+ *
10
+ * Each cascade's selection box is centred on the `anchor` the windows were placed around, `select_half` of the
11
+ * cascade's cells to a side. The finest of the first `count` cascades whose box holds the point answers, its
12
+ * `edge_weight` rising from 0 at {@link PROBE_BLEND_SKIRT} cells inside the box's nearest face to 1 on it: the
13
+ * share the next coarser cascade takes. A point no box holds answers `CLIPMAP_LEVEL_NONE`, with a weight of 0.
14
+ *
15
+ * The boxes follow the anchor, not the windows' corners, which move a whole step at a time: a point's weight
16
+ * moves as far as the anchor did over the skirt's depth, never a step's worth in one frame.
17
+ *
18
+ * @type {CodeChunk}
19
+ */
20
+ export const chunk_probe_clipmap_select_in: CodeChunk;
21
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
22
+ //# sourceMappingURL=chunk_probe_clipmap_select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_probe_clipmap_select.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAFU,SAAS,CA2BhB;0BA/CuB,uCAAuC"}
@@ -0,0 +1,50 @@
1
+ import { chunk_clipmap_select_finest } from "../../../shader/chunk/clipmap/chunk_clipmap_select_finest.js";
2
+ import { CLIPMAP_LEVEL_ARRAY, CLIPMAP_LEVEL_LIMIT } from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
3
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
4
+ import { PROBE_BLEND_SKIRT } from "./PROBE_CLIPMAP.js";
5
+
6
+ /**
7
+ * The cascade a point reads, and how far into its blend skirt it is (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.1,
8
+ * "Selection"), in the clipmap whose levels `levels` points at. Want takes it to choose the cascades a pixel
9
+ * wants, and the pick to read them.
10
+ *
11
+ * ```wgsl
12
+ * fn probe_clipmap_select_in(levels: ptr<uniform, ClipmapLevelArray>, count: u32, anchor: vec3<f32>, select_half: f32, position: vec3<f32>) -> ClipmapSelection
13
+ * ```
14
+ *
15
+ * Each cascade's selection box is centred on the `anchor` the windows were placed around, `select_half` of the
16
+ * cascade's cells to a side. The finest of the first `count` cascades whose box holds the point answers, its
17
+ * `edge_weight` rising from 0 at {@link PROBE_BLEND_SKIRT} cells inside the box's nearest face to 1 on it: the
18
+ * share the next coarser cascade takes. A point no box holds answers `CLIPMAP_LEVEL_NONE`, with a weight of 0.
19
+ *
20
+ * The boxes follow the anchor, not the windows' corners, which move a whole step at a time: a point's weight
21
+ * moves as far as the anchor did over the skirt's depth, never a step's worth in one frame.
22
+ *
23
+ * @type {CodeChunk}
24
+ */
25
+ export const chunk_probe_clipmap_select_in = CodeChunk.from(
26
+ //language=WGSL
27
+ `
28
+ fn probe_clipmap_select_in(levels: ptr<uniform, ${CLIPMAP_LEVEL_ARRAY.wgsl_ref}>, count: u32, anchor: vec3<f32>, select_half: f32, position: vec3<f32>) -> ClipmapSelection {
29
+ let offset = abs(position - anchor);
30
+ let reach = max(max(offset.x, offset.y), offset.z);
31
+
32
+ for (var i = 0u; i < ${CLIPMAP_LEVEL_LIMIT}u; i++) {
33
+ if (i >= count) {
34
+ break;
35
+ }
36
+
37
+ // the point's depth inside the box, in the cascade's cells
38
+ let edge = select_half - reach / (*levels)[i].cell_size;
39
+
40
+ if (edge >= 0.0) {
41
+ return ClipmapSelection(i, saturate(1.0 - edge / ${PROBE_BLEND_SKIRT}.0));
42
+ }
43
+ }
44
+
45
+ return ClipmapSelection(CLIPMAP_LEVEL_NONE, 0.0);
46
+ }
47
+ `, [
48
+ // ClipmapSelection and CLIPMAP_LEVEL_NONE
49
+ chunk_clipmap_select_finest,
50
+ ]);
@@ -3,12 +3,12 @@
3
3
  * for want's pixels and the hits' wants alike.
4
4
  *
5
5
  * ```wgsl
6
- * fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32>, cascade_count: u32, resolution: u32, wanted_capacity: u32)
6
+ * fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32>, cascade_count: u32, resolution: u32, anchor: vec3<f32>, select_half: f32, wanted_capacity: u32)
7
7
  * ```
8
8
  *
9
- * The cages are the pick's: the finest cascade whose cage window holds the point, the cage of the point
10
- * biased along `bias_direction` by that cascade's spacing, and in the cascade's blend skirt the next
11
- * cascade's cage too, biased by its own. A cage a bias moved out of its window is not wanted. Each cage
9
+ * The cages are the pick's: the cascade `probe_clipmap_select_in` answers for the point, by the windows'
10
+ * `anchor` and `select_half` as the pick reads them, the cage of the point biased along `bias_direction` by
11
+ * that cascade's spacing, and in the cascade's blend skirt the next cascade's cage too, biased by its own. A cage a bias moved out of its window is not wanted. Each cage
12
12
  * point's bit is set, and a point whose bit was clear goes on the wanted list by its key, so the list
13
13
  * holds every point wanted this frame once.
14
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_probe_clipmap_want.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,uCAFU,SAAS,CAgFZ;0BA7HmB,uCAAuC"}
1
+ {"version":3,"file":"chunk_probe_clipmap_want.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,uCAFU,SAAS,CAgFZ;0BA9HmB,uCAAuC"}
@@ -1,5 +1,4 @@
1
1
  import { chunk_collection_u32_append } from "../../../gpu_primitive/chunk_collection_u32_append.js";
2
- import { chunk_clipmap_select_finest } from "../../../shader/chunk/clipmap/chunk_clipmap_select_finest.js";
3
2
  import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
4
3
  import {
5
4
  chunk_probe_clipmap,
@@ -8,6 +7,7 @@ import {
8
7
  PROBE_WANTED_WRITE_RESOURCE
9
8
  } from "./chunk_probe_clipmap.js";
10
9
  import { chunk_probe_clipmap_cage } from "./chunk_probe_clipmap_cage.js";
10
+ import { chunk_probe_clipmap_select_in } from "./chunk_probe_clipmap_select.js";
11
11
  import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
12
12
 
13
13
  /**
@@ -29,12 +29,12 @@ const WANT_CLAIM_PROBES = 16;
29
29
  * for want's pixels and the hits' wants alike.
30
30
  *
31
31
  * ```wgsl
32
- * fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32>, cascade_count: u32, resolution: u32, wanted_capacity: u32)
32
+ * fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32>, cascade_count: u32, resolution: u32, anchor: vec3<f32>, select_half: f32, wanted_capacity: u32)
33
33
  * ```
34
34
  *
35
- * The cages are the pick's: the finest cascade whose cage window holds the point, the cage of the point
36
- * biased along `bias_direction` by that cascade's spacing, and in the cascade's blend skirt the next
37
- * cascade's cage too, biased by its own. A cage a bias moved out of its window is not wanted. Each cage
35
+ * The cages are the pick's: the cascade `probe_clipmap_select_in` answers for the point, by the windows'
36
+ * `anchor` and `select_half` as the pick reads them, the cage of the point biased along `bias_direction` by
37
+ * that cascade's spacing, and in the cascade's blend skirt the next cascade's cage too, biased by its own. A cage a bias moved out of its window is not wanted. Each cage
38
38
  * point's bit is set, and a point whose bit was clear goes on the wanted list by its key, so the list
39
39
  * holds every point wanted this frame once.
40
40
  *
@@ -80,8 +80,8 @@ fn probe_want_claim(key: u32) -> bool {
80
80
  return true;
81
81
  }
82
82
 
83
- fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32>, cascade_count: u32, resolution: u32, wanted_capacity: u32) {
84
- let selection = clipmap_select_finest(&probe_levels, cascade_count, position, PROBE_BLEND_SKIRT);
83
+ fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32>, cascade_count: u32, resolution: u32, anchor: vec3<f32>, select_half: f32, wanted_capacity: u32) {
84
+ let selection = probe_clipmap_select_in(&probe_levels, cascade_count, anchor, select_half, position);
85
85
 
86
86
  let held = wants && selection.level != CLIPMAP_LEVEL_NONE;
87
87
  let finest = select(0u, selection.level, held);
@@ -122,7 +122,7 @@ fn probe_clipmap_want(wants: bool, position: vec3<f32>, bias_direction: vec3<f32
122
122
  }
123
123
  `, [
124
124
  chunk_probe_clipmap,
125
- chunk_clipmap_select_finest,
125
+ chunk_probe_clipmap_select_in,
126
126
  chunk_probe_clipmap_cage,
127
127
  chunk_collection_u32_append,
128
128
  ]);
@@ -19,7 +19,7 @@ export const PROBE_ACCUMULATE_SETTINGS: WebGPUStruct;
19
19
  * so their mean needs no weight for the guide's choice.
20
20
  * - **Radiance**: the mean of the texel's resolved rays, a back face's being zero, is a sample of the
21
21
  * texel's multi-scale mean (`chunk_multiscale_mean`), its estimator in `probe_estimators` and its mean
22
- * in the atlas.
22
+ * in the atlas, at the exposure in `probe_exposure`: the display's, which the estimator's thresholds are in.
23
23
  * - The short mean blends by β = max(1/(a+1), `PROBE_SHORT_BLEND`), its variance by max(1/(a+1),
24
24
  * `PROBE_VARIANCE_BLEND`), a the texel's own count of the updates that reached it, held in its alpha.
25
25
  * A sample's blend is a sample's however long since the last one: a probe nobody wanted, or a texel the