@woosh/meep-engine 3.60.3 → 3.60.5

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 (514) hide show
  1. package/CHANGELOG.md +2602 -0
  2. package/CONTRIBUTING.md +7 -0
  3. package/MIGRATION_2_TO_3.md +136 -0
  4. package/SECURITY.md +4 -0
  5. package/editor/EditorCameraNavigation.d.ts +2 -1
  6. package/editor/EditorCameraNavigation.d.ts.map +1 -1
  7. package/editor/EditorCameraNavigation.js +51 -57
  8. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +3 -0
  9. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -1
  10. package/editor/ecs/component/editors/ecs/Trail3DEditor.js +6 -0
  11. package/package.json +6 -2
  12. package/src/engine/EngineHarness.d.ts +3 -9
  13. package/src/engine/EngineHarness.d.ts.map +1 -1
  14. package/src/engine/EngineHarness.js +6 -8
  15. package/src/engine/graphics/camera/makeOrbitalCameraController.d.ts +9 -6
  16. package/src/engine/graphics/camera/makeOrbitalCameraController.d.ts.map +1 -1
  17. package/src/engine/graphics/camera/makeOrbitalCameraController.js +44 -71
  18. package/src/engine/graphics/camera/orbital/MomentumAxis.d.ts +64 -0
  19. package/src/engine/graphics/camera/orbital/MomentumAxis.d.ts.map +1 -0
  20. package/src/engine/graphics/camera/orbital/MomentumAxis.js +187 -0
  21. package/src/engine/graphics/camera/orbital/OrbitalCameraRig.d.ts +86 -0
  22. package/src/engine/graphics/camera/orbital/OrbitalCameraRig.d.ts.map +1 -0
  23. package/src/engine/graphics/camera/orbital/OrbitalCameraRig.js +319 -0
  24. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts +34 -10
  25. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts.map +1 -1
  26. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.js +116 -30
  27. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts +1 -7
  28. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
  29. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +1 -37
  30. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.js +1 -2
  31. package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts +14 -0
  32. package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts.map +1 -0
  33. package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.js +22 -0
  34. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +19 -3
  35. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
  36. package/src/engine/graphics/ecs/trail3d/Trail3D.js +31 -4
  37. package/src/engine/graphics/ecs/trail3d/advance_trail.js +1 -1
  38. package/src/engine/graphics/ecs/water/Water.d.ts +8 -0
  39. package/src/engine/graphics/ecs/water/Water.d.ts.map +1 -1
  40. package/src/engine/graphics/ecs/water/Water.js +8 -0
  41. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts +5 -5
  42. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts.map +1 -1
  43. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.js +6 -6
  44. package/src/engine/graphics3/WaterSystem.d.ts.map +1 -1
  45. package/src/engine/graphics3/WaterSystem.js +731 -734
  46. package/src/engine/graphics3/decal/DecalTileShader.d.ts +61 -0
  47. package/src/engine/graphics3/decal/DecalTileShader.d.ts.map +1 -0
  48. package/src/engine/graphics3/decal/DecalTileShader.js +138 -0
  49. package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts +10 -4
  50. package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts.map +1 -1
  51. package/src/engine/graphics3/decal/GPUDecalRenderer.js +149 -44
  52. package/src/engine/graphics3/decal/chunk_decal_tile_vertex.d.ts +25 -0
  53. package/src/engine/graphics3/decal/chunk_decal_tile_vertex.d.ts.map +1 -0
  54. package/src/engine/graphics3/decal/chunk_decal_tile_vertex.js +55 -0
  55. package/src/engine/graphics3/decal/graph_gather_decal_tiles.d.ts +22 -0
  56. package/src/engine/graphics3/decal/graph_gather_decal_tiles.d.ts.map +1 -0
  57. package/src/engine/graphics3/decal/graph_gather_decal_tiles.js +70 -0
  58. package/src/engine/graphics3/decal/shader_decal_composite.d.ts +7 -5
  59. package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
  60. package/src/engine/graphics3/decal/shader_decal_composite.js +48 -44
  61. package/src/engine/graphics3/decal/shader_decal_tile_copy.d.ts +12 -0
  62. package/src/engine/graphics3/decal/shader_decal_tile_copy.d.ts.map +1 -0
  63. package/src/engine/graphics3/decal/shader_decal_tile_copy.js +78 -0
  64. package/src/engine/graphics3/decal/shader_gather_decal_tiles.d.ts +11 -0
  65. package/src/engine/graphics3/decal/shader_gather_decal_tiles.d.ts.map +1 -0
  66. package/src/engine/graphics3/decal/shader_gather_decal_tiles.js +80 -0
  67. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +10 -0
  68. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts.map +1 -1
  69. package/src/engine/graphics3/trail/trail_tube_write_geometry.js +13 -1
  70. package/src/engine/input/devices/mouse/MouseEventButtons.d.ts +13 -0
  71. package/src/engine/input/devices/mouse/MouseEventButtons.d.ts.map +1 -0
  72. package/src/engine/input/devices/mouse/MouseEventButtons.js +23 -0
  73. package/src/engine/input/ecs/controllers/KeyboardCameraController.d.ts +4 -0
  74. package/src/engine/input/ecs/controllers/KeyboardCameraController.d.ts.map +1 -1
  75. package/src/engine/input/ecs/controllers/KeyboardCameraController.js +9 -45
  76. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +2 -2
  77. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +2 -2
  78. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  79. package/src/shade/playground/probe_clipmap/README.md +1 -0
  80. package/src/shade/playground/probe_clipmap/index.html +5 -0
  81. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  82. package/src/shade/playground/probe_clipmap/main.js +16 -2
  83. package/src/shade/playground/vgeo_scene/README.md +1 -1
  84. package/src/shade/playground/water_refraction/README.md +5 -6
  85. package/src/shade/playground/water_refraction/index.html +1 -1
  86. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  87. package/src/shade/renderer/Renderer.js +7 -5
  88. package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts +4 -6
  89. package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts.map +1 -1
  90. package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.js +34 -36
  91. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts +1 -1
  92. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts.map +1 -1
  93. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.js +162 -163
  94. package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts +1 -1
  95. package/src/shade/renderer/atmosphere/compute_mie_absorption.js +1 -1
  96. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js +1 -1
  97. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js +1 -1
  98. package/src/shade/renderer/atmosphere/shader_multiscatter_lut.js +164 -164
  99. package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +1 -1
  100. package/src/shade/renderer/camera/orbital/OrbitalCameraController.d.ts +40 -80
  101. package/src/shade/renderer/camera/orbital/OrbitalCameraController.d.ts.map +1 -1
  102. package/src/shade/renderer/camera/orbital/OrbitalCameraController.js +197 -147
  103. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  104. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  105. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
  106. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  107. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  108. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +4 -4
  109. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +4 -4
  110. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +2 -1
  111. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
  112. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +18 -1
  113. package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +2 -2
  114. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +1 -1
  115. package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +1 -1
  116. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +4 -5
  117. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
  118. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +6 -7
  119. package/src/shade/renderer/geometry/virtual/proxy/vgeo_to_proxy_mesh.d.ts +31 -0
  120. package/src/shade/renderer/geometry/virtual/proxy/vgeo_to_proxy_mesh.d.ts.map +1 -0
  121. package/src/shade/renderer/geometry/virtual/proxy/vgeo_to_proxy_mesh.js +343 -0
  122. package/src/shade/renderer/geometry/virtual/runtime/vgeo_meshlet_metadata_write.d.ts +17 -0
  123. package/src/shade/renderer/geometry/virtual/runtime/vgeo_meshlet_metadata_write.d.ts.map +1 -0
  124. package/src/shade/renderer/geometry/virtual/runtime/vgeo_meshlet_metadata_write.js +29 -0
  125. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -1
  126. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +7 -13
  127. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  128. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +2 -8
  129. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +5 -5
  130. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  131. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +10 -10
  132. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +12 -0
  133. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  134. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +22 -0
  135. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +4 -4
  136. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  137. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +50 -13
  138. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +6 -0
  139. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  140. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +7 -0
  141. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts +13 -0
  142. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map +1 -0
  143. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js +13 -0
  144. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +17 -0
  145. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  146. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +20 -0
  147. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts +5 -15
  148. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts.map +1 -1
  149. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.js +6 -34
  150. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts +18 -0
  151. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts.map +1 -0
  152. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.js +42 -0
  153. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
  154. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +5 -4
  155. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +4 -0
  156. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  157. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +13 -2
  158. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts +52 -0
  159. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts.map +1 -0
  160. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js +250 -0
  161. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
  162. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +1 -7
  163. package/src/shade/renderer/hiz/HZBFootprint.d.ts +14 -0
  164. package/src/shade/renderer/hiz/HZBFootprint.d.ts.map +1 -0
  165. package/src/shade/renderer/hiz/HZBFootprint.js +16 -0
  166. package/src/shade/renderer/hiz/HZB_FOOTPRINT_X.d.ts +10 -0
  167. package/src/shade/renderer/hiz/HZB_FOOTPRINT_X.d.ts.map +1 -0
  168. package/src/shade/renderer/hiz/HZB_FOOTPRINT_X.js +11 -0
  169. package/src/shade/renderer/hiz/HZB_FOOTPRINT_Y.d.ts +10 -0
  170. package/src/shade/renderer/hiz/HZB_FOOTPRINT_Y.d.ts.map +1 -0
  171. package/src/shade/renderer/hiz/HZB_FOOTPRINT_Y.js +11 -0
  172. package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts +0 -7
  173. package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts.map +1 -1
  174. package/src/shade/renderer/hiz/HierarchicalZBuffer.js +405 -350
  175. package/src/shade/renderer/hiz/chunk_hzb_footprint_x.d.ts +12 -0
  176. package/src/shade/renderer/hiz/chunk_hzb_footprint_x.d.ts.map +1 -0
  177. package/src/shade/renderer/hiz/chunk_hzb_footprint_x.js +27 -0
  178. package/src/shade/renderer/hiz/chunk_hzb_footprint_y.d.ts +12 -0
  179. package/src/shade/renderer/hiz/chunk_hzb_footprint_y.d.ts.map +1 -0
  180. package/src/shade/renderer/hiz/chunk_hzb_footprint_y.js +27 -0
  181. package/src/shade/renderer/hiz/hzb_footprint_texels.d.ts +14 -0
  182. package/src/shade/renderer/hiz/hzb_footprint_texels.d.ts.map +1 -0
  183. package/src/shade/renderer/hiz/hzb_footprint_texels.js +34 -0
  184. package/src/shade/renderer/hiz/shader_hzb_reduce_any.d.ts +0 -5
  185. package/src/shade/renderer/hiz/shader_hzb_reduce_any.d.ts.map +1 -1
  186. package/src/shade/renderer/hiz/shader_hzb_reduce_any.js +37 -57
  187. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0.d.ts +11 -0
  188. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0.d.ts.map +1 -0
  189. package/src/shade/renderer/hiz/{shader_hzb_reduce_mip0_clip.js → shader_hzb_reduce_mip0.js} +120 -111
  190. package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts +39 -0
  191. package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts.map +1 -0
  192. package/src/shade/renderer/light/environment/environment_level_1_blur_plan.js +119 -0
  193. package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +15 -7
  194. package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
  195. package/src/shade/renderer/light/environment/execute_filter_environment_map.js +66 -83
  196. package/src/shade/renderer/light/environment/graph_filter_environment_map.d.ts.map +1 -1
  197. package/src/shade/renderer/light/environment/graph_filter_environment_map.js +15 -6
  198. package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts +3 -0
  199. package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts.map +1 -0
  200. package/src/shade/renderer/light/environment/shader_blur_environment_map.js +111 -0
  201. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts +3 -0
  202. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts.map +1 -0
  203. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +128 -0
  204. package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
  205. package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +0 -1
  206. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  207. package/src/shade/renderer/material/GPUMaterialManager.d.ts +7 -0
  208. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  209. package/src/shade/renderer/material/GPUMaterialManager.js +11 -0
  210. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +12 -12
  211. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
  212. package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +17 -118
  213. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -3
  214. package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
  215. package/src/shade/renderer/postprocess/nss/NSS.js +1 -3
  216. package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts +5 -6
  217. package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts.map +1 -1
  218. package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.js +9 -10
  219. package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.d.ts.map +1 -1
  220. package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.js +48 -49
  221. package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.d.ts.map +1 -1
  222. package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.js +12 -16
  223. package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.js +246 -246
  224. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts +1 -2
  225. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts.map +1 -1
  226. package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.js +34 -35
  227. package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.d.ts +2 -2
  228. package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.js +2 -2
  229. package/src/shade/renderer/shader/chunk/atmosphere/chunk_compute_extinction.js +1 -1
  230. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts +1 -1
  231. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.js +1 -1
  232. package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.d.ts +3 -3
  233. package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.js +3 -3
  234. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +9 -10
  235. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts.map +1 -1
  236. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +9 -10
  237. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +4 -4
  238. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +5 -5
  239. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts +1 -2
  240. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts.map +1 -1
  241. package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.js +1 -2
  242. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts +14 -1
  243. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts.map +1 -1
  244. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.js +19 -6
  245. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts +10 -1
  246. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts.map +1 -1
  247. package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.js +14 -6
  248. package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.d.ts +1 -1
  249. package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.js +1 -1
  250. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  251. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +7 -2
  252. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts +2 -3
  253. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts.map +1 -1
  254. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.js +7 -8
  255. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.d.ts +1 -1
  256. package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.js +12 -12
  257. package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts +2 -2
  258. package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts.map +1 -1
  259. package/src/shade/renderer/shadow/vsm/VSMPageManager.js +3 -4
  260. package/src/shade/renderer/water/GPUWaterRenderer.d.ts +0 -6
  261. package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
  262. package/src/shade/renderer/water/GPUWaterRenderer.js +12 -17
  263. package/src/shade/renderer/water/medium/graph_water_meshlets.d.ts +35 -0
  264. package/src/shade/renderer/water/medium/graph_water_meshlets.d.ts.map +1 -0
  265. package/src/shade/renderer/water/medium/graph_water_meshlets.js +89 -0
  266. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  267. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  268. package/src/shade/renderer/water/shader_water.js +22 -13
  269. package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
  270. package/src/shade/renderer/water/shader_water_avboit.js +7 -7
  271. package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts +1 -1
  272. package/src/shade/renderer/water/surface/graph_water_tessellation.js +1 -1
  273. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +9 -1
  274. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +0 -19
  275. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
  276. package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +2 -52
  277. package/editor/REWORK_PLAN_2026_08.md +0 -692
  278. package/src/CODEC_LAYOUT_VERIFICATION.md +0 -419
  279. package/src/CORRECTNESS_HUNT_2026_07_24.md +0 -142
  280. package/src/DUPLICATION_AUDIT_2026_08_07/00_core_reuse_surface.md +0 -738
  281. package/src/DUPLICATION_AUDIT_2026_08_07/A_core_math_geom.md +0 -79
  282. package/src/DUPLICATION_AUDIT_2026_08_07/B_core_data.md +0 -93
  283. package/src/DUPLICATION_AUDIT_2026_08_07/C_gfx_render.md +0 -80
  284. package/src/DUPLICATION_AUDIT_2026_08_07/D_gfx_features.md +0 -164
  285. package/src/DUPLICATION_AUDIT_2026_08_07/E_physics.md +0 -69
  286. package/src/DUPLICATION_AUDIT_2026_08_07/F_sound.md +0 -110
  287. package/src/DUPLICATION_AUDIT_2026_08_07/G_net_save.md +0 -129
  288. package/src/DUPLICATION_AUDIT_2026_08_07/H_engine_misc.md +0 -72
  289. package/src/DUPLICATION_AUDIT_2026_08_07/I_generation_view.md +0 -74
  290. package/src/DUPLICATION_AUDIT_2026_08_07/K_crosscutting.md +0 -169
  291. package/src/DUPLICATION_AUDIT_2026_08_07.md +0 -254
  292. package/src/DUPLICATION_AUDIT_REMEDIATION.md +0 -250
  293. package/src/DUPLICATION_REVIEW_2026_10_24.md +0 -1072
  294. package/src/REVIEW_2026_08_06/adv-core.md +0 -511
  295. package/src/REVIEW_2026_08_06/adv-gfx.md +0 -480
  296. package/src/REVIEW_2026_08_06/adv-view.md +0 -446
  297. package/src/REVIEW_2026_08_06/api-core.md +0 -296
  298. package/src/REVIEW_2026_08_06/api-engine.md +0 -195
  299. package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +0 -507
  300. package/src/REVIEW_2026_08_06/core-binary.md +0 -348
  301. package/src/REVIEW_2026_08_06/core-collection.md +0 -376
  302. package/src/REVIEW_2026_08_06/core-math.md +0 -221
  303. package/src/REVIEW_2026_08_06/core-process.md +0 -266
  304. package/src/REVIEW_2026_08_06/core-science.md +0 -223
  305. package/src/REVIEW_2026_08_06/engine-ai-nav.md +0 -279
  306. package/src/REVIEW_2026_08_06/engine-animation.md +0 -167
  307. package/src/REVIEW_2026_08_06/engine-asset.md +0 -166
  308. package/src/REVIEW_2026_08_06/engine-ecs.md +0 -920
  309. package/src/REVIEW_2026_08_06/engine-input.md +0 -197
  310. package/src/REVIEW_2026_08_06/engine-misc.md +0 -248
  311. package/src/REVIEW_2026_08_06/engine-terrain.md +0 -52
  312. package/src/REVIEW_2026_08_06/generation.md +0 -176
  313. package/src/REVIEW_2026_08_06/geom-2d.md +0 -434
  314. package/src/REVIEW_2026_08_06/geom-3d.md +0 -117
  315. package/src/REVIEW_2026_08_06/gfx-gi.md +0 -143
  316. package/src/REVIEW_2026_08_06/gfx-render.md +0 -740
  317. package/src/REVIEW_2026_08_06/gfx-texture.md +0 -690
  318. package/src/REVIEW_2026_08_06/prior-criticals.md +0 -49
  319. package/src/REVIEW_2026_08_06/prior-highs.md +0 -138
  320. package/src/REVIEW_2026_08_06/test-gaps.md +0 -364
  321. package/src/REVIEW_2026_08_06/view.md +0 -667
  322. package/src/REVIEW_2026_08_06.md +0 -610
  323. package/src/core/binary/lz4/LZ4_HIGH_COMPRESSION_PLAN_2026_09_14.md +0 -542
  324. package/src/core/bvh2/bvh3/NOTES.md +0 -2
  325. package/src/core/bvh8/NOTES.md +0 -63
  326. package/src/core/cache/wtinylfu/benchmark/CacheWTinylfu.bench.md +0 -243
  327. package/src/core/color/COLOR_FIX_PLAN_2026_08_28.md +0 -417
  328. package/src/core/color/COLOR_REVIEW_2026_08_28.md +0 -779
  329. package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +0 -433
  330. package/src/core/geom/3d/atlas/ATLAS_PORT_PLAN.md +0 -486
  331. package/src/core/geom/3d/atlas/BFF_PLAN.md +0 -174
  332. package/src/core/geom/3d/atlas/REVIEW_02.md +0 -392
  333. package/src/core/geom/3d/gjk/GJK_REVIEW_NOTES.md +0 -146
  334. package/src/core/geom/3d/gjk/NOTES.md +0 -8
  335. package/src/core/geom/3d/topology/TOPO_MESH_RETIREMENT_PLAN.md +0 -135
  336. package/src/core/geom/GEOMETRY_REVIEW_002_API_ISSUES.md +0 -381
  337. package/src/core/geom/GEOMETRY_REVIEW_002_NAMING.md +0 -684
  338. package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +0 -554
  339. package/src/core/model/reactive/evaluation/PREDICATE_APPLICABILITY_PROPOSAL.md +0 -446
  340. package/src/engine/REVIEW_2026_07_03.md +0 -211
  341. package/src/engine/asset/loaders/image/IMAGE_CODEC_REVIEW_2026_08_28.md +0 -815
  342. package/src/engine/control/first-person/DESIGN.md +0 -658
  343. package/src/engine/control/first-person/DESIGN_COLLISION.md +0 -382
  344. package/src/engine/control/first-person/DESIGN_EXTENSIONS.md +0 -563
  345. package/src/engine/control/first-person/TODO.md +0 -160
  346. package/src/engine/ecs/ASYNC_SYSTEMS_PROPOSAL.md +0 -531
  347. package/src/engine/ecs/HIERARCHY_REVIEW.md +0 -717
  348. package/src/engine/ecs/async/WORKER_SYSTEM_PLAN.md +0 -262
  349. package/src/engine/ecs/ik/PLAN.md +0 -179
  350. package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +0 -272
  351. package/src/engine/ecs/storage/binary/object-v2/DESIGN.md +0 -199
  352. package/src/engine/ecs/transform/TRANSFORM64_MIGRATION_PLAN_2026_09_04.md +0 -521
  353. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +0 -463
  354. package/src/engine/graphics/ecs/camera/pp/NOTES.md +0 -48
  355. package/src/engine/graphics/render/frame_graph/CORRECTNESS_FIXES_2026_09_04.md +0 -659
  356. package/src/engine/graphics/render/frame_graph/FRAME_GRAPH_RECOMMENDATIONS.md +0 -235
  357. package/src/engine/graphics/sh3/path_tracer/REVIEW_001_ACTION_PLAN.md +0 -490
  358. package/src/engine/graphics/texture/sampler/compare/FLIP_IMPLEMENTATION_PLAN.md +0 -466
  359. package/src/engine/input/GAMEPAD_API_PROPOSAL.md +0 -717
  360. package/src/engine/input/ecs/ism/ISM_DESIGN.md +0 -1523
  361. package/src/engine/input/ecs/ism/ISM_IMPLEMENTATION_PLAN.md +0 -627
  362. package/src/engine/navigation/mesh/OVERLAPPING_SURFACES_2026_08_25.md +0 -661
  363. package/src/engine/navigation/mesh/PATHFINDING_PLAN.md +0 -229
  364. package/src/engine/network/CONGESTION_CONTROL.md +0 -87
  365. package/src/engine/network/MESSAGE_TRANSPORT.md +0 -364
  366. package/src/engine/network/SMOOTHNESS_DESIGN.md +0 -400
  367. package/src/engine/physics/cloth/MEASUREMENTS.md +0 -5304
  368. package/src/engine/physics/cloth/PLAN.md +0 -3056
  369. package/src/engine/physics/fluid/GPU_FLUID_CASCADES_PROPOSAL_2026_10_16.md +0 -1382
  370. package/src/engine/physics/fluid/REVIEW_02_PLAN.md +0 -243
  371. package/src/engine/physics/fluid/solver/NOTES.md +0 -46
  372. package/src/engine/sound/SOUND_EMITTER_RETIREMENT_PLAN.md +0 -536
  373. package/src/engine/sound/simulation/IMPLEMENTATION_PLAN.md +0 -432
  374. package/src/engine/sound/simulation/PROBE_PLACEMENT.md +0 -250
  375. package/src/engine/sound/simulation/PROBE_TRANSFER_RESEARCH.md +0 -322
  376. package/src/engine/sound/simulation/REFLECTION_IR_PLAN.md +0 -261
  377. package/src/engine/sound/simulation/VISIBILITY_GRAPH_PLAN.md +0 -121
  378. package/src/engine/sound/sopra/IMPLEMENTATION_PLAN.md +0 -999
  379. package/src/format/image/avif/DECISIONS.md +0 -545
  380. package/src/format/image/jpeg/NOTES.md +0 -3
  381. package/src/format/scene/gltf/MESHOPT_COMPRESSION_PLAN.md +0 -814
  382. package/src/generation/COORDINATES.md +0 -54
  383. package/src/generation/REVIEW_01_ACTION_PLAN.md +0 -628
  384. package/src/generation/foliage/ANNUAL_SHOOTS_BRIEF_2026_10_25.md +0 -220
  385. package/src/generation/foliage/CROWN_FILLING_BRIEF_2026_10_26.md +0 -172
  386. package/src/generation/foliage/CROWN_FULLNESS_BRIEF_2026_10_26.md +0 -86
  387. package/src/generation/foliage/FOLIAGE_DESIGN.md +0 -547
  388. package/src/generation/foliage/FOLIAGE_PLAN.md +0 -198
  389. package/src/generation/foliage/LEAF_ARCHITECTURE_BRIEF_2026_10_26.md +0 -158
  390. package/src/generation/foliage/LOD_REWORK_BRIEF_2026_10_27.md +0 -521
  391. package/src/generation/foliage/REAL_TIME_TREES_BRIEF_2026_10_27.md +0 -86
  392. package/src/generation/foliage/SELF_ORGANIZING_FRAMEWORK_BRIEF_2026_10_26.md +0 -347
  393. package/src/generation/foliage/SHOOT_SYSTEMS_ALL_SPECIES_BRIEF_2026_10_26.md +0 -248
  394. package/src/generation/foliage/SPEEDTREE_COMPARISON_2026_10_24.md +0 -694
  395. package/src/generation/foliage/TWO_FRONT_ENDS_BRIEF_2026_10_28.md +0 -552
  396. package/src/shade/RENDERER_CONTRACT.md +0 -697
  397. package/src/shade/SHADER_F16_PROPOSAL_2026_10_24.md +0 -263
  398. package/src/shade/device/IMMEDIATE_DATA_PLAN_2026_08_28.md +0 -569
  399. package/src/shade/device/PASS_ENCODER_PROPOSAL_2026_08_31.md +0 -755
  400. package/src/shade/device/mock/EXTENSION_PROPOSAL_2026_08_22.md +0 -458
  401. package/src/shade/device/mock/IMPLEMENTATION_PLAN.md +0 -255
  402. package/src/shade/device/mock/REVIEW_2026_08_22.md +0 -527
  403. package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +0 -894
  404. package/src/shade/device/timing/profile/SGPT_FORMAT.md +0 -345
  405. package/src/shade/renderer/NOTES.md +0 -78
  406. package/src/shade/renderer/PLAN.md +0 -8
  407. package/src/shade/renderer/animation/ADDITIVE_BLENDING_PLAN.md +0 -145
  408. package/src/shade/renderer/animation/SKINNING_FRAME_PLAN.md +0 -357
  409. package/src/shade/renderer/atmosphere/NOTES.md +0 -6
  410. package/src/shade/renderer/camera/orbital/MomentumAxis.d.ts +0 -76
  411. package/src/shade/renderer/camera/orbital/MomentumAxis.d.ts.map +0 -1
  412. package/src/shade/renderer/camera/orbital/MomentumAxis.js +0 -164
  413. package/src/shade/renderer/camera/orbital/OrbitalCameraConfig.d.ts +0 -45
  414. package/src/shade/renderer/camera/orbital/OrbitalCameraConfig.d.ts.map +0 -1
  415. package/src/shade/renderer/camera/orbital/OrbitalCameraConfig.js +0 -66
  416. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.d.ts +0 -98
  417. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.d.ts.map +0 -1
  418. package/src/shade/renderer/camera/orbital/OrbitalCameraInput.js +0 -184
  419. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.d.ts +0 -175
  420. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.d.ts.map +0 -1
  421. package/src/shade/renderer/camera/orbital/OrbitalCameraRig.js +0 -411
  422. package/src/shade/renderer/camera/orbital/README.md +0 -81
  423. package/src/shade/renderer/camera/orbital/index.d.ts +0 -6
  424. package/src/shade/renderer/camera/orbital/index.d.ts.map +0 -1
  425. package/src/shade/renderer/camera/orbital/index.js +0 -9
  426. package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +0 -964
  427. package/src/shade/renderer/fluid/GPU_FLUID_OCCUPANCY_AND_SOTA_REVIEW_2026_10_26.md +0 -361
  428. package/src/shade/renderer/geometry/bvh/BLAS_REFIT_BATCH_PLAN.md +0 -619
  429. package/src/shade/renderer/geometry/meshlet/COMPACTION_PLAN_2026_09_16.md +0 -674
  430. package/src/shade/renderer/geometry/sdf/NOTES.md +0 -6
  431. package/src/shade/renderer/geometry/virtual/ATTRIBUTE_PLAN_2026_09_18.md +0 -540
  432. package/src/shade/renderer/geometry/virtual/MICRON_COMPARISON_2026_08_20.md +0 -305
  433. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +0 -913
  434. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +0 -787
  435. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +0 -483
  436. package/src/shade/renderer/geometry/virtual/VK_LOD_CLUSTERS_COMPARISON_2026_08_20.md +0 -301
  437. package/src/shade/renderer/geometry/virtual/WEDGE_PLAN_2026_09_18.md +0 -448
  438. package/src/shade/renderer/geometry/virtual/runtime/CULL_PLAN_2026_09_16.md +0 -385
  439. package/src/shade/renderer/geometry/virtual/runtime/CUT_PLAN_2026_09_14.md +0 -656
  440. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +0 -308
  441. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +0 -657
  442. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +0 -551
  443. package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +0 -536
  444. package/src/shade/renderer/global_illumination/lpv/NOTES.md +0 -3
  445. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +0 -4225
  446. package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md +0 -410
  447. package/src/shade/renderer/global_illumination/sharc/NOTES.md +0 -8
  448. package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +0 -1369
  449. package/src/shade/renderer/gpu_primitive/bvh/PHASE1_HANDOVER.md +0 -202
  450. package/src/shade/renderer/gpu_primitive/indirect/NOTES.md +0 -94
  451. package/src/shade/renderer/hiz/NOTES.md +0 -3
  452. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0_clip.d.ts +0 -8
  453. package/src/shade/renderer/hiz/shader_hzb_reduce_mip0_clip.d.ts.map +0 -1
  454. package/src/shade/renderer/light/cluster/NOTES.md +0 -11
  455. package/src/shade/renderer/light/cluster/PROPOSAL_ALGORITHM_2026_10_16.md +0 -524
  456. package/src/shade/renderer/light/cluster/PROPOSAL_HIERARCHICAL_2026_10_16.md +0 -1101
  457. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts +0 -13
  458. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts.map +0 -1
  459. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.js +0 -198
  460. package/src/shade/renderer/material/resident/shader_resident_texture_means.d.ts +0 -24
  461. package/src/shade/renderer/material/resident/shader_resident_texture_means.d.ts.map +0 -1
  462. package/src/shade/renderer/material/resident/shader_resident_texture_means.js +0 -120
  463. package/src/shade/renderer/particles/DESIGN.md +0 -1011
  464. package/src/shade/renderer/particles/EMITTER_GLOBAL_STATE_PLAN_2026_10_29.md +0 -283
  465. package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +0 -453
  466. package/src/shade/renderer/path_tracer/PATH_TRACED_MEDIA_PLAN_2026_10_02.md +0 -520
  467. package/src/shade/renderer/postprocess/bloom/NOTES.md +0 -6
  468. package/src/shade/renderer/postprocess/fsr/NOTES.md +0 -4
  469. package/src/shade/renderer/postprocess/gtao/NOTES.md +0 -6
  470. package/src/shade/renderer/postprocess/nss/NOTES.md +0 -339
  471. package/src/shade/renderer/postprocess/perspective/NOTES.md +0 -3
  472. package/src/shade/renderer/postprocess/sscs/NOTES.md +0 -5
  473. package/src/shade/renderer/postprocess/ssr/NOTES.md +0 -14
  474. package/src/shade/renderer/postprocess/ssr/REPROJECTION_PROPOSAL.md +0 -286
  475. package/src/shade/renderer/postprocess/ssr/prefilter/NOTES.md +0 -39
  476. package/src/shade/renderer/postprocess/taa/NOTES.md +0 -11
  477. package/src/shade/renderer/postprocess/upscale-dither/NOTES.md +0 -78
  478. package/src/shade/renderer/postprocess/vrs/NOTES.md +0 -4
  479. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_LEDGER.md +0 -1218
  480. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_PLAN_2026_09_03.md +0 -600
  481. package/src/shade/renderer/restir/reservoir/NOTES.md +0 -6
  482. package/src/shade/renderer/shader/chunk/atmosphere/NOTES.md +0 -6
  483. package/src/shade/renderer/shader/chunk/brdf/FRESNEL_BRIEF_2026_10_16.md +0 -394
  484. package/src/shade/renderer/shader/chunk/color/tonemap/ACES_TONE_MAPPING_BRIEF_2026_10_17.md +0 -160
  485. package/src/shade/renderer/shader/chunk/color/tonemap/HDR_TONE_MAPPING_FORMS_BRIEF_2026_10_16.md +0 -322
  486. package/src/shade/renderer/shader/chunk/color/tonemap/SDR_TONE_MAPPING_BRIEF_2026_10_16.md +0 -247
  487. package/src/shade/renderer/shader/chunk/fsr/NOTES.md +0 -3
  488. package/src/shade/renderer/shader/chunk/fsr/spd/NOTES.md +0 -4
  489. package/src/shade/renderer/shader/chunk/geometry/ray/NOTES.md +0 -4
  490. package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +0 -159
  491. package/src/shade/renderer/shader/chunk/mboit/NOTES.md +0 -38
  492. package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/NOTES.md +0 -3
  493. package/src/shade/renderer/shader/chunk/spherical_harmonics/sampling/NOTES.md +0 -8
  494. package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +0 -932
  495. package/src/shade/renderer/shadow/contact/FINDINGS.md +0 -413
  496. package/src/shade/renderer/shadow/map/csm/NOTES.md +0 -5
  497. package/src/shade/renderer/shadow/ray/NOTES.md +0 -31
  498. package/src/shade/renderer/shadow/sdf/NOTES.md +0 -9
  499. package/src/shade/renderer/shadow/sdf/brixelizer/NOTES.md +0 -5
  500. package/src/shade/renderer/shadow/sdf/cascade/NOTES.md +0 -9
  501. package/src/shade/renderer/shadow/vsm/NOTES.md +0 -12
  502. package/src/shade/renderer/shadow/vsm/PLAN.md +0 -442
  503. package/src/shade/renderer/shadow/vsm/REVIEW_LEDGER.md +0 -43
  504. package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +0 -2444
  505. package/src/shade/renderer/texture/mipmaps/NOTES.md +0 -4
  506. package/src/shade/renderer/volumetrics/NOTES.md +0 -1329
  507. package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +0 -336
  508. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts +0 -23
  509. package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +0 -1
  510. package/src/shade/renderer/water/medium/GPUWaterBodies.js +0 -75
  511. package/src/shade/wgsl/NOTES.md +0 -4
  512. package/src/view/elements/progress/segmented/segment_frame_transform.d.ts +0 -15
  513. package/src/view/elements/progress/segmented/segment_frame_transform.d.ts.map +0 -1
  514. package/src/view/elements/progress/segmented/segment_frame_transform.js +0 -69
