@woosh/meep-engine 3.74.0 → 3.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/CHANGELOG.md +20 -19
  2. package/package.json +1 -1
  3. package/src/core/geom/2d/hilbert/v2_hilbert_encode.d.ts +11 -0
  4. package/src/core/geom/2d/hilbert/v2_hilbert_encode.d.ts.map +1 -0
  5. package/src/core/geom/2d/hilbert/v2_hilbert_encode.js +46 -0
  6. package/src/engine/asset/GameAssetType.d.ts +1 -0
  7. package/src/engine/asset/GameAssetType.js +5 -1
  8. package/src/engine/asset/loaders/GroomAssetLoader.d.ts +33 -0
  9. package/src/engine/asset/loaders/GroomAssetLoader.d.ts.map +1 -0
  10. package/src/engine/asset/loaders/GroomAssetLoader.js +99 -0
  11. package/src/engine/graphics/ecs/hair/Hair.d.ts +47 -0
  12. package/src/engine/graphics/ecs/hair/Hair.d.ts.map +1 -0
  13. package/src/engine/graphics/ecs/hair/Hair.js +61 -0
  14. package/src/engine/graphics/hair/Groom.d.ts +130 -0
  15. package/src/engine/graphics/hair/Groom.d.ts.map +1 -0
  16. package/src/engine/graphics/hair/Groom.js +193 -0
  17. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts +24 -0
  18. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts.map +1 -0
  19. package/src/engine/graphics/hair/GroomSerializationAdapter.js +77 -0
  20. package/src/engine/graphics/hair/groom_build_group.d.ts +85 -0
  21. package/src/engine/graphics/hair/groom_build_group.d.ts.map +1 -0
  22. package/src/engine/graphics/hair/groom_build_group.js +487 -0
  23. package/src/engine/graphics/hair/groom_generate_scalp.d.ts +29 -0
  24. package/src/engine/graphics/hair/groom_generate_scalp.d.ts.map +1 -0
  25. package/src/engine/graphics/hair/groom_generate_scalp.js +184 -0
  26. package/src/engine/graphics/hair/groom_rank_order.d.ts +15 -0
  27. package/src/engine/graphics/hair/groom_rank_order.d.ts.map +1 -0
  28. package/src/engine/graphics/hair/groom_rank_order.js +53 -0
  29. package/src/engine/graphics/hair/groom_root_spacing.d.ts +12 -0
  30. package/src/engine/graphics/hair/groom_root_spacing.d.ts.map +1 -0
  31. package/src/engine/graphics/hair/groom_root_spacing.js +120 -0
  32. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +6 -0
  33. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
  34. package/src/engine/graphics/render/frame_graph/FrameGraph.js +9 -0
  35. package/src/engine/graphics3/GPUAcousticSystem.d.ts +29 -32
  36. package/src/engine/graphics3/GPUAcousticSystem.d.ts.map +1 -1
  37. package/src/engine/graphics3/GPUAcousticSystem.js +87 -162
  38. package/src/engine/graphics3/HairSystem.d.ts +102 -0
  39. package/src/engine/graphics3/HairSystem.d.ts.map +1 -0
  40. package/src/engine/graphics3/HairSystem.js +456 -0
  41. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  42. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  43. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +35 -17
  44. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  45. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +2 -3
  46. package/src/engine/sound/simulation/AcousticSimulator.d.ts +7 -0
  47. package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
  48. package/src/engine/sound/simulation/AcousticSimulator.js +27 -0
  49. package/src/engine/sound/simulation/README.md +121 -107
  50. package/src/engine/sound/sopra/README.md +8 -3
  51. package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.d.ts +2 -2
  52. package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.d.ts.map +1 -1
  53. package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.js +4 -3
  54. package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.d.ts +118 -0
  55. package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.d.ts.map +1 -0
  56. package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.js +472 -0
  57. package/src/engine/sound/sopra/runtime/AcousticReverbLines.d.ts +166 -0
  58. package/src/engine/sound/sopra/runtime/AcousticReverbLines.d.ts.map +1 -0
  59. package/src/engine/sound/sopra/runtime/AcousticReverbLines.js +447 -0
  60. package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.d.ts +69 -113
  61. package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.d.ts.map +1 -1
  62. package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.js +143 -491
  63. package/src/engine/sound/sopra/runtime/AcousticSpeakers.d.ts +102 -0
  64. package/src/engine/sound/sopra/runtime/AcousticSpeakers.d.ts.map +1 -0
  65. package/src/engine/sound/sopra/runtime/AcousticSpeakers.js +232 -0
  66. package/src/engine/sound/sopra/runtime/BusGraph.d.ts +17 -3
  67. package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
  68. package/src/engine/sound/sopra/runtime/BusGraph.js +55 -5
  69. package/src/engine/sound/sopra/runtime/EventInstance.d.ts +8 -6
  70. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  71. package/src/engine/sound/sopra/runtime/EventInstance.js +113 -105
  72. package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.d.ts +13 -0
  73. package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.d.ts.map +1 -0
  74. package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.js +15 -0
  75. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
  76. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +4 -6
  77. package/src/shade/assets/textures/hair_scattering.bin +0 -0
  78. package/src/shade/device/pipeline/PipelineEnquiry.d.ts +11 -0
  79. package/src/shade/device/pipeline/PipelineEnquiry.d.ts.map +1 -1
  80. package/src/shade/device/pipeline/PipelineEnquiry.js +13 -0
  81. package/src/shade/playground/hair/index.html +50 -0
  82. package/src/shade/playground/hair/main.d.ts +2 -0
  83. package/src/shade/playground/hair/main.d.ts.map +1 -0
  84. package/src/shade/playground/hair/main.js +274 -0
  85. package/src/shade/playground/screen_probes/README.md +54 -0
  86. package/src/shade/playground/screen_probes/index.html +271 -0
  87. package/src/shade/playground/screen_probes/main.d.ts +8 -0
  88. package/src/shade/playground/screen_probes/main.d.ts.map +1 -0
  89. package/src/shade/playground/screen_probes/main.js +527 -0
  90. package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
  91. package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +4 -5
  92. package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
  93. package/src/shade/playground/skinned_blas_refit/main.js +6 -12
  94. package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
  95. package/src/shade/playground/skinned_mesh_soup/main.js +1 -2
  96. package/src/shade/playground/vgeo_scene/README.md +12 -2
  97. package/src/shade/playground/vgeo_scene/main.js +1 -1
  98. package/src/shade/playground/volumetrics_froxel/README.md +191 -191
  99. package/src/shade/playground/volumetrics_froxel/measure.d.ts +3 -3
  100. package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
  101. package/src/shade/playground/volumetrics_froxel/measure.js +11 -13
  102. package/src/shade/playground/vsm/main.d.ts.map +1 -1
  103. package/src/shade/playground/vsm/main.js +5 -6
  104. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  105. package/src/shade/renderer/Renderer.js +85 -16
  106. package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.d.ts +6 -0
  107. package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.d.ts.map +1 -1
  108. package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.js +10 -0
  109. package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.d.ts +28 -0
  110. package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.d.ts.map +1 -0
  111. package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.js +42 -0
  112. package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.d.ts +58 -0
  113. package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.d.ts.map +1 -0
  114. package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.js +108 -0
  115. package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
  116. package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +161 -0
  117. package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts.map +1 -0
  118. package/src/shade/renderer/acoustics/GPUAcousticProbes.js +760 -0
  119. package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
  120. package/src/shade/renderer/acoustics/acoustic_listener_order.d.ts +12 -0
  121. package/src/shade/renderer/acoustics/acoustic_listener_order.d.ts.map +1 -0
  122. package/src/shade/renderer/acoustics/acoustic_listener_order.js +56 -0
  123. package/src/shade/renderer/acoustics/chunk_acoustic_direct.d.ts.map +1 -1
  124. package/src/shade/renderer/acoustics/chunk_acoustic_direct.js +5 -0
  125. package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.d.ts +57 -0
  126. package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.d.ts.map +1 -0
  127. package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.js +314 -0
  128. package/src/shade/renderer/acoustics/chunk_acoustic_finite.d.ts +15 -0
  129. package/src/shade/renderer/acoustics/chunk_acoustic_finite.d.ts.map +1 -0
  130. package/src/shade/renderer/acoustics/chunk_acoustic_finite.js +21 -0
  131. package/src/shade/renderer/acoustics/chunk_acoustic_gather.js +1 -1
  132. package/src/shade/renderer/acoustics/chunk_acoustic_lean.d.ts +27 -0
  133. package/src/shade/renderer/acoustics/chunk_acoustic_lean.d.ts.map +1 -0
  134. package/src/shade/renderer/acoustics/chunk_acoustic_lean.js +42 -0
  135. package/src/shade/renderer/acoustics/chunk_acoustic_listener.d.ts +80 -0
  136. package/src/shade/renderer/acoustics/chunk_acoustic_listener.d.ts.map +1 -0
  137. package/src/shade/renderer/acoustics/chunk_acoustic_listener.js +274 -0
  138. package/src/shade/renderer/acoustics/chunk_acoustic_partials.d.ts +2 -2
  139. package/src/shade/renderer/acoustics/chunk_acoustic_partials.js +2 -2
  140. package/src/shade/renderer/acoustics/chunk_acoustic_phonon.d.ts +7 -0
  141. package/src/shade/renderer/acoustics/chunk_acoustic_phonon.d.ts.map +1 -1
  142. package/src/shade/renderer/acoustics/chunk_acoustic_phonon.js +24 -1
  143. package/src/shade/renderer/acoustics/chunk_acoustic_resample.js +1 -1
  144. package/src/shade/renderer/acoustics/chunk_acoustic_reservoir.js +1 -1
  145. package/src/shade/renderer/acoustics/chunk_acoustic_through.d.ts +43 -0
  146. package/src/shade/renderer/acoustics/chunk_acoustic_through.d.ts.map +1 -0
  147. package/src/shade/renderer/acoustics/chunk_acoustic_through.js +153 -0
  148. package/src/shade/renderer/acoustics/chunk_acoustic_trace.d.ts +3 -1
  149. package/src/shade/renderer/acoustics/chunk_acoustic_trace.d.ts.map +1 -1
  150. package/src/shade/renderer/acoustics/chunk_acoustic_trace.js +10 -1
  151. package/src/shade/renderer/acoustics/shader_acoustic_combine.d.ts +7 -3
  152. package/src/shade/renderer/acoustics/shader_acoustic_combine.d.ts.map +1 -1
  153. package/src/shade/renderer/acoustics/shader_acoustic_combine.js +22 -6
  154. package/src/shade/renderer/acoustics/shader_acoustic_coupling.d.ts +14 -0
  155. package/src/shade/renderer/acoustics/shader_acoustic_coupling.d.ts.map +1 -0
  156. package/src/shade/renderer/acoustics/shader_acoustic_coupling.js +102 -0
  157. package/src/shade/renderer/acoustics/shader_acoustic_listener.d.ts +12 -0
  158. package/src/shade/renderer/acoustics/shader_acoustic_listener.d.ts.map +1 -0
  159. package/src/shade/renderer/acoustics/shader_acoustic_listener.js +80 -0
  160. package/src/shade/renderer/acoustics/shader_acoustic_receive.d.ts.map +1 -1
  161. package/src/shade/renderer/acoustics/shader_acoustic_receive.js +27 -6
  162. package/src/shade/renderer/acoustics/shader_acoustic_room.d.ts +11 -0
  163. package/src/shade/renderer/acoustics/shader_acoustic_room.d.ts.map +1 -0
  164. package/src/shade/renderer/acoustics/shader_acoustic_room.js +111 -0
  165. package/src/shade/renderer/acoustics/shader_acoustic_source.d.ts +18 -0
  166. package/src/shade/renderer/acoustics/shader_acoustic_source.d.ts.map +1 -0
  167. package/src/shade/renderer/acoustics/shader_acoustic_source.js +130 -0
  168. package/src/shade/renderer/deferred/chunk_read_gBuffer_material.d.ts.map +1 -1
  169. package/src/shade/renderer/deferred/chunk_read_gBuffer_material.js +3 -1
  170. package/src/shade/renderer/deferred/chunk_shade_direct_lights.d.ts +23 -0
  171. package/src/shade/renderer/deferred/chunk_shade_direct_lights.d.ts.map +1 -0
  172. package/src/shade/renderer/deferred/chunk_shade_direct_lights.js +111 -0
  173. package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts +17 -6
  174. package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts.map +1 -1
  175. package/src/shade/renderer/deferred/chunk_shade_directional_lights.js +26 -21
  176. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts +12 -22
  177. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts.map +1 -1
  178. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.js +20 -100
  179. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts.map +1 -1
  180. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js +6 -4
  181. package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.d.ts +15 -0
  182. package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.d.ts.map +1 -0
  183. package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.js +47 -0
  184. package/src/shade/renderer/extension/ViewLighting.d.ts +101 -0
  185. package/src/shade/renderer/extension/ViewLighting.d.ts.map +1 -0
  186. package/src/shade/renderer/extension/ViewLighting.js +168 -0
  187. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  188. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  189. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +7 -7
  190. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  191. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  192. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.d.ts +2 -2
  193. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.js +2 -2
  194. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts +5 -2
  195. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts.map +1 -1
  196. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.js +5 -2
  197. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts +9 -2
  198. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
  199. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +48 -12
  200. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +0 -22
  201. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
  202. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +0 -42
  203. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +2 -18
  204. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
  205. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +2 -19
  206. package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.d.ts.map +1 -1
  207. package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js +0 -1
  208. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +5 -4
  209. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  210. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +3 -1
  211. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  212. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +3 -1
  213. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  214. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +0 -1
  215. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +60 -14
  216. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
  217. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +75 -39
  218. package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.d.ts.map +1 -1
  219. package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js +3 -1
  220. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +1 -1
  221. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +0 -9
  222. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
  223. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +45 -17
  224. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +7 -3
  225. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  226. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +43 -7
  227. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
  228. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +3 -1
  229. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +15 -7
  230. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
  231. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +40 -9
  232. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +23 -0
  233. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
  234. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +26 -0
  235. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts +1 -0
  236. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.js +6 -0
  237. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +13 -1
  238. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
  239. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +23 -1
  240. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts.map +1 -1
  241. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +2 -0
  242. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +29 -0
  243. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -0
  244. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +102 -0
  245. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts +8 -1
  246. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts.map +1 -1
  247. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.js +27 -1
  248. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +4 -1
  249. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
  250. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +4 -1
  251. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts +11 -5
  252. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts.map +1 -1
  253. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.js +28 -10
  254. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +36 -2
  255. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
  256. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +149 -4
  257. package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.d.ts.map +1 -1
  258. package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.js +3 -1
  259. package/src/shade/renderer/hair/GPUHairSystem.d.ts +159 -0
  260. package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -0
  261. package/src/shade/renderer/hair/GPUHairSystem.js +1132 -0
  262. package/src/shade/renderer/hair/HAIR.d.ts +102 -0
  263. package/src/shade/renderer/hair/HAIR.d.ts.map +1 -0
  264. package/src/shade/renderer/hair/HAIR.js +115 -0
  265. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts +17 -0
  266. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts.map +1 -0
  267. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.js +71 -0
  268. package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.d.ts +11 -0
  269. package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.d.ts.map +1 -0
  270. package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.js +48 -0
  271. package/src/shade/renderer/hair/HairFrame.d.ts +41 -0
  272. package/src/shade/renderer/hair/HairFrame.d.ts.map +1 -0
  273. package/src/shade/renderer/hair/HairFrame.js +76 -0
  274. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +42 -0
  275. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -0
  276. package/src/shade/renderer/hair/chunk_hair_bsdf.js +170 -0
  277. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +30 -0
  278. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -0
  279. package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +131 -0
  280. package/src/shade/renderer/hair/chunk_hair_pixel.d.ts +32 -0
  281. package/src/shade/renderer/hair/chunk_hair_pixel.d.ts.map +1 -0
  282. package/src/shade/renderer/hair/chunk_hair_pixel.js +116 -0
  283. package/src/shade/renderer/hair/chunk_hair_strand.d.ts +40 -0
  284. package/src/shade/renderer/hair/chunk_hair_strand.d.ts.map +1 -0
  285. package/src/shade/renderer/hair/chunk_hair_strand.js +85 -0
  286. package/src/shade/renderer/hair/chunk_hair_volume.d.ts +31 -0
  287. package/src/shade/renderer/hair/chunk_hair_volume.d.ts.map +1 -0
  288. package/src/shade/renderer/hair/chunk_hair_volume.js +106 -0
  289. package/src/shade/renderer/hair/hair_id_draw.d.ts +24 -0
  290. package/src/shade/renderer/hair/hair_id_draw.d.ts.map +1 -0
  291. package/src/shade/renderer/hair/hair_id_draw.js +135 -0
  292. package/src/shade/renderer/hair/hair_lighting.d.ts +53 -0
  293. package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -0
  294. package/src/shade/renderer/hair/hair_lighting.js +270 -0
  295. package/src/shade/renderer/hair/hair_scattering_lut.d.ts +75 -0
  296. package/src/shade/renderer/hair/hair_scattering_lut.d.ts.map +1 -0
  297. package/src/shade/renderer/hair/hair_scattering_lut.js +271 -0
  298. package/src/shade/renderer/hair/hair_stamp.d.ts +33 -0
  299. package/src/shade/renderer/hair/hair_stamp.d.ts.map +1 -0
  300. package/src/shade/renderer/hair/hair_stamp.js +175 -0
  301. package/src/shade/renderer/hair/shader_hair_classes.d.ts +21 -0
  302. package/src/shade/renderer/hair/shader_hair_classes.d.ts.map +1 -0
  303. package/src/shade/renderer/hair/shader_hair_classes.js +86 -0
  304. package/src/shade/renderer/hair/shader_hair_cull.d.ts +31 -0
  305. package/src/shade/renderer/hair/shader_hair_cull.d.ts.map +1 -0
  306. package/src/shade/renderer/hair/shader_hair_cull.js +194 -0
  307. package/src/shade/renderer/hair/shader_hair_lod.d.ts +33 -0
  308. package/src/shade/renderer/hair/shader_hair_lod.d.ts.map +1 -0
  309. package/src/shade/renderer/hair/shader_hair_lod.js +268 -0
  310. package/src/shade/renderer/hair/shader_hair_volume.d.ts +28 -0
  311. package/src/shade/renderer/hair/shader_hair_volume.d.ts.map +1 -0
  312. package/src/shade/renderer/hair/shader_hair_volume.js +167 -0
  313. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  314. package/src/shade/renderer/loader/usd/usd_build_scene.d.ts +31 -0
  315. package/src/shade/renderer/loader/usd/usd_build_scene.d.ts.map +1 -1
  316. package/src/shade/renderer/loader/usd/usd_build_scene.js +36 -21
  317. package/src/shade/renderer/loader/usd/usd_groom_extension.d.ts +60 -0
  318. package/src/shade/renderer/loader/usd/usd_groom_extension.d.ts.map +1 -0
  319. package/src/shade/renderer/loader/usd/usd_groom_extension.js +417 -0
  320. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
  321. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +4 -1
  322. package/src/shade/renderer/path_tracer/shader/chunk_shading_closure_from_material_data.d.ts.map +1 -1
  323. package/src/shade/renderer/path_tracer/shader/chunk_shading_closure_from_material_data.js +3 -1
  324. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  325. package/src/shade/renderer/postprocess/ssr/SSR.d.ts +4 -1
  326. package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
  327. package/src/shade/renderer/postprocess/ssr/SSR.js +9 -0
  328. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +16 -1
  329. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
  330. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +47 -3
  331. package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
  332. package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +5 -3
  333. package/src/shade/renderer/postprocess/ssr/ssr_combine_shader.d.ts.map +1 -1
  334. package/src/shade/renderer/postprocess/ssr/ssr_combine_shader.js +6 -5
  335. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.d.ts.map +1 -1
  336. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.js +5 -2
  337. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
  338. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +5 -0
  339. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts.map +1 -1
  340. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.js +4 -1
  341. package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.d.ts.map +1 -1
  342. package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.js +5 -1
  343. package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.d.ts.map +1 -1
  344. package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.js +7 -4
  345. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +13 -8
  346. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
  347. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +18 -14
  348. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts +3 -2
  349. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts.map +1 -1
  350. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.js +12 -4
  351. package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.d.ts.map +1 -1
  352. package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js +1 -0
  353. package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.js +1 -1
  354. package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.d.ts +16 -0
  355. package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.d.ts.map +1 -0
  356. package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.js +25 -0
  357. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +2 -2
  358. package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts +1 -1
  359. package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts +1 -1
  360. package/src/shade/renderer/shader/resource/ShaderResourceDescriptor.d.ts +1 -1
  361. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.d.ts +2 -2
  362. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.js +2 -2
  363. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
