@woosh/meep-engine 3.60.5 → 3.60.7

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 (376) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/build/bundle-worker-terrain.js +1 -1
  3. package/package.json +1 -1
  4. package/src/core/binary/BitSet.d.ts.map +1 -1
  5. package/src/core/binary/BitSet.js +2 -1
  6. package/src/{format/image/avif/av1/util → core/binary/operations}/ceil_log2.d.ts +2 -2
  7. package/src/core/binary/operations/ceil_log2.d.ts.map +1 -0
  8. package/src/{format/image/avif/av1/util → core/binary/operations}/ceil_log2.js +18 -18
  9. package/src/core/binary/zstd/ZstdReverseBitReader.d.ts.map +1 -1
  10. package/src/core/binary/zstd/ZstdReverseBitReader.js +225 -223
  11. package/src/core/binary/zstd/zstd_fse.d.ts.map +1 -1
  12. package/src/core/binary/zstd/zstd_fse.js +267 -265
  13. package/src/core/binary/zstd/zstd_huffman.d.ts.map +1 -1
  14. package/src/core/binary/zstd/zstd_huffman.js +246 -244
  15. package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts.map +1 -1
  16. package/src/core/bvh2/binary/2/BinaryUint32BVH.js +8 -2
  17. package/src/core/bvh2/bvh3/ebvh_optimize_treelet.d.ts.map +1 -1
  18. package/src/core/bvh2/bvh3/ebvh_optimize_treelet.js +8 -7
  19. package/src/core/collection/PairUint32Map.d.ts.map +1 -1
  20. package/src/core/collection/PairUint32Map.js +2 -2
  21. package/src/core/collection/Uint32Map.d.ts.map +1 -1
  22. package/src/core/collection/Uint32Map.js +2 -4
  23. package/src/core/collection/heap/FibonacciHeap.d.ts.map +1 -1
  24. package/src/core/collection/heap/FibonacciHeap.js +2 -1
  25. package/src/core/geom/2d/r-tree/StaticR2Tree.d.ts.map +1 -1
  26. package/src/core/geom/2d/r-tree/StaticR2Tree.js +8 -2
  27. package/src/core/geom/3d/shape/util/mesh_compute_triangle_edge_flags.d.ts.map +1 -1
  28. package/src/core/geom/3d/shape/util/mesh_compute_triangle_edge_flags.js +2 -3
  29. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  30. package/src/engine/graphics/texture/atlas/TextureAtlas.js +13 -14
  31. package/src/engine/graphics/texture/atlas/sprite_atlas_border.d.ts.map +1 -1
  32. package/src/engine/graphics/texture/atlas/sprite_atlas_border.js +70 -69
  33. package/src/engine/graphics/texture/reflection/convolve_equirectangular_reflection.d.ts.map +1 -1
  34. package/src/engine/graphics/texture/reflection/convolve_equirectangular_reflection.js +2 -1
  35. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  36. package/src/engine/graphics3/GPUParticleEmitterSystem.js +2 -1
  37. package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts.map +1 -1
  38. package/src/engine/graphics3/decal/GPUDecalRenderer.js +2 -1
  39. package/src/engine/graphics3/decal/chunk_decal_record.d.ts +14 -0
  40. package/src/engine/graphics3/decal/chunk_decal_record.d.ts.map +1 -0
  41. package/src/engine/graphics3/decal/chunk_decal_record.js +44 -0
  42. package/src/engine/graphics3/decal/shader_cluster_assign_decals.d.ts.map +1 -1
  43. package/src/engine/graphics3/decal/shader_cluster_assign_decals.js +2 -15
  44. package/src/engine/graphics3/decal/shader_cull_decals_frustum.d.ts.map +1 -1
  45. package/src/engine/graphics3/decal/shader_cull_decals_frustum.js +3 -16
  46. package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
  47. package/src/engine/graphics3/decal/shader_decal_composite.js +3 -23
  48. package/src/engine/graphics3/terrain/TERRAIN_MATERIAL_TEMPLATE.d.ts.map +1 -1
  49. package/src/engine/graphics3/terrain/TERRAIN_MATERIAL_TEMPLATE.js +2 -1
  50. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  51. package/src/engine/physics/queries/shape_cast.js +2 -2
  52. package/src/format/image/avif/av1/decode/decode_palette.js +442 -442
  53. package/src/format/image/avif/av1/entropy/SymbolWriter.d.ts.map +1 -1
  54. package/src/format/image/avif/av1/entropy/SymbolWriter.js +2 -1
  55. package/src/generation/foliage/material/foliage_tile.d.ts.map +1 -1
  56. package/src/generation/foliage/material/foliage_tile.js +2 -1
  57. package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
  58. package/src/shade/device/mock/SoftwareGPUDevice.js +6 -13
  59. package/src/shade/playground/caldera/main.js +3 -2
  60. package/src/shade/playground/probe_clipmap/README.md +2 -1
  61. package/src/shade/playground/probe_clipmap/index.html +7 -2
  62. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  63. package/src/shade/playground/probe_clipmap/main.js +17 -7
  64. package/src/shade/playground/sh_exponential/sh_exp_playground_shaders.d.ts.map +1 -1
  65. package/src/shade/playground/sh_exponential/sh_exp_playground_shaders.js +7 -13
  66. package/src/shade/playground/vgeo_scene/main.js +2 -1
  67. package/src/shade/playground/vsm/VSMDebugOverlay.d.ts.map +1 -1
  68. package/src/shade/playground/vsm/VSMDebugOverlay.js +3 -1
  69. package/src/shade/renderer/Renderer.d.ts +11 -0
  70. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  71. package/src/shade/renderer/Renderer.js +43 -1
  72. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  73. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  74. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
  75. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  76. package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarsest.d.ts.map +1 -1
  77. package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarsest.js +5 -4
  78. package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.d.ts.map +1 -1
  79. package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.js +168 -166
  80. package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.d.ts.map +1 -1
  81. package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.js +221 -219
  82. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  83. package/src/shade/renderer/fow/shader_fog_of_war.d.ts.map +1 -1
  84. package/src/shade/renderer/fow/shader_fog_of_war.js +8 -19
  85. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +26 -43
  86. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  87. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +115 -123
  88. package/src/shade/renderer/geometry/sdf/MeshSDFLayout.d.ts.map +1 -1
  89. package/src/shade/renderer/geometry/sdf/MeshSDFLayout.js +2 -1
  90. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +20 -2
  91. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
  92. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +66 -2
  93. package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.d.ts +19 -0
  94. package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.d.ts.map +1 -0
  95. package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.js +25 -0
  96. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  97. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +2 -1
  98. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
  99. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +2 -1
  100. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +15 -0
  101. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -1
  102. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +38 -0
  103. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +28 -59
  104. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts.map +1 -1
  105. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +84 -789
  106. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_decode_from_storage.d.ts.map +1 -1
  107. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_decode_from_storage.js +10 -31
  108. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_encode_to_storage.d.ts.map +1 -1
  109. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_encode_to_storage.js +9 -15
  110. package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.d.ts +2 -1
  111. package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.d.ts.map +1 -1
  112. package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.js +6 -5
  113. package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.d.ts.map +1 -1
  114. package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.js +2 -1
  115. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +15 -3
  116. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  117. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +168 -18
  118. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +2 -1
  119. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  120. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +2 -1
  121. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +98 -57
  122. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  123. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +168 -77
  124. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +4 -2
  125. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  126. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +27 -12
  127. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map +1 -1
  128. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js +12 -7
  129. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  130. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +8 -2
  131. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -2
  132. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js +2 -2
  133. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -1
  134. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +5 -2
  135. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +1 -1
  136. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts.map +1 -1
  137. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js +5 -3
  138. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +1 -1
  139. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.d.ts.map +1 -1
  140. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.js +1 -1
  141. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_movers_command.d.ts.map +1 -1
  142. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_movers_command.js +4 -2
  143. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.d.ts.map +1 -1
  144. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.js +1 -1
  145. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts.map +1 -1
  146. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js +1 -1
  147. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts.map +1 -1
  148. package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js +3 -1
  149. package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.js +2 -2
  150. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +114 -41
  151. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  152. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +424 -207
  153. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +34 -25
  154. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  155. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +41 -31
  156. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts +7 -5
  157. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map +1 -1
  158. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js +7 -5
  159. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts +47 -0
  160. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map +1 -0
  161. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js +84 -0
  162. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts +48 -0
  163. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map +1 -0
  164. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js +101 -0
  165. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +58 -4
  166. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  167. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +127 -30
  168. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts +18 -7
  169. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts.map +1 -1
  170. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js +39 -13
  171. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +29 -8
  172. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -1
  173. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +112 -56
  174. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resample.d.ts +19 -0
  175. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resample.d.ts.map +1 -0
  176. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resample.js +35 -0
  177. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
  178. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +9 -3
  179. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +3 -3
  180. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +5 -5
  181. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +8 -12
  182. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  183. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +23 -56
  184. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +0 -3
  185. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts.map +1 -1
  186. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +11 -15
  187. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +26 -0
  188. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts.map +1 -0
  189. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +173 -0
  190. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts +32 -0
  191. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts.map +1 -0
  192. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.js +166 -0
  193. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts +3 -4
  194. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts.map +1 -1
  195. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.js +3 -4
  196. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts.map +1 -1
  197. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.js +3 -1
  198. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +6 -12
  199. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -1
  200. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +15 -65
  201. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts.map +1 -1
  202. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.js +7 -2
  203. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +4 -4
  204. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts.map +1 -1
  205. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js +24 -17
  206. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_publish.d.ts +7 -5
  207. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_publish.d.ts.map +1 -1
  208. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_publish.js +18 -10
  209. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts +2 -2
  210. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts.map +1 -1
  211. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.js +9 -5
  212. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.d.ts +3 -0
  213. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.d.ts.map +1 -1
  214. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.js +9 -6
  215. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts +1 -1
  216. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts.map +1 -1
  217. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js +16 -16
  218. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample_rays.d.ts +36 -0
  219. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample_rays.d.ts.map +1 -0
  220. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample_rays.js +233 -0
  221. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.d.ts.map +1 -1
  222. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.js +7 -5
  223. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  224. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +5 -3
  225. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  226. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +10 -4
  227. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts +2 -1
  228. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts.map +1 -1
  229. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.js +12 -6
  230. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts +1 -2
  231. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts.map +1 -1
  232. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js +5 -6
  233. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +14 -18
  234. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts.map +1 -1
  235. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +25 -35
  236. package/src/shade/renderer/gpu_primitive/WEBGPU_GUARANTEED_MAX_UNIFORM_BUFFER_BINDING_SIZE.d.ts +13 -0
  237. package/src/shade/renderer/gpu_primitive/WEBGPU_GUARANTEED_MAX_UNIFORM_BUFFER_BINDING_SIZE.d.ts.map +1 -0
  238. package/src/shade/renderer/gpu_primitive/WEBGPU_GUARANTEED_MAX_UNIFORM_BUFFER_BINDING_SIZE.js +12 -0
  239. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts +27 -2
  240. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts.map +1 -1
  241. package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js +62 -6
  242. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts.map +1 -1
  243. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.js +10 -19
  244. package/src/shade/renderer/gpu_primitive/indirect/chunk_folded_dispatch.d.ts.map +1 -1
  245. package/src/shade/renderer/gpu_primitive/indirect/chunk_folded_dispatch.js +6 -3
  246. package/src/shade/renderer/hiz/hzb_pick_alignment.d.ts.map +1 -1
  247. package/src/shade/renderer/hiz/hzb_pick_alignment.js +149 -148
  248. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.d.ts.map +1 -1
  249. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.js +4 -2
  250. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.d.ts.map +1 -1
  251. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.js +6 -5
  252. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_project.d.ts.map +1 -1
  253. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_project.js +3 -1
  254. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.d.ts.map +1 -1
  255. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.js +3 -1
  256. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_solve.d.ts.map +1 -1
  257. package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_solve.js +3 -1
  258. package/src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.d.ts +0 -5
  259. package/src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.d.ts.map +1 -1
  260. package/src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.js +0 -7
  261. package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts +15 -2
  262. package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts.map +1 -1
  263. package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.js +51 -16
  264. package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.d.ts.map +1 -1
  265. package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.js +3 -2
  266. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  267. package/src/shade/renderer/material/GPUMaterialManager.d.ts +4 -1
  268. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  269. package/src/shade/renderer/material/GPUMaterialManager.js +5 -8
  270. package/src/shade/renderer/postprocess/dof/raymarch/chunk_dof_lds_coc_cache.d.ts +17 -0
  271. package/src/shade/renderer/postprocess/dof/raymarch/chunk_dof_lds_coc_cache.d.ts.map +1 -0
  272. package/src/shade/renderer/postprocess/dof/raymarch/chunk_dof_lds_coc_cache.js +81 -0
  273. package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_raymarch_compute.d.ts.map +1 -1
  274. package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_raymarch_compute.js +5 -48
  275. package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_slice_compute.d.ts.map +1 -1
  276. package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_slice_compute.js +4 -44
  277. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +7 -3
  278. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
  279. package/src/shade/renderer/postprocess/gtao/GTAO.js +26 -13
  280. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts +14 -0
  281. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
  282. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +196 -68
  283. package/src/shade/renderer/postprocess/gtao/chunk_integrate_lighting_sample.d.ts.map +1 -1
  284. package/src/shade/renderer/postprocess/gtao/chunk_integrate_lighting_sample.js +4 -1
  285. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.d.ts.map +1 -1
  286. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.js +42 -28
  287. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.d.ts.map +1 -1
  288. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.js +430 -414
  289. package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.d.ts +16 -0
  290. package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.d.ts.map +1 -0
  291. package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.js +156 -0
  292. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  293. package/src/shade/renderer/postprocess/nss/chunk_nss_luma_derivative.d.ts.map +1 -1
  294. package/src/shade/renderer/postprocess/nss/chunk_nss_luma_derivative.js +5 -7
  295. package/src/shade/renderer/postprocess/nss/chunk_nss_tonemap.d.ts +17 -0
  296. package/src/shade/renderer/postprocess/nss/chunk_nss_tonemap.d.ts.map +1 -0
  297. package/src/shade/renderer/postprocess/nss/chunk_nss_tonemap.js +56 -0
  298. package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.d.ts.map +1 -1
  299. package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.js +2 -22
  300. package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.d.ts.map +1 -1
  301. package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.js +2 -13
  302. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  303. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +10 -13
  304. package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.d.ts.map +1 -1
  305. package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.js +39 -38
  306. package/src/shade/renderer/rasterize/expand/mesh/shader_prefix_sum_to_command.d.ts.map +1 -1
  307. package/src/shade/renderer/rasterize/expand/mesh/shader_prefix_sum_to_command.js +7 -12
  308. package/src/shade/renderer/scene/GPUSceneContext.d.ts +2 -2
  309. package/src/shade/renderer/scene/GPUSceneContext.js +5 -5
  310. package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.d.ts +8 -6
  311. package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.d.ts.map +1 -1
  312. package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js +10 -7
  313. package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_key.d.ts +16 -0
  314. package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_key.d.ts.map +1 -0
  315. package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_key.js +35 -0
  316. package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.d.ts +5 -2
  317. package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.d.ts.map +1 -1
  318. package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.js +27 -18
  319. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh2_color_get_irradiance_at.d.ts.map +1 -1
  320. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh2_color_get_irradiance_at.js +5 -15
  321. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_convolve_with_cosine_kernel.d.ts.map +1 -1
  322. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_convolve_with_cosine_kernel.js +5 -19
  323. package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh3_windowing.d.ts.map +1 -1
  324. package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh3_windowing.js +3 -22
  325. package/src/shade/renderer/shadow/map/ShadowmapDrawSelector.d.ts.map +1 -1
  326. package/src/shade/renderer/shadow/map/ShadowmapDrawSelector.js +2 -1
  327. package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_shadow_group_list.d.ts.map +1 -1
  328. package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_shadow_group_list.js +154 -152
  329. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
  330. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +2 -1
  331. package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.d.ts +3 -1
  332. package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.d.ts.map +1 -1
  333. package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.js +4 -3
  334. package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP_STRUCT.d.ts +7 -1
  335. package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP_STRUCT.d.ts.map +1 -1
  336. package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP_STRUCT.js +54 -47
  337. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_sample.d.ts.map +1 -1
  338. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_sample.js +371 -370
  339. package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
  340. package/src/shade/renderer/water/GPUWaterRenderer.js +2 -1
  341. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  342. package/src/shade/renderer/water/surface/lod/shader_water_lod.d.ts.map +1 -1
  343. package/src/shade/renderer/water/surface/lod/shader_water_lod.js +12 -14
  344. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
  345. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +2 -9
  346. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
  347. package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +2 -1
  348. package/src/shade/renderer/wind/WIND_FIELD.d.ts +3 -1
  349. package/src/shade/renderer/wind/WIND_FIELD.d.ts.map +1 -1
  350. package/src/shade/renderer/wind/WIND_FIELD.js +4 -3
  351. package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts +8 -2
  352. package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts.map +1 -1
  353. package/src/shade/renderer/wind/WIND_FIELD_STRUCT.js +11 -4
  354. package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts +2 -2
  355. package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts.map +1 -1
  356. package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.js +13 -4
  357. package/src/shade/util/texture_mip_extent.d.ts.map +1 -1
  358. package/src/shade/util/texture_mip_extent.js +88 -87
  359. package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
  360. package/src/shade/wgsl/emulator/WGSLLanguageCore.js +9 -7
  361. package/src/format/image/avif/av1/util/ceil_log2.d.ts.map +0 -1
  362. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts +0 -47
  363. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts.map +0 -1
  364. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.js +0 -80
  365. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts +0 -16
  366. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts.map +0 -1
  367. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.js +0 -67
  368. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts +0 -17
  369. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts.map +0 -1
  370. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.js +0 -145
  371. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts +0 -12
  372. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts.map +0 -1
  373. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.js +0 -105
  374. package/src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.d.ts +0 -1
  375. package/src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.d.ts.map +0 -1
  376. package/src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.js +0 -0