@@ -1,16 +1,11 @@
1
1
  import { GPU_DATABASE_NULL } from "../../../buffer/table/GPU_DATABASE_NULL.js";
2
2
  import { chunk_mesh_card_surface } from "../../../geometry/sdf/cards/chunk_mesh_card_surface.js";
3
3
  import { MESH_CARD_ROWS_RESOURCE } from "../../../geometry/sdf/cards/MESH_CARD_RESOURCES.js";
4
- import { INDIRECT_MATERIAL_ARRAY_TYPE } from "../../../material/resident/INDIRECT_MATERIAL_ARRAY_TYPE.js";
5
4
  import { chunk_scene_database_access } from "../../../scene/chunk_scene_database_access.js";
6
5
  import { SCENE_DATABASE_RESOURCE } from "../../../scene/SCENE_DATABASE_RESOURCE.js";
7
6
  import { chunk_mat4_inverse } from "../../../shader/chunk/geometry/mat4/chunk_mat4_inverse.js";
8
7
  import { chunk_mat4_linear_determinant } from "../../../shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.js";
9
- import { chunk_albedo_unpremultiply } from "../../../shader/chunk/material/chunk_albedo_unpremultiply.js";
10
8
  import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
11
- import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
12
- import { vec4f } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
13
- import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
14
9
 