@@ -34,6 +34,7 @@ import { VISIBILITY_FORMAT } from "./rasterize/visibility/VISIBILITY_BUFFER.js";
34
34
  import { PresentTarget } from "./extension/PresentTarget.js";
35
35
  import { RenderExtensionRegistry } from "./extension/RenderExtensionRegistry.js";
36
36
  import { SceneColor } from "./extension/SceneColor.js";
37
+ import { ViewLighting } from "./extension/ViewLighting.js";
37
38
  import { ViewTextures } from "./extension/ViewTextures.js";
38
39
  import { G_BUFFER_COLOR_TARGETS } from "./gbuffer/G_BUFFER_COLOR_TARGETS.js";
39
40
  import { shader_brick4_diffuse } from "./global_illumination/brick4/gpu/draw/shader_brick4_diffuse.js";
@@ -1227,9 +1228,7 @@ export class Renderer {
1227
1228
  && !this.#device_lost
1228
1229
  && typeof extension.enquirePipelines === 'function'
1229
1230
  ) {
1230
- const enquiry = PipelineEnquiry.from(this.device);
1231
-
1232
- enquiry.presentation_format = this.#presentation_format;
1231
+ const enquiry = this.#extension_enquiry();
1233
1232
 
1234
1233
  extension.enquirePipelines(enquiry);
1235
1234
 
@@ -1568,12 +1567,13 @@ export class Renderer {
1568
1567
  break;
1569
1568
 
1570
1569
  case ShadeIndirectLightingMode.ScreenProbes: {
1571
- // the diffuse is the screen probes', resolved once the bent normals exist; the specular the world-space
1572
- // probes', as under the probe clipmap
1570
+ // the diffuse is the screen probes', resolved once the bent normals exist; the specular their rough
1571
+ // specular, and the world-space probes' by the share they keep, as under the probe clipmap
1573
1572
  const diffuse = this.#screen_probe_gi.graph_resolve({
1574
1573
  graph,
1575
1574
  depth: gr_texture_depth_current,
1576
1575
  depth_previous: gr_texture_depth_previous,
1576
+ normal: gr_texture_normal,
1577
1577
  pbr: gr_texture_pbr,
1578
1578
  velocity: gr_velocity,
1579
1579
  bent_normals,
@@ -1599,6 +1599,7 @@ export class Renderer {
1599
1599
  camera: gr_buffer_camera_current,
1600
1600
  }),
1601
1601
  tScreenProbeDiffuse: diffuse,
1602
+ tScreenProbeSpecular: this.#screen_probe_gi.specular_handle,
1602
1603
  }),