@@ -211,16 +211,24 @@ export const PROBE_DEPTH_LIMIT: number;
211
211
  */
212
212
  export const PROBE_BACK_FACE_DEPTH: number;
213
213
  /**
214
- * The most a radiance texel counts of the updates that reached it: its blend's floor is 1/(this + 1),
215
- * below the time term's at any frame rate a probe is updated at.
214
+ * The short mean's blend a sample, the multi-scale mean estimator's own (Barré-Brisebois et al. 2019), and the
215
+ * depth's: a texel's samples, however far apart in time they come. A change in the light is the estimator's to
216
+ * find, not the time since the last sample's to assume (§8.8).
216
217
  * @type {number}
217
218
  */
218
- export const PROBE_RADIANCE_SAMPLES_LIMIT: number;
219
+ export const PROBE_SHORT_BLEND: number;
219
220
  /**
220
- * The share of an update's resolved rays on back faces past which the probe is dead (§8.4).
221
+ * The variance's blend a sample, half the short mean's, so that its window outlasts the short mean's; and the
222
+ * blend of a probe's change statistics, which follow the estimator's variance (§8.8).
221
223
  * @type {number}
222
224
  */
223
- export const PROBE_DEAD_BACK_FACE_SHARE: number;
225
+ export const PROBE_VARIANCE_BLEND: number;
226
+ /**
227
+ * The most a radiance texel counts of the updates that reached it: its long mean is its running mean until
228
+ * then, its blend's floor 1/(this + 1), far below `PROBE_SHORT_BLEND`.
229
+ * @type {number}
230
+ */
231
+ export const PROBE_RADIANCE_SAMPLES_LIMIT: number;
224
232
  /**
225
233
  * Rays a depth texel gathers at most, which bounds the settings: R ≤ this · n_d².
226
234
  * @type {number}
@@ -236,12 +244,19 @@ export const PROBE_DEPTH_TEXEL_RAYS: number;
236
244
  */