15
10
  /**
16
11
  * The tolerance a card's depth is held to at a GI hit, in voxels of the hit's brick cascade: a hit is
@@ -20,18 +15,6 @@ import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
20
15
  */
21
16
  export const PROBE_HIT_SURFACE_TOLERANCE_VOXELS = 1.5;
22
17
 
23
- /**
24
- * The resident materials' table, as the ray passes read it: `materials[mesh.material]`.
25
- * @type {ShaderResourceDescriptor}
26
- */
27
- export const PROBE_HIT_MATERIALS_RESOURCE = ShaderResourceDescriptor.uniform("materials", INDIRECT_MATERIAL_ARRAY_TYPE);
28
-
29
- /**
30
- * Each resident texture slot's mean, `GPUResidentMaterialContext.buffer_texture_means`.
31
- * @type {ShaderResourceDescriptor}
32
- */
33
- export const PROBE_HIT_TEXTURE_MEANS_RESOURCE = ShaderResourceDescriptor.storageBuffer("texture_means", WebGPUArray.from(vec4f));
34
-
35
18
  /**
36
19
  * What a GI hit's surface is (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §6.6), its diffuse albedo and its
37
20
  * emissive, from the `meshes` row the hit is on:
@@ -44,10 +27,11 @@ export const PROBE_HIT_TEXTURE_MEANS_RESOURCE = ShaderResourceDescriptor.storage
44
27
  * the geometry's local space through its node, the normal by the transpose of the node's linear
45
28
  * part, and the tolerance {@link PROBE_HIT_SURFACE_TOLERANCE_VOXELS} voxels of the hit's cascade,
46
29
  * `voxel`, in local units by the transform's mean scale, the cube root of its determinant.
47
- * - **The material's mean**, where no card set is resident or no card sees the hit: the colour factor
48
- * × the albedo slot's mean colour × (1 − the metallic factor × the ORM slot's mean metalness), and the
49
- * emissive factor × the emissive slot's mean. What a card would have held, Lumen's diffuse colour,
50
- * from the means of what it is made of.
30
+ * - **Black**, where no card set is resident or no card sees the hit, as UE's Lumen leaves a hit no
31
+ * card covers: a surface whose albedo is not known brings back no light rather than light it may not
32
+ * have. The cost is energy, never invented energy: a material's colour factor is all of a flat one's
33
+ * albedo but only the bound of a textured one's, and in Sponza it made the bounce-lit gallery 60%
34
+ * brighter on screen (§6.6).
51
35
  * - **Row 0** names no object, the scene root never being a mesh: the hit is black.
52
36
  *
53
37
  * @type {CodeChunk}
@@ -67,11 +51,10 @@ fn probe_clipmap_hit_surface(row: u32, position: vec3<f32>, normal: vec3<f32>, v
67
51
  return out;
68
52
  }
69
53
 
70
- let mesh = scene_read_mesh(&scene_database, row);
71
54
  let card_set = mesh_card_rows[row];
72
55
 
73
56
  if (card_set != ${GPU_DATABASE_NULL}u) {
74
- let global = scene_read_node(&scene_database, mesh.node).global;
57
+ let global = scene_read_node(&scene_database, scene_read_mesh(&scene_database, row).node).global;
75
58
  let linear = mat3x3<f32>(global[0].xyz, global[1].xyz, global[2].xyz);
76
59
 
77
60
  let p = (mat4_inverse(global) * vec4<f32>(position, 1.0)).xyz;
@@ -83,28 +66,17 @@ fn probe_clipmap_hit_surface(row: u32, position: vec3<f32>, normal: vec3<f32>, v
83
66
  if (seen.found) {
84
67
  out.albedo = seen.albedo;
85
68
  out.emissive = seen.emissive;
86
-
87
- return out;
88
69
  }
89
70
  }
90
71
 
91
- let material = materials[mesh.material];
92
- let metalness = material.metallic_factor * texture_means[material.texture_orm].b;
93
-
94
- out.albedo = albedo_unpremultiply(texture_means[material.texture_albedo]) * material.color_albedo.rgb * (1.0 - metalness);
95
- out.emissive = texture_means[material.texture_emissive].rgb * material.emissive_factor;
96
-
97
72
  return out;
98
73
  }
99
74
  `, [
100
75
  chunk_scene_database_access,
101
76
  chunk_mat4_inverse,
102
77
  chunk_mat4_linear_determinant,
103
- chunk_albedo_unpremultiply,
104
78
  chunk_mesh_card_surface,
105
79
  ]);
106
80
 
107
81
  chunk_probe_clipmap_hit_surface.requireResource(SCENE_DATABASE_RESOURCE);
108
82
  chunk_probe_clipmap_hit_surface.requireResource(MESH_CARD_ROWS_RESOURCE);
109
- chunk_probe_clipmap_hit_surface.requireResource(PROBE_HIT_MATERIALS_RESOURCE);
110
- chunk_probe_clipmap_hit_surface.requireResource(PROBE_HIT_TEXTURE_MEANS_RESOURCE);
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A radiance texel's rays as accumulate pools them, by {@link PROBE_CLIPMAP_RESAMPLING}:
3
+ *
4
+ * ```wgsl
5
+ * fn probe_clipmap_resampled(index: u32, sum: vec3<f32>, count: u32) -> vec4<f32> // index: the texel's among the listed probes', k·n_r² + i
6
+ * ```
7
+ *
8
+ * Takes the texel's rays this update, their radiance's sum and their count, and gives the samples it
9
+ * pools: their radiance's sum and their weight, whose quotient is the texel's sample.
10
+ * - `false`, the default: the rays alone.
11
+ * - `true`: the rays and the re-samples of the probe's neighbours that `shader_probe_clipmap_resample`
12
+ * wrote for the texel, each a ray's worth at a visibility of one.
13
+ *
14
+ * @type {CodeChunkChoice}
15
+ */
16
+ export const chunk_probe_clipmap_resampled: CodeChunkChoice;
17
+ import { CodeChunkChoice } from "../../../shader/compiler/CodeChunkChoice.js";
18
+ //# sourceMappingURL=chunk_probe_clipmap_resampled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_probe_clipmap_resampled.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,4CAFU,eAAe,CAEmE;gCAnB5D,6CAA6C"}
@@ -0,0 +1,42 @@
1
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
2
+ import { CodeChunkChoice } from "../../../shader/compiler/CodeChunkChoice.js";
3
+ import { PROBE_RESAMPLES_READ_RESOURCE } from "./chunk_probe_clipmap.js";
4
+ import { PROBE_CLIPMAP_RESAMPLING } from "./PROBE_CLIPMAP_RESAMPLING.js";
5
+
6
+ /**
7
+ * A radiance texel's rays as accumulate pools them, by {@link PROBE_CLIPMAP_RESAMPLING}:
8
+ *
9
+ * ```wgsl
10
+ * fn probe_clipmap_resampled(index: u32, sum: vec3<f32>, count: u32) -> vec4<f32> // index: the texel's among the listed probes', k·n_r² + i
11
+ * ```
12
+ *
13
+ * Takes the texel's rays this update, their radiance's sum and their count, and gives the samples it
14
+ * pools: their radiance's sum and their weight, whose quotient is the texel's sample.
15
+ * - `false`, the default: the rays alone.
16
+ * - `true`: the rays and the re-samples of the probe's neighbours that `shader_probe_clipmap_resample`
17
+ * wrote for the texel, each a ray's worth at a visibility of one.
18
+ *
19
+ * @type {CodeChunkChoice}
20
+ */
21
+ export const chunk_probe_clipmap_resampled = CodeChunkChoice.from(PROBE_CLIPMAP_RESAMPLING);
22
+
23
+ const rays = CodeChunk.from(
24
+ //language=WGSL
25
+ `
26
+ fn probe_clipmap_resampled(index: u32, sum: vec3<f32>, count: u32) -> vec4<f32> {
27
+ return vec4<f32>(sum, f32(count));
28
+ }
29
+ `);
30
+
31
+ const resampled = CodeChunk.from(
32
+ //language=WGSL
33
+ `
34
+ fn probe_clipmap_resampled(index: u32, sum: vec3<f32>, count: u32) -> vec4<f32> {
35
+ return vec4<f32>(sum, f32(count)) + probe_resamples[index];
36
+ }
37
+ `);
38
+
39
+ resampled.requireResource(PROBE_RESAMPLES_READ_RESOURCE);
40
+
41
+ chunk_probe_clipmap_resampled.add(false, rays);
42
+ chunk_probe_clipmap_resampled.add(true, resampled);
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_probe_clipmap_sample_radiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,kDAFU,SAAS,CAqIZ;0BA5KmB,uCAAuC"}
1
+ {"version":3,"file":"chunk_probe_clipmap_sample_radiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,kDAFU,SAAS,CAsIZ;0BA7KmB,uCAAuC"}
@@ -63,14 +63,15 @@ struct ProbeClipmapLobe {
63
63
  sh: ${METRO_L1_IRRADIANCE_STRUCT.wgsl_ref},
64
64
  }