1603
1604
  });
1604
1605
 
@@ -1710,6 +1711,7 @@ export class Renderer {
1710
1711
  input_environment: gr_texture_environment,
1711
1712
  brick4: ssr_brick4,
1712
1713
  input_indirect_diffuse: mode === ShadeIndirectLightingMode.ProbeClipmap || mode === ShadeIndirectLightingMode.ScreenProbes ? indirect_diffuse : undefined,
1714
+ input_screen_probe_specular: mode === ShadeIndirectLightingMode.ScreenProbes ? this.#screen_probe_gi.specular_handle : undefined,
1713
1715
  // in every mode: a clipmap of no cascade while it has no probes
1714
1716
  probes: this.#probe_clipmap_gi,
1715
1717
  shader_switches: this.#shader_switches,
@@ -2145,6 +2147,24 @@ export class Renderer {
2145
2147
  this.#prepare_pipelines();
2146
2148
  }
2147
2149
 
2150
+ /**
2151
+ * An enquiry for an extension to offer its pipelines to: the canvas's format, the renderer's shader switches as
2152
+ * they stand, and the scene colour's format.
2153
+ *
2154
+ * @returns {PipelineEnquiry}
2155
+ */
2156
+ #extension_enquiry() {
2157
+ const enquiry = PipelineEnquiry.from(this.device);
2158
+
2159
+ this.#update_shader_switches();
2160
+
2161
+ enquiry.presentation_format = this.#presentation_format;
2162
+ enquiry.shader_switches = this.#shader_switches;
2163
+ enquiry.scene_color_format = shader_deferred_main.variant(this.#shader_switches).pipeline.fragment.targets[0].format;
2164
+
2165
+ return enquiry;
2166
+ }
2167
+
2148
2168
  /**
2149
2169
  * Offer the core (non-extension) pipelines a frame draws with.
2150
2170
  *
@@ -2277,9 +2297,7 @@ export class Renderer {
2277
2297
  return;
2278
2298
  }
2279
2299
 
2280
- const ext_enquiry = PipelineEnquiry.from(this.device);
2281
-
2282
- ext_enquiry.presentation_format = this.#presentation_format;
2300
+ const ext_enquiry = this.#extension_enquiry();
2283
2301
 
2284
2302
  extension.enquirePipelines(ext_enquiry);
2285
2303
 
@@ -2829,6 +2847,16 @@ export class Renderer {
2829
2847
  */
2830
2848
  #frame_ahead_absorbed = null;
2831
2849
 
2850
+ /** What the scene's brick clipmap is built with each frame, kept rather than made. */
2851
+ #brick_world_update = { graph: null, view: null, settings: null, movers: -1 };
2852
+
2853
+ /**
2854
+ * The graph the next frame's FrameStart extensions record ahead into ({@link FrameContext#early_graph}): made again
2855
+ * only after a frame recorded into it.
2856
+ * @type {FrameGraph|null}
2857
+ */
2858
+ #ahead_graph = null;
2859
+
2832
2860
  /**
2833
2861
  * The virtual-geometry runtime whose frame the frame in {@link #frame_command_ctx} opened, and
2834
2862
  * null otherwise — so a frame that throws before closing it still closes it.
@@ -2894,8 +2922,9 @@ export class Renderer {
2894
2922
  const ctx = ShadeGPUCommandContext.create(graphics, "Renderer/ahead");
2895
2923
 
2896
2924
  if (recorder !== null) {
2925
+ // its passes are timed under their labels; the profile's graph, whose structure it records and whose pass ids
2926
+ // its spans name, is the frame's own
2897
2927
  ctx.enable_profiling(recorder, AHEAD_QUERY_SET);
2898
- recorder.attach_graph(graph);
2899
2928
 
2900
2929
  this.#frame_ahead_absorbed = ctx.profiling_absorbed;
2901
2930
  }
@@ -3054,7 +3083,13 @@ export class Renderer {
3054
3083
  producers at `FrameStart` (such as `GPUFluidSystem` publishing `GPUSceneWind`) have finalized
3055
3084
  their atlas and uniforms before `scene.tick` encodes.
3056
3085
  */
3057
- const early_graph = new FrameGraph("Ahead");
3086
+ // a graph nothing was recorded into last frame serves again: a frame graph is single-use, but an untouched one
3087
+ // has not been used
3088
+ if (this.#ahead_graph === null || !this.#ahead_graph.untouched) {
3089
+ this.#ahead_graph = new FrameGraph("Ahead");
3090
+ }
3091
+
3092
+ const early_graph = this.#ahead_graph;
3058
3093
  const frame = new FrameContext(graph, view_ctx, early_graph);
3059
3094
  const extension_filter = this.#in_canvas_render
3060
3095
  && !this.#wait_for_extensions_ready
@@ -3388,12 +3423,18 @@ export class Renderer {
3388
3423
  // The scene's brick clipmap for whoever else holds it, the acoustics, under any mode: built here, where the
3389
3424
  // probe clipmap GI builds it, after the frame's movers. Once a frame, so nothing when the GI built it above,
3390
3425
  // and nothing when nobody holds it.
3391
- view_ctx.scene.brick_clipmap.graph_update({
3392
- graph,
3393
- view: view_ctx,
3394
- settings: this.probe_clipmap,
3395
- movers: gr_scene_movers,
3396
- });
3426
+ const world = this.#brick_world_update;
3427
+
3428
+ world.graph = graph;
3429
+ world.view = view_ctx;
3430
+ world.settings = this.probe_clipmap;
3431
+ world.movers = gr_scene_movers;
3432
+
3433
+ view_ctx.scene.brick_clipmap.graph_update(world);
3434
+
3435
+ world.graph = null;
3436
+ world.view = null;
3437
+ world.settings = null;
3397
3438
 
3398
3439
  if (screen_probes) {
3399
3440
  this.#screen_probe_gi.graph_update({
@@ -3648,6 +3689,19 @@ export class Renderer {
3648
3689
 
3649
3690
  record_scene_color.color = current_color_out;
3650
3691
 
3692
+ // what an extension lighting samples of its own needs and only the frame has: the inputs the transparent
3693
+ // surfaces below are lit by
3694
+ frame.create(ViewLighting).state({
3695
+ light_cluster_parameters: light_clusters.parameters,
3696
+ light_cluster_lookup: light_clusters.lookup,
3697
+ light_cluster_data: light_clusters.data,
3698
+ shadowmap_atlas: gr_shadowmap_atlas,
3699
+ volumetrics_lut: volumetrics.resolved,
3700
+ volumetrics_metadata: volumetrics.metadata,
3701
+ shader_switches: this.#shader_switches,
3702
+ probes: this.#probe_clipmap_gi,
3703
+ });
3704
+
3651
3705
  this.#extensions.run(frame, extension_filter);
3652
3706
 
3653
3707
  current_color_out = record_scene_color.color;
@@ -3790,6 +3844,21 @@ export class Renderer {
3790
3844
  view_mode: this.screen_probes.debug_view,
3791
3845
  depth: gr_texture_depth_current,
3792
3846
  resolution: resolution_internal.asArray(),
3847
+ // only the specular view draws the fused pass, which reads them
3848
+ indirect: this.screen_probes.debug_view !== ScreenProbeDebugView.IndirectSpecular ? undefined : this.#probe_clipmap_gi.write_sampling_bindings({
3849
+ ...this.#probe_clipmap_indirect_inputs({
3850
+ view_ctx,
3851
+ depth: gr_texture_depth_current,
3852
+ normal: gr_texture_normal,
3853
+ bent_normal: bent_normals,
3854
+ albedo_ao: gr_texture_material_albedo_ao,
3855
+ pbr: gr_texture_pbr,
3856
+ environment: gr_texture_environment,
3857
+ camera: gr_buffer_camera_current,
3858
+ }),
3859
+ tScreenProbeDiffuse: this.#screen_probe_gi.diffuse_handle,
3860
+ tScreenProbeSpecular: this.#screen_probe_gi.specular_handle,
3861
+ }),
3793
3862
  });
