@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
@@ -12,7 +12,7 @@ export const chunk_water_gi_ibl: CodeChunk;
12
12
  export const chunk_water_gi_brick4: CodeChunk;
13
13
  /**
14
14
  * The probe clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.5): each call one pick at the point, jittered by a
15
- * hash of the point and the normal, as Brick4's is. The irradiance is π × the picked SH resolved at the normal,
15
+ * hash of the point and the normal, as Brick4's is. The irradiance is the picked SH resolved at the normal,
16
16
  * the normal standing in for the view, which the irradiance call has none of. The specular is the probes'
17
17
  * radiance picked by the normal and the view (§9.3). Where no probe weighs anything, each is the environment's.
18
18
  * Reads the probes' group, `view` and `tEnvironment`.
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_water_gi.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/water/chunk_water_gi.js"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,iCAFU,SAAS,CAUoC;AAEvD;;;;GAIG;AACH,oCAFU,SAAS,CAgBwB;AAE3C;;;;;;;GAOG;AACH,2CAFU,SAAS,CAwB+E;AAElG;;;;;;GAMG;AACH,6BAFU,eAAe,CAE6C;0BA5F5C,iCAAiC;gCAC3B,uCAAuC"}
1
+ {"version":3,"file":"chunk_water_gi.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/water/chunk_water_gi.js"],"names":[],"mappings":"AAgCA;;;;GAIG;AACH,iCAFU,SAAS,CAUoC;AAEvD;;;;GAIG;AACH,oCAFU,SAAS,CAgBwB;AAE3C;;;;;;;GAOG;AACH,2CAFU,SAAS,CAuB+D;AAElF;;;;;;GAMG;AACH,6BAFU,eAAe,CAE6C;0BA3F5C,iCAAiC;gCAC3B,uCAAuC"}
@@ -9,11 +9,10 @@ import {
9
9
  } from "../global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js";
10
10
  import { INDIRECT_LIGHTING } from "../INDIRECT_LIGHTING.js";
11
11
  import { ShadeIndirectLightingMode } from "../ShadeIndirectLightingMode.js";
12
- import { PI_DECLARATION } from "../shader/chunk/math/PI_DECLARATION.js";
13
12
  import { chunk_jitter_from_vectors } from "../shader/chunk/random/chunk_jitter_from_vectors.js";
14
13
  import {
15
- chunk_resolve_irradiance_sh_to_diffuse
16
- } from "../shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_diffuse.js";
14
+ chunk_sh3_color_get_irradiance_at
15
+ } from "../shader/chunk/spherical_harmonics/chunk_sh3_color_get_irradiance_at.js";
17
16
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
18
17
  import { CodeChunkChoice } from "../shader/compiler/CodeChunkChoice.js";
19
18
 
@@ -69,7 +68,7 @@ fn water_gi_specular(position: vec3<f32>, normal: vec3<f32>, view_direction: vec
69
68
 
70
69
  /**
71
70
  * The probe clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.5): each call one pick at the point, jittered by a
72
- * hash of the point and the normal, as Brick4's is. The irradiance is π × the picked SH resolved at the normal,
71
+ * hash of the point and the normal, as Brick4's is. The irradiance is the picked SH resolved at the normal,
73
72
  * the normal standing in for the view, which the irradiance call has none of. The specular is the probes'
74
73
  * radiance picked by the normal and the view (§9.3). Where no probe weighs anything, each is the environment's.
75
74
  * Reads the probes' group, `view` and `tEnvironment`.
@@ -80,8 +79,7 @@ fn water_gi_irradiance(position: vec3<f32>, normal: vec3<f32>) -> vec3<f32> {
80
79
  let probes = probe_clipmap_sample_sh(position, normal, normal, jitter_from_vectors(position, normal));
81
80
 
82
81
  if (probes.found) {
83
- // the resolve gives E/π
84
- return PI * resolve_irradiance_sh_to_diffuse(probes.sh.Y, probes.sh.CoCg, normal);
82
+ return sh3_color_get_irradiance_at(normal, probes.sh);
85
83
  }
86
84
 
87
85
  return get_ibl_irradiance(normal);
@@ -96,8 +94,8 @@ fn water_gi_specular(position: vec3<f32>, normal: vec3<f32>, view_direction: vec
96
94
 
97
95
  return get_ibl_radiance(view_direction, normal, roughness);
98
96
  }
99
- `, [chunk_probe_clipmap_pick, chunk_probe_clipmap_sample_radiance, chunk_resolve_irradiance_sh_to_diffuse,
100
- chunk_jitter_from_vectors, PI_DECLARATION, chunk_get_ibl_irradiance, chunk_get_ibl_radiance]);
97
+ `, [chunk_probe_clipmap_pick, chunk_probe_clipmap_sample_radiance, chunk_sh3_color_get_irradiance_at,
98
+ chunk_jitter_from_vectors, chunk_get_ibl_irradiance, chunk_get_ibl_radiance]);
101
99
 
102
100
  /**
103
101
  * The water's indirect lighting by the renderer's mode ({@link INDIRECT_LIGHTING}): IBL and LPV
@@ -24,7 +24,7 @@ export class GPUWaterQueries {
24
24
  * @param {PipelineEnquiry} enquiry
25
25
  */