65
65
 
66
- // a slot's radiance toward a direction: one bilinear tap of its tile, through its skirt
67
- fn probe_clipmap_radiance(slot: u32, direction: vec3<f32>) -> vec3<f32> {
66
+ // a slot's radiance toward a direction, and its texels' count of samples in alpha: one bilinear tap of its
67
+ // tile, through its skirt
68
+ fn probe_clipmap_radiance(slot: u32, direction: vec3<f32>) -> vec4<f32> {
68
69
  let side = probe_sampling.radiance_resolution + 2u;
69
70
  let place = index_to_grid2d_reciprocal(slot, probe_sampling.radiance_tiles_per_row, probe_sampling.radiance_tiles_per_row_reciprocal);
70
71
  let tile = vec2<f32>(place * side);
71
72
  let in_tile = texture_octahedral_skirt_uv(uv_octahedral_unit_encode(direction), f32(side)) * f32(side);
72
73
 
73
- return textureSampleLevel(probe_radiance, probe_depth_sampler, (tile + in_tile) * probe_sampling.radiance_texel, 0.0).rgb;
74
+ return textureSampleLevel(probe_radiance, probe_depth_sampler, (tile + in_tile) * probe_sampling.radiance_texel, 0.0);
74
75
  }
75
76
 
76
77
  // a picked probe's share for the lobe, its radiance along it and its SH
@@ -108,7 +109,7 @@ fn probe_clipmap_lobe(slot: u32, share: f32, position: vec3<f32>, normal: vec3<f
108
109
  }
109
110
  }