3794
3863
  } else if (
3795
3864
  (this.indirect_lighting_mode === ShadeIndirectLightingMode.ProbeClipmap || screen_probes)
@@ -12,6 +12,12 @@ export class StaticGraphicsEngineAssets {
12
12
  * @type {ShadeTexture}
13
13
  */
14
14
  split_sum: ShadeTexture;
15
+ /**
16
+ * Strand hair's average scattering, which dual scattering reads (`hair_scattering_lut.js`): x the view's
17
+ * sin to the fibre, y the roughness, z the square root of the colour; front, then back.
18
+ * @type {ShadeTexture}
19
+ */
20
+ hair_scattering: ShadeTexture;
15
21
  #private;
16
22
  }
17
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"STATIC_GRAPHICS_ENGINE_ASSETS.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.js"],"names":[],"mappings":"AAIA;IAII;;;OAGG;IACH,qBAMC;IAsBG,wBAA6C;IAC7C,wBAA6C;IAC7C,wBAA6C;IAM7C;;;OAGG;IACH,WAFU,YAAY,CAEuB;;CAKpD;AAED;;;GAGG;AACH,4CAFU,0BAA0B,CAE0C;6BA/DjD,2BAA2B"}
1
+ {"version":3,"file":"STATIC_GRAPHICS_ENGINE_ASSETS.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.js"],"names":[],"mappings":"AAIA;IAII;;;OAGG;IACH,qBAMC;IAwBG,wBAA6C;IAC7C,wBAA6C;IAC7C,wBAA6C;IAM7C;;;OAGG;IACH,WAFU,YAAY,CAEuB;IAG7C;;;;OAIG;IACH,iBAFU,YAAY,CAEmC;;CAKhE;AAED;;;GAGG;AACH,4CAFU,0BAA0B,CAE0C;6BAzEjD,2BAA2B"}
@@ -31,11 +31,13 @@ export class StaticGraphicsEngineAssets {
31
31
  stbn_vec2,
32
32
  stbn_vec3,
33
33
  split_sum,
34
+ hair_scattering,
34
35
  ] = await Promise.all([
35
36
  shade_load_data_image(asset_url('stbn_vec1.bin')),
36
37
  shade_load_data_image(asset_url('stbn_vec2.bin')),
37
38
  shade_load_data_image(asset_url('stbn_vec3.bin')),
38
39
  shade_load_data_image(asset_url('split_sum.bin')),
40
+ shade_load_data_image(asset_url('hair_scattering.bin')),
39
41
  ])
