@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
@@ -1,34 +1,3 @@
1
- /**
2
- * Cascades either clipmap may have at most.
3
- * @type {number}
4
- */
5
- export const PROBE_CLIPMAP_CASCADE_COUNT_MAX: number;
6
- /**
7
- * Cells per axis a cascade of either clipmap may have.
8
- * @type {ReadonlyArray<number>}
9
- */
10
- export const PROBE_CLIPMAP_CASCADE_RESOLUTIONS: ReadonlyArray<number>;
11
- /**
12
- * Bounds of the octahedral radiance and depth resolutions, texels per side.
13
- * @type {number}
14
- */
15
- export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN: number;
16
- /**
17
- * @type {number}
18
- */
19
- export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX: number;
20
- /**
21
- * The smallest {@link ProbeClipmapSettings#brick_build_budget}: one workgroup's worth of cells.
22
- * @type {number}
23
- */
24
- export const PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN: number;
25
- /**
26
- * The most {@link ProbeClipmapSettings#mesh_sdf_max_bricks}: 64 bricks are 448 voxels a side, three and a
27
- * half times Unreal's cap, in seven levels. It bounds the levels a thread walks, and the bake's ring,
28
- * which holds twice the largest geometry's bricks, to 2^20 entries.
29
- * @type {number}
30
- */
31
- export const PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT: number;
32
1
  /**
33
2
  * Settings of {@link ShadeIndirectLightingMode.ProbeClipmap}, held on `Renderer.probe_clipmap` and
34
3
  * read every frame the mode runs (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §10).
@@ -48,7 +17,8 @@ export const PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT: number;
48
17
  */