237
245
  export const PROBE_UNIFORM_PERIOD: number;
238
246
  /**
239
- * The fewest rays an update casts, of the radiance texels: a quarter. The settings hold R to
240
- * `[n_r²/4, 4·n_r²]`, which the uniform map and the gathers are built for; a DEAD probe's updates cast
241
- * the fewest, and a guided update of a probe that sees no change asks for no more (§8.6).
247
+ * The fewest rays a guided update casts, of the radiance texels: a quarter, or R where R is fewer, so
248
+ * that no update casts more than the budget counts a probe for. A guided update of a probe that sees no
249
+ * change asks for no more (§8.6).
242
250
  * @type {number}
243
251
  */
244
252
  export const PROBE_RAYS_PER_TEXEL_MIN: number;
253
+ /**
254
+ * Rays a DEAD probe's update casts, or R where R is fewer, uniform over the sphere (§8.4, §8.6). A DEAD
255
+ * probe is one whose every resolved ray hit a back face; the update asks only whether one ray now gets
256
+ * out.
257
+ * @type {number}
258
+ */
259
+ export const PROBE_DEAD_RAYS: number;
245
260
  /**
246
261
  * The most rays an update casts, of the radiance texels: four. A guided update of a probe whose light
247
262
  * moved asks for them, and a new probe's first guided ones (§8.6). The guide holds any one texel under
@@ -266,6 +281,12 @@ export const PROBE_CHANGE_SIGNIFICANCE: number;
266
281
  * @type {number}
267
282
  */
