@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
@@ -1,3 +1,15 @@
1
+ /**
2
+ * The RGB SH3 that {@link chunk_brick4_sh3_color_pack} packed, times `scale`, and its band 0 alone, which is the
3
+ * first word. Every coefficient decodes as a multiple of band 0, so the scale is applied to band 0 alone.
4
+ *
5
+ * ```wgsl
6
+ * fn brick4_sh3_color_unpack(words: array<u32, 7>, scale: f32) -> array<vec3<f32>, 9>
7
+ * fn brick4_sh3_color_unpack_dc(words: array<u32, 7>) -> vec3<f32>
8
+ * ```
9
+ *
10
+ * @type {CodeChunk}
11
+ */
12
+ export const chunk_brick4_sh3_color_unpack: CodeChunk;
1
13
  export const chunk_brick4_sh3_color_decode: CodeChunk;
2
14
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
3
15
  //# sourceMappingURL=chunk_brick4_sh3_color_decode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_brick4_sh3_color_decode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js"],"names":[],"mappings":"AAOA,sDAyCC;0BA5CyB,6CAA6C"}
1
+ {"version":3,"file":"chunk_brick4_sh3_color_decode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js"],"names":[],"mappings":"AAQA;;;;;;;;;;GAUG;AACH,4CAFU,SAAS,CAiCjB;AAEF,sDAqBC;0BArEyB,6CAA6C"}
@@ -3,42 +3,44 @@ import {
3
3
  chunk_sh3_color_combine_channels
4
4
  } from "../../../../../shader/chunk/spherical_harmonics/chunk_sh3_color_combine_channels.js";
5
5
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
6
+ import { BRICK4_PROBE_ENCODED_SIZE } from "../../../BRICK4_PROBE_ENCODED_SIZE.js";
6
7
  import { chunk_sh3_uncompress } from "./chunk_sh3_uncompress.js";
7
8
 