40
42
 
41
43
  this.stbn_vec1 = ShadeTexture.from(stbn_vec1);
@@ -53,6 +55,14 @@ export class StaticGraphicsEngineAssets {
53
55
  this.split_sum = ShadeTexture.from(split_sum);
54
56
  this.split_sum.clearFlag(ShadeTextureFlags.GenerateMipMaps);
55
57
 
58
+ /**
59
+ * Strand hair's average scattering, which dual scattering reads (`hair_scattering_lut.js`): x the view's
60
+ * sin to the fibre, y the roughness, z the square root of the colour; front, then back.
61
+ * @type {ShadeTexture}
62
+ */
63
+ this.hair_scattering = ShadeTexture.from(hair_scattering);
64
+ this.hair_scattering.clearFlag(ShadeTextureFlags.GenerateMipMaps);
65
+
56
66
  }
57
67
 
58
68
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Workgroups of 64 the listener's rays take, and so the chunks a source's coupling is summed in.
3
+ * @type {number}
4
+ */
5
+ export const ACOUSTIC_LISTENER_GROUPS: number;
6
+ /**
7
+ * Vec4s of a listener workgroup's sums: `acoustic_listener_sums`'s three.
8
+ * @type {number}
9
+ */
10
+ export const ACOUSTIC_LISTENER_PARTIAL_VEC4S: number;
11
+ /**
12
+ * Vec4s of a source's coupling a chunk: its first-order reflections per band, and the chunk's rays that hit anything.
13
+ * @type {number}
14
+ */
15
+ export const ACOUSTIC_COUPLING_PARTIAL_VEC4S: number;
16
+ /** The Fibonacci point each lane of the listener pass traces (`acoustic_listener_order`), made once. */
17
+ export const ACOUSTIC_LISTENER_ORDER_RESOURCE: ShaderResourceDescriptor;
18
+ /** The frame's listener hits, a lane's at its own place, as the listener pass writes them and the coupling reads them. */
19
+ export const ACOUSTIC_LISTENER_HITS_STORE_RESOURCE: ShaderResourceDescriptor;
20
+ export const ACOUSTIC_LISTENER_HITS_RESOURCE: ShaderResourceDescriptor;
21
+ /** The listener workgroups' sums, as written and as the room reads them. */
22
+ export const ACOUSTIC_LISTENER_PARTIALS_STORE_RESOURCE: ShaderResourceDescriptor;
23
+ export const ACOUSTIC_LISTENER_PARTIALS_RESOURCE: ShaderResourceDescriptor;
24
+ /** Each source's coupling sums a chunk, as written and as the source pass reads them. */
25
+ export const ACOUSTIC_COUPLING_PARTIALS_STORE_RESOURCE: ShaderResourceDescriptor;
26
+ export const ACOUSTIC_COUPLING_PARTIALS_RESOURCE: ShaderResourceDescriptor;
27
+ import { ShaderResourceDescriptor } from "../shader/resource/ShaderResourceDescriptor.js";
28
+ //# sourceMappingURL=ACOUSTIC_LISTENER_RESOURCES.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ACOUSTIC_LISTENER_RESOURCES.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,uCAFU,MAAM,CAEoD;AAKpE;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD,wGAAwG;AACxG,wEAAyI;AAEzI,0HAA0H;AAC1H,6EAA4K;AAC5K,uEAAgK;AAEhK,4EAA4E;AAC5E,iFAA6J;AAC7J,2EAAiJ;AAEjJ,yFAAyF;AACzF,iFAA6J;AAC7J,2EAAiJ;yCAvCxG,gDAAgD"}
@@ -0,0 +1,42 @@
1
+ import { assert } from "../../../core/assert.js";
2
+ import { WORKGROUP_SUM_VEC4_LANES } from "../shader/chunk/subgroup/chunk_workgroup_sum_vec4.js";
3
+ import { ShaderResourceDescriptor } from "../shader/resource/ShaderResourceDescriptor.js";
4
+ import { u32, vec4f } from "../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
5
+ import { WebGPUArray } from "../shader/type/WebGPUArray.js";
6
+ import { ACOUSTIC_LISTENER_HIT_STRUCT, ACOUSTIC_LISTENER_RAYS } from "./chunk_acoustic_listener.js";
7
+
8
+ /**
9
+ * Workgroups of 64 the listener's rays take, and so the chunks a source's coupling is summed in.
10
+ * @type {number}
11
+ */
12
+ export const ACOUSTIC_LISTENER_GROUPS = ACOUSTIC_LISTENER_RAYS / 64;
13
+
14
+ // the room pass and the source pass sum the chunks a lane each, in one workgroup
15
+ assert.lessThanOrEqual(ACOUSTIC_LISTENER_GROUPS, WORKGROUP_SUM_VEC4_LANES, 'listener chunks a workgroup can sum');
16
+
17
+ /**
18
+ * Vec4s of a listener workgroup's sums: `acoustic_listener_sums`'s three.
19
+ * @type {number}
20
+ */
21
+ export const ACOUSTIC_LISTENER_PARTIAL_VEC4S = 3;
22
+
23
+ /**
24
+ * Vec4s of a source's coupling a chunk: its first-order reflections per band, and the chunk's rays that hit anything.
25
+ * @type {number}
26
+ */
27
+ export const ACOUSTIC_COUPLING_PARTIAL_VEC4S = 1;
28
+
29
+ /** The Fibonacci point each lane of the listener pass traces (`acoustic_listener_order`), made once. */
30
+ export const ACOUSTIC_LISTENER_ORDER_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_listener_order", WebGPUArray.from(u32));
31
+
32
+ /** The frame's listener hits, a lane's at its own place, as the listener pass writes them and the coupling reads them. */
33
+ export const ACOUSTIC_LISTENER_HITS_STORE_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_listener_hits", WebGPUArray.from(ACOUSTIC_LISTENER_HIT_STRUCT), true);
34
+ export const ACOUSTIC_LISTENER_HITS_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_listener_hits", WebGPUArray.from(ACOUSTIC_LISTENER_HIT_STRUCT));
35
+
36
+ /** The listener workgroups' sums, as written and as the room reads them. */
37
+ export const ACOUSTIC_LISTENER_PARTIALS_STORE_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_listener_partials", WebGPUArray.from(vec4f), true);
38
+ export const ACOUSTIC_LISTENER_PARTIALS_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_listener_partials", WebGPUArray.from(vec4f));
39
+
40
+ /** Each source's coupling sums a chunk, as written and as the source pass reads them. */
41
+ export const ACOUSTIC_COUPLING_PARTIALS_STORE_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_coupling_partials", WebGPUArray.from(vec4f), true);
42
+ export const ACOUSTIC_COUPLING_PARTIALS_RESOURCE = ShaderResourceDescriptor.storageBuffer("acoustic_coupling_partials", WebGPUArray.from(vec4f));
@@ -0,0 +1,58 @@
1
+ /**
2
+ * A sounding source as its direct path is traced to it: where it is and how large. Written by the host when the
3
+ * source starts and when it moves.
4
+ *
5
+ * @type {WebGPUStruct}
6
+ */
7
+ export const ACOUSTIC_SOURCE_STRUCT: WebGPUStruct;
8
+ /**
9
+ * What the frame that last traced a source found, at the source's own row: its direct path, and how strongly it
10
+ * excites the reverb where the listener is.
11
+ *
12
+ * @type {WebGPUStruct}
13
+ */
14
+ export const ACOUSTIC_DIRECT_STRUCT: WebGPUStruct;
15
+ /**
16
+ * The room about the listener, as the frame that last traced it measured it (`acoustic_room`).
17
+ *
18
+ * @type {WebGPUStruct}
19
+ */
20
+ export const ACOUSTIC_PROBE_RESULT_STRUCT: WebGPUStruct;
21
+ /** Names of the tables within {@link ACOUSTIC_PROBE_DATABASE_SPEC}. */
22
+ export const ACOUSTIC_SOURCE_TABLE: "acoustic_sources";
23
+ export const ACOUSTIC_DIRECT_TABLE: "acoustic_direct";
24
+ export const ACOUSTIC_PROBE_RESULT_TABLE: "acoustic_room";
25
+ /**
26
+ * A 16 KB page holds 1,024 sources, more than any voice budget.
27
+ * @type {number}
28
+ */
29
+ export const ACOUSTIC_PROBE_DATABASE_PAGE_SIZE: number;
30
+ /**
31
+ * The page address table and a page of each table, before the database grows itself.
32
+ * @type {number}
33
+ */
34
+ export const ACOUSTIC_PROBE_DATABASE_INITIAL_SIZE: number;
35
+ /**
36
+ * # The acoustics' database
37
+ *
38
+ * | Table | Row | Lifecycle |
39
+ * |---|---|---|
40
+ * | `acoustic_sources` | one {@link ACOUSTIC_SOURCE_STRUCT} per sounding source | added when its voice first plays acoustically, written when it moves, freed when it stops |
41
+ * | `acoustic_direct` | one {@link ACOUSTIC_DIRECT_STRUCT} at each source's row | written by the source pass in the frames that trace it, read back then |
42
+ * | `acoustic_room` | one {@link ACOUSTIC_PROBE_RESULT_STRUCT}, the room about the listener | written by the room pass every frame, read back then |
43
+ *
44
+ * A source's result is at its own row, so a pass a workgroup a source writes it without an index. A row freed and taken
45
+ * again is told apart by the host's generation of it, compared when its reading lands.
46
+ *
47
+ * @type {GPUDatabaseDefinition}
48
+ */
49
+ export const ACOUSTIC_PROBE_DATABASE_SPEC: GPUDatabaseDefinition;
50
+ /** @type {import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor} */
51
+ export const ACOUSTIC_SOURCE_DESCRIPTOR: import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor;
52
+ /** @type {import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor} */
53
+ export const ACOUSTIC_DIRECT_DESCRIPTOR: import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor;
54
+ /** @type {import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor} */
55
+ export const ACOUSTIC_PROBE_RESULT_DESCRIPTOR: import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor;
56
+ import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
57
+ import { GPUDatabaseDefinition } from "../buffer/table/GPUDatabaseDefinition.js";
58
+ //# sourceMappingURL=ACOUSTIC_PROBE_DATABASE_SPEC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ACOUSTIC_PROBE_DATABASE_SPEC.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,qCAFU,YAAY,CAOD;AAErB;;;;;GAKG;AACH,qCAFU,YAAY,CAeD;AAErB;;;;GAIG;AACH,2CAFU,YAAY,CAmBI;AAE1B,uEAAuE;AACvE,uDAAwD;AACxD,sDAAuD;AACvD,0DAA2D;AAE3D;;;GAGG;AACH,gDAFU,MAAM,CAE+C;AAE/D;;;GAGG;AACH,mDAFU,MAAM,CAEkD;AAElE;;;;;;;;;;;;;GAaG;AACH,2CAFU,qBAAqB,CAMO;AAEtC,2FAA2F;AAC3F,yCADW,OAAO,4CAA4C,EAAE,uBAAuB,CACW;AAElG,2FAA2F;AAC3F,yCADW,OAAO,4CAA4C,EAAE,uBAAuB,CACW;AAElG,2FAA2F;AAC3F,+CADW,OAAO,4CAA4C,EAAE,uBAAuB,CACuB;6BAxGjF,gCAAgC;sCAFvB,0CAA0C"}
@@ -0,0 +1,108 @@
1
+ import { KILOBYTE } from "../../../core/science/units/memory/KILOBYTE.js";
2
+ import { GPUDatabaseDefinition } from "../buffer/table/GPUDatabaseDefinition.js";
3
+ import { f32, vec3f } from "../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
4
+ import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
5
+
6
+ /**
7
+ * A sounding source as its direct path is traced to it: where it is and how large. Written by the host when the
8
+ * source starts and when it moves.
9
+ *
10
+ * @type {WebGPUStruct}
11
+ */
12
+ export const ACOUSTIC_SOURCE_STRUCT = WebGPUStruct.from({
13
+ /** world metres */
14
+ position: vec3f,
15
+ /** the source's sphere, metres: the disk its direct rays aim over */
16
+ radius: f32,
17
+ }, 'AcousticSource');
18
+
19
+ /**
20
+ * What the frame that last traced a source found, at the source's own row: its direct path, and how strongly it
21
+ * excites the reverb where the listener is.
22
+ *
23
+ * @type {WebGPUStruct}
24
+ */
25
+ export const ACOUSTIC_DIRECT_STRUCT = WebGPUStruct.from({
26
+ /** energy per band: 1 in the open, the walls' transmission behind them; kept from before where the cone did not resolve */
27
+ direct: vec3f,
28
+ /** 1 where the direct cone resolved in the frame that last traced it; 0 for a row no frame has traced yet */
29
+ answered: f32,
30
+ /**
31
+ * the reflected energy reaching the listener from the source, every order, per band, as a ratio to its free-field
32
+ * direct energy at 1 m: its first-order reflections off the listener's hits (`acoustic_listener_reflection`), and
33
+ * the orders after as the room's absorption has them
34
+ */
35
+ reverb: vec3f,
36
+ /** 1 where the room had any hit to reflect from */
37
+ reverb_rays: f32,
38
+ }, 'AcousticDirect');
39
+
40
+ /**
41
+ * The room about the listener, as the frame that last traced it measured it (`acoustic_room`).
42
+ *
43
+ * @type {WebGPUStruct}
44
+ */
45
+ export const ACOUSTIC_PROBE_RESULT_STRUCT = WebGPUStruct.from({
46
+ /** the diffuse field's energy per band, as a ratio to the free-field direct energy at 1 m */
47
+ energy: vec3f,
48
+ /** 1 where the listener stands inside a solid: no room to measure */
49
+ inside: f32,
50
+ /** the reverberation's time constant, per band, seconds: its centre time; 0 where no ray hit anything */
51
+ centre: vec3f,
52
+ /** the listener's rays that resolved; 0 for a frame not traced yet */
53
+ answered: f32,
54
+ /** where the room's reflecting surface lies as the listener sees it, a vector of length at most 1 */
55
+ lean: vec3f,
56
+ /** the share of the resolved rays that left into open air */
57
+ escaped: f32,
58
+ /** the absorption a reflection meets per band, the rays that left counted as absorbed; 1 where no ray hit */
59
+ absorption: vec3f,
60
+ /** the room's mean free path, metres, 4V/S; 0 where no ray hit */
61
+ mfp: f32,
62
+ }, 'AcousticProbeResult');
63
+
64
+ /** Names of the tables within {@link ACOUSTIC_PROBE_DATABASE_SPEC}. */
65
+ export const ACOUSTIC_SOURCE_TABLE = "acoustic_sources";
66
+ export const ACOUSTIC_DIRECT_TABLE = "acoustic_direct";
67
+ export const ACOUSTIC_PROBE_RESULT_TABLE = "acoustic_room";
68
+
69
+ /**
70
+ * A 16 KB page holds 1,024 sources, more than any voice budget.
71
+ * @type {number}
72
+ */
73
+ export const ACOUSTIC_PROBE_DATABASE_PAGE_SIZE = 16 * KILOBYTE;
74
+
75
+ /**
76
+ * The page address table and a page of each table, before the database grows itself.
77
+ * @type {number}
78
+ */
79
+ export const ACOUSTIC_PROBE_DATABASE_INITIAL_SIZE = 96 * KILOBYTE;
80
+
81
+ /**
82
+ * # The acoustics' database
83
+ *
84
+ * | Table | Row | Lifecycle |
85
+ * |---|---|---|
86
+ * | `acoustic_sources` | one {@link ACOUSTIC_SOURCE_STRUCT} per sounding source | added when its voice first plays acoustically, written when it moves, freed when it stops |
87
+ * | `acoustic_direct` | one {@link ACOUSTIC_DIRECT_STRUCT} at each source's row | written by the source pass in the frames that trace it, read back then |
88
+ * | `acoustic_room` | one {@link ACOUSTIC_PROBE_RESULT_STRUCT}, the room about the listener | written by the room pass every frame, read back then |
89
+ *
90
+ * A source's result is at its own row, so a pass a workgroup a source writes it without an index. A row freed and taken
91
+ * again is told apart by the host's generation of it, compared when its reading lands.
92
+ *
93
+ * @type {GPUDatabaseDefinition}
94
+ */
95
+ export const ACOUSTIC_PROBE_DATABASE_SPEC = GPUDatabaseDefinition.from({
96
+ [ACOUSTIC_SOURCE_TABLE]: ACOUSTIC_SOURCE_STRUCT,
97
+ [ACOUSTIC_DIRECT_TABLE]: ACOUSTIC_DIRECT_STRUCT,
98
+ [ACOUSTIC_PROBE_RESULT_TABLE]: ACOUSTIC_PROBE_RESULT_STRUCT,
99
+ }, ACOUSTIC_PROBE_DATABASE_PAGE_SIZE);
100
+
101
+ /** @type {import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor} */
102
+ export const ACOUSTIC_SOURCE_DESCRIPTOR = ACOUSTIC_PROBE_DATABASE_SPEC.get(ACOUSTIC_SOURCE_TABLE);
103
+
104
+ /** @type {import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor} */
105
+ export const ACOUSTIC_DIRECT_DESCRIPTOR = ACOUSTIC_PROBE_DATABASE_SPEC.get(ACOUSTIC_DIRECT_TABLE);
106
+
107
+ /** @type {import("../buffer/table/GPUTypedTableDescriptor.js").GPUTypedTableDescriptor} */
108
+ export const ACOUSTIC_PROBE_RESULT_DESCRIPTOR = ACOUSTIC_PROBE_DATABASE_SPEC.get(ACOUSTIC_PROBE_RESULT_TABLE);
@@ -55,7 +55,7 @@ export class GPUAcousticLattice {
55
55
  * @param {number} gz
56
56
  * @returns {number} the point's storage index: storage wraps, as the clipmaps' does
57
57
  */
58
- static "__#386@#storage"(c: number, gx: number, gy: number, gz: number): number;
58
+ static "__#605@#storage"(c: number, gx: number, gy: number, gz: number): number;
59
59
  /**
60
60
  * @param {GPUAcoustics} acoustics whose receivers the points are
61
61
  * @param {number} radius metres: the default source's, which the points stand for
@@ -0,0 +1,161 @@
1
+ /** Floats of a source's row, and of the room, as they land. */
2
+ export const ACOUSTIC_DIRECT_FLOATS: number;
3
+ export const ACOUSTIC_ROOM_FLOATS: number;
4
+ /** Where a source row's direct energy and its reverberant energy sit, in floats. */
5
+ export const ACOUSTIC_DIRECT_ENERGY: number;
6
+ export const ACOUSTIC_DIRECT_REVERB: number;
7
+ /**
8
+ * Floats of the room about the listener ({@link GPUAcousticProbes#room}): energy per band, centre time per band, lean.
9
+ * @type {number}
10
+ */
11
+ export const ACOUSTIC_REVERB_FLOATS: number;
12
+ /**
13
+ * # The acoustics on the device: one probe at the listener, its hits shared by every source
14
+ *
15
+ * Every frame, from the listener:
16
+ *
17
+ * - **Its rays** (`shader_acoustic_listener`): {@link ACOUSTIC_LISTENER_RAYS} rays along a fixed Fibonacci sphere, each to
18
+ * its first hit, nothing further. Each hit stands for the piece of surface and the cone of room its solid angle
19
+ * covers.
20
+ * - **The room** (`shader_acoustic_room`): their sums by statistical room acoustics, its volume, its surface and its
21
+ * absorption, so its mean free path and Eyring's decay and diffuse level per band, and where its reflecting surface
22
+ * lies (`acoustic_room`).
23
+ * - **Each heard source** (`shader_acoustic_coupling`, `shader_acoustic_source`): one trace from every hit to the
24
+ * source, its first-order reflections at the listener through whatever walls stand between, and every order after
25
+ * as the room's absorption has them; and its direct path, a cone over its disk, a lane a cell of it: the share each
26
+ * occluder leaves open, and what the walls let through.
27
+ *
28
+ * Nothing is baked and nothing is averaged over frames; the rays are the same every frame, so a still scene reads the
29
+ * same. What the frame traced is read back: the room and the heard sources' rows.
30
+ *
31
+ * ## A frame
32
+ *
33
+ * add / move / remove the host's sources, as they start, move and stop
34
+ * set_heard(row, heard) whether a source is traced this frame
35
+ * record({ graph, ... }) the frame's pass: the rows' upload, the listener, the room, the sources, the readback
36
+ * apply() at the owner's apply point; and again whenever a mapping lands between frames
37
+ *
38
+ * Nothing is allocated per frame at steady state.
39
+ */
40
+ export class GPUAcousticProbes {
41
+ /**
42
+ * Offer the pipelines the acoustics dispatch — see {@link PipelineEnquiry}.
43
+ *
44
+ * @param {PipelineEnquiry} enquiry
45
+ */
46
+ static enquirePipelines(enquiry: PipelineEnquiry): void;
47
+ /**
48
+ * @param {object} pass
49
+ * @param {*} resources
50
+ * @param {{encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
51
+ */
52
+ static "__#390@#execute"(pass: object, resources: any, context: {
53
+ encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
54
+ }): void;
55
+ /**
56
+ * @param {object} options
57
+ * @param {GPUDevice} options.device
58
+ * @param {(function(): void)|null} [options.on_landed] told when results land between frames, once applied
59
+ */
60
+ constructor({ device, on_landed }: {
61
+ device: GPUDevice;
62
+ on_landed?: (() => void) | null;
63
+ });
64
+ /**
65
+ * Sources live.
66
+ * @returns {number}
67
+ */
68
+ get count(): number;
69
+ /**
70
+ * Each source row's result as it last landed, {@link ACOUSTIC_DIRECT_FLOATS} a row, laid out as
71
+ * `ACOUSTIC_DIRECT_STRUCT` (direct energy at {@link ACOUSTIC_DIRECT_ENERGY}, its reverberant energy at the listener
72
+ * at {@link ACOUSTIC_DIRECT_REVERB}); a row's is its current source's once {@link answered}. Replaced when the rows
73
+ * grow.
74
+ * @returns {Float32Array}
75
+ */
76
+ get direct(): Float32Array;
77
+ /**
78
+ * The readback the results travel through. For inspection.
79
+ * @returns {GPUDatabaseReadback}
80
+ */
81
+ get readback(): GPUDatabaseReadback;
82
+ /**
83
+ * @param {number} row
84
+ * @returns {boolean} whether a reading of the row's current source has landed
85
+ */
86
+ answered(row: number): boolean;
87
+ /**
88
+ * A source starts: a row at `(x, y, z)` of radius `radius`, heard until told otherwise.
89
+ *
90
+ * @param {number} x world metres
91
+ * @param {number} y
92
+ * @param {number} z
93
+ * @param {number} radius metres, at least 0
94
+ * @returns {number} its row
95
+ */
96
+ add(x: number, y: number, z: number, radius: number): number;
97
+ /**
98
+ * The source moved, or its radius changed.
99
+ *
100
+ * @param {number} row
101
+ * @param {number} x
102
+ * @param {number} y
103
+ * @param {number} z
104
+ * @param {number} radius
105
+ */
106
+ move(row: number, x: number, y: number, z: number, radius: number): void;
107
+ /**
108
+ * Whether the source is traced: a source out of hearing keeps its last result and costs nothing.
109
+ *
110
+ * @param {number} row
111
+ * @param {boolean} heard
112
+ */
113
+ set_heard(row: number, heard: boolean): void;
114
+ /**
115
+ * The source stopped: its rows are freed, and a reading of them in flight is dropped.
116
+ *
117
+ * @param {number} row
118
+ */
119
+ remove(row: number): void;
120
+ /**
121
+ * The room about the listener as it last landed: none before the first, while the listener stands inside a solid,
122
+ * or where no ray of its resolved.
123
+ *
124
+ * @param {Float32Array} out {@link ACOUSTIC_REVERB_FLOATS}: energy per band (as a ratio to the free-field direct
125
+ * energy at 1 m), centre time per band (seconds), lean
126
+ * @returns {boolean} whether there is one
127
+ */
128
+ room(out: Float32Array): boolean;
129
+ /**
130
+ * Record the frame's pass into `graph`: the rows' upload, the listener's rays and the room they make, the heard
131
+ * sources' coupling and direct paths, traced through the bricks `clipmap` holds, then the readback's copy of what
132
+ * they wrote.
133
+ *
134
+ * @param {object} options
135
+ * @param {FrameGraph} options.graph
136
+ * @param {GPUBrickClipmap} options.clipmap
137
+ * @param {GPUBrickAcoustics} options.payload
138
+ * @param {ArrayLike<number>} options.listener world metres
139
+ * @param {ArrayLike<number>} options.air the ambient medium's absorption of energy per metre, per band
140
+ */
141
+ record({ graph, clipmap, payload, listener, air }: {
142
+ graph: FrameGraph;
143
+ clipmap: GPUBrickClipmap;
144
+ payload: GPUBrickAcoustics;
145
+ listener: ArrayLike<number>;
146
+ air: ArrayLike<number>;
147
+ }): void;
148
+ /**
149
+ * The apply point: once a frame at the owner's, and again whenever a mapping lands between frames.
150
+ * @returns {number} readings delivered
151
+ */
152
+ apply(): number;
153
+ destroy(): void;
154
+ #private;
155
+ }
156
+ export type FrameGraph = import("../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
157
+ export type GPUBrickClipmap = import("../global_illumination/probe_clipmap/brick/GPUBrickClipmap.js").GPUBrickClipmap;
158
+ export type GPUBrickAcoustics = import("./GPUBrickAcoustics.js").GPUBrickAcoustics;
159
+ export type PipelineEnquiry = import("../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry;
160
+ import { GPUDatabaseReadback } from "../buffer/table/GPUDatabaseReadback.js";
161
+ //# sourceMappingURL=GPUAcousticProbes.d.ts.map