268
283
  export const PROBE_TEXEL_RAYS: number;
284
+ /**
285
+ * The share of the frame's ray budget the frustum's probes trace; the world cache's is the rest
286
+ * (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md). Alex's, 2026-11-01.
287
+ * @type {number}
288
+ */
289
+ export const FRUSTUM_RAY_BUDGET_FRACTION: number;
269
290
  /**
270
291
  * The guide's fixed point. A texel's weight is its share of the probe's luminance in units of 1/this,
271
292
  * so the walk's sums are exact and every pass that reads them agrees on each texel's rays. A share
@@ -300,25 +321,20 @@ export const PROBE_RAY_BACK_FACE: number;
300
321
  * @type {number}
301
322
  */
302
323
  export const PROBE_RAY_CASCADE_SHIFT: number;
303
- /**
304
- * The hit's cascade's bits once shifted down: the brick clipmap has at most
305
- * `PROBE_CLIPMAP_CASCADE_COUNT_MAX` (8) cascades.
306
- * @type {number}
307
- */
308
- export const PROBE_RAY_CASCADE_MASK: number;
309
324
  /**
310
325
  * The shift of the ray's probe, its place in the trace list: 24 bits, past any trace list.
311
326
  * @type {number}
312
327
  */
313
328
  export const PROBE_RAY_PROBE_SHIFT: number;
314
329
  /**
315
- * Set when a pixel wanted the probe in the last frame anything did, clear when only hits did (§8.3):
316
- * whether its hits want in turn.
330
+ * The hit's cascade's bits once shifted down: every bit between the cascade's shift and the probe's,
331
+ * so the brick clipmap's cascades fit in it up to 32.
317
332
  * @type {number}
318
333
  */
319
- export const PROBE_RECORD_SCREEN: number;
334
+ export const PROBE_RAY_CASCADE_MASK: number;
320
335
  /**
321
- * The shift of the probe's cascade, the flags' top bits: six, past `PROBE_CLIPMAP_CASCADE_COUNT_MAX`.
336
+ * The shift of the probe's cascade, the flags' top bits: six, so the probe clipmap's cascades fit in it up
337
+ * to 64.
322
338
  * @type {number}
323
339
  */
324
340
  export const PROBE_RECORD_CASCADE_SHIFT: number;
@@ -332,13 +348,6 @@ export const PROBE_WANT_TILE: number;
332
348
  * @type {number}
333
349
  */
334
350
  export const PROBE_WANT_WORKGROUP_TILES: number;