8
- export const chunk_brick4_sh3_color_decode = CodeChunk.from(
9
+ /**
10
+ * The RGB SH3 that {@link chunk_brick4_sh3_color_pack} packed, times `scale`, and its band 0 alone, which is the
11
+ * first word. Every coefficient decodes as a multiple of band 0, so the scale is applied to band 0 alone.
12
+ *
13
+ * ```wgsl
14
+ * fn brick4_sh3_color_unpack(words: array<u32, 7>, scale: f32) -> array<vec3<f32>, 9>
15
+ * fn brick4_sh3_color_unpack_dc(words: array<u32, 7>) -> vec3<f32>
16
+ * ```
17
+ *
18
+ * @type {CodeChunk}
19
+ */
20
+ export const chunk_brick4_sh3_color_unpack = CodeChunk.from(
9
21
  //language=WGSL
10
22
  `
11
- fn brick4_sh3_color_decode(
12
- storage_buf: ptr<storage, array<u32>, read>,
13
- offset: u32
14
- ) -> array< vec3<f32>, 9 > {
23
+ fn brick4_sh3_color_unpack_dc(words: array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>) -> vec3<f32> {
24
+ return rgbe9995_decode(words[0]);
25
+ }
15
26
 
16
- let rgb_L0 = rgbe9995_decode((*storage_buf)[offset + 0u]);
27
+ fn brick4_sh3_color_unpack(words: array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>, scale: f32) -> array< vec3<f32>, 9 > {
28
+
29
+ let rgb_L0 = brick4_sh3_color_unpack_dc(words) * scale;
30
+
31
+ let compressed_r = vec2<u32>(words[1], words[2]);
32
+ let compressed_g = vec2<u32>(words[3], words[4]);
33
+ let compressed_b = vec2<u32>(words[5], words[6]);
17
34
 
18
- let compressed_r = vec2<u32>(
19
- (*storage_buf)[offset + 1u],
20
- (*storage_buf)[offset + 2u]
21
- );
22
-
23
- let compressed_g = vec2<u32>(
24
- (*storage_buf)[offset + 3u],
25
- (*storage_buf)[offset + 4u]
26
- );
27
-
28
- let compressed_b = vec2<u32>(
29
- (*storage_buf)[offset + 5u],
30
- (*storage_buf)[offset + 6u]
31
- );
32
-
33
35
  const nonZbound = 1.9365;
34
36
  const bits = 8;
35
37
  const sq = true;
36
38
  const isIrrad = false;
37
-
39
+
38
40
  let sh_r = sh3_uncompress(compressed_r, rgb_L0.x, bits, nonZbound, sq, isIrrad);
39
41
  let sh_g = sh3_uncompress(compressed_g, rgb_L0.y, bits, nonZbound, sq, isIrrad);
40
42
  let sh_b = sh3_uncompress(compressed_b, rgb_L0.z, bits, nonZbound, sq, isIrrad);
41
-
43
+
42
44
  return sh3_color_combine_channels(sh_r, sh_g, sh_b);
43
45
  }
44
46
  `, [
@@ -46,4 +48,27 @@ fn brick4_sh3_color_decode(
46
48
  chunk_sh3_color_combine_channels,
47
49
  chunk_sh3_uncompress,
48
50
  ]
49
- )
51
+ );
52
+
53
+ export const chunk_brick4_sh3_color_decode = CodeChunk.from(
54
+ //language=WGSL
55
+ `
56
+ fn brick4_sh3_color_decode(
57
+ storage_buf: ptr<storage, array<u32>, read>,
58
+ offset: u32
59
+ ) -> array< vec3<f32>, 9 > {
60
+
61
+ return brick4_sh3_color_unpack(array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>(
62
+ (*storage_buf)[offset + 0u],
63
+ (*storage_buf)[offset + 1u],
64
+ (*storage_buf)[offset + 2u],
65
+ (*storage_buf)[offset + 3u],
66
+ (*storage_buf)[offset + 4u],
67
+ (*storage_buf)[offset + 5u],
68
+ (*storage_buf)[offset + 6u],
69
+ ), 1.0);
70
+ }
71
+ `, [
72
+ chunk_brick4_sh3_color_unpack,
73
+ ]
74
+ )
@@ -1,3 +1,15 @@
1
+ /**
2
+ * An RGB SH3 of a non-negative function as {@link BRICK4_PROBE_ENCODED_SIZE} words: band 0 as RGB9E5 in the
3
+ * first, then each channel's bands 1 and 2 in two words, eight bits a coefficient over the band 0 the decoder
4
+ * reads back (`sh3_compress`).
5
+ *
6
+ * ```wgsl
7
+ * fn brick4_sh3_color_pack(sh: array<vec3<f32>, 9>) -> array<u32, 7>
8
+ * ```
9
+ *
10
+ * @type {CodeChunk}
11
+ */
12
+ export const chunk_brick4_sh3_color_pack: CodeChunk;
1
13
  export const chunk_brick4_sh3_color_encode: CodeChunk;
2
14
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
3
15
  //# sourceMappingURL=chunk_brick4_sh3_color_encode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_brick4_sh3_color_encode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js"],"names":[],"mappings":"AAQA,sDAgDC;0BAnDyB,6CAA6C"}
1
+ {"version":3,"file":"chunk_brick4_sh3_color_encode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,0CAFU,SAAS,CA8CjB;AAEF,sDAqBC;0BAlFyB,6CAA6C"}
@@ -4,18 +4,25 @@ import {
4
4
  chunk_sh3_color_split_channels
5
5
  } from "../../../../../shader/chunk/spherical_harmonics/chunk_sh3_color_split_channels.js";
6
6
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
7
+ import { BRICK4_PROBE_ENCODED_SIZE } from "../../../BRICK4_PROBE_ENCODED_SIZE.js";
7
8
  import { chunk_sh3_compress } from "./chunk_sh3_compress.js";
8
9
 
9
- export const chunk_brick4_sh3_color_encode = CodeChunk.from(
10
+ /**
11
+ * An RGB SH3 of a non-negative function as {@link BRICK4_PROBE_ENCODED_SIZE} words: band 0 as RGB9E5 in the
12
+ * first, then each channel's bands 1 and 2 in two words, eight bits a coefficient over the band 0 the decoder
13
+ * reads back (`sh3_compress`).
14
+ *
15
+ * ```wgsl
16
+ * fn brick4_sh3_color_pack(sh: array<vec3<f32>, 9>) -> array<u32, 7>
17
+ * ```
18
+ *
19
+ * @type {CodeChunk}
20
+ */
21
+ export const chunk_brick4_sh3_color_pack = CodeChunk.from(
10
22
  //language=WGSL
11
23
  `
12
- fn brick4_sh3_color_encode(
13
- out:ptr<storage, array<u32>,read_write>,
14
- out_offset: u32,
15
- sh: array<vec3<f32>,9>
16
- ) {
24
+ fn brick4_sh3_color_pack(sh: array<vec3<f32>,9>) -> array<u32, ${BRICK4_PROBE_ENCODED_SIZE}> {
17
25
  let encoded_dc = rgbe9995_encode(sh[0]);
18
- (*out)[out_offset + 0u] = encoded_dc;
19
26
 
20
27
  // Normalize L1/L2 against the DC the DECODER will see — the rgbe9995 round-trip quantizes the
21
28
  // DC (shared 5-bit exponent, so a dim channel next to a bright one moves a lot), and
@@ -28,7 +35,7 @@ fn brick4_sh3_color_encode(
28
35
  rgb_sh[0][0] = quantized_dc.x;
29
36
  rgb_sh[1][0] = quantized_dc.y;
30
37
  rgb_sh[2][0] = quantized_dc.z;
31
-
38
+
32
39
  // sqrt(15)/2
33
40
  const nonZbound = 1.9365;
34
41
  const bits = 8;
@@ -38,20 +45,44 @@ fn brick4_sh3_color_encode(
38
45
  let compressed_r = sh3_compress(rgb_sh[0], bits, nonZbound, sq, isIrrad);
39
46
  let compressed_g = sh3_compress(rgb_sh[1], bits, nonZbound, sq, isIrrad);
40
47
  let compressed_b = sh3_compress(rgb_sh[2], bits, nonZbound, sq, isIrrad);
41
-
42
- (*out)[out_offset + 1u] = compressed_r.x;
43
- (*out)[out_offset + 2u] = compressed_r.y;
44
-
45
- (*out)[out_offset + 3u] = compressed_g.x;
46
- (*out)[out_offset + 4u] = compressed_g.y;
47
-
48
- (*out)[out_offset + 5u] = compressed_b.x;
49
- (*out)[out_offset + 6u] = compressed_b.y;
48
+
49
+ return array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>(
50
+ encoded_dc,
51
+ compressed_r.x,
52
+ compressed_r.y,
53
+ compressed_g.x,
54
+ compressed_g.y,
55
+ compressed_b.x,
56
+ compressed_b.y,
57
+ );
50
58
  }
51
- `,[
59
+ `, [
52
60
  chunk_sh3_compress,
53
61
  chunk_rgbe9995_encode,
54
62
  chunk_rgbe9995_decode,
55
63
  chunk_sh3_color_split_channels,
56
64
  ]
57
- )
65
+ );
66
+
67
+ export const chunk_brick4_sh3_color_encode = CodeChunk.from(
68
+ //language=WGSL
69
+ `
70
+ fn brick4_sh3_color_encode(
71
+ out:ptr<storage, array<u32>,read_write>,
72
+ out_offset: u32,
73
+ sh: array<vec3<f32>,9>
74
+ ) {
75
+ let words = brick4_sh3_color_pack(sh);
76
+
77
+ (*out)[out_offset + 0u] = words[0];
78
+ (*out)[out_offset + 1u] = words[1];
79
+ (*out)[out_offset + 2u] = words[2];
80
+ (*out)[out_offset + 3u] = words[3];
81
+ (*out)[out_offset + 4u] = words[4];
82
+ (*out)[out_offset + 5u] = words[5];
83
+ (*out)[out_offset + 6u] = words[6];
84
+ }
85
+ `,[
86
+ chunk_brick4_sh3_color_pack,
87
+ ]
88
+ )
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_sh3_compress.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,iCAFU,SAAS,CAsDlB;0BA7DyB,6CAA6C"}
1
+ {"version":3,"file":"chunk_sh3_compress.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,iCAFU,SAAS,CA0DlB;0BAjEyB,6CAA6C"}
@@ -38,10 +38,14 @@ fn sh3_compress(
38
38
  let nz_factor = select(1.0, 0.25, isIrrad); // Same factor as qz for irradiance
39
39
  let nz = 1.0 / (safe_DC * nz_denom * nz_factor);
40
40
 
41
+ // The bounds hold over the DC the function was projected with. Over a DC the caller quantized down
42
+ // (an RGB9E5 band 0) a coefficient can pass its bound, and pack4's byte would overflow into the
43
+ // next coefficient's: held to the bound instead.
44
+
41
45
  // Pack the first set: sh[1]..sh[4] (Linear + 1st Quad) [cite: 130-132]
42
46
  // Scaled by their respective bounds: lc, lc, lc, nz
43
47
  let packed0 = pack4(
44
- vec4<f32>(sh[1], sh[2], sh[3], sh[4]) * vec4<f32>(lc, lc, lc, nz),
48
+ clamp(vec4<f32>(sh[1], sh[2], sh[3], sh[4]) * vec4<f32>(lc, lc, lc, nz), vec4<f32>(-1.0), vec4<f32>(1.0)),
45
49
  bv,
46
50
  sq
47
51
  );
@@ -49,7 +53,7 @@ fn sh3_compress(
49
53
  // Pack the second set: sh[5]..sh[8] (Remaining Quads) [cite: 135-137]
50
54
  // Scaled by bounds: nz, qz, nz, nz
51
55
  let packed1 = pack4(
52
- vec4<f32>(sh[5], sh[6], sh[7], sh[8]) * vec4<f32>(nz, qz, nz, nz),
56
+ clamp(vec4<f32>(sh[5], sh[6], sh[7], sh[8]) * vec4<f32>(nz, qz, nz, nz), vec4<f32>(-1.0), vec4<f32>(1.0)),
53
57
  bv,
54
58
  sq
55
59
  );
@@ -20,10 +20,11 @@
20
20
  * readers bind while there are no probes ({@link write_sampling_bindings}): seven objects of a few bytes,
21
21
  * made on the first ask and kept until {@link destroy}.
22
22
  *
23
- * Each frame it holds the geometry caches and card sets its scene's SDF world draws
24
- * ({@link ProbeClipmapSceneHolds}), trims the caches nothing holds, and records their bake and the
25
- * cards' capture (§6). Leaving the mode lets go of the holds and trims nothing, so the caches are
26
- * there when the mode comes back (D28); the card sets go, and are captured again.
23
+ * Each frame it holds the geometry caches and the Model Surface Caches its scene's SDF world draws
24
+ * ({@link ProbeClipmapSceneHolds}), trims the geometry caches nothing holds, and records their bakes
25
+ * (§6). The bricks' material is gathered from the surface caches as each brick is built
26
+ * ({@link GPUBrickMaterial}). Leaving the mode lets go of the holds and trims nothing, so the geometry
27
+ * caches are there when the mode comes back (D28); the surface caches go, and are baked again.
27
28
  *
28
29
  * Until its probes are traced (§13, S4) the mode lights as IBL.
29
30
  */
@@ -33,7 +34,7 @@ export class GPUProbeClipmapGI {
33
34
  * @param {ProbeClipmapSettings} settings
34
35
  * @returns {boolean} whether it is what the settings' world cache describes, in their frustum's windows
35
36
  */
36
- static "__#208@#world_cache_built_for"(world_cache: GPUProbeClipmap, settings: ProbeClipmapSettings): boolean;
37
+ static "__#210@#world_cache_built_for"(world_cache: GPUProbeClipmap, settings: ProbeClipmapSettings): boolean;
37
38
  /**
38
39
  * @param {GraphicsContext} graphics
39
40
  */
@@ -68,8 +69,11 @@ export class GPUProbeClipmapGI {
68
69
  * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
69
70
  * @param {number} [options.movers] the graph handle of the scene's mover list for the frame,
70
71
  * which the world's bricks are built again over
72
+ * @param {number} options.exposure the graph handle of the factor the display multiplies radiance by ahead of its
73
+ * tone curve, as the last frame was shown (`GPUCameraExposureManager#multiplier`): what the probes'
74
+ * estimators state their thresholds in
71
75
  */
72
- graph_update({ graph, view, settings, depth, normal, stbn, movers }: {
76
+ graph_update({ graph, view, settings, depth, normal, stbn, movers, exposure }: {
73
77
  graph: FrameGraph;
74
78
  view: GPUViewContext;
75
79
  settings: ProbeClipmapSettings;
@@ -77,6 +81,7 @@ export class GPUProbeClipmapGI {
77
81
  normal: number;
78
82
  stbn: any;
79
83
  movers?: number;
84
+ exposure: number;
80
85
  }): void;
81
86
  /**
82
87
  * Whether the probes are there to read: the mode has run a frame and not been left since.
@@ -98,18 +103,25 @@ export class GPUProbeClipmapGI {
98
103
  * The debug view the settings ask for, in place of the frame's colour. Record it after
99
104
  * {@link graph_update} in the same frame.
100
105
  *
106
+ * The indirect views draw the fused indirect pass (`shader_probe_clipmap_indirect_lighting`) with one lobe
107
+ * alone, from `indirect`, the inputs the frame's own fused pass takes, to which they add the probes' sampling
108
+ * bindings ({@link write_sampling_bindings}).
109
+ *
101
110
  * @param {Object} options
102
111
  * @param {FrameGraph} options.graph
103
112
  * @param {GPUViewContext} options.view
104
113
  * @param {ProbeClipmapSettings} options.settings
105
114
  * @param {number[]} options.resolution
106
- * @returns {number} graph handle of an `rgba8unorm` image
115
+ * @param {Object} options.indirect the fused indirect pass's inputs this frame, without the probes' bindings
116
+ * @returns {number} graph handle of the image: `rgba8unorm` for the geometry views, `rgba16float` for the
117
+ * indirect ones
107
118
  */
108
- graph_debug_view({ graph, view, settings, resolution }: {
119
+ graph_debug_view({ graph, view, settings, resolution, indirect }: {
109
120
  graph: FrameGraph;
110
121
  view: GPUViewContext;
111
122
  settings: ProbeClipmapSettings;
112
123
  resolution: number[];
124
+ indirect: any;
113
125
  }): number;
114
126
  /**
115
127
  * Have a plugin write the world's bricks too, after the mesh provider and every provider added
@@ -1 +1 @@
1
- {"version":3,"file":"GPUProbeClipmapGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAoSI;;;;OAIG;IACH,oDAJW,eAAe,YACf,oBAAoB,GAClB,OAAO,CAUnB;IArOD;;OAEG;IACH,sBAFW,eAAe,EAMzB;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;;;;;;;;;;;;OAcG;IACH;QAT+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACJ,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACK,IAAI;QACE,MAAM,GAAvB,MAAM;aAiIhB;IAqDD;;;OAGG;IACH,0BAEC;IAED;;;;;;;;;OASG;IACH,4CAUC;IAwDD;;;;;;;;;;OAUG;IACH;QAN+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACF,UAAU,EAA5B,MAAM,EAAE;QACN,MAAM,CAmBlB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAgED;;;OAGG;IACH,gBAuBC;IAED,gBAcC;;CACJ;yBA5kBY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,0BAA0B,EAAE,eAAe;6BAClD,OAAO,8BAA8B,EAAE,cAAc;mCACrD,OAAO,2BAA2B,EAAE,oBAAoB;4BACxD,OAAO,4BAA4B,EAAE,aAAa;gCAnB/B,4BAA4B;gCAQ5B,4BAA4B;uCAIrB,6BAA6B"}
1
+ {"version":3,"file":"GPUProbeClipmapGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js"],"names":[],"mappings":"AA8BA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IAwTI;;;;OAIG;IACH,oDAJW,eAAe,YACf,oBAAoB,GAClB,OAAO,CAUnB;IA5OD;;OAEG;IACH,sBAFW,eAAe,EAMzB;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH;QAZ+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACJ,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACK,IAAI;QACE,MAAM,GAAvB,MAAM;QAEU,QAAQ,EAAxB,MAAM;aAsIhB;IAqDD;;;OAGG;IACH,0BAEC;IAED;;;;;;;;;OASG;IACH,4CAUC;IAwDD;;;;;;;;;;;;;;;;OAgBG;IACH;QAR+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACF,UAAU,EAA5B,MAAM,EAAE;QACQ,QAAQ;QACtB,MAAM,CA8ClB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAqED;;;OAGG;IACH,gBA2BC;IAED,gBAcC;;CACJ;yBA1oBY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,0BAA0B,EAAE,eAAe;6BAClD,OAAO,8BAA8B,EAAE,cAAc;mCACrD,OAAO,2BAA2B,EAAE,oBAAoB;4BACxD,OAAO,4BAA4B,EAAE,aAAa;gCA1B/B,4BAA4B;gCAa5B,4BAA4B;uCAKrB,6BAA6B"}
@@ -10,16 +10,23 @@ import { graph_import_buffer } from "../../shader/graph/graph_import_buffer.js";
10
10
  import { GPUBrickClipmap } from "./brick/GPUBrickClipmap.js";
11
11
  import { MeshSDFBrickProvider } from "./brick/mesh/MeshSDFBrickProvider.js";
12
12
  import { graph_probe_clipmap_debug_brick_clipmap } from "./debug/graph_probe_clipmap_debug_brick_clipmap.js";
13
- import { graph_probe_clipmap_debug_mesh_cards } from "./debug/graph_probe_clipmap_debug_mesh_cards.js";
13
+ import { graph_probe_clipmap_debug_indirect } from "./debug/graph_probe_clipmap_debug_indirect.js";
14
+ import {
15
+ graph_probe_clipmap_debug_brick_material,
16
+ ProbeClipmapDebugBrickMaterialChannel
17
+ } from "./debug/graph_probe_clipmap_debug_brick_material.js";
14
18
  import { graph_probe_clipmap_debug_mesh_sdf } from "./debug/graph_probe_clipmap_debug_mesh_sdf.js";
19
+ import { graph_probe_clipmap_debug_mesh_surfaces } from "./debug/graph_probe_clipmap_debug_mesh_surfaces.js";
15
20
  import { ProbeClipmapDebugView } from "./debug/ProbeClipmapDebugView.js";
16
21
  import { PROBE_RECORD_STRUCT } from "./probe/chunk_probe_clipmap.js";
17
22
  import { PROBE_SAMPLING_STRUCT } from "./probe/chunk_probe_clipmap_pick.js";
18
23
  import { GPUProbeClipmap } from "./probe/GPUProbeClipmap.js";
19
24
  import { PROBE_DEPTH_TEXEL_RAYS, PROBE_RAY_CASCADE_MASK, PROBE_TEXEL_RAYS } from "./probe/PROBE_CLIPMAP.js";
20
25
  import { ProbeClipmapHitWants } from "./probe/ProbeClipmapHitWants.js";
26
+ import { ProbeClipmapIndirectLobe } from "./probe/ProbeClipmapIndirectLobe.js";
21
27
  import { ProbeClipmapScreenWants } from "./probe/ProbeClipmapScreenWants.js";
22
28
  import { ProbeClipmapSceneHolds } from "./ProbeClipmapSceneHolds.js";
29
+ import { GPUBrickMaterial } from "./material/GPUBrickMaterial.js";
23
30
 
24
31
  /**
25
32
  * @typedef {import("../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
@@ -44,10 +51,11 @@ import { ProbeClipmapSceneHolds } from "./ProbeClipmapSceneHolds.js";
44
51
  * readers bind while there are no probes ({@link write_sampling_bindings}): seven objects of a few bytes,
45
52
  * made on the first ask and kept until {@link destroy}.
46
53
  *
47
- * Each frame it holds the geometry caches and card sets its scene's SDF world draws
48
- * ({@link ProbeClipmapSceneHolds}), trims the caches nothing holds, and records their bake and the
49
- * cards' capture (§6). Leaving the mode lets go of the holds and trims nothing, so the caches are
50
- * there when the mode comes back (D28); the card sets go, and are captured again.
54
+ * Each frame it holds the geometry caches and the Model Surface Caches its scene's SDF world draws
55
+ * ({@link ProbeClipmapSceneHolds}), trims the geometry caches nothing holds, and records their bakes
56
+ * (§6). The bricks' material is gathered from the surface caches as each brick is built
57
+ * ({@link GPUBrickMaterial}). Leaving the mode lets go of the holds and trims nothing, so the geometry
58
+ * caches are there when the mode comes back (D28); the surface caches go, and are baked again.
51
59
  *
52
60
  * Until its probes are traced (§13, S4) the mode lights as IBL.
53
61
  */
@@ -127,6 +135,19 @@ export class GPUProbeClipmapGI {
127
135
  */
128
136
  #placeholders = undefined;
129
137
 
138
+ /**
139
+ * The bricks' surface material, which the probes' hits read: made with the clipmaps and given back
140
+ * with them.
141
+ * @type {GPUBrickMaterial|undefined}
142
+ */
143
+ #material = undefined;
144
+
145
+ /**
146
+ * What the frame's build writes after its store: the material.
147
+ * @type {GPUBrickMaterial[]}
148
+ */
149
+ #material_writers = [];
150
+
130
151
  /**
131
152
  * @param {GraphicsContext} graphics
132
153
  */
@@ -178,13 +199,17 @@ export class GPUProbeClipmapGI {
178
199
  * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
179
200
  * @param {number} [options.movers] the graph handle of the scene's mover list for the frame,
180
201
  * which the world's bricks are built again over
202
+ * @param {number} options.exposure the graph handle of the factor the display multiplies radiance by ahead of its
203
+ * tone curve, as the last frame was shown (`GPUCameraExposureManager#multiplier`): what the probes'
204
+ * estimators state their thresholds in
181
205
  */
182
- graph_update({ graph, view, settings, depth, normal, stbn, movers = -1 }) {
206
+ graph_update({ graph, view, settings, depth, normal, stbn, movers = -1, exposure }) {
183
207
  assert.defined(graph, 'graph');
184
208
  assert.defined(view, 'view');
185
209
  assert.defined(settings, 'settings');
186
210
  assert.isNonNegativeInteger(depth, 'depth');
187
211
  assert.isNonNegativeInteger(normal, 'normal');
212
+ assert.isNonNegativeInteger(exposure, 'exposure');
188
213
  assert.notOk(this.#destroyed, 'destroyed');
189
214
 
190
215
  // the relations between fields, checked here because each setter sees only its own field
@@ -222,18 +247,18 @@ export class GPUProbeClipmapGI {
222
247
  const sdf = scene.geometries.sdf;
223
248
  sdf.configure(settings.mesh_sdf_voxel_size, settings.mesh_sdf_max_bricks);
224
249
  sdf.trim();
225
- sdf.cards.capture_mode = settings.card_capture_mode;
226
250
  sdf.graph_bake({
227
251
  graph,
228
252
  budget: settings.mesh_sdf_bake_budget,
229
- capture_budget: settings.card_capture_budget,
253
+ surface_budget: settings.surface_bake_budget,
230
254
  materials: this.#graphics.materials_resident,
231
- material_contexts: this.#graphics.materials,
232
255
  });
233
256
 
234
- // the card sets the capture made resident, for this frame's readers
257
+ // the surface caches the bake made resident, for this frame's readers
235
258
  this.#holds.flush();
236
259
 
260
+ this.#material.surface_rows = this.#holds.surface_rows_buffer;
261
+
237
262
  // the world's bricks around the view, every provider merged in order, built again where the
238
263
  // movers went and where a row's field turned resident or its SDF membership changed
239
264
  this.#brick_clipmap.invalidate_rows(this.#holds.invalidated);
@@ -248,10 +273,13 @@ export class GPUProbeClipmapGI {
248
273
  z: transform[14],
249
274
  budget: settings.brick_build_budget,
250
275
  providers: this.#providers,
276
+ material_writers: this.#material_writers,
251
277
  scene,
252
278
  movers,
253
279
  });
254
280
 
281
+ const material = this.#material;
282
+
255
283
  const clusters = this.#graph_clusters(graph, scene);
256
284
 
257
285
  // the probes around the same anchor, updated through the bricks (§8): the frustum's windows, and the
@@ -269,14 +297,13 @@ export class GPUProbeClipmapGI {
269
297
  world.graph_update({
270
298
  graph,
271
299
  wants: this.#hit_wants,
272
- stbn,
273
300
  response_frames: settings.response_frames,
274
301
  ray_budget: settings.world_ray_budget,
275
302
  rays_per_probe: settings.world_cache_rays_per_probe,
276
303
  brick_clipmap: this.#brick_clipmap,
277
304
  bricks,
278
305
  scene,
279
- card_rows: this.#holds.rows_buffer,
306
+ material,
280
307
  // a world cache probe re-samples nothing: its radiance has no skirt for the history's taps, and the
281
308
  // rays are the frustum's switch
282
309
  history_resampling: false,
@@ -284,6 +311,7 @@ export class GPUProbeClipmapGI {
284
311
  clusters,
285
312
  bounce_first: frustum,
286
313
  bounce_fallback: world,
314
+ exposure,
287
315
  });
288
316
 
289
317
  this.#screen_wants.set({ depth, normal, camera: view.camera.buffer, stbn, resolution: view.resolution });
@@ -291,19 +319,19 @@ export class GPUProbeClipmapGI {
291
319
  frustum.graph_update({
292
320
  graph,
293
321
  wants: this.#screen_wants,
294
- stbn,
295
322
  response_frames: settings.response_frames,
296
323
  ray_budget: settings.frustum_ray_budget,
297
324
  rays_per_probe: settings.rays_per_probe,
298
325
  brick_clipmap: this.#brick_clipmap,
299
326
  bricks,
300
327
  scene,
301
- card_rows: this.#holds.rows_buffer,
328
+ material,
302
329
  history_resampling: settings.history_resampling,
303
330
  ray_resampling: settings.ray_resampling,
304
331
  clusters,
305
332
  bounce_first: frustum,
306
333
  bounce_fallback: world,
334
+ exposure,
307
335
  });
308
336
  }
309
337
 
@@ -446,27 +474,59 @@ export class GPUProbeClipmapGI {
446
474
  * The debug view the settings ask for, in place of the frame's colour. Record it after
447
475
  * {@link graph_update} in the same frame.
448
476
  *
477
+ * The indirect views draw the fused indirect pass (`shader_probe_clipmap_indirect_lighting`) with one lobe
478
+ * alone, from `indirect`, the inputs the frame's own fused pass takes, to which they add the probes' sampling
479
+ * bindings ({@link write_sampling_bindings}).
480
+ *
449
481
  * @param {Object} options
450
482
  * @param {FrameGraph} options.graph
451
483
  * @param {GPUViewContext} options.view
452
484
  * @param {ProbeClipmapSettings} options.settings
453
485
  * @param {number[]} options.resolution
454
- * @returns {number} graph handle of an `rgba8unorm` image
486
+ * @param {Object} options.indirect the fused indirect pass's inputs this frame, without the probes' bindings
487
+ * @returns {number} graph handle of the image: `rgba8unorm` for the geometry views, `rgba16float` for the
488
+ * indirect ones
455
489
  */
456
- graph_debug_view({ graph, view, settings, resolution }) {
490
+ graph_debug_view({ graph, view, settings, resolution, indirect }) {
457
491
  switch (settings.debug_view) {
458
492
  case ProbeClipmapDebugView.MeshSDF:
459
493
  return graph_probe_clipmap_debug_mesh_sdf({ graph, view, resolution });
460
- case ProbeClipmapDebugView.MeshCards:
461
- return graph_probe_clipmap_debug_mesh_cards({
494
+ case ProbeClipmapDebugView.MeshSurfaces:
495
+ return graph_probe_clipmap_debug_mesh_surfaces({
462
496
  graph,
463
497
  view,
464
498
  resolution,
465
- cards: view.scene.geometries.sdf.cards,
466
- rows: this.#holds.rows_buffer,
499
+ surfaces: view.scene.geometries.sdf.surfaces,
500
+ rows: this.#holds.surface_rows_buffer,
467
501
  });
468
502
  case ProbeClipmapDebugView.BrickClipmap:
469
503
  return graph_probe_clipmap_debug_brick_clipmap({ graph, view, resolution, brick_clipmap: this.#brick_clipmap });
504
+ case ProbeClipmapDebugView.IndirectDiffuse:
505
+ return graph_probe_clipmap_debug_indirect({
506
+ graph,
507
+ lobe: ProbeClipmapIndirectLobe.Diffuse,
508
+ inputs: this.write_sampling_bindings(indirect),
509
+ resolution,
510
+ });
511
+ case ProbeClipmapDebugView.IndirectSpecular:
512
+ return graph_probe_clipmap_debug_indirect({
513
+ graph,
514
+ lobe: ProbeClipmapIndirectLobe.Specular,
515
+ inputs: this.write_sampling_bindings(indirect),
516
+ resolution,
517
+ });
518
+ case ProbeClipmapDebugView.BrickMaterial:
519
+ case ProbeClipmapDebugView.BrickMetalRough:
520
+ return graph_probe_clipmap_debug_brick_material({
521
+ graph,
522
+ view,
523
+ resolution,
524
+ brick_clipmap: this.#brick_clipmap,
525
+ material: this.#material,
526
+ channel: settings.debug_view === ProbeClipmapDebugView.BrickMaterial
527
+ ? ProbeClipmapDebugBrickMaterialChannel.Albedo
528
+ : ProbeClipmapDebugBrickMaterialChannel.MetalRough,
529
+ });
470
530
  default:
471
531
  throw new Error(`no debug view to record for ${settings.debug_view}`);
472
532
  }
@@ -532,6 +592,11 @@ export class GPUProbeClipmapGI {
532
592
  voxel_size: settings.brick_voxel_size,
533
593
  });
534
594
 
595
+ this.#material = new GPUBrickMaterial(device, {
596
+ capacity: this.#brick_clipmap.capacity,
597
+ });
598
+ this.#material_writers.push(this.#material);
599
+
535
600
  // the frustum's slots start at 2·N²·C, a power of two: a visible surface crosses each cascade as a shell a
536
601
  // cell thick, doubled for the cage. The world cache's start there too: the surfaces that want it are the
537
602
  // frustum's hits', not the screen's, so its own lattice says nothing of how many there are
@@ -584,6 +649,10 @@ export class GPUProbeClipmapGI {
584
649
  this.#probe_clipmap.destroy();
585
650
  this.#world_cache.destroy();
586
651
  this.#mesh_provider.destroy();
652
+ this.#material.destroy();
653
+
654
+ this.#material = undefined;
655
+ this.#material_writers.length = 0;
587
656
 
588
657
  this.#mesh_provider = undefined;
589
658
  this.#order_providers();