@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
@@ -3,20 +3,14 @@ import { VGEO_CUT_FLAGS } from "./cut/VGEO_CUT_FLAGS.js";
3
3
  import { VGEO_CUT_STAT } from "./layout/VGEO_CUT_STAT.js";
4
4
  import { VGEO_CUT_STAT_COUNT } from "./layout/VGEO_CUT_STAT_COUNT.js";
5
5
 
6
- /**
7
- * Consecutive clean readings (`QUEUE_REMAINING === 0`) required before decaying `#max_iterations`
8
- * by one step toward `runtime.max_iterations`.
9
- */
10
- const ITERATION_DECAY_CLEAN_FRAMES = 8;
11
-
12
6
  /**
13
7
  * @typedef {import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime} GPUVirtualGeometryRuntime
14
8
  */
15
9
 
16
10
  /**
17
- * Per-view virtual-geometry cut state: view projection scale, adaptive wavefront iteration bound
18
- * with clean-streak decay, optional per-view `cone_culling` override, and plain uniform value
19
- * builder for `graph_import_typed_buffer`.
11
+ * Per-view virtual-geometry cut state: view projection scale, a wavefront iteration bound raised by
12
+ * this view's own readings and never lowered, optional per-view `cone_culling` override, and plain
13
+ * uniform value builder for `graph_import_typed_buffer`.
20
14
  *
21
15
  * @author Alex Goldring
22
16
  * @copyright Company Named Limited (c) 2026
@@ -56,6 +50,9 @@ export class VGeoViewCut {
56
50
  cone_culling = undefined;
57
51
 
58
52
  /**
53
+ * This view's wavefront bound as its own readings have raised it; 0 until one has. The view cuts
54
+ * at the larger of this and the runtime's starting bound — see {@link iterations_under}.
55
+ *
59
56
  * @type {number}
60
57
  */
61
58
  #max_iterations = 0;