335
- /**
336
- * A wanted list entry's top bit: a pixel wanted the point, not only hits (§8.3). Admit marks the point's
337
- * probe as the screen's on it, and only the screen's probes' hits want in turn. The key is the other
338
- * bits.
339
- * @type {number}
340
- */
341
- export const PROBE_WANTED_SCREEN: number;
342
351
  /**
343
352
  * Lanes of the fill, a texel of the indirection each.
344
353
  * @type {number}
@@ -1 +1 @@
1
- {"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"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"}
@@ -247,17 +247,26 @@ export const PROBE_DEPTH_LIMIT = (1 + PROBE_RELOCATION_LIMIT) * Math.sqrt(3);
247
247
  export const PROBE_BACK_FACE_DEPTH = 0.2;
248
248
 
249
249
  /**
250
- * The most a radiance texel counts of the updates that reached it: its blend's floor is 1/(this + 1),
251
- * below the time term's at any frame rate a probe is updated at.
250
+ * The short mean's blend a sample, the multi-scale mean estimator's own (Barré-Brisebois et al. 2019), and the
251
+ * depth's: a texel's samples, however far apart in time they come. A change in the light is the estimator's to
252
+ * find, not the time since the last sample's to assume (§8.8).
252
253
  * @type {number}
253
254
  */
254
- export const PROBE_RADIANCE_SAMPLES_LIMIT = 255;
255
+ export const PROBE_SHORT_BLEND = 0.08;
255
256
 
256
257
  /**
257
- * The share of an update's resolved rays on back faces past which the probe is dead (§8.4).
258
+ * The variance's blend a sample, half the short mean's, so that its window outlasts the short mean's; and the
259
+ * blend of a probe's change statistics, which follow the estimator's variance (§8.8).
258
260
  * @type {number}
259
261
  */
260
- export const PROBE_DEAD_BACK_FACE_SHARE = 0.25;
262
+ export const PROBE_VARIANCE_BLEND = PROBE_SHORT_BLEND / 2;
263
+
264
+ /**
265
+ * The most a radiance texel counts of the updates that reached it: its long mean is its running mean until
266
+ * then, its blend's floor 1/(this + 1), far below `PROBE_SHORT_BLEND`.
267
+ * @type {number}
268
+ */
269
+ export const PROBE_RADIANCE_SAMPLES_LIMIT = 255;
261
270
 
262
271
  /**
263
272
  * Rays a depth texel gathers at most, which bounds the settings: R ≤ this · n_d².
@@ -291,13 +300,21 @@ export function probe_clipmap_maps_words(radiance_resolution, depth_resolution)
291
300
  export const PROBE_UNIFORM_PERIOD = 5;
292
301
 
293
302
  /**
294
- * The fewest rays an update casts, of the radiance texels: a quarter. The settings hold R to
295
- * `[n_r²/4, 4·n_r²]`, which the uniform map and the gathers are built for; a DEAD probe's updates cast
296
- * the fewest, and a guided update of a probe that sees no change asks for no more (§8.6).
303
+ * The fewest rays a guided update casts, of the radiance texels: a quarter, or R where R is fewer, so
304
+ * that no update casts more than the budget counts a probe for. A guided update of a probe that sees no
305
+ * change asks for no more (§8.6).
297
306
  * @type {number}
298
307
  */
299
308
  export const PROBE_RAYS_PER_TEXEL_MIN = 1 / 4;
300
309
 
310
+ /**
311
+ * Rays a DEAD probe's update casts, or R where R is fewer, uniform over the sphere (§8.4, §8.6). A DEAD
312
+ * probe is one whose every resolved ray hit a back face; the update asks only whether one ray now gets
313
+ * out.
314
+ * @type {number}
315
+ */
316
+ export const PROBE_DEAD_RAYS = 16;
317
+
301
318
  /**
302
319
  * The most rays an update casts, of the radiance texels: four. A guided update of a probe whose light
303
320
  * moved asks for them, and a new probe's first guided ones (§8.6). The guide holds any one texel under
@@ -325,6 +342,13 @@ export const PROBE_CHANGE_SIGNIFICANCE = 3;
325
342
  */
326
343
  export const PROBE_TEXEL_RAYS = PROBE_DEPTH_TEXEL_RAYS;
327
344
 
345
+ /**
346
+ * The share of the frame's ray budget the frustum's probes trace; the world cache's is the rest
347
+ * (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md). Alex's, 2026-11-01.
348
+ * @type {number}
349
+ */
350
+ export const FRUSTUM_RAY_BUDGET_FRACTION = 0.75;
351
+
328
352
  /**
329
353
  * The guide's fixed point. A texel's weight is its share of the probe's luminance in units of 1/this,
330
354
  * so the walk's sums are exact and every pass that reads them agrees on each texel's rays. A share
@@ -359,7 +383,7 @@ export const PROBE_SHADOWED_SUNS = 2;
359
383
  /*
360
384
  A ray's flags, `PROBE_RAY_STRUCT.flags`: its kind in the low two bits, as the brick clipmap's tracer
361
385
  names it (miss 0, hit 1, unresolved 2) or none (3), whether the hit is a back face, the hit's cascade
362
- in three bits above, and the probe it belongs to, its place in the trace list, from bit 8.
386
+ in the five bits above, and the probe it belongs to, its place in the trace list, from bit 8.
363
387
  */
364
388
 
365
389
  /**
@@ -388,32 +412,26 @@ export const PROBE_RAY_BACK_FACE = 4;
388
412
  export const PROBE_RAY_CASCADE_SHIFT = 3;
389
413
 
390
414
  /**
391
- * The hit's cascade's bits once shifted down: the brick clipmap has at most
392
- * `PROBE_CLIPMAP_CASCADE_COUNT_MAX` (8) cascades.
415
+ * The shift of the ray's probe, its place in the trace list: 24 bits, past any trace list.
393
416
  * @type {number}
394
417
  */
395
- export const PROBE_RAY_CASCADE_MASK = 7;
418
+ export const PROBE_RAY_PROBE_SHIFT = 8;
396
419
 
397
420
  /**
398
- * The shift of the ray's probe, its place in the trace list: 24 bits, past any trace list.
421
+ * The hit's cascade's bits once shifted down: every bit between the cascade's shift and the probe's,
422
+ * so the brick clipmap's cascades fit in it up to 32.
399
423
  * @type {number}
400
424
  */
