@woosh/meep-engine 3.61.2 → 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 (389) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/package.json +1 -1
  3. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  4. package/src/shade/playground/probe_clipmap/README.md +3 -4
  5. package/src/shade/playground/probe_clipmap/index.html +5 -13
  6. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  7. package/src/shade/playground/probe_clipmap/main.js +0 -5
  8. package/src/shade/playground/probe_clipmap_box/README.md +1 -1
  9. package/src/shade/playground/probe_clipmap_box/index.html +1 -1
  10. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  11. package/src/shade/renderer/Renderer.js +50 -11
  12. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  13. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  14. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
  15. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  16. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  17. package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts +10 -0
  18. package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts.map +1 -0
  19. package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.js +54 -0
  20. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +85 -36
  21. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  22. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +813 -412
  23. package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +7 -0
  24. package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts.map +1 -1
  25. package/src/shade/renderer/geometry/sdf/MESH_SDF.js +8 -0
  26. package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts +14 -0
  27. package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts.map +1 -0
  28. package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.js +35 -0
  29. package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.d.ts.map +1 -1
  30. package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.js +0 -4
  31. package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts +55 -10
  32. package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts.map +1 -1
  33. package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.js +86 -16
  34. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts +2 -2
  35. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts.map +1 -1
  36. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.js +28 -2
  37. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts +54 -0
  38. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts.map +1 -0
  39. package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.js +146 -0
  40. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
  41. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts.map +1 -1
  42. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +2 -1
  43. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts +18 -0
  44. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts.map +1 -0
  45. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.js +66 -0
  46. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts +17 -0
  47. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts.map +1 -0
  48. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.js +66 -0
  49. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +5 -3
  50. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts.map +1 -1
  51. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +15 -14
  52. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts +2 -1
  53. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts.map +1 -1
  54. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.js +12 -3
  55. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts +21 -0
  56. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts.map +1 -0
  57. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.js +84 -0
  58. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts +53 -0
  59. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts.map +1 -0
  60. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.js +343 -0
  61. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts +3 -3
  62. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts.map +1 -1
  63. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.js +9 -5
  64. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts +2 -2
  65. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts.map +1 -1
  66. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.js +3 -2
  67. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts +69 -0
  68. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts.map +1 -0
  69. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.js +294 -0
  70. package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts +16 -0
  71. package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts.map +1 -0
  72. package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.js +36 -0
  73. package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts +126 -0
  74. package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts.map +1 -0
  75. package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.js +148 -0
  76. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts +10 -0
  77. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts.map +1 -0
  78. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.js +140 -0
  79. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts +8 -0
  80. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts.map +1 -0
  81. package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.js +76 -0
  82. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts +9 -0
  83. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts.map +1 -1
  84. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.js +23 -0
  85. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts +13 -0
  86. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts.map +1 -0
  87. package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.js +23 -0
  88. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +262 -0
  89. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -0
  90. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +1819 -0
  91. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +118 -0
  92. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts.map +1 -0
  93. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +204 -0
  94. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts +66 -0
  95. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts.map +1 -0
  96. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.js +103 -0
  97. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts +19 -0
  98. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts.map +1 -0
  99. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.js +23 -0
  100. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts +15 -0
  101. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts.map +1 -0
  102. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.js +70 -0
  103. package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts +13 -0
  104. package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts.map +1 -0
  105. package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.js +35 -0
  106. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts +32 -0
  107. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts.map +1 -0
  108. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.js +111 -0
  109. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts +17 -0
  110. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts.map +1 -0
  111. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.js +49 -0
  112. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts +13 -0
  113. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts.map +1 -0
  114. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.js +35 -0
  115. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts +24 -0
  116. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts.map +1 -0
  117. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.js +169 -0
  118. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts +19 -0
  119. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts.map +1 -0
  120. package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.js +49 -0
  121. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts +19 -0
  122. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts.map +1 -0
  123. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.js +67 -0
  124. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts +78 -0
  125. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts.map +1 -0
  126. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.js +320 -0
  127. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts +15 -0
  128. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts.map +1 -0
  129. package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.js +48 -0
  130. package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts +51 -0
  131. package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts.map +1 -0
  132. package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.js +109 -0
  133. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts +11 -0
  134. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts.map +1 -0
  135. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.js +51 -0
  136. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts +26 -0
  137. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts.map +1 -0
  138. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.js +453 -0
  139. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts +12 -0
  140. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts.map +1 -0
  141. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.js +99 -0
  142. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts +22 -0
  143. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts.map +1 -0
  144. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.js +140 -0
  145. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts +32 -0
  146. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts.map +1 -0
  147. package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.js +261 -0
  148. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +2 -2
  149. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +2 -2
  150. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +6 -6
  151. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +7 -7
  152. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +15 -7
  153. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  154. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +82 -17
  155. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +26 -19
  156. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  157. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +226 -148
  158. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +25 -52
  159. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  160. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +29 -69
  161. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +19 -16
  162. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts.map +1 -1
  163. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js +24 -21
  164. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +46 -22
  165. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  166. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +49 -36
  167. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts +3 -2
  168. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map +1 -1
  169. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js +7 -6
  170. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +8 -22
  171. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  172. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +15 -51
  173. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +1 -6
  174. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -1
  175. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +6 -13
  176. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -1
  177. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +0 -2
  178. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts +4 -4
  179. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts.map +1 -1
  180. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +9 -34
  181. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts +4 -6
  182. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts.map +1 -1
  183. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +15 -39
  184. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.d.ts +1 -1
  185. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.js +1 -1
  186. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts +1 -2
  187. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts.map +1 -1
  188. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js +2 -6
  189. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts +2 -2
  190. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts.map +1 -1
  191. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js +5 -2
  192. package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.d.ts +5 -1
  193. package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.js +16 -2
  194. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts +45 -0
  195. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts.map +1 -0
  196. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.js +208 -0
  197. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts +24 -0
  198. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts.map +1 -0
  199. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.js +40 -0
  200. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts +34 -0
  201. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts.map +1 -0
  202. 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
  203. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +61 -0
  204. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -0
  205. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +193 -0
  206. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts +67 -0
  207. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts.map +1 -0
  208. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.js +142 -0
  209. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts +32 -0
  210. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts.map +1 -0
  211. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.js +70 -0
  212. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts +30 -0
  213. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts.map +1 -0
  214. package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.js +71 -0
  215. package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts +26 -0
  216. package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts.map +1 -0
  217. package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.js +176 -0
  218. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +18 -9
  219. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  220. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +63 -44
  221. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +21 -1
  222. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  223. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +24 -1
  224. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts +10 -0
  225. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts.map +1 -0
  226. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.js +11 -0
  227. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts +11 -0
  228. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts.map +1 -0
  229. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.js +15 -0
  230. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +44 -7
  231. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  232. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +88 -11
  233. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts +43 -0
  234. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts.map +1 -0
  235. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.js +138 -0
  236. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts +21 -0
  237. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts.map +1 -0
  238. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.js +49 -0
  239. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +2 -0
  240. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -1
  241. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +10 -4
  242. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts +22 -0
  243. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts.map +1 -0
  244. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.js +50 -0
  245. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +4 -4
  246. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts.map +1 -1
  247. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +8 -8
  248. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +3 -3
  249. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +5 -5
  250. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts +2 -0
  251. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
  252. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +5 -1
  253. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +1 -1
  254. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +2 -2
  255. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +7 -4
  256. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  257. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +30 -26
  258. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +6 -5
  259. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  260. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +22 -16
  261. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts.map +1 -1
  262. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js +6 -2
  263. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +2 -2
  264. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +6 -6
  265. package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts +14 -0
  266. package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts.map +1 -0
  267. package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js +22 -0
  268. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts +37 -0
  269. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts.map +1 -0
  270. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.js +122 -0
  271. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.d.ts.map +1 -1
  272. package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.js +1 -11
  273. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts +8 -0
  274. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts.map +1 -1
  275. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js +6 -4
  276. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  277. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +1 -1
  278. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
  279. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +2 -18
  280. package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts +17 -0
  281. package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts.map +1 -0
  282. package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.js +16 -0
  283. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts +1 -1
  284. package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.js +1 -1
  285. package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.js +1 -1
  286. package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts +20 -0
  287. package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts.map +1 -0
  288. package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.js +65 -0
  289. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  290. package/src/shade/renderer/scene/GPUSceneContext.d.ts +1 -1
  291. package/src/shade/renderer/scene/GPUSceneContext.js +1 -1
  292. package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts +12 -0
  293. package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts.map +1 -0
  294. package/src/shade/renderer/shader/chunk/material/albedo_compress.js +26 -0
  295. package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts +16 -0
  296. package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts.map +1 -0
  297. package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.js +22 -0
  298. package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts +15 -0
  299. package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts.map +1 -0
  300. package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.js +23 -0
  301. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts +16 -0
  302. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts.map +1 -0
  303. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.js +25 -0
  304. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts +25 -0
  305. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts.map +1 -0
  306. package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.js +36 -0
  307. package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts +11 -0
  308. package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts.map +1 -0
  309. package/src/shade/renderer/shader/chunk/material/metal_rough_compress.js +38 -0
  310. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts +20 -0
  311. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts.map +1 -0
  312. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.js +35 -0
  313. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts +28 -0
  314. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts.map +1 -0
  315. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.js +79 -0
  316. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts +25 -0
  317. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts.map +1 -0
  318. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.js +89 -0
  319. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts +31 -0
  320. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts.map +1 -0
  321. package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.js +66 -0
  322. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.d.ts.map +1 -1
  323. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.js +2 -0
  324. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts +17 -0
  325. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts.map +1 -0
  326. package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.js +34 -0
  327. package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts +18 -0
  328. package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts.map +1 -1
  329. package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.js +31 -23
  330. package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
  331. package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +5 -6
  332. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  333. package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
  334. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +0 -213
  335. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +0 -1
  336. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +0 -1468
  337. package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts +0 -82
  338. package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts.map +0 -1
  339. package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.js +0 -127
  340. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts +0 -24
  341. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts.map +0 -1
  342. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.js +0 -29
  343. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts +0 -12
  344. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts.map +0 -1
  345. package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.js +0 -31
  346. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts +0 -11
  347. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts.map +0 -1
  348. package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.js +0 -21
  349. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts +0 -29
  350. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts.map +0 -1
  351. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.js +0 -179
  352. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts +0 -17
  353. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts.map +0 -1
  354. package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.js +0 -107
  355. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts +0 -65
  356. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts.map +0 -1
  357. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +0 -376
  358. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts +0 -40
  359. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts.map +0 -1
  360. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.js +0 -301
  361. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts +0 -19
  362. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts.map +0 -1
  363. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.js +0 -61
  364. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +0 -18
  365. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts.map +0 -1
  366. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +0 -102
  367. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts +0 -15
  368. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts.map +0 -1
  369. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.js +0 -65
  370. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts +0 -22
  371. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts.map +0 -1
  372. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.js +0 -136
  373. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts +0 -20
  374. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts.map +0 -1
  375. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.js +0 -104
  376. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts +0 -20
  377. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts.map +0 -1
  378. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.js +0 -80
  379. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts +0 -18
  380. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts.map +0 -1
  381. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.js +0 -113
  382. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts +0 -30
  383. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts.map +0 -1
  384. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.js +0 -146
  385. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts +0 -34
  386. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts.map +0 -1
  387. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts +0 -31
  388. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts.map +0 -1
  389. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.js +0 -82
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Rays a listed texel is sampled with, a thread each: a Fibonacci set over the hemisphere facing its
3
+ * surface, turned about the surface's normal by a random angle for each texel, each one's first opaque
4
+ * hit under the texel's tent a sample.
5
+ * @type {number}
6
+ */
7
+ export const MESH_SURFACE_TEXEL_RAYS: number;
8
+ /**
9
+ * How far out from a texel's surface point its rays leave, in voxels of its level: where a ray of
10
+ * the GI coming in over the surface stands on it, UE's half voxel (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md
11
+ * §7.9), so that the texel holds the surface as such rays meet it.
12
+ * @type {number}
13
+ */
14
+ export const MESH_SURFACE_LIFT_VOXELS: number;
15
+ /**
16
+ * Transparent hits a texel's ray steps past, at most, before it gives no sample.
17
+ * @type {number}
18
+ */
19
+ export const MESH_SURFACE_ALPHA_CONTINUATIONS: number;
20
+ /** Counter: texels the list pass listed, appended to atomically. */
21
+ export const MESH_SURFACE_COUNTER_LISTED: 0;
22
+ /** Counter: texels the trace takes, the listed ones the list holds; the command writes it. */
23
+ export const MESH_SURFACE_COUNTER_TRACED: 1;
24
+ /** Words of the counter. */
25
+ export const MESH_SURFACE_COUNTER_WORDS: 2;
26
+ /** Words of the trace's command: the three workgroup counts. */
27
+ export const MESH_SURFACE_COMMAND_WORDS: 3;
28
+ /**
29
+ * Words of a texel's staging: its albedo, metalness and roughness, and emissive codes, the albedo's 0
30
+ * where the trace found no surface (the codec never writes 0).
31
+ * @type {number}
32
+ */
33
+ export const MESH_SURFACE_STAGING_WORDS: number;
34
+ /**
35
+ * Words of a survey's result: the ticket it was asked under, and its field's count of blocks.
36
+ * @type {number}
37
+ */
38
+ export const MESH_SURFACE_SURVEY_RESULT_WORDS: number;
39
+ /**
40
+ * A texel the trace samples, as the list pass resolved it: whose triangles and material, which brick
41
+ * and texel of the field, and its staging slot, the list pass's thread.
42
+ * @type {WebGPUStruct}
43
+ */
44
+ export const MESH_SURFACE_TEXEL_STRUCT: WebGPUStruct;
45
+ /**
46
+ * @type {WebGPUStruct}
47
+ */
48
+ export const MESH_SURFACE_LIST_SETTINGS: WebGPUStruct;
49
+ /**
50
+ * @type {WebGPUStruct}
51
+ */
52
+ export const MESH_SURFACE_COMMAND_SETTINGS: WebGPUStruct;
53
+ /**
54
+ * @type {WebGPUStruct}
55
+ */
56
+ export const MESH_SURFACE_ENCODE_SETTINGS: WebGPUStruct;
57
+ /**
58
+ * @type {WebGPUStruct}
59
+ */
60
+ export const MESH_SURFACE_SURVEY_SETTINGS: WebGPUStruct;
61
+ /**
62
+ * A pass's runs, a `vec4<u32>` each, in order of their first thread, the first at 0. To the bake's
63
+ * passes: its first thread, the cache, its first brick number, 0. To the survey: its first thread, the
64
+ * geometry, its first brick number, its table's word. To the numbering: its first thread, its table's
65
+ * word, its result, its ticket.
66
+ * @type {ShaderResourceDescriptor}
67
+ */
68
+ export const MESH_SURFACE_RUNS_RESOURCE: ShaderResourceDescriptor;
69
+ /**
70
+ * The frame's survey results, {@link MESH_SURFACE_SURVEY_RESULT_WORDS} each, read back.
71
+ * @type {ShaderResourceDescriptor}
72
+ */
73
+ export const MESH_SURFACE_SURVEY_RESULTS_RESOURCE: ShaderResourceDescriptor;
74
+ /**
75
+ * @type {ShaderResourceDescriptor}
76
+ */
77
+ export const MESH_SURFACE_TEXELS_WRITE_RESOURCE: ShaderResourceDescriptor;
78
+ /**
79
+ * @type {ShaderResourceDescriptor}
80
+ */
81
+ export const MESH_SURFACE_TEXELS_READ_RESOURCE: ShaderResourceDescriptor;
82
+ /**
83
+ * @type {ShaderResourceDescriptor}
84
+ */
85
+ export const MESH_SURFACE_COUNTER_RESOURCE: ShaderResourceDescriptor;
86
+ /**
87
+ * @type {ShaderResourceDescriptor}
88
+ */
89
+ export const MESH_SURFACE_COUNTER_READ_RESOURCE: ShaderResourceDescriptor;
90
+ /**
91
+ * @type {ShaderResourceDescriptor}
92
+ */
93
+ export const MESH_SURFACE_COMMAND_RESOURCE: ShaderResourceDescriptor;
94
+ /**
95
+ * The frame's texels' staging, {@link MESH_SURFACE_STAGING_WORDS} a slot, as the list pass clears it and
96
+ * the trace writes it.
97
+ * @type {ShaderResourceDescriptor}
98
+ */
99
+ export const MESH_SURFACE_STAGING_WRITE_RESOURCE: ShaderResourceDescriptor;
100
+ /**
101
+ * The staging as the encode reads it.
102
+ * @type {ShaderResourceDescriptor}
103
+ */
104
+ export const MESH_SURFACE_STAGING_READ_RESOURCE: ShaderResourceDescriptor;
105
+ /**
106
+ * The caches' words (`MESH_SURFACE_DATA_RESOURCE`) as the encode writes its blocks into them.
107
+ * @type {ShaderResourceDescriptor}
108
+ */
109
+ export const MESH_SURFACE_DATA_WRITE_RESOURCE: ShaderResourceDescriptor;
110
+ /**
111
+ * The caches' words as the survey and the numbering write the block tables into them, a texel's bit at
112
+ * a time.
113
+ * @type {ShaderResourceDescriptor}
114
+ */
115
+ export const MESH_SURFACE_DATA_ATOMIC_RESOURCE: ShaderResourceDescriptor;
116
+ import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
117
+ import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
118
+ //# sourceMappingURL=MESH_SURFACE_BAKE.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MESH_SURFACE_BAKE.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,sCAFU,MAAM,CAE0B;AAE1C;;;;;GAKG;AACH,uCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,+CAFU,MAAM,CAEkC;AAElD,oEAAoE;AACpE,4CAA6C;AAE7C,8FAA8F;AAC9F,4CAA6C;AAE7C,4BAA4B;AAC5B,2CAA4C;AAE5C,gEAAgE;AAChE,2CAA4C;AAE5C;;;;GAIG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,+CAFU,MAAM,CAEkC;AAElD;;;;GAIG;AACH,wCAFU,YAAY,CAWC;AAEvB;;GAEG;AACH,yCAFU,YAAY,CAWQ;AAE9B;;GAEG;AACH,4CAFU,YAAY,CAKW;AAEjC;;GAEG;AACH,2CAFU,YAAY,CASU;AAEhC;;GAEG;AACH,2CAFU,YAAY,CASU;AAEhC;;;;;;GAMG;AACH,yCAFU,wBAAwB,CAE6F;AAE/H;;;GAGG;AACH,mDAFU,wBAAwB,CAE4H;AAE9J;;GAEG;AACH,iDAFU,wBAAwB,CAEiI;AAEnK;;GAEG;AACH,gDAFU,wBAAwB,CAE0H;AAE5J;;GAEG;AACH,4CAFU,wBAAwB,CAE8G;AAEhJ;;GAEG;AACH,iDAFU,wBAAwB,CAEgG;AAElI;;GAEG;AACH,4CAFU,wBAAwB,CAEiG;AAEnI;;;;GAIG;AACH,kDAFU,wBAAwB,CAEuG;AAEzI;;;GAGG;AACH,iDAFU,wBAAwB,CAEgG;AAElI;;;GAGG;AACH,+CAFU,wBAAwB,CAEiG;AAEnI;;;;GAIG;AACH,gDAFU,wBAAwB,CAE+G;6BAxMpH,sCAAsC;yCAH1B,sDAAsD"}
@@ -0,0 +1,204 @@
1
+ import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
2
+ import { atomic_u32, u32, vec4u } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
3
+ import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
4
+ import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
5
+
6
+ /*
7
+ A Model Surface Cache's survey and bake (`GPUMeshSurfaceCaches`).
8
+
9
+ The survey, once a field, over runs of its stored bricks:
10
+
11
+ survey a thread a texel: sets its block's bit in its brick's table word when it can hold
12
+ surface (chunk_mesh_surface_listed)
13
+ number a thread a brick of a field whose survey is done: gives the brick's blocks numbers, the
14
+ field's count of them read back
15
+
16
+ The bake, over the frame's runs, a run a stretch of one cache's bricks by number:
17
+
18
+ list a thread a texel of the runs' bricks: clears its staging, and lists it when it can hold
19
+ surface
20
+ command one thread: the trace's dispatch, a workgroup a listed texel
21
+ trace a workgroup a listed texel: MESH_SURFACE_TEXEL_RAYS rays from it into its geometry's
22
+ triangles, the surface they find under its tent fitted into its staging's codes
23
+ encode a workgroup a block the runs' bricks keep, a thread a texel: the block's presence, and its
24
+ code in each plane the cache keeps (MESH_SURFACE_BLOCK.js)
25
+
26
+ Once per cache, and again when its material changes: the rays read the geometry's BLAS and the
27
+ material's resident row, which nothing that reads the cache does. A cache that keeps no plane is
28
+ never baked: its record's codes are all it holds.
29
+ */
30
+
31
+ /**
32
+ * Rays a listed texel is sampled with, a thread each: a Fibonacci set over the hemisphere facing its
33
+ * surface, turned about the surface's normal by a random angle for each texel, each one's first opaque
34
+ * hit under the texel's tent a sample.
35
+ * @type {number}
36
+ */
37
+ export const MESH_SURFACE_TEXEL_RAYS = 64;
38
+
39
+ /**
40
+ * How far out from a texel's surface point its rays leave, in voxels of its level: where a ray of
41
+ * the GI coming in over the surface stands on it, UE's half voxel (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md
42
+ * §7.9), so that the texel holds the surface as such rays meet it.
43
+ * @type {number}
44
+ */
45
+ export const MESH_SURFACE_LIFT_VOXELS = 0.5;
46
+
47
+ /**
48
+ * Transparent hits a texel's ray steps past, at most, before it gives no sample.
49
+ * @type {number}
50
+ */
51
+ export const MESH_SURFACE_ALPHA_CONTINUATIONS = 4;
52
+
53
+ /** Counter: texels the list pass listed, appended to atomically. */
54
+ export const MESH_SURFACE_COUNTER_LISTED = 0;
55
+
56
+ /** Counter: texels the trace takes, the listed ones the list holds; the command writes it. */
57
+ export const MESH_SURFACE_COUNTER_TRACED = 1;
58
+
59
+ /** Words of the counter. */
60
+ export const MESH_SURFACE_COUNTER_WORDS = 2;
61
+
62
+ /** Words of the trace's command: the three workgroup counts. */
63
+ export const MESH_SURFACE_COMMAND_WORDS = 3;
64
+
65
+ /**
66
+ * Words of a texel's staging: its albedo, metalness and roughness, and emissive codes, the albedo's 0
67
+ * where the trace found no surface (the codec never writes 0).
68
+ * @type {number}
69
+ */
70
+ export const MESH_SURFACE_STAGING_WORDS = 3;
71
+
72
+ /**
73
+ * Words of a survey's result: the ticket it was asked under, and its field's count of blocks.
74
+ * @type {number}
75
+ */
76
+ export const MESH_SURFACE_SURVEY_RESULT_WORDS = 2;
77
+
78
+ /**
79
+ * A texel the trace samples, as the list pass resolved it: whose triangles and material, which brick
80
+ * and texel of the field, and its staging slot, the list pass's thread.
81
+ * @type {WebGPUStruct}
82
+ */
83
+ export const MESH_SURFACE_TEXEL_STRUCT = WebGPUStruct.from({
84
+ geometry: u32,
85
+ material: u32,
86
+ /** the brick's index in the field's layout */
87
+ brick: u32,
88
+ /** t.x + 8 (t.y + 8 t.z) */
89
+ texel: u32,
90
+ /** its staging: the list pass's thread */
91
+ slot: u32,
92
+ }, "MeshSurfaceTexel");
93
+
94
+ /**
95
+ * @type {WebGPUStruct}
96
+ */
97
+ export const MESH_SURFACE_LIST_SETTINGS = WebGPUStruct.from({
98
+ /** runs in `mesh_surface_runs` */
99
+ run_count: u32,
100
+ /** texels over every run: the threads that do work */
101
+ thread_count: u32,
102
+ /** workgroups along x, the rest folded into y */
103
+ groups_x: u32,
104
+ /** texels `mesh_surface_texels` holds */
105
+ capacity: u32,
106
+ }, "MeshSurfaceListSettings");
107
+
108
+ /**
109
+ * @type {WebGPUStruct}
110
+ */
111
+ export const MESH_SURFACE_COMMAND_SETTINGS = WebGPUStruct.from({
112
+ /** texels `mesh_surface_texels` holds */
113
+ capacity: u32,
114
+ }, "MeshSurfaceCommandSettings");
115
+
116
+ /**
117
+ * @type {WebGPUStruct}
118
+ */
119
+ export const MESH_SURFACE_ENCODE_SETTINGS = WebGPUStruct.from({
120
+ /** runs in `mesh_surface_runs` */
121
+ run_count: u32,
122
+ /** bricks over every run: the workgroups that do work are 8 of each */
123
+ brick_count: u32,
124
+ /** workgroups along x, the rest folded into y */
125
+ groups_x: u32,
126
+ }, "MeshSurfaceEncodeSettings");
127
+
128
+ /**
129
+ * @type {WebGPUStruct}
130
+ */
131
+ export const MESH_SURFACE_SURVEY_SETTINGS = WebGPUStruct.from({
132
+ /** runs in `mesh_surface_survey_runs` */
133
+ run_count: u32,
134
+ /** threads over every run */
135
+ thread_count: u32,
136
+ /** workgroups along x, the rest folded into y */
137
+ groups_x: u32,
138
+ }, "MeshSurfaceSurveySettings");
139
+
140
+ /**
141
+ * A pass's runs, a `vec4<u32>` each, in order of their first thread, the first at 0. To the bake's
142
+ * passes: its first thread, the cache, its first brick number, 0. To the survey: its first thread, the
143
+ * geometry, its first brick number, its table's word. To the numbering: its first thread, its table's
144
+ * word, its result, its ticket.
145
+ * @type {ShaderResourceDescriptor}
146
+ */
147
+ export const MESH_SURFACE_RUNS_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_runs", WebGPUArray.from(vec4u));
148
+
149
+ /**
150
+ * The frame's survey results, {@link MESH_SURFACE_SURVEY_RESULT_WORDS} each, read back.
151
+ * @type {ShaderResourceDescriptor}
152
+ */
153
+ export const MESH_SURFACE_SURVEY_RESULTS_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_survey_results", WebGPUArray.from(atomic_u32), true);
154
+
155
+ /**
156
+ * @type {ShaderResourceDescriptor}
157
+ */
158
+ export const MESH_SURFACE_TEXELS_WRITE_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_texels", WebGPUArray.from(MESH_SURFACE_TEXEL_STRUCT), true);
159
+
160
+ /**
161
+ * @type {ShaderResourceDescriptor}
162
+ */
163
+ export const MESH_SURFACE_TEXELS_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_texels", WebGPUArray.from(MESH_SURFACE_TEXEL_STRUCT));
164
+
165
+ /**
166
+ * @type {ShaderResourceDescriptor}
167
+ */
168
+ export const MESH_SURFACE_COUNTER_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_counter", WebGPUArray.from(atomic_u32), true);
169
+
170
+ /**
171
+ * @type {ShaderResourceDescriptor}
172
+ */
173
+ export const MESH_SURFACE_COUNTER_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_counter", WebGPUArray.u32);
174
+
175
+ /**
176
+ * @type {ShaderResourceDescriptor}
177
+ */
178
+ export const MESH_SURFACE_COMMAND_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_command", WebGPUArray.u32, true);
179
+
180
+ /**
181
+ * The frame's texels' staging, {@link MESH_SURFACE_STAGING_WORDS} a slot, as the list pass clears it and
182
+ * the trace writes it.
183
+ * @type {ShaderResourceDescriptor}
184
+ */
185
+ export const MESH_SURFACE_STAGING_WRITE_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_staging", WebGPUArray.u32, true);
186
+
187
+ /**
188
+ * The staging as the encode reads it.
189
+ * @type {ShaderResourceDescriptor}
190
+ */
191
+ export const MESH_SURFACE_STAGING_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_staging", WebGPUArray.u32);
192
+
193
+ /**
194
+ * The caches' words (`MESH_SURFACE_DATA_RESOURCE`) as the encode writes its blocks into them.
195
+ * @type {ShaderResourceDescriptor}
196
+ */
197
+ export const MESH_SURFACE_DATA_WRITE_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_data", WebGPUArray.u32, true);
198
+
199
+ /**
200
+ * The caches' words as the survey and the numbering write the block tables into them, a texel's bit at
201
+ * a time.
202
+ * @type {ShaderResourceDescriptor}
203
+ */
204
+ export const MESH_SURFACE_DATA_ATOMIC_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_data", WebGPUArray.from(atomic_u32), true);
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Texels along a side of a block.
3
+ * @type {number}
4
+ */
5
+ export const MESH_SURFACE_BLOCK_TEXELS: number;
6
+ /**
7
+ * Texels in a block.
8
+ * @type {number}
9
+ */
10
+ export const MESH_SURFACE_BLOCK_TEXEL_COUNT: number;
11
+ /**
12
+ * Blocks a brick keeps at most: 2³.
13
+ * @type {number}
14
+ */
15
+ export const MESH_SURFACE_BRICK_BLOCKS: number;
16
+ /**
17
+ * Bits of a table word below the brick's first block number: its mask of blocks.
18
+ * @type {number}
19
+ */
20
+ export const MESH_SURFACE_TABLE_MASK_BITS: number;
21
+ /**
22
+ * Words of a block's presence.
23
+ * @type {number}
24
+ */
25
+ export const MESH_SURFACE_PRESENCE_BLOCK_WORDS: number;
26
+ /**
27
+ * Words of a block's albedo.
28
+ * @type {number}
29
+ */
30
+ export const MESH_SURFACE_ALBEDO_BLOCK_WORDS: number;
31
+ /**
32
+ * Words of a block's albedo ahead of its texels' fields: two endpoints for each of its two subsets.
33
+ * @type {number}
34
+ */
35
+ export const MESH_SURFACE_ALBEDO_ENDPOINT_WORDS: number;
36
+ /**
37
+ * Levels of each albedo subset's line: a 3-bit index.
38
+ * @type {number}
39
+ */
40
+ export const MESH_SURFACE_ALBEDO_LEVELS: number;
41
+ /**
42
+ * Words of a block's metalness and roughness.
43
+ * @type {number}
44
+ */
45
+ export const MESH_SURFACE_METAL_ROUGH_BLOCK_WORDS: number;
46
+ /**
47
+ * Levels of the metalness and roughness's line: a 2-bit index.
48
+ * @type {number}
49
+ */
50
+ export const MESH_SURFACE_METAL_ROUGH_LEVELS: number;
51
+ /**
52
+ * Words of a block's emissive.
53
+ * @type {number}
54
+ */
55
+ export const MESH_SURFACE_EMISSIVE_BLOCK_WORDS: number;
56
+ /**
57
+ * Words of a block in each plane, by `SURFACE_MATERIAL.js` plane.
58
+ * @type {ReadonlyArray<number>}
59
+ */
60
+ export const MESH_SURFACE_PLANE_BLOCK_WORDS: ReadonlyArray<number>;
61
+ /**
62
+ * A block number no brick holds: its block is not kept.
63
+ * @type {number}
64
+ */
65
+ export const MESH_SURFACE_NO_BLOCK: number;
66
+ //# sourceMappingURL=MESH_SURFACE_BLOCK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MESH_SURFACE_BLOCK.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.js"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,6CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,2CAFU,MAAM,CAE8B;AAE9C;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,8CAFU,MAAM,CAEkC;AAElD;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,mDAFU,MAAM,CAEsC;AAEtD;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,gDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,6CAFU,cAAc,MAAM,CAAC,CAM5B;AAEH;;;GAGG;AACH,oCAFU,MAAM,CAEgC"}
@@ -0,0 +1,103 @@
1
+ /*
2
+ A Model Surface Cache's material blocks: 4³ texels of a field brick's 8³, the brick halved along each
3
+ axis, kept only where some texel of the block can hold surface, each plane block-coded.
4
+
5
+ block of brick texel t (t >> 2): b = b.x + 2 (b.y + 2 b.z), 8 a brick
6
+ texel of its block (t & 3): l = l.x + 4 (l.y + 4 l.z), 64 a block
7
+
8
+ A geometry's block table holds a word for each brick its field stored, by number: the brick's first
9
+ block number above an 8-bit mask of the blocks it keeps, block b numbered first + the mask's bits
10
+ below b. Every cache of the geometry keeps its planes' blocks by those numbers.
11
+
12
+ presence 2 words a bit a texel: the texels the bake found surface under
13
+ albedo 12 words two subsets of the texels, each a line through the square roots of
14
+ the diffuse albedo: subset s's endpoints in words 2s and 2s + 1, unorm8
15
+ each (pack4x8unorm), then a 4-bit field a texel, texel l at bit
16
+ 4 (l % 8) of word 4 + l / 8, its subset s above its 3-bit level k:
17
+ albedo (e0 + (k / 7) (e1 - e0))² on subset s's line
18
+ metal_rough 5 words two endpoints, 4 bits of metalness and 4 of roughness each, in the
19
+ first word, then a 2-bit index a texel: e0 + (k / 3) (e1 - e0)
20
+ emissive 64 words a code a texel, RGB9E5 (rgbe9995_encode)
21
+ */
22
+
23
+ /**
24
+ * Texels along a side of a block.
25
+ * @type {number}
26
+ */
27
+ export const MESH_SURFACE_BLOCK_TEXELS = 4;
28
+
29
+ /**
30
+ * Texels in a block.
31
+ * @type {number}
32
+ */
33
+ export const MESH_SURFACE_BLOCK_TEXEL_COUNT = 64;
34
+
35
+ /**
36
+ * Blocks a brick keeps at most: 2³.
37
+ * @type {number}
38
+ */
39
+ export const MESH_SURFACE_BRICK_BLOCKS = 8;
40
+
41
+ /**
42
+ * Bits of a table word below the brick's first block number: its mask of blocks.
43
+ * @type {number}
44
+ */
45
+ export const MESH_SURFACE_TABLE_MASK_BITS = 8;
46
+
47
+ /**
48
+ * Words of a block's presence.
49
+ * @type {number}
50
+ */
51
+ export const MESH_SURFACE_PRESENCE_BLOCK_WORDS = 2;
52
+
53
+ /**
54
+ * Words of a block's albedo.
55
+ * @type {number}
56
+ */
57
+ export const MESH_SURFACE_ALBEDO_BLOCK_WORDS = 12;
58
+
59
+ /**
60
+ * Words of a block's albedo ahead of its texels' fields: two endpoints for each of its two subsets.
61
+ * @type {number}
62
+ */
63
+ export const MESH_SURFACE_ALBEDO_ENDPOINT_WORDS = 4;
64
+
65
+ /**
66
+ * Levels of each albedo subset's line: a 3-bit index.
67
+ * @type {number}
68
+ */
69
+ export const MESH_SURFACE_ALBEDO_LEVELS = 8;
70
+
71
+ /**
72
+ * Words of a block's metalness and roughness.
73
+ * @type {number}
74
+ */
75
+ export const MESH_SURFACE_METAL_ROUGH_BLOCK_WORDS = 5;
76
+
77
+ /**
78
+ * Levels of the metalness and roughness's line: a 2-bit index.
79
+ * @type {number}
80
+ */
81
+ export const MESH_SURFACE_METAL_ROUGH_LEVELS = 4;
82
+
83
+ /**
84
+ * Words of a block's emissive.
85
+ * @type {number}
86
+ */
87
+ export const MESH_SURFACE_EMISSIVE_BLOCK_WORDS = 64;
88
+
89
+ /**
90
+ * Words of a block in each plane, by `SURFACE_MATERIAL.js` plane.
91
+ * @type {ReadonlyArray<number>}
92
+ */
93
+ export const MESH_SURFACE_PLANE_BLOCK_WORDS = Object.freeze([
94
+ MESH_SURFACE_ALBEDO_BLOCK_WORDS,
95
+ MESH_SURFACE_METAL_ROUGH_BLOCK_WORDS,
96
+ MESH_SURFACE_EMISSIVE_BLOCK_WORDS,
97
+ ]);
98
+
99
+ /**
100
+ * A block number no brick holds: its block is not kept.
101
+ * @type {number}
102
+ */
103
+ export const MESH_SURFACE_NO_BLOCK = 0xffffffff;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Every Model Surface Cache's record, by cache id.
3
+ * @type {ShaderResourceDescriptor}
4
+ */
5
+ export const MESH_SURFACE_RECORDS_RESOURCE: ShaderResourceDescriptor;
6
+ /**
7
+ * The caches' words (`MESH_SURFACE_BLOCK.js`): each geometry's block table, and each cache's blocks of
8
+ * presence and of every plane it keeps, at the words its record names.
9
+ * @type {ShaderResourceDescriptor}
10
+ */
11
+ export const MESH_SURFACE_DATA_RESOURCE: ShaderResourceDescriptor;
12
+ /**
13
+ * A word a `meshes` row: the Model Surface Cache of the row's (geometry, material) pair, or
14
+ * `GPU_DATABASE_NULL` while it has none that readers may use.
15
+ * @type {ShaderResourceDescriptor}
16
+ */
17
+ export const MESH_SURFACE_ROWS_RESOURCE: ShaderResourceDescriptor;
18
+ import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
19
+ //# sourceMappingURL=MESH_SURFACE_RESOURCES.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MESH_SURFACE_RESOURCES.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH,4CAFU,wBAAwB,CAEiH;AAEnJ;;;;GAIG;AACH,yCAFU,wBAAwB,CAEqF;AAEvH;;;;GAIG;AACH,yCAFU,wBAAwB,CAEqF;yCAtB9E,sDAAsD"}
@@ -0,0 +1,23 @@
1
+ import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
2
+ import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
3
+ import { MESH_SURFACE_STRUCT } from "./MESH_SURFACE_STRUCT.js";
4
+
5
+ /**
6
+ * Every Model Surface Cache's record, by cache id.
7
+ * @type {ShaderResourceDescriptor}
8
+ */
9
+ export const MESH_SURFACE_RECORDS_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_records", WebGPUArray.from(MESH_SURFACE_STRUCT));
10
+
11
+ /**
12
+ * The caches' words (`MESH_SURFACE_BLOCK.js`): each geometry's block table, and each cache's blocks of
13
+ * presence and of every plane it keeps, at the words its record names.
14
+ * @type {ShaderResourceDescriptor}
15
+ */
16
+ export const MESH_SURFACE_DATA_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_data", WebGPUArray.u32);
17
+
18
+ /**
19
+ * A word a `meshes` row: the Model Surface Cache of the row's (geometry, material) pair, or
20
+ * `GPU_DATABASE_NULL` while it has none that readers may use.
21
+ * @type {ShaderResourceDescriptor}
22
+ */
23
+ export const MESH_SURFACE_ROWS_RESOURCE = ShaderResourceDescriptor.storageBuffer("mesh_surface_rows", WebGPUArray.u32);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A Model Surface Cache: one (geometry, material) pair's surface material (`SURFACE_MATERIAL.js`), by
3
+ * cache id. A plane that varies over the surface keeps blocks (`MESH_SURFACE_BLOCK.js`), one for each
4
+ * block its geometry's field keeps, by the block numbers of its geometry's table: block n of a plane at
5
+ * word `<plane>_blocks + n · <the plane's words a block>` of `mesh_surface_data`. A plane that does not
6
+ * vary keeps none, and its code here stands for every texel. A cache that keeps any plane keeps a
7
+ * block of presence for each block too.
8
+ *
9
+ * 52 bytes.
10
+ *
11
+ * @type {WebGPUStruct}
12
+ */
13
+ export const MESH_SURFACE_STRUCT: WebGPUStruct;
14
+ import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
15
+ //# sourceMappingURL=MESH_SURFACE_STRUCT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MESH_SURFACE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,kCAFU,YAAY,CAwDJ;6BApEW,sCAAsC"}
@@ -0,0 +1,70 @@
1
+ import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
2
+ import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
3
+
4
+ /**
5
+ * A Model Surface Cache: one (geometry, material) pair's surface material (`SURFACE_MATERIAL.js`), by
6
+ * cache id. A plane that varies over the surface keeps blocks (`MESH_SURFACE_BLOCK.js`), one for each
7
+ * block its geometry's field keeps, by the block numbers of its geometry's table: block n of a plane at
8
+ * word `<plane>_blocks + n · <the plane's words a block>` of `mesh_surface_data`. A plane that does not
9
+ * vary keeps none, and its code here stands for every texel. A cache that keeps any plane keeps a
10
+ * block of presence for each block too.
11
+ *
12
+ * 52 bytes.
13
+ *
14
+ * @type {WebGPUStruct}
15
+ */
16
+ export const MESH_SURFACE_STRUCT = WebGPUStruct.from({
17
+ /**
18
+ * The geometry id whose field the blocks follow and whose triangles they were baked from: the
19
+ * source's, for an aliased geometry.
20
+ */
21
+ geometry: u32,
22
+ /**
23
+ * The material's resident id, which the bake shades with.
24
+ */
25
+ material: u32,
26
+ /**
27
+ * The bricks the field stored.
28
+ */
29
+ tiles: u32,
30
+ /**
31
+ * The blocks the field's bricks keep: each run's length.
32
+ */
33
+ blocks: u32,
34
+ /**
35
+ * Bit `1 << plane` for each plane (`SURFACE_MATERIAL.js`) the cache keeps blocks of.
36
+ */
37
+ texels: u32,
38
+ /**
39
+ * The word of the geometry's block table holding its brick numbered 0.
40
+ */
41
+ table: u32,
42
+ /**
43
+ * The word of block 0's presence, with any plane's bit in {@link texels}.
44
+ */
45
+ presence_blocks: u32,
46
+ /**
47
+ * The word of block 0's albedo, with the albedo plane's bit.
48
+ */
49
+ albedo_blocks: u32,
50
+ /**
51
+ * The word of block 0's metalness and roughness, with that plane's bit.
52
+ */
53
+ metal_rough_blocks: u32,
54
+ /**
55
+ * The word of block 0's emissive, with the emissive plane's bit.
56
+ */
57
+ emissive_blocks: u32,
58
+ /**
59
+ * The diffuse albedo's code (`albedo_compress`) of every texel, without the albedo plane's bit.
60
+ */
61
+ albedo: u32,
62
+ /**
63
+ * The metalness and roughness's code (`metal_rough_compress`) of every texel, without that plane's bit.
64
+ */
65
+ metal_rough: u32,
66
+ /**
67
+ * The emissive's code (`rgbe9995_encode`) of every texel, without the emissive plane's bit.
68
+ */
69
+ emissive: u32,
70
+ }, "MeshSurface");
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The planes' formats, in the order {@link SURFACE_MATERIAL_ALBEDO_PLANE},
3
+ * {@link SURFACE_MATERIAL_METAL_ROUGH_PLANE} and {@link SURFACE_MATERIAL_EMISSIVE_PLANE} name them.
4
+ * @type {ReadonlyArray<GPUTextureFormat>}
5
+ */
6
+ export const SURFACE_MATERIAL_FORMATS: ReadonlyArray<GPUTextureFormat>;
7
+ /** The plane of the albedo codes. */
8
+ export const SURFACE_MATERIAL_ALBEDO_PLANE: 0;
9
+ /** The plane of the metalness and roughness codes. */
10
+ export const SURFACE_MATERIAL_METAL_ROUGH_PLANE: 1;
11
+ /** The plane of the emissive codes. */
12
+ export const SURFACE_MATERIAL_EMISSIVE_PLANE: 2;
13
+ //# sourceMappingURL=SURFACE_MATERIAL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SURFACE_MATERIAL.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,uCAFU,+BAA+B,CAE+C;AAExF,qCAAqC;AACrC,8CAA+C;AAE/C,sDAAsD;AACtD,mDAAoD;AAEpD,uCAAuC;AACvC,gDAAiD"}