26
26
  static enquirePipelines(enquiry: PipelineEnquiry): void;
27
- static "__#279@#execute"(pass: any, resources: any, context: any): void;
27
+ static "__#281@#execute"(pass: any, resources: any, context: any): void;
28
28
  /**
29
29
  * @param {object} options
30
30
  * @param {GPUDevice} options.device
@@ -42,7 +42,7 @@ export class GPUSceneWind {
42
42
  * @param {number} capacity
43
43
  * @returns {GPUTileAtlas3D}
44
44
  */
45
- static "__#169@#make_atlas"(device: GPUDevice, content: ArrayLike<number>, capacity: number): GPUTileAtlas3D;
45
+ static "__#174@#make_atlas"(device: GPUDevice, content: ArrayLike<number>, capacity: number): GPUTileAtlas3D;
46
46
  /**
47
47
  * @param {GPUDevice} device
48
48
  */
@@ -1 +1 @@
1
- {"version":3,"file":"WGSLLanguageCore.d.ts","sourceRoot":"","sources":["../../../../../src/shade/wgsl/emulator/WGSLLanguageCore.js"],"names":[],"mappings":";IAs3DA;;;;;;;;;;;;;OAaG;IACH,+DAyFC"}
1
+ {"version":3,"file":"WGSLLanguageCore.d.ts","sourceRoot":"","sources":["../../../../../src/shade/wgsl/emulator/WGSLLanguageCore.js"],"names":[],"mappings":";IAk6DA;;;;;;;;;;;;;OAaG;IACH,+DAyFC"}
@@ -99,11 +99,26 @@ const BITCAST_F16 = new Float16Array(BITCAST_BUFFER);
99
99
  * @returns {*}
100
100
  */