401
- export const PROBE_RAY_PROBE_SHIFT = 8;
425
+ export const PROBE_RAY_CASCADE_MASK = (1 << (PROBE_RAY_PROBE_SHIFT - PROBE_RAY_CASCADE_SHIFT)) - 1;
402
426
 
403
427
  /*
404
428
  A probe record's flags, `PROBE_RECORD_STRUCT.flags`: the share of its last update's resolved rays that
405
- hit back faces, unorm16, in the low half; ten bits of flags above it; its cascade in the top six bits.
429
+ hit back faces, unorm16, in the low half; ten bits clear above it; its cascade in the top six bits.
406
430
  */
407
431
 
408
432
  /**
409
- * Set when a pixel wanted the probe in the last frame anything did, clear when only hits did (§8.3):
410
- * whether its hits want in turn.
411
- * @type {number}
412
- */
413
- export const PROBE_RECORD_SCREEN = 0x10000;
414
-
415
- /**
416
- * The shift of the probe's cascade, the flags' top bits: six, past `PROBE_CLIPMAP_CASCADE_COUNT_MAX`.
433
+ * The shift of the probe's cascade, the flags' top bits: six, so the probe clipmap's cascades fit in it up
434
+ * to 64.
417
435
  * @type {number}
418
436
  */
419
437
  export const PROBE_RECORD_CASCADE_SHIFT = 26;
@@ -430,14 +448,6 @@ export const PROBE_WANT_TILE = 8;
430
448
  */
431
449
  export const PROBE_WANT_WORKGROUP_TILES = 8;
432
450
 
433
- /**
434
- * A wanted list entry's top bit: a pixel wanted the point, not only hits (§8.3). Admit marks the point's
435
- * probe as the screen's on it, and only the screen's probes' hits want in turn. The key is the other
436
- * bits.
437
- * @type {number}
438
- */
439
- export const PROBE_WANTED_SCREEN = 0x80000000;
440
-
441
451
  /**
442
452
  * Lanes of the fill, a texel of the indirection each.
443
453
  * @type {number}
@@ -1,10 +1,12 @@
1
1
  /**
2
- * Whether the frame's updates re-sample their neighbours (`shader_probe_clipmap_resample`): accumulate
3
- * then adds each radiance texel's re-samples to its rays (`chunk_probe_clipmap_resampled`). Decided by
4
- * `chunk_probe_clipmap_resampled`, whose `false` alternative, the default, is the texel's own rays alone
5
- * and binds nothing more, so a pass that never sets it accumulates exactly as it always did.
2
+ * Whether the frame's updates re-sample their neighbours, their histories (`shader_probe_clipmap_resample`) or
3
+ * their rays (`shader_probe_clipmap_resample_rays`): accumulate then adds each radiance texel's re-samples to its
4
+ * rays (`chunk_probe_clipmap_resampled`). Decided by `chunk_probe_clipmap_resampled`, whose `false` alternative, the
5
+ * default, is the texel's own rays alone and binds nothing more, so a pass that never sets it accumulates exactly as
6
+ * it always did.
6
7
  *
7
- * `GPUProbeClipmap` sets it from `ProbeClipmapSettings.resampling` the frame it records the update.
8
+ * `GPUProbeClipmap` sets it from `ProbeClipmapSettings.history_resampling` or `ray_resampling` the frame it records
9
+ * the update.
8
10
  *
9
11
  * @type {ShaderSwitch}
10
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PROBE_CLIPMAP_RESAMPLING.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,uCAFU,YAAY,CAEgE;6BAZzD,0CAA0C"}
1
+ {"version":3,"file":"PROBE_CLIPMAP_RESAMPLING.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,uCAFU,YAAY,CAEgE;6BAdzD,0CAA0C"}
@@ -1,12 +1,14 @@
1
1
  import { ShaderSwitch } from "../../../shader/compiler/ShaderSwitch.js";
2
2
 
3
3
  /**
4
- * Whether the frame's updates re-sample their neighbours (`shader_probe_clipmap_resample`): accumulate
5
- * then adds each radiance texel's re-samples to its rays (`chunk_probe_clipmap_resampled`). Decided by
6
- * `chunk_probe_clipmap_resampled`, whose `false` alternative, the default, is the texel's own rays alone
7
- * and binds nothing more, so a pass that never sets it accumulates exactly as it always did.
4
+ * Whether the frame's updates re-sample their neighbours, their histories (`shader_probe_clipmap_resample`) or
5
+ * their rays (`shader_probe_clipmap_resample_rays`): accumulate then adds each radiance texel's re-samples to its
6
+ * rays (`chunk_probe_clipmap_resampled`). Decided by `chunk_probe_clipmap_resampled`, whose `false` alternative, the
7
+ * default, is the texel's own rays alone and binds nothing more, so a pass that never sets it accumulates exactly as
8
+ * it always did.
8
9
  *
9
- * `GPUProbeClipmap` sets it from `ProbeClipmapSettings.resampling` the frame it records the update.
10
+ * `GPUProbeClipmap` sets it from `ProbeClipmapSettings.history_resampling` or `ray_resampling` the frame it records
11
+ * the update.
10
12
  *
11
13
  * @type {ShaderSwitch}
12
14
  */