@@ -66,11 +63,12 @@ export class VGeoViewCut {
66
63
  #iteration_escalations = 0;
67
64
 
68
65
  /**
69
- * Consecutive unshared clean readings (`QUEUE_REMAINING === 0`) while `#max_iterations` is
70
- * elevated above `runtime.max_iterations`.
66
+ * The first pool frame cut under the current {@link #max_iterations}. A reading of an earlier
67
+ * frame was cut under a lower bound and says nothing about this one.
68
+ *
71
69
  * @type {number}
72
70
  */
73
- #clean_descent_streak = 0;
71
+ #raised_at_frame = 0;
74
72
 
75
73
  /**
76
74
  * @type {Uint32Array}
@@ -142,6 +140,9 @@ export class VGeoViewCut {
142
140
  }
143
141
 
144
142
  /**
143
+ * Wavefronts this view's descent may run in a frame of `runtime`: the runtime's starting bound,
144
+ * or what this view's own readings have raised it to.
145
+ *
145
146
  * @param {GPUVirtualGeometryRuntime} runtime
146
147
  * @returns {number}
147
148
  */
@@ -150,6 +151,9 @@ export class VGeoViewCut {
150
151
  }
151
152
 
152
153
  /**
154
+ * Times this view's bound has been raised: at most log₂ of the ceiling over the starting bound,
155
+ * and zero for the life of almost every view.
156
+ *
153
157
  * @returns {number}
154
158
  */
155
159
  get iteration_escalations() {
@@ -157,36 +161,51 @@ export class VGeoViewCut {
157
161
  }
158
162
 
159
163
  /**
160
- * Escalate `#max_iterations` when `remaining > 0`, and decay step-by-step after
161
- * {@link ITERATION_DECAY_CLEAN_FRAMES} consecutive clean frames (`remaining === 0`) so a single
162
- * transient spike does not permanently lock 64 wavefronts for the lifetime of the view.
164
+ * A reading of this view's slot saying its descent stopped with work still queued — raise this
165
+ * view's bound and keep it raised.
163
166
  *
164
- * @param {number} remaining
165
- * @param {GPUVirtualGeometryRuntime} runtime
166
- * @returns {boolean} whether the bound moved upward
167
+ * **This is the only place the engine can learn it.** How many wavefronts a cut needs is a
168
+ * function of the frontier's *breadth*, which is a function of the scene, the viewpoint and the
169
+ * render target together; the kernel cannot know it before it runs and the host cannot know it
170
+ * at all. So the bound is guessed low, and the one reading that says the guess was wrong —
171
+ * `VGEO_CUT_STAT.QUEUE_REMAINING`, non-zero exactly when items were abandoned — pays for
172
+ * correcting it. It is the same shape as the rasterizer's meshlet counts, which cannot be known
173
+ * before the expansion runs either and are grown from what the frame reported.
174
+ *
175
+ * **Per view.** One bound for the frame let one hungry view — a far cascade, a point face in the
176
+ * shadow budget for one frame — double every site's ladder for the life of the scene
177
+ * (SHADOW_PLAN_2026_09_28 §2.4).
178
+ *
179
+ * **Doubling, because the reading does not say how much more was needed.** A remainder is a
180
+ * count of *items*, and what they cost in wavefronts depends on how they spill; there is no
181
+ * ratio to convert one into the other. So it goes up by a factor until it drains, which is at
182
+ * most three steps from 8 to the ceiling.
183
+ *
184
+ * **Only a frame cut under the current bound can raise it.** A reading lands frames after its
185
+ * cut and more than one is in flight, so the frames cut while the first truncated reading was on
186
+ * its way were cut under the same bound and report the same shortfall. Each says that bound was
187
+ * too few; none says anything about its double.
188
+ *
189
+ * **Never lowered.** A frame that drained is evidence about that frame, not that the scene got
190
+ * smaller — and a bound that fell back would re-learn the same lesson every time the camera
191
+ * turned away and back, at a hole a time. An unused wavefront is an empty indirect dispatch,
192
+ * which is the cheap side of that trade.
193
+ *
194
+ * @param {number} remaining items the descent still held when it was abandoned
195
+ * @param {number} frame the pool frame the descent ran in
196
+ * @param {GPUVirtualGeometryRuntime} runtime whose starting bound, ceiling and frame apply
197
+ * @returns {boolean} whether the bound moved
167
198
  */
168
- note_incomplete_descent(remaining, runtime) {
199
+ note_incomplete_descent(remaining, frame, runtime) {
169
200
  assert.isNonNegativeInteger(remaining, 'remaining');
201
+ assert.isNonNegativeInteger(frame, 'frame');
170
202
  assert.defined(runtime, 'runtime');
171
203
 
172
- const current = this.iterations_under(runtime);
173
-
174
- if (remaining === 0) {
175
- if (this.#max_iterations > runtime.max_iterations) {
176
- this.#clean_descent_streak++;
177
- if (this.#clean_descent_streak >= ITERATION_DECAY_CLEAN_FRAMES) {
178
- this.#clean_descent_streak = 0;
179
- const decayed = Math.max(runtime.max_iterations, Math.floor(this.#max_iterations / 2));
180
- this.#max_iterations = decayed <= runtime.max_iterations ? 0 : decayed;
181
- }
182
- } else {
183
- this.#max_iterations = 0;
184
- this.#clean_descent_streak = 0;
185
- }
204
+ if (remaining === 0 || frame < this.#raised_at_frame) {
186
205
  return false;
187
206
  }
188
207
 
189
- this.#clean_descent_streak = 0;
208
+ const current = this.iterations_under(runtime);
190
209
 
191
210
  if (current >= runtime.iteration_ceiling) {
192
211
  return false;
@@ -195,22 +214,39 @@ export class VGeoViewCut {
195
214
  this.#max_iterations = Math.min(current * 2, runtime.iteration_ceiling);
196
215
  this.#iteration_escalations++;
197
216
 
217
+ // the next frame begun is the first cut under it; a reading landing inside an open frame
218
+ // dates the raise one frame late, which can delay a raise and never repeat one
219
+ this.#raised_at_frame = runtime.pool.frame + 1;
220
+
198
221
  return true;
199
222
  }
200
223
 
201
224
  /**
202
- * @param {Uint32Array} words
203
- * @param {number} base
204
- * @param {boolean} shared
225
+ * Take this view's slot of a reading: its counters, and what they say about its descent.
226
+ *
227
+ * One counter is not a statistic, it is an instruction. `QUEUE_REMAINING` is non-zero exactly
228
+ * when the descent ran out of wavefronts and abandoned subtrees it had not expanded — a hole in
229
+ * the picture rather than a coarser surface — and this is the only moment anything on the host
230
+ * learns it.
231
+ *
232
+ * A slot two views shared — they were past the frame's layout — holds the sum of their counters,
233
+ * so a remainder in it says one of them ran out and not which. Escalating both would raise a
234
+ * bound that was never binding, for good; each has a slot of its own next frame, and escalates
235
+ * from that.
236
+ *
237
+ * @param {Uint32Array} words the reading
238
+ * @param {number} base where this slot's counters start in it
239
+ * @param {boolean} shared whether another consumer shared the slot
240
+ * @param {number} frame the pool frame the reading is about
205
241
  * @param {GPUVirtualGeometryRuntime} runtime
206
242
  */
207
- read_feedback(words, base, shared, runtime) {
243
+ read_feedback(words, base, shared, frame, runtime) {
208
244
  for (let i = 0; i < VGEO_CUT_STAT_COUNT; i++) {
209
245
  this.stats[i] = words[base + i];
210
246
  }
211
247
 
212
248
  if (!shared) {
213
- this.note_incomplete_descent(words[base + VGEO_CUT_STAT.QUEUE_REMAINING], runtime);
249
+ this.note_incomplete_descent(words[base + VGEO_CUT_STAT.QUEUE_REMAINING], frame, runtime);
214
250
  }
215
251
  }
216
252
 
@@ -1 +1 @@
1
- {"version":3,"file":"shader_brick4_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js"],"names":[],"mappings":"AA0MA,0DAwBE;4BA3M0B,mCAAmC"}
1
+ {"version":3,"file":"shader_brick4_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js"],"names":[],"mappings":"AA4MA,0DAwBE;4BA5M0B,mCAAmC"}
@@ -13,6 +13,7 @@ import { chunk_compute_indirect_specular } from "../../../../shader/chunk/materi
13
13
  import { chunk_decode_g_buffer_metalness } from "../../../../shader/chunk/material/chunk_decode_g_buffer_metalness.js";
14
14
  import { chunk_decode_g_buffer_roughness } from "../../../../shader/chunk/material/chunk_decode_g_buffer_roughness.js";
15
15
  import { chunk_metalness_to_specular_color } from "../../../../shader/chunk/material/chunk_metalness_to_specular_color.js";
16
+ import { chunk_metalness_to_specular_F90 } from "../../../../shader/chunk/material/chunk_metalness_to_specular_F90.js";
16
17
  import {
17
18
  chunk_sh3_color_estimate_for_cone
18
19
  } from "../../../../shader/chunk/spherical_harmonics/chunk_sh3_color_estimate_for_cone.js";
@@ -81,7 +82,7 @@ fn main(
81
82
  let alpha = roughness * roughness;
82
83
 
83
84
  let material_specularF0 = metalness_to_specular_color(f_metalness, albedo);
84
- let material_specularF90 = 1.0;
85
+ let material_specularF90 = metalness_to_specular_F90(f_metalness, albedo);
85
86
 
86
87
  let shading_normal = decode_g_buffer_normal(g_buffer_sample_normal.x);
87
88
  let bent_normal = decode_g_buffer_normal(g_buffer_bent_normal.x);
@@ -184,6 +185,7 @@ fn main(
184
185
  chunk_decode_g_buffer_metalness,
185
186
  chunk_decode_g_buffer_roughness,
186
187
  chunk_metalness_to_specular_color,
188
+ chunk_metalness_to_specular_F90,
187
189
  chunk_MIN_DIELECTRICS_F0,
188
190
  chunk_brick4_node_by_position,
189
191
  chunk_brick4_node_sample_probes_meta,
@@ -35,7 +35,7 @@ export class GPUProbeClipmapGI {
35
35
  * @param {ProbeClipmapSettings} settings
36
36
  * @returns {boolean} whether it is what the settings' world cache describes, in their frustum's windows
37
37
  */
38
- static "__#213@#world_cache_built_for"(world_cache: GPUProbeClipmap, settings: ProbeClipmapSettings): boolean;
38
+ static "__#212@#world_cache_built_for"(world_cache: GPUProbeClipmap, settings: ProbeClipmapSettings): boolean;
39
39
  /**
40
40
  * @param {GraphicsContext} graphics
41
41
  */
@@ -1,12 +1,3 @@
1
- /**
2
- * @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
3
- * @typedef {import("../../../GraphicsContext.js").GraphicsContext} GraphicsContext
4
- * @typedef {import("../../../scene/GPUSceneContext.js").GPUSceneContext} GPUSceneContext
5
- * @typedef {import("../../../view/GPUViewContext.js").GPUViewContext} GPUViewContext
6
- * @typedef {import("../ProbeClipmapSettings.js").ProbeClipmapSettings} ProbeClipmapSettings
7
- * @typedef {import("./GPUBrickClipmap.js").BrickProvider} BrickProvider
8
- * @typedef {import("./GPUBrickClipmap.js").BrickMaterialWriter} BrickMaterialWriter
9
- */
10
1
  /**
11
2
  * The world as rays see it, a service of one scene (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §6, §7; GPU acoustics
12
3
  * design, "What the tracer has to gain"): the {@link GPUBrickClipmap} around a view, the mesh provider that builds
@@ -1 +1 @@
1
- {"version":3,"file":"GPUSceneBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAiDI;;;OAGG;IACH,sBAHW,eAAe,SACf,eAAe,EAQzB;IAED;;;OAGG;IACH,oBAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;OAGG;IACH,qBAEC;IAED;;;OAGG;IACH,2BAKC;IAED;;;;;OAKG;IACH,sBAFa,OAAO,CAYnB;IAED;;;;;;OAMG;IACH,4BAFW,mBAAmB,QAU7B;IAED;;;OAGG;IACH,+BAHW,mBAAmB,GACjB,OAAO,CAYnB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAV+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACH,MAAM,GAAvB,MAAM;QAEY,QAAQ,GAA1B,OAAO;QAEL,MAAM,CAmElB;IAkED,gBASC;;CACJ;yBAlXY,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,6BAA6B,EAAE,eAAe;8BACrD,OAAO,mCAAmC,EAAE,eAAe;6BAC3D,OAAO,iCAAiC,EAAE,cAAc;mCACxD,OAAO,4BAA4B,EAAE,oBAAoB;4BACzD,OAAO,sBAAsB,EAAE,aAAa;kCAC5C,OAAO,sBAAsB,EAAE,mBAAmB;gCAV/B,sBAAsB;uCADf,8BAA8B"}
1
+ {"version":3,"file":"GPUSceneBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAqDI;;;OAGG;IACH,sBAHW,eAAe,SACf,eAAe,EAQzB;IAED;;;OAGG;IACH,oBAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;OAGG;IACH,qBAEC;IAED;;;OAGG;IACH,2BAKC;IAED;;;;;OAKG;IACH,sBAFa,OAAO,CAYnB;IAED;;;;;;OAMG;IACH,4BAFW,mBAAmB,QAU7B;IAED;;;OAGG;IACH,+BAHW,mBAAmB,GACjB,OAAO,CAYnB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAV+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACH,MAAM,GAAvB,MAAM;QAEY,QAAQ,GAA1B,OAAO;QAEL,MAAM,CA2ElB;IAkED,gBASC;;CACJ;yBA9YY,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,6BAA6B,EAAE,eAAe;8BACrD,OAAO,mCAAmC,EAAE,eAAe;6BAC3D,OAAO,iCAAiC,EAAE,cAAc;mCACxD,OAAO,4BAA4B,EAAE,oBAAoB;4BACzD,OAAO,sBAAsB,EAAE,aAAa;kCAC5C,OAAO,sBAAsB,EAAE,mBAAmB;gCAV/B,sBAAsB;uCADf,8BAA8B"}
@@ -13,6 +13,22 @@ import { MeshSDFBrickProvider } from "./mesh/MeshSDFBrickProvider.js";
13
13
  * @typedef {import("./GPUBrickClipmap.js").BrickMaterialWriter} BrickMaterialWriter
14
14
  */
15
15
 
16
+ /**
17
+ * What a frame's build is recorded with (`GPUBrickClipmap#graph_update`), kept rather than made: a class, so that a
18
+ * double stored in its anchor stays in place rather than boxed.
19
+ */
20
+ class BrickBuildOptions {
21
+ graph = null;
22
+ x = 0.5;
23
+ y = 0.5;
24
+ z = 0.5;
25
+ budget = 1;
26
+ providers = null;
27
+ material_writers = null;
28
+ scene = null;
29
+ movers = -1;
30
+ }
31
+
16
32
  /**
17
33
  * The world as rays see it, a service of one scene (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §6, §7; GPU acoustics
18
34
  * design, "What the tracer has to gain"): the {@link GPUBrickClipmap} around a view, the mesh provider that builds
@@ -67,6 +83,10 @@ export class GPUSceneBrickClipmap {
67
83
  */
68
84
  #providers = [];
69
85
 
86
+ /** What a frame's bake and build are recorded with, kept rather than made. */
87
+ #bake_options = { graph: null, budget: 0, surface_budget: 0, materials: null };
88
+ #build_options = new BrickBuildOptions();
89
+
70
90
  /**
71
91
  * What the build writes after its store, in the order they were added.
72
92
  * @type {BrickMaterialWriter[]}
@@ -266,12 +286,16 @@ export class GPUSceneBrickClipmap {
266
286
 
267
287
  sdf.configure(settings.mesh_sdf_voxel_size, settings.mesh_sdf_max_bricks);
268
288
  sdf.trim();
269
- sdf.graph_bake({
270
- graph,
271
- budget: settings.mesh_sdf_bake_budget,
272
- surface_budget: surfaces ? settings.surface_bake_budget : 0,
273
- materials: this.#graphics.materials_resident,
274
- });
289
+ const bake = this.#bake_options;
290
+
291
+ bake.graph = graph;
292
+ bake.budget = settings.mesh_sdf_bake_budget;
293
+ bake.surface_budget = surfaces ? settings.surface_bake_budget : 0;
294
+ bake.materials = this.#graphics.materials_resident;
295
+
296
+ sdf.graph_bake(bake);
297
+
298
+ bake.graph = null;
275
299
 
276
300
  // the surface caches the bake made resident, for this frame's readers
277
301
  this.#holds.flush();
@@ -283,17 +307,21 @@ export class GPUSceneBrickClipmap {
283
307
 
284
308
  const transform = view.camera.camera.transform;
285
309
 
286
- this.#bricks = this.#clipmap.graph_update({
287
- graph,
288
- x: transform[12],
289
- y: transform[13],
290
- z: transform[14],
291
- budget: settings.brick_build_budget,
292
- providers: this.#providers,
293
- material_writers: this.#material_writers,
294
- scene: this.#scene,
295
- movers,
296
- });
310
+ const build = this.#build_options;
311
+
312
+ build.graph = graph;
313
+ build.x = transform[12];
314
+ build.y = transform[13];
315
+ build.z = transform[14];
316
+ build.budget = settings.brick_build_budget;
317
+ build.providers = this.#providers;
318
+ build.material_writers = this.#material_writers;
319
+ build.scene = this.#scene;
320
+ build.movers = movers;
321
+
322
+ this.#bricks = this.#clipmap.graph_update(build);
323
+
324
+ build.graph = null;
297
325
 
298
326
  this.#graph = graph;
299
327
 
@@ -117,7 +117,8 @@ export const chunk_brick_clipmap_march: CodeChunk;
117
117
  *
118
118
  * A march that spends its steps is unresolved, at the `t` it reached: the probe rays discard it (§8.8),
119
119
  * and a caller that resumes it marches on from there. One past `t_max`, or out of every window, is a
120
- * miss. `steps` in the hit is how many it took, so a caller that bounds several marches by one budget
120
+ * miss; `unknown` on a miss says it left through a cell no cascade has built yet, which a caller that must
121
+ * not take unbuilt space for open air reads. `steps` in the hit is how many it took, so a caller that bounds several marches by one budget
121
122
  * passes on what is left.
122
123
  *
123
124
  * @type {CodeChunk}
@@ -146,15 +147,18 @@ export const chunk_brick_clipmap_trace: CodeChunk;
146
147
  */
147
148
  export const chunk_brick_clipmap_trace_through: CodeChunk;
148
149
  /**
149
- * The finest cascade's signed distance at a point (§7.9), for probe relocation.
150
+ * The finest cascade's signed distance at a point (§7.9), for probe relocation; and with it the cell
151
+ * that answered.
150
152
  *
151
153
  * ```wgsl
152
154
  * fn brick_clipmap_distance(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> f32
155
+ * fn brick_clipmap_point(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> BrickClipmapPoint
153
156
  * ```
154
157
  *
155
158
  * The finest window holding the point answers, unless its cell is UNKNOWN, which defers to the
156
159
  * parent. EMPTY reads R of its cascade, EMPTY inside -R: the surface is at least that far. A point no
157
- * window holds, or that only UNKNOWN cells cover, reads R of the coarsest cascade.
160
+ * window holds, or that only UNKNOWN cells cover, reads R of the coarsest cascade, its entry UNKNOWN.
161
+ * The point's `entry` is the answering cell's (a slot, EMPTY or EMPTY inside) and `voxel` its cascade's.
158
162
  *
159
163
  * @type {CodeChunk}
160
164
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,gCAFU,MAAM,CAEwB;AAExC;;;;GAIG;AACH,qCAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,yCAFU,wBAAwB,CAEoE;AAEtG;;;GAGG;AACH,+CAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;;;;;;;;;;;;;;;;GAkBG;AACH,yCAFU,SAAS,CAyCZ;AAKP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAyBZ;AAIP;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wCAFU,SAAS,CAgFZ;AAKP;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wCAFU,SAAS,CA4GZ;AAEP;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gDAFU,SAAS,CA0FZ;AAEP;;;;;;;;;;;;GAYG;AACH,2CAFU,SAAS,CAsCZ;AAIP;;;;;;;;;;;;;;GAcG;AACH,2CAFU,SAAS,CA0BZ;yCA7lBkC,sDAAsD;0BADrE,uCAAuC"}
1
+ {"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,gCAFU,MAAM,CAEwB;AAExC;;;;GAIG;AACH,qCAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,yCAFU,wBAAwB,CAEoE;AAEtG;;;GAGG;AACH,+CAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;;;;;;;;;;;;;;;;GAkBG;AACH,yCAFU,SAAS,CAyCZ;AAKP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAyBZ;AAIP;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wCAFU,SAAS,CAmFZ;AAKP;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wCAFU,SAAS,CAgHZ;AAEP;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gDAFU,SAAS,CA6FZ;AAEP;;;;;;;;;;;;;;;GAeG;AACH,2CAFU,SAAS,CA4DZ;AAIP;;;;;;;;;;;;;;GAcG;AACH,2CAFU,SAAS,CA0BZ;yCAjoBkC,sDAAsD;0BADrE,uCAAuC"}
@@ -215,6 +215,8 @@ struct BrickClipmapMarch {
215
215
  voxel: f32,
216
216
  /** where the march stands */
217
217
  position: vec3<f32>,
218
+ /** it left every window through a cell no cascade has built yet, not through open air */
219
+ unknown: bool,
218
220
  }
219
221
 
220
222
  fn brick_clipmap_march(origin: vec3<f32>, direction: vec3<f32>, cascade_count: u32, march: ptr<function, BrickClipmapMarch>) -> u32 {
@@ -249,6 +251,7 @@ fn brick_clipmap_march(origin: vec3<f32>, direction: vec3<f32>, cascade_count: u
249
251
 
250
252
  if (entry == BRICK_CLIPMAP_UNKNOWN) {
251
253
  (*march).cascade++;
254
+ (*march).unknown = (*march).cascade >= cascade_count;
252
255
 
253
256
  return select(BRICK_MARCH_MOVED, BRICK_MARCH_LEFT, (*march).cascade >= cascade_count);
254
257
  }
@@ -296,7 +299,8 @@ chunk_brick_clipmap_march.requireResource(BRICK_OCCUPANCY_TEXTURE_RESOURCE);
296
299
  *
297
300
  * A march that spends its steps is unresolved, at the `t` it reached: the probe rays discard it (§8.8),
298
301
  * and a caller that resumes it marches on from there. One past `t_max`, or out of every window, is a
299
- * miss. `steps` in the hit is how many it took, so a caller that bounds several marches by one budget
302
+ * miss; `unknown` on a miss says it left through a cell no cascade has built yet, which a caller that must
303
+ * not take unbuilt space for open air reads. `steps` in the hit is how many it took, so a caller that bounds several marches by one budget
300
304
  * passes on what is left.
301
305
  *
302
306
  * @type {CodeChunk}
@@ -325,6 +329,8 @@ struct BrickClipmapHit {
325
329
  cell_min: vec3<f32>,
326
330
  /** steps the march took */
327
331
  steps: u32,
332
+ /** a miss that left through space no cascade has built yet: what lies there is not known */
333
+ unknown: bool,
328
334
  }
329
335
 
330
336
  fn brick_clipmap_trace(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_max: f32, cascade_count: u32, atlas_shift: u32) -> BrickClipmapHit {
@@ -357,6 +363,8 @@ fn brick_clipmap_trace_steps(origin: vec3<f32>, direction: vec3<f32>, t_min: f32
357
363
  let stood = brick_clipmap_march(origin, direction, cascade_count, &march);
358
364
 
359
365
  if (stood == BRICK_MARCH_LEFT) {
366
+ hit.unknown = march.unknown;
367
+
360
368
  return hit;
361
369
  }
362
370
 
@@ -440,6 +448,8 @@ struct BrickClipmapExit {
440
448
  t: f32,
441
449
  /** steps the march took */
442
450
  steps: u32,
451
+ /** a miss that left through space no cascade has built yet */
452
+ unknown: bool,
443
453
  }
444
454
 
445
455
  fn brick_clipmap_trace_through(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_max: f32, cascade_count: u32, atlas_shift: u32, steps: u32) -> BrickClipmapExit {
@@ -471,6 +481,7 @@ fn brick_clipmap_trace_through(origin: vec3<f32>, direction: vec3<f32>, t_min: f
471
481
 
472
482
  if (stood == BRICK_MARCH_LEFT) {
473
483
  exit.t = before;
484
+ exit.unknown = march.unknown;
474
485
 
475
486
  return exit;
476
487
  }
@@ -521,23 +532,33 @@ fn brick_clipmap_trace_through(origin: vec3<f32>, direction: vec3<f32>, t_min: f
521
532
  ]);
522
533
 
523
534
  /**
524
- * The finest cascade's signed distance at a point (§7.9), for probe relocation.
535
+ * The finest cascade's signed distance at a point (§7.9), for probe relocation; and with it the cell
536
+ * that answered.
525
537
  *
526
538
  * ```wgsl
527
539
  * fn brick_clipmap_distance(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> f32
540
+ * fn brick_clipmap_point(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> BrickClipmapPoint
528
541
  * ```
529
542
  *
530
543
  * The finest window holding the point answers, unless its cell is UNKNOWN, which defers to the
531
544
  * parent. EMPTY reads R of its cascade, EMPTY inside -R: the surface is at least that far. A point no
532
- * window holds, or that only UNKNOWN cells cover, reads R of the coarsest cascade.
545
+ * window holds, or that only UNKNOWN cells cover, reads R of the coarsest cascade, its entry UNKNOWN.
546
+ * The point's `entry` is the answering cell's (a slot, EMPTY or EMPTY inside) and `voxel` its cascade's.
533
547
  *
534
548
  * @type {CodeChunk}
535
549
  */
536
550
  export const chunk_brick_clipmap_distance = CodeChunk.from(
537
551
  //language=WGSL
538
552
  `
539
- fn brick_clipmap_distance(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> f32 {
553
+ struct BrickClipmapPoint {
554
+ distance: f32,
555
+ entry: u32,
556
+ voxel: f32,
557
+ }
558
+
559
+ fn brick_clipmap_point(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> BrickClipmapPoint {
540
560
  let count = min(cascade_count, ${CLIPMAP_LEVEL_LIMIT}u);
561
+ var point: BrickClipmapPoint;
541
562
 
542
563
  for (var c = 0u; c < count; c++) {
543
564
  let level = brick_levels[c];
@@ -556,14 +577,29 @@ fn brick_clipmap_distance(position: vec3<f32>, cascade_count: u32, atlas_shift:
556
577
  continue;
557
578
  }
558
579
 
580
+ point.entry = entry;
581
+ point.voxel = voxel;
582
+
559
583
  if (!brick_clipmap_entry_holds_slot(entry)) {
560
- return select(1.0, -1.0, entry == BRICK_CLIPMAP_EMPTY_INSIDE) * BRICK_CLIPMAP_BAND_VOXELS * voxel;
584
+ point.distance = select(1.0, -1.0, entry == BRICK_CLIPMAP_EMPTY_INSIDE) * BRICK_CLIPMAP_BAND_VOXELS * voxel;
585
+
586
+ return point;
561
587
  }
562
588
 
563
- return brick_clipmap_sample(entry, (position - vec3<f32>(cell) * level.cell_size) / voxel, voxel, atlas_shift);
589
+ point.distance = brick_clipmap_sample(entry, (position - vec3<f32>(cell) * level.cell_size) / voxel, voxel, atlas_shift);
590
+
591
+ return point;
564
592
  }
565
593
 
566
- return BRICK_CLIPMAP_BAND_VOXELS * brick_levels[max(count, 1u) - 1u].cell_size / ${MESH_SDF_BRICK_VOXELS}.0;
594
+ point.voxel = brick_levels[max(count, 1u) - 1u].cell_size / ${MESH_SDF_BRICK_VOXELS}.0;
595
+ point.distance = BRICK_CLIPMAP_BAND_VOXELS * point.voxel;
596
+ point.entry = BRICK_CLIPMAP_UNKNOWN;
597
+
598
+ return point;
599
+ }
600
+
601
+ fn brick_clipmap_distance(position: vec3<f32>, cascade_count: u32, atlas_shift: u32) -> f32 {
602
+ return brick_clipmap_point(position, cascade_count, atlas_shift).distance;
567
603
  }
568
604
  `, [
569
605
  chunk_brick_clipmap,
@@ -1 +1 @@
1
- {"version":3,"file":"shader_probe_clipmap_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js"],"names":[],"mappings":"AAyIA;;;;;;;;;;;;;GAaG;AACH,qDAFU,WAAW,CA0BlB;4BA1JyB,gCAAgC"}
1
+ {"version":3,"file":"shader_probe_clipmap_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js"],"names":[],"mappings":"AA2IA;;;;;;;;;;;;;GAaG;AACH,qDAFU,WAAW,CA0BlB;4BA3JyB,gCAAgC"}
@@ -14,6 +14,7 @@ import { chunk_compute_indirect_specular } from "../../../shader/chunk/material/
14
14
  import { chunk_decode_g_buffer_metalness } from "../../../shader/chunk/material/chunk_decode_g_buffer_metalness.js";
15
15
  import { chunk_decode_g_buffer_roughness } from "../../../shader/chunk/material/chunk_decode_g_buffer_roughness.js";
16
16
  import { chunk_metalness_to_specular_color } from "../../../shader/chunk/material/chunk_metalness_to_specular_color.js";
17
+ import { chunk_metalness_to_specular_F90 } from "../../../shader/chunk/material/chunk_metalness_to_specular_F90.js";
17
18
  import { chunk_stbn_sample_vec2 } from "../../../shader/chunk/noise/chunk_stbn_sample_vec2.js";
18
19
  import {
19
20
  chunk_sh3_color_get_irradiance_at
@@ -107,7 +108,7 @@ fn main(
107
108
  metalness_to_specular_color(f_metalness, albedo),
108
109
  vec3(MIN_DIELECTRICS_F0),
109
110
  albedo,
110
- 1.0,
111
+ metalness_to_specular_F90(f_metalness, albedo),
111
112
  roughness,
112
113
  );
113
114
 
@@ -123,6 +124,7 @@ fn main(
123
124
  chunk_decode_g_buffer_metalness,
124
125
  chunk_decode_g_buffer_roughness,
125
126
  chunk_metalness_to_specular_color,
127
+ chunk_metalness_to_specular_F90,
126
128
  chunk_MIN_DIELECTRICS_F0,
127
129
  chunk_stbn_sample_vec2,
128
130
  chunk_probe_clipmap_pick,
@@ -12,12 +12,12 @@
12
12
  * it wants); its BRDF and lighting densities and its rays, reassigned to where its light is; the screen trace; the
13
13
  * bricks' trace, shade, local light and bounce of what the screen left; the hits' wants; the composite into each
14
14
  * probe's radiance, the spatial filter's passes, and the probes' SH3.
15
- * 3. **Resolve** ({@link graph_resolve}), once the bent normals exist: each pixel's irradiance from its probes, then
16
- * the temporal filter into the frame's diffuse, which the deferred passes read.
15
+ * 3. **Resolve** ({@link graph_resolve}), once the bent normals exist: each pixel's irradiance and rough specular from
16
+ * its probes, then the temporal filter into the frame's diffuse and specular, which the deferred passes read.
17
17
  * 4. **Capture** ({@link graph_capture}): the lit colour of the opaque surfaces, for the next frame's screen hits.
18
18
  *
19
- * **Its history**: last frame's probes (their records and filtered radiance, for the lighting density), its diffuse
20
- * and frames (for the temporal filter) and its colour (for the screen hits) are kept while the structure and the view
19
+ * **Its history**: last frame's probes (their records and filtered radiance, for the lighting density), its diffuse,
20
+ * specular and frames (for the temporal filter) and its colour (for the screen hits) are kept while the structure and the view
21
21
  * stay, until {@link reset_history}; any change starts it again. Nothing is allocated on a frame that changes neither: the adaptive probes' slots
22
22
  * are made with the rest, as many as the uniform probes (`screen_probe_adaptive_capacity`), and a frame that would
23
23
  * place more places no more.
@@ -80,13 +80,14 @@ export class GPUScreenProbeGI {
80
80
  exposure: number;
81
81
  }): void;
82
82
  /**
83
- * Take the frame's resolve, once the bent normals exist: each pixel's irradiance from its probes, then the temporal
84
- * filter into the frame's diffuse.
83
+ * Take the frame's resolve, once the bent normals exist: each pixel's irradiance and rough specular from its
84
+ * probes, then the temporal filter into the frame's diffuse and specular ({@link specular_handle}).
85
85
  *
86
86
  * @param {Object} options
87
87
  * @param {FrameGraph} options.graph
88
88
  * @param {number} options.depth graph handle of the view's reverse-Z depth
89
89
  * @param {number} options.depth_previous graph handle of last frame's
90
+ * @param {number} options.normal graph handle of the G-buffer's shading normals, which the specular lobe stands on
90
91
  * @param {number} options.pbr graph handle of the G-buffer's PBR target
91
92
  * @param {number} options.velocity graph handle of the frame's motion
92
93
  * @param {number} options.bent_normals graph handle of the bent normals (the shading normals where GTAO is off)
@@ -94,15 +95,22 @@ export class GPUScreenProbeGI {
94
95
  * was shown, the one {@link graph_update} took: what the probes' radiance is pre-exposed by
95
96
  * @returns {number} graph handle of the frame's diffuse, `rgba16float`: E at the bent normal, before AO
96
97
  */
97
- graph_resolve({ graph, depth, depth_previous, pbr, velocity, bent_normals, exposure }: {
98
+ graph_resolve({ graph, depth, depth_previous, normal, pbr, velocity, bent_normals, exposure }: {
98
99
  graph: FrameGraph;
99
100
  depth: number;
100
101
  depth_previous: number;
102
+ normal: number;
101
103
  pbr: number;
102
104
  velocity: number;
103
105
  bent_normals: number;
104
106
  exposure: number;
105
107
  }): number;
108
+ /**
109
+ * @returns {number} graph handle of the rough specular this frame's {@link graph_resolve} wrote, `rgba16float`: the
110
+ * screen probes' radiance along each pixel's specular lobe, and in alpha the share of the pixel's specular the
111
+ * world-space probes keep, so a pixel's specular light is `rgb · (1 − a) + world · a`
112
+ */
113
+ get specular_handle(): number;
106
114
  /**
107
115
  * @returns {number} graph handle of the diffuse this frame's {@link graph_resolve} wrote
108
116
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GPUScreenProbeGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAsHI;;OAEG;IACH,+BAIC;IAED;;;OAGG;IACH,sBAEC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,gCAEC;IAiBD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH;QAf+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACe,QAAQ,EAArC,mBAAmB;QACQ,KAAK,EAAhC,iBAAiB;QAEN,IAAI;QACC,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;QACU,SAAS,EAAzB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;aAoFhB;IAED;;;;;;;;;;;;;;OAcG;IACH;QAV+B,KAAK,EAAzB,UAAU;QACM,KAAK,EAArB,MAAM;QACU,cAAc,EAA9B,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;QACU,YAAY,EAA5B,MAAM;QACU,QAAQ,EAAxB,MAAM;QAEJ,MAAM,CAqBlB;IAED;;OAEG;IACH,6BAEC;IAED;;;;;;OAMG;IACH,yCASC;IAED;;;;;;;OAOG;IACH;QAH+B,KAAK,EAAzB,UAAU;QACM,KAAK,EAArB,MAAM;aAWhB;IA6bD;;;OAGG;IACH,gBA+BC;IAED,gBAQC;;CACJ;yBAh3BY,OAAO,8DAA8D,EAAE,UAAU;6BACjF,OAAO,8BAA8B,EAAE,cAAc;kCACrD,OAAO,0BAA0B,EAAE,mBAAmB;gCACtD,OAAO,uCAAuC,EAAE,iBAAiB"}
1
+ {"version":3,"file":"GPUScreenProbeGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IA6HI;;OAEG;IACH,+BAIC;IAED;;;OAGG;IACH,sBAEC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,gCAEC;IAiBD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH;QAf+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACe,QAAQ,EAArC,mBAAmB;QACQ,KAAK,EAAhC,iBAAiB;QAEN,IAAI;QACC,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;QACU,SAAS,EAAzB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;aAoFhB;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAX+B,KAAK,EAAzB,UAAU;QACM,KAAK,EAArB,MAAM;QACU,cAAc,EAA9B,MAAM;QACU,MAAM,EAAtB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;QACU,YAAY,EAA5B,MAAM;QACU,QAAQ,EAAxB,MAAM;QAEJ,MAAM,CAyBlB;IAED;;;;OAIG;IACH,8BAEC;IAED;;OAEG;IACH,6BAEC;IAED;;;;;;OAMG;IACH,yCASC;IAED;;;;;;;OAOG;IACH;QAH+B,KAAK,EAAzB,UAAU;QACM,KAAK,EAArB,MAAM;aAWhB;IAqcD;;;OAGG;IACH,gBAiCC;IAED,gBAQC;;CACJ;yBA/4BY,OAAO,8DAA8D,EAAE,UAAU;6BACjF,OAAO,8BAA8B,EAAE,cAAc;kCACrD,OAAO,0BAA0B,EAAE,mBAAmB;gCACtD,OAAO,uCAAuC,EAAE,iBAAiB"}