101
101
  function makeVec(TypedArrayCtor, size, args) {
102
- if (args.length === 0) {
102
+ const n = args.length;
103
+ if (n === 0) {
103
104
  return new TypedArrayCtor(size);
104
105
  }
106
+ if (n === size && typeof args[0] === 'number') {
107
+ let all_num = true;
108
+ for (let k = 1; k < n; k++) {
109
+ if (typeof args[k] !== 'number') {
110
+ all_num = false;
111
+ break;
112
+ }
113
+ }
114
+ if (all_num) {
115
+ const out = new TypedArrayCtor(size);
116
+ for (let k = 0; k < size; k++) out[k] = args[k];
117
+ return out;
118
+ }
119
+ }
105
120
  // Single scalar → broadcast.
106
- if (args.length === 1 && typeof args[0] === 'number') {
121
+ if (n === 1 && typeof args[0] === 'number') {
107
122
  const v = args[0];
108
123
  const out = new TypedArrayCtor(size);
109
124
  for (let i = 0; i < size; i++) out[i] = v;
@@ -112,7 +127,8 @@ function makeVec(TypedArrayCtor, size, args) {
112
127
  // Otherwise flatten.
113
128
  const out = new TypedArrayCtor(size);
114
129
  let i = 0;
115
- for (const a of args) {
130
+ for (let k = 0; k < n; k++) {
131
+ const a = args[k];
116
132
  if (typeof a === 'number' || typeof a === 'boolean') {
117
133
  out[i++] = +a;
118
134
  } else if (a != null && typeof a.length === 'number') {
@@ -213,7 +229,31 @@ function is_vec(v) {
213
229
  * @param {function(number, number): number} op
214
230
  * @returns {*}
215
231
  */
232
+ const op_add = (x, y) => x + y;
233
+ const op_sub = (x, y) => x - y;
234
+ const op_mul = (x, y) => x * y;
235
+ const op_div = (x, y) => x / y;
236
+ const op_add_f32 = (x, y) => Math.fround(x + y);
237
+ const op_sub_f32 = (x, y) => Math.fround(x - y);
238
+ const op_mul_f32 = (x, y) => Math.fround(x * y);
239
+ const op_div_f32 = (x, y) => Math.fround(x / y);
240
+ const op_add_f16 = (x, y) => round_f16(x + y);
241
+ const op_sub_f16 = (x, y) => round_f16(x - y);
242
+ const op_mul_f16 = (x, y) => round_f16(x * y);
243
+ const op_div_f16 = (x, y) => round_f16(x / y);
244
+ const op_rem = (x, y) => x % y;
245
+ const op_idiv = (x, y) => Math.trunc(x / y);
246
+ const op_add_u32 = (x, y) => (x + y) >>> 0;
247
+ const op_sub_u32 = (x, y) => (x - y) >>> 0;
248
+ const op_mul_u32 = (x, y) => Math.imul(x, y) >>> 0;
249
+ const op_add_i32 = (x, y) => (x + y) | 0;
250
+ const op_sub_i32 = (x, y) => (x - y) | 0;
251
+ const op_mul_i32 = (x, y) => Math.imul(x, y) | 0;
252
+
216
253
  function binop(a, b, op) {
254
+ if (typeof a === "number" && typeof b === "number") {
255
+ return op(a, b);
256
+ }
217
257
  const a_vec = is_vec(a);
218
258
  const b_vec = is_vec(b);
219
259
 
@@ -302,7 +342,7 @@ function round_ties_to_even(x) {
302
342
  }
303
343
 
304
344
  function unop(a, op) {
305
- if (!is_vec(a)) {
345
+ if (typeof a === "number" || !is_vec(a)) {
306
346
  return op(a);
307
347
  }
308
348
  const out = new a.constructor(a.length);
@@ -321,15 +361,15 @@ function unop(a, op) {
321
361
  * @returns {*}
322
362
  */
323
363
  function ternop(a, b, c, op) {
324
- if (is_vec(a) || is_vec(b) || is_vec(c)) {
325
- const length = (is_vec(a) ? a.length : (is_vec(b) ? b.length : c.length));
326
- const ctor = (is_vec(a) ? a.constructor : (is_vec(b) ? b.constructor : c.constructor));
327
- const out = new ctor(length);
364
+ const a_vec = is_vec(a);
365
+ const b_vec = is_vec(b);
366
+ const c_vec = is_vec(c);
367
+ if (a_vec || b_vec || c_vec) {
368
+ const ref = a_vec ? a : (b_vec ? b : c);
369
+ const length = ref.length;
370
+ const out = new ref.constructor(length);
328
371
  for (let i = 0; i < length; i++) {
329
- const ai = is_vec(a) ? a[i] : a;
330
- const bi = is_vec(b) ? b[i] : b;
331
- const ci = is_vec(c) ? c[i] : c;
332
- out[i] = op(ai, bi, ci);
372
+ out[i] = op(a_vec ? a[i] : a, b_vec ? b[i] : b, c_vec ? c[i] : c);
333
373
  }
334
374
  return out;
335
375
  }
@@ -358,6 +398,10 @@ function ternop(a, b, c, op) {
358
398
  * @returns {*}
359
399
  */
360
400
  function copy_value(value) {
401
+ if (typeof value !== "object" || value === null) {
402
+ return value;
403
+ }
404
+
361
405
  if (ArrayBuffer.isView(value)) {
362
406
  return value.slice();
363
407
  }
@@ -606,10 +650,10 @@ export const WGSLLanguageCore = {
606
650
  // Arithmetic helpers (work on scalars and vectors element-wise)
607
651
  // ---------------------------------------------------------------------
608
652
 
609
- add: (a, b) => binop(a, b, (x, y) => x + y),
610
- sub: (a, b) => binop(a, b, (x, y) => x - y),
611
- mul: (a, b) => binop(a, b, (x, y) => x * y),
612
- div: (a, b) => binop(a, b, (x, y) => x / y),
653
+ add: (a, b) => typeof a === "number" && typeof b === "number" ? a + b : binop(a, b, op_add),
654
+ sub: (a, b) => typeof a === "number" && typeof b === "number" ? a - b : binop(a, b, op_sub),
655
+ mul: (a, b) => typeof a === "number" && typeof b === "number" ? a * b : binop(a, b, op_mul),
656
+ div: (a, b) => typeof a === "number" && typeof b === "number" ? a / b : binop(a, b, op_div),
613
657
 
614
658
  /*
615
659
  The same four at f32, for a SCALAR whose type the compiler knows is f32.
@@ -632,23 +676,23 @@ export const WGSLLanguageCore = {
632
676
  runtime. `Math.fround` of a vector is NaN, and binop is already idempotent here: a vec lane is
633
677
  rounded and then stored into the Float32Array that would have rounded it anyway.
634
678
  */
635
- add_f32: (a, b) => binop(a, b, (x, y) => Math.fround(x + y)),
636
- sub_f32: (a, b) => binop(a, b, (x, y) => Math.fround(x - y)),
637
- mul_f32: (a, b) => binop(a, b, (x, y) => Math.fround(x * y)),
638
- div_f32: (a, b) => binop(a, b, (x, y) => Math.fround(x / y)),
679
+ add_f32: (a, b) => typeof a === "number" && typeof b === "number" ? Math.fround(a + b) : binop(a, b, op_add_f32),
680
+ sub_f32: (a, b) => typeof a === "number" && typeof b === "number" ? Math.fround(a - b) : binop(a, b, op_sub_f32),
681
+ mul_f32: (a, b) => typeof a === "number" && typeof b === "number" ? Math.fround(a * b) : binop(a, b, op_mul_f32),
682
+ div_f32: (a, b) => typeof a === "number" && typeof b === "number" ? Math.fround(a / b) : binop(a, b, op_div_f32),
639
683
 
640
684
  // The same four at f16, for a SCALAR whose type the compiler knows is f16. Without these,
641
685
  // scalar f16 arithmetic ran in f64 (`16000.0h * 8.0h` evaluated to 128000 instead of +Infinity,
642
686
  // and `1e-3h * 1e-3h` evaluated to 1e-6 instead of underflowing in binary16).
643
- add_f16: (a, b) => binop(a, b, (x, y) => round_f16(x + y)),
644
- sub_f16: (a, b) => binop(a, b, (x, y) => round_f16(x - y)),
645
- mul_f16: (a, b) => binop(a, b, (x, y) => round_f16(x * y)),
646
- div_f16: (a, b) => binop(a, b, (x, y) => round_f16(x / y)),
647
- rem: (a, b) => binop(a, b, (x, y) => x % y),
687
+ add_f16: (a, b) => typeof a === "number" && typeof b === "number" ? round_f16(a + b) : binop(a, b, op_add_f16),
688
+ sub_f16: (a, b) => typeof a === "number" && typeof b === "number" ? round_f16(a - b) : binop(a, b, op_sub_f16),
689
+ mul_f16: (a, b) => typeof a === "number" && typeof b === "number" ? round_f16(a * b) : binop(a, b, op_mul_f16),
690
+ div_f16: (a, b) => typeof a === "number" && typeof b === "number" ? round_f16(a / b) : binop(a, b, op_div_f16),
691
+ rem: (a, b) => typeof a === "number" && typeof b === "number" ? a % b : binop(a, b, op_rem),
648
692
 
649
693
  // Integer division — truncates toward zero, matching WGSL `/` semantics on integer types.
650
694
  // The compiler routes `/` through `idiv` when both operands' tracked types are integer.
651
- idiv: (a, b) => binop(a, b, (x, y) => Math.trunc(x / y)),
695
+ idiv: (a, b) => typeof a === "number" && typeof b === "number" ? Math.trunc(a / b) : binop(a, b, op_idiv),
652
696
 
653
697
  // WGSL integer arithmetic wraps at 32 bits; JS numbers grow instead. Without wrapping, any
654
698
  // hash or PRNG that multiplies by a large odd constant leaves the u32 range within a step or
@@ -658,13 +702,13 @@ export const WGSLLanguageCore = {
658
702
  //
659
703
  // The compiler routes `+` / `-` / `*` here only when the result type is known to be an integer,
660
704
  // so float math never reaches these.
661
- add_u32: (a, b) => binop(a, b, (x, y) => (x + y) >>> 0),
662
- sub_u32: (a, b) => binop(a, b, (x, y) => (x - y) >>> 0),
663
- mul_u32: (a, b) => binop(a, b, (x, y) => Math.imul(x, y) >>> 0),
705
+ add_u32: (a, b) => typeof a === "number" && typeof b === "number" ? (a + b) >>> 0 : binop(a, b, op_add_u32),
706
+ sub_u32: (a, b) => typeof a === "number" && typeof b === "number" ? (a - b) >>> 0 : binop(a, b, op_sub_u32),
707
+ mul_u32: (a, b) => typeof a === "number" && typeof b === "number" ? Math.imul(a, b) >>> 0 : binop(a, b, op_mul_u32),
664
708
 
665
- add_i32: (a, b) => binop(a, b, (x, y) => (x + y) | 0),
666
- sub_i32: (a, b) => binop(a, b, (x, y) => (x - y) | 0),
667
- mul_i32: (a, b) => binop(a, b, (x, y) => Math.imul(x, y) | 0),
709
+ add_i32: (a, b) => typeof a === "number" && typeof b === "number" ? (a + b) | 0 : binop(a, b, op_add_i32),
710
+ sub_i32: (a, b) => typeof a === "number" && typeof b === "number" ? (a - b) | 0 : binop(a, b, op_sub_i32),
711
+ mul_i32: (a, b) => typeof a === "number" && typeof b === "number" ? Math.imul(a, b) | 0 : binop(a, b, op_mul_i32),
668
712
 
669
713
  // Element-wise bitwise / shift helpers. JS's raw `&` / `|` / `^` / `<<` / `>>` work on
670
714
  // scalars but not typed arrays (they coerce the array to a number → NaN), so the compiler
@@ -1,17 +0,0 @@
1
- /**
2
- * Based on Squirrel3 hash function by Squirrel Eiserloh
3
- *
4
- * NOTE: every step is wrapping u32 arithmetic, matching the WGSL twin `chunk_hash_squirrel3` bit
5
- * for bit. This used to multiply with plain `*`, which is a double multiply - `hash * 0x1B56C4E9`
6
- * exceeds 2^53 for any int32-sized hash, so the low bits the following `hash ^= hash >> 8` mixes
7
- * were rounded away before they were used. The result set bit 31 in exactly zero of 200,000
8
- * outputs, half the codomain unreachable, and disagreed with the GPU on every value. An in-file
9
- * comment used to blame the algorithm for the resulting low entropy; it was this port.
10
- *
11
- * @deprecated prefer {@link lowbias32}, as the WGSL chunk already says of its own twin
12
- * @see GDC 2017 presentation on "Math for Game Programmers: Noise-Based RNG"
13
- * @param {number} value expected to be an integer, if not - it will be truncated to such
14
- * @returns {number} unsigned 32-bit integer
15
- */
16
- export function squirrel3(value: number): number;
17
- //# sourceMappingURL=squirrel3.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"squirrel3.d.ts","sourceRoot":"","sources":["../../../../../src/core/math/hash/squirrel3.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,iCAHW,MAAM,GACJ,MAAM,CAYlB"}
@@ -1,30 +0,0 @@
1
- const BIT_NOISE1 = 0xB5297A4D;
2
- const BIT_NOISE2 = 0x68E31DA4;
3
- const BIT_NOISE3 = 0x1B56C4E9;
4
-
5
- /**
6
- * Based on Squirrel3 hash function by Squirrel Eiserloh
7
- *
8
- * NOTE: every step is wrapping u32 arithmetic, matching the WGSL twin `chunk_hash_squirrel3` bit
9
- * for bit. This used to multiply with plain `*`, which is a double multiply - `hash * 0x1B56C4E9`
10
- * exceeds 2^53 for any int32-sized hash, so the low bits the following `hash ^= hash >> 8` mixes
11
- * were rounded away before they were used. The result set bit 31 in exactly zero of 200,000
12
- * outputs, half the codomain unreachable, and disagreed with the GPU on every value. An in-file
13
- * comment used to blame the algorithm for the resulting low entropy; it was this port.
14
- *
15
- * @deprecated prefer {@link lowbias32}, as the WGSL chunk already says of its own twin
16
- * @see GDC 2017 presentation on "Math for Game Programmers: Noise-Based RNG"
17
- * @param {number} value expected to be an integer, if not - it will be truncated to such
18
- * @returns {number} unsigned 32-bit integer
19
- */
20
- export function squirrel3(value) {
21
- let hash = Math.imul(value, BIT_NOISE1);
22
-
23
- hash ^= (hash >>> 8);
24
- hash = (hash + BIT_NOISE2) | 0;
25
- hash ^= (hash << 8);
26
- hash = Math.imul(hash, BIT_NOISE3);
27
- hash ^= (hash >>> 8);
28
-
29
- return hash >>> 0;
30
- }
@@ -1,213 +0,0 @@
1
- /**
2
- * s_e: the largest component of a material's emissive factor, which the capture stores emissive
3
- * over. 0 for a material that emits nothing, or that has no emissive factor.
4
- *
5
- * @param {ShadeMaterial} material
6
- * @returns {number}
7
- */
8
- export function mesh_card_emissive_scale_of(material: ShadeMaterial): number;
9
- /**
10
- * Most pages a frame's capture may take: a workgroup a page, in one dispatch row.
11
- * @type {number}
12
- */
13
- export const MESH_CARD_CAPTURE_BUDGET_MAX: number;
14
- /**
15
- * Card sets (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §6.5): one (geometry, material) pair's capture of
16
- * its geometry's card layout, by card set id, the storage of which {@link GPUGeometrySDFManager}
17
- * keeps beside its fields and layouts.
18
- *
19
- * - A card set's pages are a run of tiles of the card atlas, one a page of the layout, in the
20
- * layout's order, from page_base. The layout's column tables are the geometry's, shared by every
21
- * card set of it, so a card set needs no page table of its own.
22
- * - The atlas is two `rgba8unorm` planes of 8×8 tiles ({@link GPUTileAtlas2D}): √(diffuse albedo)
23
- * and depth; emissive / s_e and 0.
24
- * - Its record (`MESH_CARD_SET_STRUCT`) is written when a capture starts.
25
- *
26
- * **Lifetime.** {@link acquire} makes a card set for a pair and {@link release} gives it back; the
27
- * caller keeps one per pair. A card set of an aliased geometry ({@link alias}) is its source's: it
28
- * captures the source's layout through the source's meshlets. A card set waits until its geometry's layout is placed
29
- * ({@link set_layout}), is then captured, and turns resident ({@link onResident}) on the frame its
30
- * last page is recorded: the capture's writes come before any later pass reads it. A layout that
31
- * goes ({@link drop_layout}) withdraws its card sets ({@link onWithdrawn}) back to waiting.
32
- *
33
- * **Capture** ({@link graph_capture}, once a frame) takes at most `budget` pages, first captures in
34
- * the order they were asked for, then recaptures in the order queued. A card set's pages may span
35
- * frames. {@link recapture} queues a resident card set again, which reads its last capture until the
36
- * new one is done; a card set whose capture is under way starts it again.
37
- *
38
- * **Modes** ({@link capture_mode}). A traced card set is a run of pages, a thread a texel. A
39
- * rastered one is taken whole: its cards are drawn into a region of a scratch, a cell a card, and its
40
- * pages scattered from there into the atlas; the frame's last one may take the budget past its end.
41
- */
42
- export class GPUMeshCardSets {
43
- /**
44
- * @param {GPUDevice} device
45
- */
46
- constructor(device: GPUDevice);
47
- /**
48
- * Sent with a card set id when its first capture is recorded in full.
49
- * @type {Signal<number>}
50
- */
51
- onResident: any;
52
- /**
53
- * Sent with a resident card set's id when its layout goes; it waits for the next.
54
- * @type {Signal<number>}
55
- */
56
- onWithdrawn: any;
57
- /**
58
- * Card sets given out.
59
- * @returns {number}
60
- */
61
- get count(): number;
62
- /**
63
- * @returns {number}
64
- */
65
- get resident_count(): number;
66
- /**
67
- * Recaptures asked of resident card sets, and of captures under way restarted.
68
- * @returns {number}
69
- */
70
- get recaptures_requested(): number;
71
- /**
72
- * Pages the captures have recorded.
73
- * @returns {number}
74
- */
75
- get pages_captured(): number;
76
- /**
77
- * Whether a frame's capture has anything to do: pages queued, or card sets turned resident with
78
- * nothing to capture, still to be announced.
79
- * @returns {boolean}
80
- */
81
- get has_pending_capture(): boolean;
82
- /**
83
- * Pages waiting for capture over every queue.
84
- * @returns {number}
85
- */
86
- get pages_queued(): number;
87
- /**
88
- * A change captures every card set again in the new mode: resident ones read their last capture
89
- * until it is done, and captures under way start again.
90
- *
91
- * @param {MeshCardCaptureMode} mode
92
- */
93
- set capture_mode(mode: number);
94
- /**
95
- * @returns {MeshCardCaptureMode}
96
- */
97
- get capture_mode(): number;
98
- /**
99
- * Whether readers may use the card set: captured at least once, and its layout still there.
100
- *
101
- * @param {number} id
102
- * @returns {boolean}
103
- */
104
- is_resident(id: number): boolean;
105
- /**
106
- * The card set's geometry id.
107
- *
108
- * @param {number} id
109
- * @returns {number}
110
- */
111
- geometry_of(id: number): number;
112
- /**
113
- * Every card set's record, by id. Replaced when it grows; take it each frame.
114
- * @returns {GPUBuffer}
115
- */
116
- get records(): GPUBuffer;
117
- /**
118
- * The card atlas: plane 0 holds √(diffuse albedo) and depth, plane 1 emissive / s_e.
119
- * @returns {GPUTileAtlas2D}
120
- */
121
- get atlas(): GPUTileAtlas2D;
122
- /**
123
- * A card set for a pair. The caller keeps one per pair.
124
- *
125
- * @param {number} geometry the geometry id the pair draws; an aliased one's card set captures its source's
126
- * layout ({@link alias})
127
- * @param {ShadeMaterial} material
128
- * @returns {number} card set id
129
- */
130
- acquire(geometry: number, material: ShadeMaterial): number;
131
- /**
132
- * @param {number} id
133
- */
134
- release(id: number): void;
135
- /**
136
- * The card set's material has changed (its version moved): capture it again. A resident card set
137
- * reads its last capture until the new one is done.
138
- *
139
- * @param {number} id
140
- */
141
- recapture(id: number): void;
142
- /**
143
- * A geometry's layout is placed, with `pages` pages: its card sets can be captured.
144
- *
145
- * @param {number} geometry
146
- * @param {number} pages
147
- * @param {number} side texels a side of the layout's largest card: its grid's longest axis in
148
- * voxels, plus one, the lattice having a point at either end
149
- */
150
- set_layout(geometry: number, pages: number, side: number): void;
151
- /**
152
- * A geometry's layout is gone: its card sets wait for the next.
153
- *
154
- * @param {number} geometry
155
- */
156
- drop_layout(geometry: number): void;
157
- /**
158
- * The geometry `clone` is drawn as `source` from here on: its card sets, and those acquired for it after, capture
159
- * `source`'s layout through `source`'s meshlets, the two being in one local space. A card set of `clone` waits
160
- * for `source`'s layout, as one acquired for `source` does.
161
- *
162
- * @param {number} clone
163
- * @param {number} source
164
- */
165
- alias(clone: number, source: number): void;
166
- /**
167
- * `clone` is no longer aliased: card sets acquired for it from here on capture its own layout. Those it has keep
168
- * capturing its source's until they are given back.
169
- *
170
- * @param {number} clone
171
- */
172
- unalias(clone: number): void;
173
- /**
174
- * Record the frame's capture: at most `budget` pages. Records nothing when nothing waits. Card
175
- * sets whose first capture this completes are resident from here, and {@link onResident} is sent
176
- * for each.
177
- *
178
- * @param {Object} options
179
- * @param {FrameGraph} options.graph
180
- * @param {number} options.budget pages captured at most, `card_capture_budget`
181
- * @param {number} options.arena graph handle of the arena, as the frame's bake left it
182
- * @param {GPUBuffer} options.headers
183
- * @param {GPUResidentMaterialContext} options.materials what the trace shades with: each traced
184
- * material is made resident, and the rows committed, before the trace is recorded
185
- * @param {GPUMaterialManager} options.material_contexts what the raster draws with: each
186
- * material's template and bind group
187
- * @param {Object} options.blas the geometry bindings `ray_query_blas_nearest` reads, whose
188
- * geometry and meshlet buffers the raster pulls vertices from
189
- */
190
- graph_capture({ graph, budget, arena, headers, materials, material_contexts, blas }: {
191
- graph: FrameGraph;
192
- budget: number;
193
- arena: number;
194
- headers: GPUBuffer;
195
- materials: GPUResidentMaterialContext;
196
- material_contexts: GPUMaterialManager;
197
- blas: any;
198
- }): void;
199
- /**
200
- * @returns {number} bytes
201
- */
202
- get gpu_memory_usage(): number;
203
- destroy(): void;
204
- #private;
205
- }
206
- export type FrameGraph = import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
207
- export type ShadeMaterial = import("../../../material/ShadeMaterial.js").ShadeMaterial;
208
- export type GPUResidentMaterialContext = import("../../../material/resident/GPUResidentMaterialContext.js").GPUResidentMaterialContext;
209
- export type GPUMaterialManager = import("../../../material/GPUMaterialManager.js").GPUMaterialManager;
210
- export type GPUMaterialContext = import("../../../material/GPUMaterialContext.js").GPUMaterialContext;
211
- export type Allocation = import("../../../../../core/binary/allocator/OffsetAllocator.js").Allocation;
212
- import { GPUTileAtlas2D } from "../../../texture/atlas/GPUTileAtlas2D.js";
213
- //# sourceMappingURL=GPUMeshCardSets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GPUMeshCardSets.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js"],"names":[],"mappings":"AAyEA;;;;;;GAMG;AACH,sDAHW,aAAa,GACX,MAAM,CAUlB;AApCD;;;GAGG;AACH,2CAFU,MAAM,CAEmF;AA0DnG;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IAiMI;;OAEG;IACH,+BAIC;IAjMD;;;OAGG;IACH,gBAA0B;IAE1B;;;OAGG;IACH,iBAA2B;IAyL3B;;;OAGG;IACH,oBAUC;IAED;;OAEG;IACH,6BAEC;IAED;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;;OAIG;IACH,mCAIC;IAED;;;OAGG;IACH,2BAcC;IASD;;;;;OAKG;IACH,+BAgBC;IA7BD;;OAEG;IACH,2BAEC;IA0BD;;;;;OAKG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,gBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,yBAIC;IAED;;;OAGG;IACH,4BAIC;IAED;;;;;;;OAOG;IACH,kBALW,MAAM,YAEN,aAAa,GACX,MAAM,CAiClB;IAED;;OAEG;IACH,YAFW,MAAM,QA2BhB;IAED;;;;;OAKG;IACH,cAFW,MAAM,QAqBhB;IAED;;;;;;;OAOG;IACH,qBALW,MAAM,SACN,MAAM,QACN,MAAM,QAqBhB;IAED;;;;OAIG;IACH,sBAFW,MAAM,QA+BhB;IAED;;;;;;;OAOG;IACH,aAHW,MAAM,UACN,MAAM,QAoChB;IAED;;;;;OAKG;IACH,eAFW,MAAM,QAIhB;IA0SD;;;;;;;;;;;;;;;;OAgBG;IACH;QAX+B,KAAK,EAAzB,UAAU;QACM,MAAM,EAAtB,MAAM;QACU,KAAK,EAArB,MAAM;QACa,OAAO;QACU,SAAS,EAA7C,0BAA0B;QAEE,iBAAiB,EAA7C,kBAAkB;QAEF,IAAI;aAsG9B;IAiTD;;OAEG;IACH,+BAuBC;IAED,gBAoBC;;CACJ;yBA95CY,OAAO,iEAAiE,EAAE,UAAU;4BACpF,OAAO,oCAAoC,EAAE,aAAa;yCAC1D,OAAO,0DAA0D,EAAE,0BAA0B;iCAC7F,OAAO,yCAAyC,EAAE,kBAAkB;iCACpE,OAAO,yCAAyC,EAAE,kBAAkB;yBACpE,OAAO,yDAAyD,EAAE,UAAU;+BAxB1D,0CAA0C"}