@@ -0,0 +1,47 @@
1
+ /**
2
+ * A clipmap's probes wanted by another clipmap's hits (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.3): each
3
+ * front-face hit of that clipmap's last frame that its own probes did not serve wants the cages its pick reads
4
+ * here (`shader_probe_clipmap_want_hits`). The world cache's wants, from the frustum's rays; a
5
+ * {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
6
+ *
7
+ * It reads the rays as their clipmap left them, so the wanting clipmap's lifetime is recorded before theirs,
8
+ * which writes them over. Give it that clipmap's ray budget with {@link set} before the wanting clipmap's
9
+ * `graph_update`.
10
+ */
11
+ export class ProbeClipmapHitWants {
12
+ /**
13
+ * @param {import("./GPUProbeClipmap.js").GPUProbeClipmap} rays_of the clipmap whose last frame's hits want
14
+ */
15
+ constructor(rays_of: import("./GPUProbeClipmap.js").GPUProbeClipmap);
16
+ /**
17
+ * The other clipmap's frame.
18
+ *
19
+ * @param {Object} options
20
+ * @param {number} options.ray_budget the rays it casts a frame at most
21
+ */
22
+ set({ ray_budget }: {
23
+ ray_budget: number;
24
+ }): void;
25
+ /**
26
+ * @returns {number} the most points a frame's wants list: each of the other clipmap's rays, the eight points of
27
+ * a cage in each of two cascades
28
+ */
29
+ wanted_bound(): number;
30
+ /**
31
+ * Nothing of the frame graph's: the rays are the other clipmap's own buffers, read before its lifetime.
32
+ *
33
+ * @param {*} pass
34
+ * @param {Object} data
35
+ */
36
+ graph_declare(pass: any, data: any): void;
37
+ /**
38
+ * @param {GPUCommandEncoder} encoder
39
+ * @param {Object} data the lifetime pass's data
40
+ * @param {*} resources the frame graph's resources
41
+ * @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
42
+ * `probe_wanted_bits` and its want settings as `settings`
43
+ */
44
+ encode(encoder: GPUCommandEncoder, data: any, resources: any, clipmap: any): void;
45
+ #private;
46
+ }
47
+ //# sourceMappingURL=ProbeClipmapHitWants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProbeClipmapHitWants.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH;IAQI;;OAEG;IACH,qBAFW,OAAO,sBAAsB,EAAE,eAAe,EAMxD;IAED;;;;;OAKG;IACH;QAF2B,UAAU,EAA1B,MAAM;aAMhB;IAED;;;OAGG;IACH,gBAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,0CACC;IAED;;;;;;OAMG;IACH,kFAeC;;CACJ"}
@@ -0,0 +1,84 @@
1
+ import { assert } from "../../../../../core/assert.js";
2
+ import { PROBE_DISPATCH_RAYS } from "./PROBE_CLIPMAP.js";
3
+ import { shader_probe_clipmap_want_hits } from "./shader_probe_clipmap_want_hits.js";
4
+
5
+ /**
6
+ * A clipmap's probes wanted by another clipmap's hits (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.3): each
7
+ * front-face hit of that clipmap's last frame that its own probes did not serve wants the cages its pick reads
8
+ * here (`shader_probe_clipmap_want_hits`). The world cache's wants, from the frustum's rays; a
9
+ * {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
10
+ *
11
+ * It reads the rays as their clipmap left them, so the wanting clipmap's lifetime is recorded before theirs,
12
+ * which writes them over. Give it that clipmap's ray budget with {@link set} before the wanting clipmap's
13
+ * `graph_update`.
14
+ */
15
+ export class ProbeClipmapHitWants {
16
+ /** @type {import("./GPUProbeClipmap.js").GPUProbeClipmap} */
17
+ #rays_of;
18
+
19
+ #bindings = {};
20
+
21
+ #ray_budget = 0;
22
+
23
+ /**
24
+ * @param {import("./GPUProbeClipmap.js").GPUProbeClipmap} rays_of the clipmap whose last frame's hits want
25
+ */
26
+ constructor(rays_of) {
27
+ assert.defined(rays_of, 'rays_of');
28
+
29
+ this.#rays_of = rays_of;
30
+ }
31
+
32
+ /**
33
+ * The other clipmap's frame.
34
+ *
35
+ * @param {Object} options
36
+ * @param {number} options.ray_budget the rays it casts a frame at most
37
+ */
38
+ set({ ray_budget }) {
39
+ assert.isPositiveInteger(ray_budget, 'ray_budget');
40
+
41
+ this.#ray_budget = ray_budget;
42
+ }
43
+
44
+ /**
45
+ * @returns {number} the most points a frame's wants list: each of the other clipmap's rays, the eight points of
46
+ * a cage in each of two cascades
47
+ */
48
+ wanted_bound() {
49
+ return 16 * this.#ray_budget;
50
+ }
51
+
52
+ /**
53
+ * Nothing of the frame graph's: the rays are the other clipmap's own buffers, read before its lifetime.
54
+ *
55
+ * @param {*} pass
56
+ * @param {Object} data
57
+ */
58
+ graph_declare(pass, data) {
59
+ }
60
+
61
+ /**
62
+ * @param {GPUCommandEncoder} encoder
63
+ * @param {Object} data the lifetime pass's data
64
+ * @param {*} resources the frame graph's resources
65
+ * @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
66
+ * `probe_wanted_bits` and its want settings as `settings`
67
+ */
68
+ encode(encoder, data, resources, clipmap) {
69
+ const rays_of = this.#rays_of;
70
+ const b = Object.assign(this.#bindings, clipmap);
71
+
72
+ // as the other clipmap holds them now, which a growth may have replaced since the frame was recorded
73
+ b.probe_trace = rays_of.trace;
74
+ b.probe_origins = rays_of.origins;
75
+ b.probe_rays = rays_of.rays;
76
+
77
+ shader_probe_clipmap_want_hits.dispatchIndirect({
78
+ encoder,
79
+ bindings: b,
80
+ command: rays_of.dispatch,
81
+ command_offset: 4 * PROBE_DISPATCH_RAYS,
82
+ });
83
+ }
84
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * A clipmap's probes wanted by the frame's pixels (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3): one pixel of
3
+ * each screen tile wants the cages its pick reads (`shader_probe_clipmap_want`). The wants of the frustum's
4
+ * probes; a {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
5
+ *
6
+ * Give it the frame's G-buffer with {@link set} before the clipmap's `graph_update`.
7
+ */
8
+ export class ProbeClipmapScreenWants {
9
+ /**
10
+ * The frame's G-buffer and view.
11
+ *
12
+ * @param {Object} options
13
+ * @param {number} options.depth graph handle of the frame's depth
14
+ * @param {number} options.normal graph handle of the G-buffer's normals
15
+ * @param {GPUBuffer} options.camera the view's camera uniform
16
+ * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
17
+ * @param {ArrayLike<number>} options.resolution the frame's pixels, x and y
18
+ */
19
+ set({ depth, normal, camera, stbn, resolution }: {
20
+ depth: number;
21
+ normal: number;
22
+ camera: GPUBuffer;
23
+ stbn: any;
24
+ resolution: ArrayLike<number>;
25
+ }): void;
26
+ /**
27
+ * @returns {number} the most points a frame's wants list: a pixel of each tile, the eight points of a cage in
28
+ * each of two cascades
29
+ */
30
+ wanted_bound(): number;
31
+ /**
32
+ * Declare what the wants read on the lifetime's pass.
33
+ *
34
+ * @param {import("../../../../../engine/graphics/render/frame_graph/FramePassBuilder.js").FramePassBuilder} pass
35
+ * @param {Object} data the pass's data, which {@link encode} is given back
36
+ */
37
+ graph_declare(pass: import("../../../../../engine/graphics/render/frame_graph/FramePassBuilder.js").FramePassBuilder, data: any): void;
38
+ /**
39
+ * @param {GPUCommandEncoder} encoder
40
+ * @param {Object} data the lifetime pass's data
41
+ * @param {*} resources the frame graph's resources
42
+ * @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
43
+ * `probe_wanted_bits` and its want settings as `settings`
44
+ */
45
+ encode(encoder: GPUCommandEncoder, data: any, resources: any, clipmap: any): void;
46
+ #private;
47
+ }
48
+ //# sourceMappingURL=ProbeClipmapScreenWants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProbeClipmapScreenWants.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH;IAeI;;;;;;;;;OASG;IACH;QAN2B,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACa,MAAM;QACd,IAAI;QACY,UAAU,EAArC,UAAU,MAAM,CAAC;aAqB3B;IAED;;;OAGG;IACH,gBAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,oBAHW,OAAO,uEAAuE,EAAE,gBAAgB,mBAQ1G;IAED;;;;;;OAMG;IACH,kFAcC;;CACJ"}
@@ -0,0 +1,101 @@
1
+ import { assert } from "../../../../../core/assert.js";
2
+ import { PROBE_WANT_TILE, PROBE_WANT_WORKGROUP_TILES } from "./PROBE_CLIPMAP.js";
3
+ import { shader_probe_clipmap_want } from "./shader_probe_clipmap_want.js";
4
+
5
+ /**
6
+ * A clipmap's probes wanted by the frame's pixels (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3): one pixel of
7
+ * each screen tile wants the cages its pick reads (`shader_probe_clipmap_want`). The wants of the frustum's
8
+ * probes; a {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
9
+ *
10
+ * Give it the frame's G-buffer with {@link set} before the clipmap's `graph_update`.
11
+ */
12
+ export class ProbeClipmapScreenWants {
13
+ #depth = -1;
14
+ #normal = -1;
15
+
16
+ /** @type {GPUBuffer|null} */
17
+ #camera = null;
18
+
19
+ #stbn = null;
20
+
21
+ #groups = [0, 0];
22
+
23
+ #tiles = 0;
24
+
25
+ #bindings = {};
26
+
27
+ /**
28
+ * The frame's G-buffer and view.
29
+ *
30
+ * @param {Object} options
31
+ * @param {number} options.depth graph handle of the frame's depth
32
+ * @param {number} options.normal graph handle of the G-buffer's normals
33
+ * @param {GPUBuffer} options.camera the view's camera uniform
34
+ * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
35
+ * @param {ArrayLike<number>} options.resolution the frame's pixels, x and y
36
+ */
37
+ set({ depth, normal, camera, stbn, resolution }) {
38
+ assert.isNonNegativeInteger(depth, 'depth');
39
+ assert.isNonNegativeInteger(normal, 'normal');
40
+ assert.defined(camera, 'camera');
41
+ assert.defined(stbn, 'stbn');
42
+ assert.isPositiveInteger(resolution[0], 'resolution[0]');
43
+ assert.isPositiveInteger(resolution[1], 'resolution[1]');
44
+
45
+ this.#depth = depth;
46
+ this.#normal = normal;
47
+ this.#camera = camera;
48
+ this.#stbn = stbn;
49
+
50
+ const tiles_x = Math.ceil(resolution[0] / PROBE_WANT_TILE);
51
+ const tiles_y = Math.ceil(resolution[1] / PROBE_WANT_TILE);
52
+
53
+ this.#groups[0] = Math.ceil(tiles_x / PROBE_WANT_WORKGROUP_TILES);
54
+ this.#groups[1] = Math.ceil(tiles_y / PROBE_WANT_WORKGROUP_TILES);
55
+ this.#tiles = tiles_x * tiles_y;
56
+ }
57
+
58
+ /**
59
+ * @returns {number} the most points a frame's wants list: a pixel of each tile, the eight points of a cage in
60
+ * each of two cascades
61
+ */
62
+ wanted_bound() {
63
+ return 16 * this.#tiles;
64
+ }
65
+
66
+ /**
67
+ * Declare what the wants read on the lifetime's pass.
68
+ *
69
+ * @param {import("../../../../../engine/graphics/render/frame_graph/FramePassBuilder.js").FramePassBuilder} pass
70
+ * @param {Object} data the pass's data, which {@link encode} is given back
71
+ */
72
+ graph_declare(pass, data) {
73
+ assert.isNonNegativeInteger(this.#depth, 'depth: set() first');
74
+
75
+ data.want_depth = pass.read(this.#depth);
76
+ data.want_normal = pass.read(this.#normal);
77
+ }
78
+
79
+ /**
80
+ * @param {GPUCommandEncoder} encoder
81
+ * @param {Object} data the lifetime pass's data
82
+ * @param {*} resources the frame graph's resources
83
+ * @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
84
+ * `probe_wanted_bits` and its want settings as `settings`
85
+ */
86
+ encode(encoder, data, resources, clipmap) {
87
+ const b = Object.assign(this.#bindings, clipmap);
88
+
89
+ b.gBufferDepth = resources.get(data.want_depth);
90
+ b.gBufferNormals = resources.get(data.want_normal);
91
+ b.camera = this.#camera;
92
+ b.tSTBN_vec2 = this.#stbn;
93
+
94
+ shader_probe_clipmap_want.dispatch({
95
+ encoder,
96
+ group_count_x: this.#groups[0],
97
+ group_count_y: this.#groups[1],
98
+ bindings: b,
99
+ });
100
+ }
101
+ }