49
18
  export class ProbeClipmapSettings {
50
19
  /**
51
- * @param {number} v integer, 1 to {@link PROBE_CLIPMAP_CASCADE_COUNT_MAX}
20
+ * @param {number} v a positive integer; the brick clipmap checks it against what its layout and the
21
+ * device hold when it is built
52
22
  */
53
23
  set brick_cascade_count(v: number);
54
24
  /**
@@ -58,7 +28,8 @@ export class ProbeClipmapSettings {
58
28
  */
59
29
  get brick_cascade_count(): number;
60
30
  /**
61
- * @param {number} v one of {@link PROBE_CLIPMAP_CASCADE_RESOLUTIONS}
31
+ * @param {number} v a power of two, since a cascade's cells wrap by masking; the brick clipmap checks
32
+ * the rest of what its layout and the device hold when it is built
62
33
  */
63
34
  set brick_cascade_resolution(v: number);
64
35
  /**
@@ -78,7 +49,7 @@ export class ProbeClipmapSettings {
78
49
  */
79
50
  get brick_voxel_size(): number;
80
51
  /**
81
- * @param {number} v integer, at least {@link PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN}
52
+ * @param {number} v a positive integer
82
53
  */
83
54
  set brick_build_budget(v: number);
84
55
  /**
@@ -99,8 +70,8 @@ export class ProbeClipmapSettings {
99
70
  */
100
71
  get mesh_sdf_voxel_size(): number;
101
72
  /**
102
- * @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks, to
103
- * {@link PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT}
73
+ * @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks; the
74
+ * geometry SDF manager checks the bake's ring against the device when it sizes it
104
75
  */
105
76
  set mesh_sdf_max_bricks(v: number);
106
77
  /**
@@ -188,7 +159,8 @@ export class ProbeClipmapSettings {
188
159
  */
189
160
  get card_capture_mode(): number;
190
161
  /**
191
- * @param {number} v integer, 1 to {@link PROBE_CLIPMAP_CASCADE_COUNT_MAX}
162
+ * @param {number} v a positive integer; the probe clipmap checks it against what its layout and the
163
+ * device hold when it is built
192
164
  */
193
165
  set probe_cascade_count(v: number);
194
166
  /**
@@ -198,7 +170,8 @@ export class ProbeClipmapSettings {
198
170
  */
199
171
  get probe_cascade_count(): number;
200
172
  /**
201
- * @param {number} v one of {@link PROBE_CLIPMAP_CASCADE_RESOLUTIONS}
173
+ * @param {number} v a power of two, since a cascade's points wrap by masking; the probe clipmap checks
174
+ * the rest of what its layout holds when it is built
202
175
  */
203
176
  set probe_cascade_resolution(v: number);
204
177
  /**
@@ -218,8 +191,8 @@ export class ProbeClipmapSettings {
218
191
  */
219
192
  get probe_spacing(): number;
220
193
  /**
221
- * @param {number} v a power of two, {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN} to
222
- * {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX}
194
+ * @param {number} v a power of two from 2: an update's spread of rays walks the texels in bit-reversed
195
+ * order, which needs more than one; the atlas checks a tile against the device
223
196
  */
224
197
  set radiance_resolution(v: number);
225
198
  /**
@@ -229,8 +202,7 @@ export class ProbeClipmapSettings {
229
202
  */
230
203
  get radiance_resolution(): number;
231
204
  /**
232
- * @param {number} v a power of two, {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN} to
233
- * {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX}
205
+ * @param {number} v a power of two; the atlas checks a tile against the device
234
206
  */
235
207
  set depth_resolution(v: number);
236
208
  /**
@@ -240,7 +212,8 @@ export class ProbeClipmapSettings {
240
212
  */
241
213
  get depth_resolution(): number;
242
214
  /**
243
- * @param {number} v a power of two in `[radiance_resolution² / 4, 4·radiance_resolution²]`, checked
215
+ * @param {number} v a power of two, at most `PROBE_TEXEL_RAYS·radiance_resolution²` and
216
+ * `PROBE_DEPTH_TEXEL_RAYS·depth_resolution²`, the rays one thread gathers into a texel, checked
244
217
  * against {@link radiance_resolution} when the GI takes the settings
245
218
  */
246
219
  set rays_per_probe(v: number);
@@ -251,41 +224,109 @@ export class ProbeClipmapSettings {
251
224
  */
252
225
  get rays_per_probe(): number;
253
226
  /**
254
- * @param {number} v integer, at least {@link rays_per_probe}, checked when the GI takes the settings
227
+ * @param {number} v integer; each set's share is checked against its rays a probe when the GI takes the
228
+ * settings
255
229
  */
256
230
  set ray_budget(v: number);
257
231
  /**
258
- * Rays traced a frame at most, so `floor(ray_budget / rays_per_probe)` probes update a frame and
259
- * every wanted probe is traced again after as many frames as that takes. Between Enshrouded's low and
260
- * mid tiers (100k and 250k rays a frame). A time knob.
232
+ * Rays both probe sets trace a frame at most, between Enshrouded's low and mid tiers (100k and 250k): the
233
+ * frustum's {@link frustum_ray_budget} and the world cache's {@link world_ray_budget}. A time knob.
261
234
  * @returns {number}
262
235
  */
263
236
  get ray_budget(): number;
237
+ /**
238
+ * Rays the frustum's probes trace a frame at most, `FRUSTUM_RAY_BUDGET_FRACTION` of {@link ray_budget}
239
+ * rounded down, so `floor(frustum_ray_budget / rays_per_probe)` of them update a frame and every wanted one
240
+ * is traced again after as many frames as that takes.
241
+ * @returns {number}
242
+ */
243
+ get frustum_ray_budget(): number;
244
+ /**
245
+ * Rays the world cache's probes trace a frame at most: the rest of {@link ray_budget}.
246
+ * @returns {number}
247
+ */
248
+ get world_ray_budget(): number;
249
+ /**
250
+ * @param {number} v a positive integer; the world cache checks its lattice against what its layout and the
251
+ * device hold when it is built
252
+ */
253
+ set world_cache_spacing_shift(v: number);
254
+ /**
255
+ * The world cache's probes against the frustum's (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.2): k, its
256
+ * spacing the frustum's over 2^k and its lattice 2^k the frustum's {@link probe_cascade_resolution}, in the
257
+ * frustum's windows, so every frustum probe's point is one of the world cache's. 2, a quarter of the
258
+ * spacing, Enshrouded's denser world cache. Structure.
259
+ * @returns {number}
260
+ */
261
+ get world_cache_spacing_shift(): number;
262
+ /**
263
+ * @param {number} v a power of two from 2, as {@link radiance_resolution}
264
+ */
265
+ set world_cache_radiance_resolution(v: number);
266
+ /**
267
+ * Octahedral radiance texels per side of a world cache probe: Enshrouded's 4. Its radiance is only made
268
+ * into its SH, never sampled, so its tiles have no skirt. Structure.
269
+ * @returns {number}
270
+ */
271
+ get world_cache_radiance_resolution(): number;
272
+ /**
273
+ * @param {number} v a power of two
274
+ */
275
+ set world_cache_depth_resolution(v: number);
276
+ /**
277
+ * Octahedral depth-moment texels per side of a world cache probe, which a hit's pick weighs it by.
278
+ * Structure.
279
+ * @returns {number}
280
+ */
281
+ get world_cache_depth_resolution(): number;
282
+ /**
283
+ * @param {number} v a power of two, held as {@link rays_per_probe} is against the world cache's
284
+ * resolutions when the GI takes the settings
285
+ */
286
+ set world_cache_rays_per_probe(v: number);
287
+ /**
288
+ * Rays a world cache probe traces each uniform update: one a texel at the default
289
+ * {@link world_cache_radiance_resolution}, as {@link rays_per_probe} is for the frustum's.
290
+ * @returns {number}
291
+ */
292
+ get world_cache_rays_per_probe(): number;
264
293
  /**
265
294
  * @param {number} v frames, positive and finite
266
295
  */
267
296
  set response_frames(v: number);
268
297
  /**
269
- * Frames of the short mean a probe's radiance follows a change by, in its multi-scale mean: an update
270
- * blends the short mean by `1 − e^(−Δt / response_frames)`, Δt the frames since the probe's last update,
271
- * and the mean catches up with it once the two disagree past the texel's noise. The depth's moments
272
- * blend by the same. Frames, not seconds: an update happens in a frame, and the records count them.
273
- * 30 is half a second at 60 fps; DDGI's hysteresis of 0.97 a frame is 33.
298
+ * Frames over which a neighbour's history goes stale to an update that re-samples it
299
+ * (`history_resampling`): a neighbour last updated Δt frames ago weighs `e^(−Δt / response_frames)`.
300
+ * A probe's own history blends a sample by a sample's blend however long since its last update, the
301
+ * time between them being no change in the light. Frames, not seconds: an update happens in a frame, and
302
+ * the records count them. 30 is half a second at 60 fps.
274
303
  * @returns {number}
275
304
  */
276
305
  get response_frames(): number;
277
306
  /**
278
307
  * @param {boolean} v
279
308
  */
280
- set resampling(v: boolean);
309
+ set history_resampling(v: boolean);
281
310
  /**
282
- * Whether each probe update also re-samples its neighbours: every radiance texel takes what four of the
283
- * probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
284
- * they can see it, each a ray's worth beside its own rays. It traces nothing, and buys convergence for
311
+ * Whether each probe update also re-samples its neighbours' histories: every radiance texel takes what four of
312
+ * the probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
313
+ * they can see it, each a ray's worth beside its own rays. It traces nothing, and buys stability for
285
314
  * some spatial blur. Off, the update's pass is not recorded. Takes effect the next frame.
286
315
  * @returns {boolean}
287
316
  */
288
- get resampling(): boolean;
317
+ get history_resampling(): boolean;
318
+ /**
319
+ * @param {boolean} v
320
+ */
321
+ set ray_resampling(v: boolean);
322
+ /**
323
+ * Whether each probe update also re-samples one neighbour's rays of the same frame: it draws a neighbour
324
+ * updated this frame by its radiance and how well the probe sees it, and takes every one of its rays whose hit,
325
+ * or sky, the probe's depth confirms, in the texel the probe sees it in. It traces nothing, and brings in light
326
+ * the neighbour's rays found this frame. Off, the update's passes are not recorded. Takes effect the next frame.
327
+ * @returns {boolean}
328
+ */
329
+ get ray_resampling(): boolean;
289
330
  /**
290
331
  * @param {ProbeClipmapDebugView} v
291
332
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ProbeClipmapSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,gDAFU,cAAc,MAAM,CAAC,CAE8C;AAE7E;;;GAGG;AACH,sDAFU,MAAM,CAEyC;AAEzD;;GAEG;AACH,sDAFU,MAAM,CAE0C;AAE1D;;;GAGG;AACH,mDAFU,MAAM,CAEuC;AAEvD;;;;;GAKG;AACH,sDAFU,MAAM,CAE0C;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH;IAaI;;OAEG;IACH,mCAKC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;OAEG;IACH,wCAIC;IAfD;;;OAGG;IACH,uCAEC;IAuBD;;OAEG;IACH,gCAKC;IAlBD;;;;;OAKG;IACH,+BAEC;IAuBD;;OAEG;IACH,kCAKC;IAjBD;;;;OAIG;IACH,iCAEC;IAwBD;;OAEG;IACH,mCAKC;IAlBD;;;;;OAKG;IACH,kCAEC;IAyBD;;;OAGG;IACH,mCAOC;IAtBD;;;;;;OAMG;IACH,kCAEC;IAqCD;;;OAGG;IACH,oCAKC;IA7BD;;;;;;;;;;;;;;;OAeG;IACH,mCAEC;IA6CD;;;OAGG;IACH,mCAKC;IAvCD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kCAEC;IAoCD;;OAEG;IACH,iCAIC;IA5BD;;;;;;;;;;;;;;;;OAgBG;IACH,gCAEC;IAsBD;;OAEG;IACH,mCAKC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;OAEG;IACH,wCAIC;IAfD;;;OAGG;IACH,uCAEC;IAuBD;;OAEG;IACH,6BAKC;IAlBD;;;;;OAKG;IACH,4BAEC;IAuBD;;;OAGG;IACH,mCAOC;IApBD;;;;OAIG;IACH,kCAEC;IA0BD;;;OAGG;IACH,gCAOC;IApBD;;;;OAIG;IACH,+BAEC;IA0BD;;;OAGG;IACH,8BAKC;IAlBD;;;;OAIG;IACH,6BAEC;IAyBD;;OAEG;IACH,0BAIC;IAjBD;;;;;OAKG;IACH,yBAEC;IAyBD;;OAEG;IACH,+BAKC;IApBD;;;;;;;OAOG;IACH,8BAEC;IAyBD;;OAEG;IACH,2BAIC;IAlBD;;;;;;OAMG;IACH,0BAEC;IAsBD;;OAEG;IACH,0BAIC;IAhBD;;;;OAIG;IACH,yBAEC;;CAUJ"}
1
+ {"version":3,"file":"ProbeClipmapSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;GAgBG;AACH;IAaI;;;OAGG;IACH,mCAIC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;;OAGG;IACH,wCAKC;IAjBD;;;OAGG;IACH,uCAEC;IAyBD;;OAEG;IACH,gCAKC;IAlBD;;;;;OAKG;IACH,+BAEC;IAuBD;;OAEG;IACH,kCAIC;IAhBD;;;;OAIG;IACH,iCAEC;IAuBD;;OAEG;IACH,mCAKC;IAlBD;;;;;OAKG;IACH,kCAEC;IAyBD;;;OAGG;IACH,mCAMC;IArBD;;;;;;OAMG;IACH,kCAEC;IAoCD;;;OAGG;IACH,oCAKC;IA7BD;;;;;;;;;;;;;;;OAeG;IACH,mCAEC;IA6CD;;;OAGG;IACH,mCAKC;IAvCD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kCAEC;IAoCD;;OAEG;IACH,iCAIC;IA5BD;;;;;;;;;;;;;;;;OAgBG;IACH,gCAEC;IAsBD;;;OAGG;IACH,mCAIC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;;OAGG;IACH,wCAKC;IAjBD;;;OAGG;IACH,uCAEC;IAyBD;;OAEG;IACH,6BAKC;IAlBD;;;;;OAKG;IACH,4BAEC;IAuBD;;;OAGG;IACH,mCAMC;IAnBD;;;;OAIG;IACH,kCAEC;IAyBD;;OAEG;IACH,gCAKC;IAjBD;;;;OAIG;IACH,+BAEC;IAuBD;;;;OAIG;IACH,8BAKC;IAnBD;;;;OAIG;IACH,6BAEC;IAyBD;;;OAGG;IACH,0BAIC;IAjBD;;;;OAIG;IACH,yBAEC;IAYD;;;;;OAKG;IACH,iCAEC;IAED;;;OAGG;IACH,+BAEC;IAeD;;;OAGG;IACH,yCAIC;IAnBD;;;;;;OAMG;IACH,wCAEC;IAuBD;;OAEG;IACH,+CAMC;IAlBD;;;;OAIG;IACH,8CAEC;IAwBD;;OAEG;IACH,4CAKC;IAjBD;;;;OAIG;IACH,2CAEC;IAuBD;;;OAGG;IACH,0CAKC;IAlBD;;;;OAIG;IACH,yCAEC;IA2BD;;OAEG;IACH,+BAKC;IApBD;;;;;;;OAOG;IACH,8BAEC;IAyBD;;OAEG;IACH,mCAIC;IAlBD;;;;;;OAMG;IACH,kCAEC;IAwBD;;OAEG;IACH,+BAIC;IAlBD;;;;;;OAMG;IACH,8BAEC;IAsBD;;OAEG;IACH,0BAIC;IAhBD;;;;OAIG;IACH,yBAEC;;CAUJ"}
@@ -4,43 +4,7 @@ import { MESH_CARD_CAPTURE_BUDGET_MAX } from "../../geometry/sdf/cards/GPUMeshCa
4
4
  import { MeshCardCaptureMode } from "../../geometry/sdf/cards/MeshCardCaptureMode.js";
5
5
  import { MESH_SDF_BAKE_BUDGET_MAX } from "../../geometry/sdf/GPUGeometrySDFManager.js";
6
6
  import { ProbeClipmapDebugView } from "./debug/ProbeClipmapDebugView.js";
7
-
8
- /**
9
- * Cascades either clipmap may have at most.
10
- * @type {number}
11
- */
12
- export const PROBE_CLIPMAP_CASCADE_COUNT_MAX = 8;
13
-
14
- /**
15
- * Cells per axis a cascade of either clipmap may have.
16
- * @type {ReadonlyArray<number>}
17
- */
18
- export const PROBE_CLIPMAP_CASCADE_RESOLUTIONS = Object.freeze([16, 32, 64]);
19
-
20
- /**
21
- * Bounds of the octahedral radiance and depth resolutions, texels per side.
22
- * @type {number}
23
- */
24
- export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN = 4;
25
-
26
- /**
27
- * @type {number}
28
- */
29
- export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX = 32;
30
-
31
- /**
32
- * The smallest {@link ProbeClipmapSettings#brick_build_budget}: one workgroup's worth of cells.
33
- * @type {number}
34
- */
35
- export const PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN = 64;
36
-
37
- /**
38
- * The most {@link ProbeClipmapSettings#mesh_sdf_max_bricks}: 64 bricks are 448 voxels a side, three and a
39
- * half times Unreal's cap, in seven levels. It bounds the levels a thread walks, and the bake's ring,
40
- * which holds twice the largest geometry's bricks, to 2^20 entries.
41
- * @type {number}
42
- */
43
- export const PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT = 64;
7
+ import { FRUSTUM_RAY_BUDGET_FRACTION } from "./probe/PROBE_CLIPMAP.js";
44
8
 
45
9
  /**
46
10
  * Settings of {@link ShadeIndirectLightingMode.ProbeClipmap}, held on `Renderer.probe_clipmap` and
@@ -73,11 +37,11 @@ export class ProbeClipmapSettings {
73
37
  }
74
38
 
75
39
  /**
76
- * @param {number} v integer, 1 to {@link PROBE_CLIPMAP_CASCADE_COUNT_MAX}
40
+ * @param {number} v a positive integer; the brick clipmap checks it against what its layout and the
41
+ * device hold when it is built
77
42
  */
78
43
  set brick_cascade_count(v) {
79
44
  assert.isPositiveInteger(v, 'brick_cascade_count');
80
- assert.lessThanOrEqual(v, PROBE_CLIPMAP_CASCADE_COUNT_MAX, 'brick_cascade_count');
81
45
 
82
46
  this.#brick_cascade_count = v;
83
47
  }
@@ -93,10 +57,12 @@ export class ProbeClipmapSettings {
93
57
  }
94
58
 
95
59
  /**
96
- * @param {number} v one of {@link PROBE_CLIPMAP_CASCADE_RESOLUTIONS}
60
+ * @param {number} v a power of two, since a cascade's cells wrap by masking; the brick clipmap checks
61
+ * the rest of what its layout and the device hold when it is built
97
62
  */
98
63
  set brick_cascade_resolution(v) {
99
- assert.isOneOf(v, PROBE_CLIPMAP_CASCADE_RESOLUTIONS, 'brick_cascade_resolution');
64
+ assert.isPositiveInteger(v, 'brick_cascade_resolution');
65
+ assert.ok(isPowerOfTwo(v), 'brick_cascade_resolution must be a power of two');
100
66
 
101
67
  this.#brick_cascade_resolution = v;
102
68
  }
@@ -135,11 +101,10 @@ export class ProbeClipmapSettings {
135
101
  }
136
102
 
137
103
  /**
138
- * @param {number} v integer, at least {@link PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN}
104
+ * @param {number} v a positive integer
139
105
  */
140
106
  set brick_build_budget(v) {
141
107
  assert.isPositiveInteger(v, 'brick_build_budget');
142
- assert.greaterThanOrEqual(v, PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN, 'brick_build_budget');
143
108
 
144
109
  this.#brick_build_budget = v;
145
110
  }
@@ -180,13 +145,12 @@ export class ProbeClipmapSettings {
180
145
  }
181
146
 
182
147
  /**
183
- * @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks, to
184
- * {@link PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT}
148
+ * @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks; the
149
+ * geometry SDF manager checks the bake's ring against the device when it sizes it
185
150
  */
186
151
  set mesh_sdf_max_bricks(v) {
187
152
  assert.isPositiveInteger(v, 'mesh_sdf_max_bricks');
188
153
  assert.greaterThanOrEqual(v, 2, 'mesh_sdf_max_bricks');
189
- assert.lessThanOrEqual(v, PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT, 'mesh_sdf_max_bricks');
190
154
  assert.equal(v % 2, 0, 'mesh_sdf_max_bricks must be even');
191
155
 
192
156
  this.#mesh_sdf_max_bricks = v;
@@ -312,11 +276,11 @@ export class ProbeClipmapSettings {
312
276
  }
313
277
 
314
278
  /**
315
- * @param {number} v integer, 1 to {@link PROBE_CLIPMAP_CASCADE_COUNT_MAX}
279
+ * @param {number} v a positive integer; the probe clipmap checks it against what its layout and the
280
+ * device hold when it is built
316
281
  */
317
282
  set probe_cascade_count(v) {
318
283
  assert.isPositiveInteger(v, 'probe_cascade_count');
319
- assert.lessThanOrEqual(v, PROBE_CLIPMAP_CASCADE_COUNT_MAX, 'probe_cascade_count');
320
284
 
321
285
  this.#probe_cascade_count = v;
322
286
  }
@@ -332,10 +296,12 @@ export class ProbeClipmapSettings {
332
296
  }
333
297
 
334
298
  /**
335
- * @param {number} v one of {@link PROBE_CLIPMAP_CASCADE_RESOLUTIONS}
299
+ * @param {number} v a power of two, since a cascade's points wrap by masking; the probe clipmap checks
300
+ * the rest of what its layout holds when it is built
336
301
  */
337
302
  set probe_cascade_resolution(v) {
338
- assert.isOneOf(v, PROBE_CLIPMAP_CASCADE_RESOLUTIONS, 'probe_cascade_resolution');
303
+ assert.isPositiveInteger(v, 'probe_cascade_resolution');
304
+ assert.ok(isPowerOfTwo(v), 'probe_cascade_resolution must be a power of two');
339
305
 
340
306
  this.#probe_cascade_resolution = v;
341
307
  }
@@ -374,14 +340,13 @@ export class ProbeClipmapSettings {
374
340
  }
375
341
 
376
342
  /**
377
- * @param {number} v a power of two, {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN} to
378
- * {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX}
343
+ * @param {number} v a power of two from 2: an update's spread of rays walks the texels in bit-reversed
344
+ * order, which needs more than one; the atlas checks a tile against the device
379
345
  */
380
346
  set radiance_resolution(v) {
381
347
  assert.isPositiveInteger(v, 'radiance_resolution');
382
348
  assert.ok(isPowerOfTwo(v), 'radiance_resolution must be a power of two');
383
- assert.greaterThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN, 'radiance_resolution');
384
- assert.lessThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX, 'radiance_resolution');
349
+ assert.greaterThanOrEqual(v, 2, 'radiance_resolution');
385
350
 
386
351
  this.#radiance_resolution = v;
387
352
  }
@@ -398,14 +363,11 @@ export class ProbeClipmapSettings {
398
363
  }
399
364
 
400
365
  /**
401
- * @param {number} v a power of two, {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN} to
402
- * {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX}
366
+ * @param {number} v a power of two; the atlas checks a tile against the device
403
367
  */
404
368
  set depth_resolution(v) {
405
369
  assert.isPositiveInteger(v, 'depth_resolution');
406
370
  assert.ok(isPowerOfTwo(v), 'depth_resolution must be a power of two');
407
- assert.greaterThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN, 'depth_resolution');
408
- assert.lessThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX, 'depth_resolution');
409
371
 