110
111
 
111
- out.radiance = probe_clipmap_radiance(slot, direction);
112
+ out.radiance = probe_clipmap_radiance(slot, direction).rgb;
112
113
 
113
114
  return out;
114
115
  }
@@ -33,6 +33,10 @@ export const PROBE_ACCUMULATE_SETTINGS: WebGPUStruct;
33
33
  * - Samples are clipped once the variance's window has passed, when 1/(a+1) is no longer its blend:
34
34
  * before that it holds no spread to clip to.
35
35
  * - A texel's first sample seeds both means. A texel no ray reached keeps its history.
36
+ * - Where the frame re-samples (`PROBE_CLIPMAP_RESAMPLING`), the sample pools the rays with the texel's
37
+ * re-samples of the probe's neighbours (`shader_probe_clipmap_resample`), each a ray's worth at a
38
+ * visibility of one (`chunk_probe_clipmap_resampled`). Only a texel some ray reached takes them: its
39
+ * time terms are a sampled texel's.
36
40
  * - **Depth**: the moments (d, d²) of the rays landing in the texel, in spacings: a miss the limit, a
37
41
  * back face 0.2·t (DDGI 2021's shortening), a hit t, every sample held to the limit, the farthest a
38
42
  * cage tests a relocated probe, (1 + 0.45)·√3 (`PROBE_DEPTH_LIMIT`, D9). On a uniform update the
@@ -1 +1 @@
1
- {"version":3,"file":"shader_probe_clipmap_accumulate.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js"],"names":[],"mappings":"AA0CA;;GAEG;AACH,wCAFU,YAAY,CAqBQ;AAmB9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,8CAFU,aAAa,CAmVpB;6BA3c0B,sCAAsC;8BAHrC,kCAAkC"}
1
+ {"version":3,"file":"shader_probe_clipmap_accumulate.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js"],"names":[],"mappings":"AA4CA;;GAEG;AACH,wCAFU,YAAY,CAqBQ;AAqB9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,8CAFU,aAAa,CAsVpB;6BAtd0B,sCAAsC;8BAHrC,kCAAkC"}
@@ -28,9 +28,11 @@ import {
28
28
  PROBE_RAY_SUMS_READ_RESOURCE,
29
29
  PROBE_RAYS_READ_RESOURCE,
30
30
  PROBE_RECORDS_READ_RESOURCE,
31
+ PROBE_RESAMPLES_READ_RESOURCE,
31
32
  PROBE_STATES_READ_RESOURCE,
32
33
  PROBE_TRACE_READ_RESOURCE
33
34
  } from "./chunk_probe_clipmap.js";