410
372
  this.#depth_resolution = v;
411
373
  }
@@ -422,7 +384,8 @@ export class ProbeClipmapSettings {
422
384
  }
423
385
 
424
386
  /**
425
- * @param {number} v a power of two in `[radiance_resolution² / 4, 4·radiance_resolution²]`, checked
387
+ * @param {number} v a power of two, at most `PROBE_TEXEL_RAYS·radiance_resolution²` and
388
+ * `PROBE_DEPTH_TEXEL_RAYS·depth_resolution²`, the rays one thread gathers into a texel, checked
426
389
  * against {@link radiance_resolution} when the GI takes the settings
427
390
  */
428
391
  set rays_per_probe(v) {
@@ -435,9 +398,8 @@ export class ProbeClipmapSettings {
435
398
  #ray_budget = 131072;
436
399
 
437
400
  /**
438
- * Rays traced a frame at most, so `floor(ray_budget / rays_per_probe)` probes update a frame and
439
- * every wanted probe is traced again after as many frames as that takes. Between Enshrouded's low and
440
- * mid tiers (100k and 250k rays a frame). A time knob.
401
+ * Rays both probe sets trace a frame at most, between Enshrouded's low and mid tiers (100k and 250k): the
402
+ * frustum's {@link frustum_ray_budget} and the world cache's {@link world_ray_budget}. A time knob.
441
403
  * @returns {number}
442
404
  */
443
405
  get ray_budget() {
@@ -445,7 +407,8 @@ export class ProbeClipmapSettings {
445
407
  }
446
408
 
447
409
  /**
448
- * @param {number} v integer, at least {@link rays_per_probe}, checked when the GI takes the settings
410
+ * @param {number} v integer; each set's share is checked against its rays a probe when the GI takes the
411
+ * settings
449
412
  */
450
413
  set ray_budget(v) {
451
414
  assert.isPositiveInteger(v, 'ray_budget');
@@ -453,14 +416,120 @@ export class ProbeClipmapSettings {
453
416
  this.#ray_budget = v;
454
417
  }
455
418
 
419
+ /**
420
+ * Rays the frustum's probes trace a frame at most, `FRUSTUM_RAY_BUDGET_FRACTION` of {@link ray_budget}
421
+ * rounded down, so `floor(frustum_ray_budget / rays_per_probe)` of them update a frame and every wanted one
422
+ * is traced again after as many frames as that takes.
423
+ * @returns {number}
424
+ */
425
+ get frustum_ray_budget() {
426
+ return Math.floor(this.#ray_budget * FRUSTUM_RAY_BUDGET_FRACTION);
427
+ }
428
+
429
+ /**
430
+ * Rays the world cache's probes trace a frame at most: the rest of {@link ray_budget}.
431
+ * @returns {number}
432
+ */
433
+ get world_ray_budget() {
434
+ return this.#ray_budget - this.frustum_ray_budget;
435
+ }
436
+
437
+ #world_cache_spacing_shift = 2;
438
+
439
+ /**
440
+ * The world cache's probes against the frustum's (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.2): k, its
441
+ * spacing the frustum's over 2^k and its lattice 2^k the frustum's {@link probe_cascade_resolution}, in the
442
+ * frustum's windows, so every frustum probe's point is one of the world cache's. 2, a quarter of the
443
+ * spacing, Enshrouded's denser world cache. Structure.
444
+ * @returns {number}
445
+ */
446
+ get world_cache_spacing_shift() {
447
+ return this.#world_cache_spacing_shift;
448
+ }
449
+
450
+ /**
451
+ * @param {number} v a positive integer; the world cache checks its lattice against what its layout and the
452
+ * device hold when it is built
453
+ */
454
+ set world_cache_spacing_shift(v) {
455
+ assert.isPositiveInteger(v, 'world_cache_spacing_shift');
456
+
457
+ this.#world_cache_spacing_shift = v;
458
+ }
459
+
460
+ #world_cache_radiance_resolution = 4;
461
+
462
+ /**
463
+ * Octahedral radiance texels per side of a world cache probe: Enshrouded's 4. Its radiance is only made
464
+ * into its SH, never sampled, so its tiles have no skirt. Structure.
465
+ * @returns {number}
466
+ */
467
+ get world_cache_radiance_resolution() {
468
+ return this.#world_cache_radiance_resolution;
469
+ }
470
+
471
+ /**
472
+ * @param {number} v a power of two from 2, as {@link radiance_resolution}
473
+ */
474
+ set world_cache_radiance_resolution(v) {
475
+ assert.isPositiveInteger(v, 'world_cache_radiance_resolution');
476
+ assert.ok(isPowerOfTwo(v), 'world_cache_radiance_resolution must be a power of two');
477
+ assert.greaterThanOrEqual(v, 2, 'world_cache_radiance_resolution');
478
+
479
+ this.#world_cache_radiance_resolution = v;
480
+ }
481
+
482
+ #world_cache_depth_resolution = 4;
483
+
484
+ /**
485
+ * Octahedral depth-moment texels per side of a world cache probe, which a hit's pick weighs it by.
486
+ * Structure.
487
+ * @returns {number}
488
+ */
489
+ get world_cache_depth_resolution() {
490
+ return this.#world_cache_depth_resolution;
491
+ }
492
+
493
+ /**
494
+ * @param {number} v a power of two
495
+ */
496
+ set world_cache_depth_resolution(v) {
497
+ assert.isPositiveInteger(v, 'world_cache_depth_resolution');
498
+ assert.ok(isPowerOfTwo(v), 'world_cache_depth_resolution must be a power of two');
499
+
500
+ this.#world_cache_depth_resolution = v;
501
+ }
502
+
503
+ #world_cache_rays_per_probe = 16;
504
+
505
+ /**
506
+ * Rays a world cache probe traces each uniform update: one a texel at the default
507
+ * {@link world_cache_radiance_resolution}, as {@link rays_per_probe} is for the frustum's.
508
+ * @returns {number}
509
+ */
510
+ get world_cache_rays_per_probe() {
511
+ return this.#world_cache_rays_per_probe;
512
+ }
513
+
514
+ /**
515
+ * @param {number} v a power of two, held as {@link rays_per_probe} is against the world cache's
516
+ * resolutions when the GI takes the settings
517
+ */
518
+ set world_cache_rays_per_probe(v) {
519
+ assert.isPositiveInteger(v, 'world_cache_rays_per_probe');
520
+ assert.ok(isPowerOfTwo(v), 'world_cache_rays_per_probe must be a power of two');
521
+
522
+ this.#world_cache_rays_per_probe = v;
523
+ }
524
+
456
525
  #response_frames = 30;
457
526
 
458
527
  /**
459
- * Frames of the short mean a probe's radiance follows a change by, in its multi-scale mean: an update
460
- * blends the short mean by `1 − e^(−Δt / response_frames)`, Δt the frames since the probe's last update,
461
- * and the mean catches up with it once the two disagree past the texel's noise. The depth's moments
462
- * blend by the same. Frames, not seconds: an update happens in a frame, and the records count them.
463
- * 30 is half a second at 60 fps; DDGI's hysteresis of 0.97 a frame is 33.
528
+ * Frames over which a neighbour's history goes stale to an update that re-samples it
529
+ * (`history_resampling`): a neighbour last updated Δt frames ago weighs `e^(−Δt / response_frames)`.
530
+ * A probe's own history blends a sample by a sample's blend however long since its last update, the
531
+ * time between them being no change in the light. Frames, not seconds: an update happens in a frame, and
532
+ * the records count them. 30 is half a second at 60 fps.
464
533
  * @returns {number}
465
534
  */
466
535
  get response_frames() {
@@ -477,26 +546,48 @@ export class ProbeClipmapSettings {
477
546
  this.#response_frames = v;
478
547
  }
479
548
 
480
- #resampling = false;
549
+ #history_resampling = false;
481
550
 
482
551
  /**
483
- * Whether each probe update also re-samples its neighbours: every radiance texel takes what four of the
484
- * probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
485
- * they can see it, each a ray's worth beside its own rays. It traces nothing, and buys convergence for
552
+ * Whether each probe update also re-samples its neighbours' histories: every radiance texel takes what four of
553
+ * the probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
554
+ * they can see it, each a ray's worth beside its own rays. It traces nothing, and buys stability for
486
555
  * some spatial blur. Off, the update's pass is not recorded. Takes effect the next frame.
487
556
  * @returns {boolean}
488
557
  */
489
- get resampling() {
490
- return this.#resampling;
558
+ get history_resampling() {
559
+ return this.#history_resampling;
560
+ }
561
+
562
+ /**
563
+ * @param {boolean} v
564
+ */
565
+ set history_resampling(v) {
566
+ assert.isBoolean(v, 'history_resampling');
567
+
568
+ this.#history_resampling = v;
569
+ }
570
+
571
+ #ray_resampling = false;
572
+
573
+ /**
574
+ * Whether each probe update also re-samples one neighbour's rays of the same frame: it draws a neighbour
575
+ * updated this frame by its radiance and how well the probe sees it, and takes every one of its rays whose hit,
576
+ * or sky, the probe's depth confirms, in the texel the probe sees it in. It traces nothing, and brings in light
577
+ * the neighbour's rays found this frame. Off, the update's passes are not recorded. Takes effect the next frame.
578
+ * @returns {boolean}
579
+ */
580
+ get ray_resampling() {
581
+ return this.#ray_resampling;
491
582
  }
492
583
 
493
584
  /**
494
585
  * @param {boolean} v
495
586
  */
496
- set resampling(v) {
497
- assert.isBoolean(v, 'resampling');
587
+ set ray_resampling(v) {
588
+ assert.isBoolean(v, 'ray_resampling');
498
589
 
499
- this.#resampling = v;
590
+ this.#ray_resampling = v;
500
591
  }
501
592
 
502
593
  #debug_view = ProbeClipmapDebugView.None;
@@ -55,8 +55,10 @@ export class GPUBrickClipmap {
55
55
  /**
56
56
  * @param {GPUDevice} device
57
57
  * @param {object} options
58
- * @param {number} options.cascade_count
59
- * @param {number} options.resolution one of {@link PROBE_CLIPMAP_CASCADE_RESOLUTIONS}
58
+ * @param {number} options.cascade_count at most the levels table holds, {@link CLIPMAP_LEVEL_LIMIT}
59
+ * @param {number} options.resolution a power of two, at least an occupancy block,
60
+ * {@link BRICK_OCCUPANCY_BLOCK}; the brick map's height, resolution · cascade_count, at most the
61
+ * device's `maxTextureDimension3D`
60
62
  * @param {number} options.voxel_size metres
61
63
  */
62
64
  constructor(device: GPUDevice, { cascade_count, resolution, voxel_size }: {
@@ -1 +1 @@
1
- {"version":3,"file":"GPUBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js"],"names":[],"mappings":"AAiFA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IA2JI;;;;;;OAMG;IACH;QAJ2B,aAAa,EAA7B,MAAM;QACU,UAAU,EAA1B,MAAM;QACU,UAAU,EAA1B,MAAM;OA8FhB;IA7PD;;;OAGG;IACH,wBAHU,MAAM,CAGF;IAEd;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAEX;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IA6OX;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;;;;;;OAQG;IACH,mCASC;IAED;;;OAGG;IACH,uBAEC;IAED;;;;OAIG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,sBAFW,UAAU,MAAM,CAAC,QAiB3B;IAED;;;OAGG;IACH,oBAHW,oBAAoB,GAClB,OAAO,CAMnB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH;QAZ+B,KAAK,EAAzB,UAAU;QACM,CAAC,EAAjB,MAAM;QACU,CAAC,EAAjB,MAAM;QACU,CAAC,EAAjB,MAAM;QACU,MAAM,EAAtB,MAAM;QAC4B,SAAS,EAA3C,UAAU,aAAa,CAAC;QACM,KAAK,EAAnC,eAAe,GAAC,IAAI;QACH,MAAM,GAAvB,MAAM;QAEJ,MAAM,CAoGlB;IAgWD,gBAcC;;CACJ;mCAl7BY,OAAO,4BAA4B,EAAE,oBAAoB;yBACzD,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,mCAAmC,EAAE,eAAe;;;;;;;WAyC1D,UAAU;;;;WACV,MAAM;;;;;;UACN,MAAM;;;;;aAGN,MAAM;;;;sBAEN,MAAM;;;;;mBAEN,MAAM;;;;gBACN,MAAM;mBACN,MAAM;;;;;;;;;;WAGN,eAAe;;;+BAMN,UAAU,QAAE,oBAAoB,KAAG,IAAI;;+BA1F/B,0CAA0C"}
1
+ {"version":3,"file":"GPUBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js"],"names":[],"mappings":"AAwFA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IA2JI;;;;;;;;OAQG;IACH;QAN2B,aAAa,EAA7B,MAAM;QACU,UAAU,EAA1B,MAAM;QAGU,UAAU,EAA1B,MAAM;OAiGhB;IAlQD;;;OAGG;IACH,wBAHU,MAAM,CAGF;IAEd;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAEX;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAkPX;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;;;;;;OAQG;IACH,mCASC;IAED;;;OAGG;IACH,uBAEC;IAED;;;;OAIG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,sBAFW,UAAU,MAAM,CAAC,QAiB3B;IAED;;;OAGG;IACH,oBAHW,oBAAoB,GAClB,OAAO,CAMnB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH;QAZ+B,KAAK,EAAzB,UAAU;QACM,CAAC,EAAjB,MAAM;QACU,CAAC,EAAjB,MAAM;QACU,CAAC,EAAjB,MAAM;QACU,MAAM,EAAtB,MAAM;QAC4B,SAAS,EAA3C,UAAU,aAAa,CAAC;QACM,KAAK,EAAnC,eAAe,GAAC,IAAI;QACH,MAAM,GAAvB,MAAM;QAEJ,MAAM,CAoGlB;IAmWD,gBAcC;;CACJ;mCA17BY,OAAO,4BAA4B,EAAE,oBAAoB;yBACzD,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,mCAAmC,EAAE,eAAe;;;;;;;WAyC1D,UAAU;;;;WACV,MAAM;;;;;;UACN,MAAM;;;;;aAGN,MAAM;;;;sBAEN,MAAM;;;;;mBAEN,MAAM;;;;gBACN,MAAM;mBACN,MAAM;;;;;;;;;;WAGN,eAAe;;;+BAMN,UAAU,QAAE,oBAAoB,KAAG,IAAI;;+BAxF/B,0CAA0C"}