35
+ import { chunk_probe_clipmap_resampled } from "./chunk_probe_clipmap_resampled.js";
34
36
  import {
35
37
  PROBE_BACK_FACE_DEPTH,
36
38
  PROBE_CHANGE_SIGNIFICANCE,
@@ -79,7 +81,9 @@ resources.createGroup()
79
81
  .add(PROBE_MAPS_WRITE_RESOURCE)
80
82
  .add(PROBE_RADIANCE_HISTORY_RESOURCE)
81
83
  .add(PROBE_DEPTH_HISTORY_RESOURCE)
82
- .add(PROBE_ESTIMATORS_RESOURCE);
84
+ .add(PROBE_ESTIMATORS_RESOURCE)
85
+ // read only where the frame re-samples (chunk_probe_clipmap_resampled)
86
+ .add(PROBE_RESAMPLES_READ_RESOURCE);
83
87
 
84
88
  /**
85
89
  * Accumulate (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.8): a thread a texel of each listed probe's maps,
@@ -112,6 +116,10 @@ resources.createGroup()
112
116
  * - Samples are clipped once the variance's window has passed, when 1/(a+1) is no longer its blend:
113
117
  * before that it holds no spread to clip to.
114
118
  * - A texel's first sample seeds both means. A texel no ray reached keeps its history.
119
+ * - Where the frame re-samples (`PROBE_CLIPMAP_RESAMPLING`), the sample pools the rays with the texel's
120
+ * re-samples of the probe's neighbours (`shader_probe_clipmap_resample`), each a ray's worth at a
121
+ * visibility of one (`chunk_probe_clipmap_resampled`). Only a texel some ray reached takes them: its
122
+ * time terms are a sampled texel's.
115
123
  * - **Depth**: the moments (d, d²) of the rays landing in the texel, in spacings: a miss the limit, a
116
124
  * back face 0.2·t (DDGI 2021's shortening), a hit t, every sample held to the limit, the farthest a
117
125
  * cage tests a relocated probe, (1 + 0.45)·√3 (`PROBE_DEPTH_LIMIT`, D9). On a uniform update the
@@ -280,7 +288,9 @@ fn main(
280
288
  var change = vec2<f32>(0.0);
281
289
 
282
290
  if (count > 0u) {
283
- let sample = sum / f32(count);
291
+ // the rays, and the neighbours' re-samples where the frame took them
292
+ let pooled = probe_clipmap_resampled(k * texels + i, sum, count);
293
+ let sample = pooled.rgb / pooled.w;
284
294
  let estimator = slot * texels + i;
285
295
  let rate = probe_clipmap_guide_rate(probe_accumulate_expected_rays(base, i, rays, n), settings.rays_per_probe, texels, settings.uniform_period);
286
296
 
@@ -459,6 +469,7 @@ fn main(
459
469
  chunk_probe_clipmap_ray_layout,
460
470
  chunk_probe_clipmap_ray_texel,
461
471
  chunk_probe_clipmap_guide,
472
+ chunk_probe_clipmap_resampled,
462
473
  chunk_folded_workgroup_index,
463
474
  chunk_index_to_grid2d,
464
475
  chunk_f16_round_stochastic,
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @type {WebGPUStruct}
3
+ */
4
+ export const PROBE_RESAMPLE_SETTINGS: WebGPUStruct;
5
+ /**
6
+ * Re-sample: each radiance texel of each listed probe B takes what its neighbours have already seen, and
7
+ * traces nothing (Enshrouded's probe reprojection). A thread a texel, through accumulate's launch,
8
+ * `PROBE_DISPATCH_TEXELS`; the depth texels' threads do nothing. It writes the texel's
9
+ * `probe_resamples`: the accepted re-samples' radiance, each times its weight, summed, and the weights'
10
+ * sum. Accumulate adds them to the texel's rays when `PROBE_CLIPMAP_RESAMPLING` is on, each re-sample a
11
+ * ray's worth (`chunk_probe_clipmap_resampled`); with it off, this pass is not recorded.
12
+ *
13
+ * - **The neighbours**: `PROBE_RESAMPLE_NEIGHBOURS` distinct ones of the 26 around B's lattice point
14
+ * in its cascade, from a start and a stride coprime with 26 that a hash of the slot, the texel and
15
+ * the update count picks, so a texel meets every neighbour over its updates. A neighbour is taken only
16
+ * if it is ALIVE and its record holds that point: the indirection's storage wraps.
17
+ * - **The point B sees**: along the texel's centre direction ω, at B's mean depth there, from its
18
+ * published depth.
19
+ * - **The neighbour's radiance**: its published radiance toward the point, weighed by how well its own
20
+ * depth toward the point confirms a surface there: `s² / (s² + (d − μ)²)`, d the point's distance from
21
+ * it and μ its mean depth that way, in spacings, s² its depth's variance that way plus the receiver
22
+ * bias squared (`PROBE_RECEIVER_BIAS`). Two-sided, unlike Chebyshev's: a neighbour that sees nearer
23
+ * has an occluder between, and one that sees farther sees past a point in mid-air, which B's texel puts
24
+ * there where it mixes a near depth with a far one.
25
+ * - **Only what depth confirms**: a texel whose depth is at the limit, everything past every probe's
26
+ * moments, takes nothing, and nor is a neighbour whose distance to the point is at the limit or past it.
27
+ * - Measured on Sponza, the 4090, the settled frame's eight-corner diffuse against a reference of four times
28
+ * the rays without re-sampling: without re-sampling +1.1–1.9% (two runs); Chebyshev one-sided, the first
29
+ * read along ω itself and the second at the limit alone, +11.5%; two-sided, +9.8%; without the second,
30
+ * +6.5%; without either, as built, +3.2%. Light the depth cannot confirm is light through a wall.
31
+ * - **Confidence**: the weight is also scaled by how much the neighbour's mean can be trusted, so a re-sample
32
+ * stays at most a ray's worth:
33
+ * - its spread and its count, `σ²_B / (σ²_B + σ²_A / n_A)`: σ²_A the variance of the samples of the
34
+ * neighbour's texel the point is in (its estimator's deviation, luminance), n_A that texel's count of
35
+ * samples (the radiance's alpha), so σ²_A / n_A is the variance of the mean read; σ²_B that of one of
36
+ * B's own samples of its texel. Both are absolute, each held to the estimator's own floor of 10⁻⁵, so a
37
+ * dark neighbour is not taken less for being dark;
38
+ * - its freshness, `e^(−age / τ)`: age the frames since the neighbour's last update, τ
39
+ * `response_frames`, the time over which a probe's own history follows a change.
40
+ * - A neighbour's texel no ray has reached, its count zero, is not taken.
41
+ * - A probe whose first update this is, or a DEAD one, takes nothing: its depth is not yet its own, or
42
+ * it is inside a solid.
43
+ *
44
+ * Reads only the atlases as the last publish left them, and the frame's records and states, which no
45
+ * pass after relocation writes before accumulate.
46
+ *
47
+ * @type {ComputeShader}
48
+ */
49
+ export const shader_probe_clipmap_resample: ComputeShader;
50
+ import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
51
+ import { ComputeShader } from "../../../shader/ComputeShader.js";
52
+ //# sourceMappingURL=shader_probe_clipmap_resample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shader_probe_clipmap_resample.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js"],"names":[],"mappings":"AA+BA;;GAEG;AACH,sCAFU,YAAY,CAaM;AAsB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,4CAFU,aAAa,CA4IpB;6BAhP0B,sCAAsC;8BAHrC,kCAAkC"}
@@ -0,0 +1,250 @@
1
+ import { chunk_rgb_to_luminance } from "../../../shader/chunk/color/chunk_rgb_to_luminance.js";
2
+ import { chunk_uv_octahedral_unit_decode } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
3
+ import { chunk_uv_octahedral_unit_encode } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_encode.js";
4
+ import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
5
+ import { chunk_pcg3d } from "../../../shader/chunk/random/pcg/chunk_pcg3d.js";
6
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
7
+ import { ComputeShader } from "../../../shader/ComputeShader.js";
8
+ import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
9
+ import { f32, u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
10
+ import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
11
+ import {
12
+ chunk_probe_clipmap,
13
+ PROBE_DEPTH_HISTORY_RESOURCE,
14
+ PROBE_ESTIMATORS_READ_RESOURCE,
15
+ PROBE_LEVELS_RESOURCE,
16
+ PROBE_ORIGINS_READ_RESOURCE,
17
+ PROBE_RADIANCE_HISTORY_RESOURCE,
18
+ PROBE_RECORDS_READ_RESOURCE,
19
+ PROBE_RESAMPLES_WRITE_RESOURCE,
20
+ PROBE_STATES_READ_RESOURCE,
21
+ PROBE_TRACE_READ_RESOURCE
22
+ } from "./chunk_probe_clipmap.js";
23
+ import {
24
+ chunk_probe_clipmap_pick,
25
+ PROBE_DEPTH_SAMPLER_RESOURCE,
26
+ PROBE_INDIRECTION_READ_RESOURCE,
27
+ PROBE_SAMPLING_RESOURCE
28
+ } from "./chunk_probe_clipmap_pick.js";
29
+ import { chunk_probe_clipmap_sample_radiance } from "./chunk_probe_clipmap_sample_radiance.js";
30
+ import { PROBE_DEPTH_LIMIT, PROBE_RECEIVER_BIAS, PROBE_RESAMPLE_NEIGHBOURS, PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
31
+
32
+ /**
33
+ * @type {WebGPUStruct}
34
+ */
35
+ export const PROBE_RESAMPLE_SETTINGS = WebGPUStruct.from({
36
+ /** probes a frame updates at most: the trace list's bound */
37
+ trace_capacity: u32,
38
+ /** octahedral radiance texels a side, n_r */
39
+ radiance_resolution: u32,
40
+ /** octahedral depth texels a side, n_d: the texels' launch is accumulate's, n_r² + n_d² a probe */
41
+ depth_resolution: u32,
42
+ /** the frame, of the frames the clipmap has recorded */
43
+ frame: u32,
44
+ /** the short mean's response, τ, in frames: how fast a neighbour's history goes stale */
45
+ response_frames: f32,
46
+ }, "ProbeResampleSettings");
47
+
48
+ const resources = new ShaderResourceSetDescriptor();
49
+
50
+ resources.setImmediate("settings", PROBE_RESAMPLE_SETTINGS);
51
+
52
+ resources.createGroup()
53
+ .add(PROBE_TRACE_READ_RESOURCE)
54
+ .add(PROBE_ORIGINS_READ_RESOURCE)
55
+ .add(PROBE_RESAMPLES_WRITE_RESOURCE);
56
+
57
+ resources.createGroup()
58
+ .add(PROBE_LEVELS_RESOURCE)
59
+ .add(PROBE_SAMPLING_RESOURCE)
60
+ .add(PROBE_INDIRECTION_READ_RESOURCE)
61
+ .add(PROBE_STATES_READ_RESOURCE)
62
+ .add(PROBE_RECORDS_READ_RESOURCE)
63
+ .add(PROBE_DEPTH_HISTORY_RESOURCE)
64
+ .add(PROBE_RADIANCE_HISTORY_RESOURCE)
65
+ .add(PROBE_DEPTH_SAMPLER_RESOURCE)
66
+ .add(PROBE_ESTIMATORS_READ_RESOURCE);
67
+
68
+ /**
69
+ * Re-sample: each radiance texel of each listed probe B takes what its neighbours have already seen, and
70
+ * traces nothing (Enshrouded's probe reprojection). A thread a texel, through accumulate's launch,
71
+ * `PROBE_DISPATCH_TEXELS`; the depth texels' threads do nothing. It writes the texel's
72
+ * `probe_resamples`: the accepted re-samples' radiance, each times its weight, summed, and the weights'
73
+ * sum. Accumulate adds them to the texel's rays when `PROBE_CLIPMAP_RESAMPLING` is on, each re-sample a
74
+ * ray's worth (`chunk_probe_clipmap_resampled`); with it off, this pass is not recorded.
75
+ *
76
+ * - **The neighbours**: `PROBE_RESAMPLE_NEIGHBOURS` distinct ones of the 26 around B's lattice point
77
+ * in its cascade, from a start and a stride coprime with 26 that a hash of the slot, the texel and
78
+ * the update count picks, so a texel meets every neighbour over its updates. A neighbour is taken only
79
+ * if it is ALIVE and its record holds that point: the indirection's storage wraps.
80
+ * - **The point B sees**: along the texel's centre direction ω, at B's mean depth there, from its
81
+ * published depth.
82
+ * - **The neighbour's radiance**: its published radiance toward the point, weighed by how well its own
83
+ * depth toward the point confirms a surface there: `s² / (s² + (d − μ)²)`, d the point's distance from
84
+ * it and μ its mean depth that way, in spacings, s² its depth's variance that way plus the receiver
85
+ * bias squared (`PROBE_RECEIVER_BIAS`). Two-sided, unlike Chebyshev's: a neighbour that sees nearer
86
+ * has an occluder between, and one that sees farther sees past a point in mid-air, which B's texel puts
87
+ * there where it mixes a near depth with a far one.
88
+ * - **Only what depth confirms**: a texel whose depth is at the limit, everything past every probe's
89
+ * moments, takes nothing, and nor is a neighbour whose distance to the point is at the limit or past it.
90
+ * - Measured on Sponza, the 4090, the settled frame's eight-corner diffuse against a reference of four times
91
+ * the rays without re-sampling: without re-sampling +1.1–1.9% (two runs); Chebyshev one-sided, the first
92
+ * read along ω itself and the second at the limit alone, +11.5%; two-sided, +9.8%; without the second,
93
+ * +6.5%; without either, as built, +3.2%. Light the depth cannot confirm is light through a wall.
94
+ * - **Confidence**: the weight is also scaled by how much the neighbour's mean can be trusted, so a re-sample
95
+ * stays at most a ray's worth:
96
+ * - its spread and its count, `σ²_B / (σ²_B + σ²_A / n_A)`: σ²_A the variance of the samples of the
97
+ * neighbour's texel the point is in (its estimator's deviation, luminance), n_A that texel's count of
98
+ * samples (the radiance's alpha), so σ²_A / n_A is the variance of the mean read; σ²_B that of one of
99
+ * B's own samples of its texel. Both are absolute, each held to the estimator's own floor of 10⁻⁵, so a
100
+ * dark neighbour is not taken less for being dark;
101
+ * - its freshness, `e^(−age / τ)`: age the frames since the neighbour's last update, τ
102
+ * `response_frames`, the time over which a probe's own history follows a change.
103
+ * - A neighbour's texel no ray has reached, its count zero, is not taken.
104
+ * - A probe whose first update this is, or a DEAD one, takes nothing: its depth is not yet its own, or
105
+ * it is inside a solid.
106
+ *
107
+ * Reads only the atlases as the last publish left them, and the frame's records and states, which no
108
+ * pass after relocation writes before accumulate.
109
+ *
110
+ * @type {ComputeShader}
111
+ */
112
+ export const shader_probe_clipmap_resample = ComputeShader.from({
113
+ label: "Probe Clipmap Resample",
114
+ resources,
115
+ body: CodeChunk.from(
116
+ //language=WGSL
117
+ `
118
+ // the j-th of the 26 neighbours: the 3×3×3 around the point, its centre skipped
119
+ fn probe_resample_offset(j: u32) -> vec3<i32> {
120
+ let index = j + select(0u, 1u, j >= 13u);
121
+
122
+ return vec3<i32>(vec3<u32>(index % 3u, (index / 3u) % 3u, index / 9u)) - vec3<i32>(1);
123
+ }
124
+
125
+ // the variance of a texel's samples, luminance, from its estimator's words: the deviation's r in the second word's
126
+ // high half, its g and b in the third; held to the estimator's own floor
127
+ fn probe_resample_variance(words: vec4<u32>) -> f32 {
128
+ let deviation = vec3<f32>(unpack2x16float(words.y).y, unpack2x16float(words.z));
129
+ let d = rgb_to_luminance(sqrt(max(vec3<f32>(1e-5), deviation * deviation)));
130
+
131
+ return d * d;
132
+ }
133
+
134
+ // a stride through the 26 that meets each of them once: odd, and not 13
135
+ fn probe_resample_stride(hash: u32) -> u32 {
136
+ let m = hash % 12u;
137
+
138
+ return 2u * m + 1u + select(0u, 2u, m >= 6u);
139
+ }
140
+
141
+ @compute @workgroup_size(${PROBE_THREAD_WORKGROUP_SIZE})
142
+ fn main(
143
+ @builtin(workgroup_id) workgroup_id: vec3<u32>,
144
+ @builtin(local_invocation_index) lane: u32,
145
+ ) {
146
+ let thread = folded_workgroup_index(workgroup_id) * PROBE_THREAD_WORKGROUP_SIZE + lane;
147
+
148
+ let n = settings.radiance_resolution;
149
+ let texels = n * n;
150
+ let per_probe = texels + settings.depth_resolution * settings.depth_resolution;
151
+
152
+ if (thread >= min(probe_trace.count, settings.trace_capacity) * per_probe) {
153
+ return;
154
+ }
155
+
156
+ let k = thread / per_probe;
157
+ let i = thread % per_probe;
158
+
159
+ if (i >= texels) {
160
+ return;
161
+ }
162
+
163
+ let slot = probe_trace.elements[k];
164
+ let state = probe_states[slot];
165
+
166
+ var sum = vec4<f32>(0.0);
167
+
168
+ if (probe_state_kind(state.x) == PROBE_STATE_ALIVE) {
169
+ let record = probe_records[slot];
170
+ let cascade = probe_record_cascade(record.flags);
171
+ let origin = probe_origins[k];
172
+ let spacing = origin.w;
173
+
174
+ let direction = uv_octahedral_unit_decode((vec2<f32>(f32(i % n), f32(i / n)) + 0.5) / f32(n));
175
+ let seen = probe_clipmap_depth_moments(slot, direction).x;
176
+ let point = origin.xyz + direction * (seen * spacing);
177
+ // the variance of one of B's own samples of the texel
178
+ let own = probe_resample_variance(probe_estimators[slot * texels + i]);
179
+
180
+ let hash = pcg3d(vec3<u32>(slot, i, probe_state_updates(state.x)));
181
+ let start = hash.x % 26u;
182
+ let stride = probe_resample_stride(hash.y);
183
+
184
+ // at the limit to a half float's step there, 2^-9 between 2 and 4: every ray that way went past it,
185
+ // and no depth confirms where
186
+ let gathered = select(0u, ${PROBE_RESAMPLE_NEIGHBOURS}u, seen < ${PROBE_DEPTH_LIMIT} - 1.0 / 512.0);
187
+
188
+ for (var t = 0u; t < gathered; t++) {
189
+ let lattice = record.cell + probe_resample_offset((start + t * stride) % 26u);
190
+ let neighbour = probe_clipmap_corner_slot(cascade, lattice);
191
+
192
+ if (neighbour == PROBE_CLIPMAP_NONE) {
193
+ continue;
194
+ }
195
+
196
+ let neighbour_state = probe_states[neighbour];
197
+
198
+ // the storage wraps: the slot is this point's only if its record says so
199
+ if (probe_state_kind(neighbour_state.x) != PROBE_STATE_ALIVE || any(probe_records[neighbour].cell != lattice)) {
200
+ continue;
201
+ }
202
+
203
+ let at = vec3<f32>(lattice) * spacing + probe_clipmap_offset_decode(neighbour_state.y, spacing);
204
+ let to_point = point - at;
205
+ let distance = length(to_point) / spacing;
206
+
207
+ if (distance >= ${PROBE_DEPTH_LIMIT}) {
208
+ continue;
209
+ }
210
+
211
+ let toward = to_point / max(distance * spacing, 1e-6);
212
+ let radiance = probe_clipmap_radiance(neighbour, toward);
213
+
214
+ if (radiance.a < 1.0) {
215
+ continue;
216
+ }
217
+
218
+ let moments = probe_clipmap_depth_moments(neighbour, toward);
219
+ let spread = max(moments.y - moments.x * moments.x, 0.0) + ${PROBE_RECEIVER_BIAS} * ${PROBE_RECEIVER_BIAS};
220
+ let gap = distance - moments.x;
221
+ let visibility = spread / (spread + gap * gap);
222
+
223
+ // the neighbour's texel the point is in: the variance of the mean read, its samples' over their count
224
+ let uv = min(vec2<u32>(uv_octahedral_unit_encode(toward) * f32(n)), vec2<u32>(n - 1u));
225
+ let mean_variance = probe_resample_variance(probe_estimators[neighbour * texels + uv.y * n + uv.x]) / radiance.a;
226
+ let confidence = own / (own + mean_variance);
227
+
228
+ // how stale its history is: the frames since its last update, over the response time
229
+ let age = f32(settings.frame - probe_records[neighbour].traced_frame);
230
+ let freshness = exp(-age / settings.response_frames);
231
+
232
+ let weight = visibility * confidence * freshness;
233
+
234
+ sum += vec4<f32>(radiance.rgb * weight, weight);
235
+ }
236
+ }
237
+
238
+ probe_resamples[k * texels + i] = sum;
239
+ }
240
+ `, [
241
+ chunk_probe_clipmap,
242
+ chunk_probe_clipmap_pick,
243
+ chunk_probe_clipmap_sample_radiance,
244
+ chunk_folded_workgroup_index,
245
+ chunk_uv_octahedral_unit_decode,
246
+ chunk_uv_octahedral_unit_encode,
247
+ chunk_rgb_to_luminance,
248
+ chunk_pcg3d,
249
+ ]),
250
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"shader_probe_clipmap_shade.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,yCAFU,aAAa,CAyDpB;8BAxH2B,kCAAkC"}
1
+ {"version":3,"file":"shader_probe_clipmap_shade.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js"],"names":[],"mappings":"AAqDA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,yCAFU,aAAa,CAyDpB;8BAlH2B,kCAAkC"}
@@ -19,11 +19,7 @@ import { ComputeShader } from "../../../shader/ComputeShader.js";
19
19
  import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
20
20
  import { BRICK_TRACE_HIT, BRICK_TRACE_MISS } from "../brick/BRICK_CLIPMAP.js";
21
21
  import { BRICK_LEVELS_RESOURCE } from "../brick/chunk_brick_clipmap_trace.js";
22
- import {
23
- chunk_probe_clipmap_hit_surface,
24
- PROBE_HIT_MATERIALS_RESOURCE,
25
- PROBE_HIT_TEXTURE_MEANS_RESOURCE
26
- } from "./chunk_probe_clipmap_hit_surface.js";
22
+ import { chunk_probe_clipmap_hit_surface } from "./chunk_probe_clipmap_hit_surface.js";
27
23
  import {
28
24
  chunk_probe_clipmap,
29
25
  chunk_probe_clipmap_ray_origin,
@@ -49,8 +45,6 @@ resources.createGroup()
49
45
  resources.createGroup()
50
46
  .add(SCENE_DATABASE_RESOURCE)
51
47
  .add(MESH_CARD_ROWS_RESOURCE)
52
- .add(PROBE_HIT_MATERIALS_RESOURCE)
53
- .add(PROBE_HIT_TEXTURE_MEANS_RESOURCE)
54
48
  .add(MESH_SDF_HEADERS_RESOURCE)
55
49
  .add(MESH_SDF_INDIRECTION_RESOURCE)
56
50
  .add(MESH_CARD_SETS_RESOURCE)
@@ -0,0 +1,14 @@
1
+ /**
2
+ * How many source texels, along one axis, the mip 0 reduction reads per HZB texel: the widest footprint
3
+ * any HZB texel of the dispatch has on that axis ({@link hzb_footprint_texels }). Narrower footprints in
4
+ * the same dispatch read their last texel again.
5
+ *
6
+ * Two when the axis halves exactly, three when mip 0 is padded past half the source, which the HZB's
7
+ * sizing caps at three ({@link HierarchicalZBuffersetViewportSize }).
8
+ */
9
+ export type HZBFootprint = number;
10
+ export namespace HZBFootprint {
11
+ let Two: number;
12
+ let Three: number;
13
+ }
14
+ //# sourceMappingURL=HZBFootprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HZBFootprint.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hiz/HZBFootprint.js"],"names":[],"mappings":";;;;;;;;2BAQU,MAAM"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * How many source texels, along one axis, the mip 0 reduction reads per HZB texel: the widest footprint
3
+ * any HZB texel of the dispatch has on that axis ({@link hzb_footprint_texels}). Narrower footprints in
4
+ * the same dispatch read their last texel again.
5
+ *
6
+ * Two when the axis halves exactly, three when mip 0 is padded past half the source, which the HZB's
7
+ * sizing caps at three ({@link HierarchicalZBuffer#setViewportSize}).
8
+ *
9
+ * @enum {number}
10
+ */
11
+ export const HZBFootprint = {
12
+ /** Two texels: the source is exactly twice the HZB's mip 0 on this axis. */
13
+ Two: 0,
14
+ /** Three texels: the HZB's mip 0 is padded past half the source on this axis. */
15
+ Three: 1,
16
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The mip 0 reduction's footprint across x — decided by {@link chunk_hzb_footprint_x}.
3
+ *
4
+ * `HierarchicalZBuffer` sets it from the viewport and its mip 0 width, each time the viewport changes.
5
+ *
6
+ * @type {ShaderSwitch}
7
+ */
8
+ export const HZB_FOOTPRINT_X: ShaderSwitch;
9
+ import { ShaderSwitch } from "../shader/compiler/ShaderSwitch.js";
10
+ //# sourceMappingURL=HZB_FOOTPRINT_X.d.ts.map