@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,339 +0,0 @@
1
- # Neural Super Sampling (NSS)
2
-
3
- Port of [ARM's Neural Super Sampling](https://github.com/arm/neural-graphics-for-unreal/tree/main)
4
- reference design onto the engine's FrameGraph. Same role as TAA — temporal
5
- anti-aliasing + upscale — but the spatial reconstruction kernel is predicted
6
- per-pixel by a small CNN (Kernel-Prediction Network) instead of a fixed
7
- Catmull-Rom + variance clip.
8
-
9
- ## Pipeline overview
10
-
11
- For each frame:
12
-
13
- 1. **Preprocess** (compute, render-res, 8×8 workgroups) — assembles a
14
- 12-channel input tensor from current colour, depth-dilated velocity,
15
- warped history, the network's own feedback tensor from the previous
16
- frame, and a luma-derivative high-frequency hint. Also writes a
17
- "nearest depth offset" texture used later by postprocess.
18
- 2. **Network** (compute, render-res, 18 conv dispatches + 2 concats) —
19
- ARM's U-Net produces:
20
- - K0..K3: a 4×4 spatial reconstruction kernel (one row of weights per
21
- tensor, 4 channels each).
22
- - K4: temporal blend coefficients (theta, alpha).
23
- - FB: a 4-channel feedback tensor consumed by next frame's preprocess.
24
- 3. **Extract feedback** (compute, render-res) — copies the FB layer of the
25
- network's 3D output texture into a standalone 2D texture so the next
26
- frame's preprocess can sample it as a regular `texture_2d<f32>`.
27
- 4. **Postprocess** (compute, output-res) — applies the predicted 4×4 KPN
28
- to the jittered colour, blends with the warped history using the
29
- predicted theta, tonemap-blend-inverse-tonemap.
30
-
31
- ## Network architecture
32
-
33
- ARM's network is a U-Net with skip connections and 6 parallel output heads.
34
- Topology was reverse-engineered by parsing the SPIR-V dataflow inside
35
- `nss_v0_1_1_int8.vgf`:
36
-
37
- ```
38
- Encoder (ReLU + bias):
39
- conv1: 12 -> 32 (3x3)
40
- conv2: 32 -> 32 -> tap to skip_B
41
- conv3: 32 -> 32
42
- conv4: 32 -> 32 -> tap to skip_A
43
- conv5: 32 -> 64
44
- conv6: 64 -> 64
45
- conv7: 64 -> 32
46
-
47
- Decoder (ReLU, no bias):
48
- conv8: 32 -> 16
49
- concat(conv8_out, skip_A) -> 48 ch
50
- conv9: 48 -> 16
51
- conv10: 16 -> 16
52
- concat(conv10_out, skip_B) -> 48 ch
53
- conv11: 48 -> 16
54
- conv12: 16 -> 16 -> shared by 6 heads
55
-
56
- Output heads (identity, no bias):
57
- K0..K3, K4, FB: 16 -> 4 (3x3) each, 6 parallel dispatches writing
58
- distinct z-layers of network_output.
59
- ```
60
-
61
- The schema is encoded in `NSS_NETWORK_SCHEMA.js`; `NSSWeights` instances
62
- are validated against it on install.
63
-
64
- ## Files
65
-
66
- - `NSS.js` — orchestrator. Manages persistent textures, weight buffers, the
67
- jitter sequence, and the per-frame dispatch sequence.
68
- - `NSS_NETWORK_SCHEMA.js` — fixed U-Net topology spec.
69
- - `NSSWeights.js` — host-side weight bundle (per-layer
70
- `{in_channels, out_channels, kernel_size, weights, bias, activation,
71
- weight_scale, bias_scale}`); knows how to pack into the binary
72
- format the conv shader binds.
73
- - `NSS_WEIGHTS_ACTUAL.js` — bundled weights (base64 of the packed
74
- blob), decoded once on first use. Auto-generated.
75
- - `generate_NSS_WEIGHTS_ACTUAL.js` — build-time script that converts
76
- ARM's `nss_v0_1_1_int8.vgf` (via the SDK's `Model_Parser` C-header
77
- dump) into the binary format above.
78
- - `NSS_CONSTANTS.js` — workgroup size, channel counts, kernel size.
79
- - `NSS_SETTINGS_STRUCT.js` — per-frame uniforms (jitter, resolution,
80
- history validity, frame index).
81
- - `NSS_LAYER_CONFIG_STRUCT.js` — per-layer conv config (offsets,
82
- channel counts, activation, output-z offset, scales, has-bias flag).
83
- - `shader_nss_preprocess.js` — preprocess compute shader.
84
- - `shader_nss_conv_layer.js` — generic conv layer (int8-packed weights,
85
- `unpack4x8snorm`-based dequant, optional bias).
86
- - `shader_nss_concat.js` — concat two 3D tensors along the channel-group
87
- (z) axis.
88
- - `shader_nss_extract_feedback.js` — extracts FB layer to 2D texture.
89
- - `shader_nss_postprocess.js` — postprocess compute shader.
90
- - `chunk_nss_*.js` — supporting WGSL chunks.
91
-
92
- ## Texture inventory
93
-
94
- | Texture | Channels | Format | Lifetime |
95
- |---|---|---|---|
96
- | Preprocess tensor | 12 | rgba16f (3D, depth=3) | transient (FrameGraph) |
97
- | Nearest-depth offset | 2 | rg8unorm (2D) | transient |
98
- | Activation A / B (ping-pong) | 64 | rgba16f (3D, depth=16) | persistent |
99
- | Skip A / B | 32 | rgba16f (3D, depth=8) | persistent |
100
- | Concat scratch | 48 | rgba16f (3D, depth=12) | persistent |
101
- | Pre-output | 16 | rgba16f (3D, depth=4) | persistent |
102
- | Network output | 24 | rgba16f (3D, depth=6) | persistent |
103
- | Feedback A / B (ping-pong) | 4 | rgba16f (2D) | persistent |
104
-
105
- All sized at render-res. At 540p render that's roughly 270 MB of VRAM
106
- for the network alone — substantial. Lower the render-resolution scale
107
- or move to a smaller architecture if memory matters.
108
-
109
- ## Weights
110
-
111
- Bundled directly in the source via `NSS_WEIGHTS_ACTUAL.js` — 18 conv
112
- layers (~131 KB int8 weights + ~1.2 KB f32 biases), base64-encoded in
113
- the JS module. The `NSS` constructor decodes and uploads them
114
- automatically; the renderer only needs to flip
115
- `upscale_type = ShadeUpscalerType.NSS`.
116
-
117
- ### Source
118
-
119
- Extracted from `nss_v0_1_1_int8.vgf` in the ARM Neural Graphics for
120
- Unreal SDK in two passes:
121
-
122
- 1. **VGF constants table** via ARM's own `Model_Parser.exe` — gives
123
- us the conv weights for every layer and biases for the 7 encoder
124
- convs (the parser writes a `.nss_constants.h` C dump).
125
- 2. **SPIR-V graph** via `.nss_work/extract_spirv.cjs` — gives us the
126
- decoder + head biases (which live as inline `OpConstantComposite`
127
- in the SPIR-V module, not as VGF constants) and the per-channel
128
- RESCALE multiplier + shift for every conv layer.
129
-
130
- `generate_NSS_WEIGHTS_ACTUAL.js` combines both extracts using
131
- `BinaryBuffer` from `@woosh/meep-engine` and emits the base64 blob.
132
-
133
- To regenerate:
134
-
135
- ```
136
- # 1. Run ARM's parser on the .vgf:
137
- Model_Parser.exe -output=<dir> nss_v0_1_1_int8.vgf
138
- # Copy `.nss_constants.h` to <repo>/.nss_work/_nss_constants.h
139
- # (the dot-prefix in the parser's output isn't great on Windows;
140
- # we use an underscore-prefix locally).
141
-
142
- # 2. Copy nss_v0_1_1_int8.vgf to <repo>/.nss_work/nss.vgf and dump
143
- # the embedded SPIR-V data:
144
- node .nss_work/extract_spirv.cjs > .nss_work/spirv_extract.json
145
-
146
- # 3. From repo root:
147
- node src/webgpu/renderer/postprocess/nss/generate_NSS_WEIGHTS_ACTUAL.js
148
- ```
149
-
150
- ### Quantization
151
-
152
- ARM's network is INT8 throughout. Two TOSA ops define how int32 conv
153
- accumulators are turned into int8 activations:
154
-
155
- 1. **RESCALE** (`inst=65`) — per-output-channel `(acc_int32 * mult) >> shift`.
156
- Saturates to int8 [-128, 127].
157
- 2. **TABLE** (`inst=30`) — only on the 6 output heads. A 256-entry
158
- int8 lookup applied after RESCALE. ARM uses this to encode the
159
- trained activation function: roughly sigmoid for K4 (the temporal
160
- blend probability), smoother tanh-shape for K0..K3 + FB (the
161
- kernel-weight heads). Body layers don't have a LUT — they use the
162
- inline ReLU activation from the RESCALE+CLAMP fused output.
163
-
164
- We extract both from the SPIR-V graph in the .vgf:
165
-
166
- ```
167
- rescale_factor[c] = 127 * mult[c] / 2^shift[c] # baked at conv time
168
- LUT[i] in [-127, 127] # 256 entries, 1 per head
169
- ```
170
-
171
- Each conv shader pass:
172
-
173
- ```
174
- acc = sum(input * weight) + bias // bias pre-divided by 127^2
175
- acc = clamp(acc * rescale, -1, 1) // RESCALE + int8 saturation
176
- if has_lut: // output heads
177
- acc = LUT[clamp(round(acc * 127) + 128, 0, 255)] / 127
178
- else:
179
- acc = activation(acc) // ReLU for body layers
180
- ```
181
-
182
- The LUT is the missing piece that makes the trained network's
183
- activation function meaningful — ThetaAlpha goes from "noisy linear"
184
- to "sharp sigmoid step", the KPN columns get their proper tanh shape.
185
-
186
- #### Per-head RESCALE output_zp — the LUT calibration shift
187
-
188
- TOSA RESCALE has an `output_zp` operand that biases the int8 result
189
- by a head-specific amount before saturation, lining up the
190
- saturated value with the trained transition zone of the per-head
191
- TABLE LUT. Without applying it, the LUT input always lands at the
192
- flat tail (int8 ≈ 0) and the trained activation collapses to a
193
- constant.
194
-
195
- The values we extract from the SPIR-V (per ARM's quantized model):
196
-
197
- | Slot | Head | output_zp | LUT transition zone (int8 input) |
198
- |------|-------------|-----------|----------------------------------|
199
- | 0 | Feedback | +76 | [+41, +111] |
200
- | 1 | ThetaAlpha | +22 | [+18, +26] |
201
- | 2 | KPNCol3 | +94 | [+65, +123] |
202
- | 3 | KPNCol2 | +11 | [-29, +51] |
203
- | 4 | KPNCol1 | -1 | [-50, +48] |
204
- | 5 | KPNCol0 | +12 | [-25, +49] |
205
-
206
- The conv shader applies `output_zp` in `nss_apply_lut`:
207
- `int8_in = clamp(round(value_fp * 127) + output_zp, -128, 127)`
208
- which puts the LUT INDEX inside the trained transition zone for
209
- each head. LUT output dequantisation matches ARM's `Dequantize`
210
- (`(int8 + 127) / 255`), giving fp ∈ [0, 1].
211
-
212
- Body layers also have an output_zp (= -128, the uint8 storage zero
213
- point that cancels the next conv's input_zp = 128). For body
214
- layers the conv shader ignores it — body activations are stored in
215
- fp32 throughout our pipeline so the offset is implicit.
216
-
217
- #### Head ordering — ARM's quantized model
218
-
219
- The 6 heads come out of the SPIR-V in CONCAT order, which is NOT
220
- KPN col 0..3 + ThetaAlpha + FB. ARM's UE5.5 plugin
221
- (`UE5.5/Source/NSS/Private/NSS.cpp:241-246`) hard-codes the
222
- quantized-model `OutputIndices`:
223
-
224
- ```cpp
225
- Result->OutputIndices.Feedback = 0;
226
- Result->OutputIndices.ThetaAlpha = 1;
227
- Result->OutputIndices.KPNFilterCol3 = 2;
228
- Result->OutputIndices.KPNFilterCol2 = 3;
229
- Result->OutputIndices.KPNFilterCol1 = 4;
230
- Result->OutputIndices.KPNFilterCol0 = 5;
231
- ```
232
-
233
- Our postprocess shader reads the columns from `[5, 4, 3, 2]` in
234
- that order to recover (col 0, col 1, col 2, col 3), and reads
235
- ThetaAlpha from slot 1.
236
-
237
- #### Postprocess two-stage blend
238
-
239
- Mirrors ARM's `NSSPostprocess.usf` (UE5.5):
240
- 1. Apply the 4×4 KPN to the jittered colour, normalising by
241
- the (positive) weight sum. The centre tap (col=1, row=1) is also
242
- captured separately.
243
- 2. Blend the KPN colour with warped history by `theta * on_screen`.
244
- 3. In tonemapped (max-of-channels Karis) space, blend toward the
245
- centre tap by `alpha * centre_present` — sharpens output pixels
246
- that have a true render-res sample under them.
247
- 4. Inverse tonemap, divide by `EXPOSURE = e^2`, write.
248
-
249
- `theta = ThetaAlpha.x` directly (LUT output already in [0, 1]).
250
- `alpha = 0.35 * ThetaAlpha.y + 0.05` — remap to ARM's
251
- [0.05, 0.4] band.
252
-
253
- ## Known divergences from ARM's reference
254
-
255
- Audited against `ffx_nss_callbacks_glsl.h`, `ffx_nss_preprocess.h`,
256
- `ffx_nss_postprocess.h`. Tracking what we still differ on:
257
-
258
- - **Persistent luma derivative (preprocess):** ARM
259
- (`CalculateLumaDerivative`, ffx_nss_callbacks_glsl.h:627-681) uses
260
- a persistent `R8G8` ping-pong texture with soft-clip + x^1.5
261
- normalisation + temporal accumulation + disocclusion gating. We
262
- use a single-frame `saturate(abs(luma_diff) * 4)`. The trained
263
- network expects the persistent variant.
264
- - **Disocclusion sample location:** ARM unjitters the previous-frame
265
- UV via `JitterOffsetTm1Uv()` before sampling prev depth
266
- (`ffx_nss_preprocess.h:34`). We pass the raw reprojected UV.
267
- Causes false-positive disocclusion on static silhouettes.
268
- - **Disocclusion bilinear weight threshold:** ours 0.01, ARM's 0.1.
269
- We admit weak corner taps that ARM rejects.
270
- - **Disocclusion gather rebias:** ARM offsets the prev-depth gather
271
- by the previous frame's nearest-depth-offset texture
272
- (`GatherReconstructedPreviousDepthRQuad`). We don't track or feed
273
- back the prev-frame nearest-offset.
274
- - **Motion zero-clamp + static-frame disocclusion scaling:** ARM
275
- zeros tiny motion (`MotionWarpThresh=0.01`) and scales
276
- disocclusion by `~0.725` on near-static frames
277
- (`MotionDisThresh=0.25`). We do neither.
278
- - **History warp filter:** ARM uses Catmull-Rom with deringing
279
- (`CatmullRomWithDering`, NSSPostprocess.usf:55). We use plain
280
- bilinear via `SAMPLER_LINEAR_UPSCALE`. Slight softness on
281
- high-frequency history detail.
282
- - **Per-tensor input scales (forward pass):** ARM's INT8
283
- quantisation has per-tensor `input_scale` per CONV op (encoded as
284
- TOSA quantisation metadata that we don't decode). The combined
285
- `s_in * s_w / s_out` is folded into the per-channel RESCALE
286
- multiplier we DO extract — so for our purposes the heads are
287
- fully calibrated via output_zp (above), and any residual scale
288
- drift in the body layers gets absorbed by the per-channel
289
- multipliers. Symptoms would be uniform brightness / saturation
290
- bias on whole-image output, not the activation collapse we had
291
- before output_zp was wired up.
292
- - **Exposure factor:** ARM multiplies network colour reads by
293
- `Exposure()` and the final write by `1/Exposure()`
294
- (`ffx_nss_postprocess.h:48`). We hard-code `EXPOSURE = e^2` to
295
- match ARM's `NSSCommon.ush` constant — adequate for SDR output,
296
- but doesn't track engine exposure changes.
297
- - **2x preset KPN footprint:** ARM's 2x path uses a precomputed
298
- `kernelLUT` indexed by `(out_pixel + jitter_tile_offset) % 2`,
299
- selecting one of 4 sparse 4-tap patterns. We do a generic 4×4
300
- walk on the input grid via `nss_solve_input_location`; the
301
- trained 2x weights expect the LUT-based pattern.
302
- - **Feedback texture format:** ARM uses `R8_SINT` (or aliased
303
- `R8G8B8A8_SNORM`) with a quantisation scale; we use raw `rgba16f`.
304
- Higher precision but a different value range than the network was
305
- trained against.
306
-
307
- ## Engine integration
308
-
309
- Wired into `Renderer.js` behind `ShadeUpscalerType`. To switch:
310
-
311
- ```js
312
- import { ShadeUpscalerType } from "./ShadeUpscalerType.js";
313
-
314
- renderer.upscale_type = ShadeUpscalerType.NSS; // or .TAA
315
- ```
316
-
317
- The renderer already advances NSS's jitter sequence (Halton(2,3) sized
318
- via `NSS.recommended_jitter_sequence_size(upscale_ratio)`), forwards
319
- `reset_history` on view changes, and bumps `frame_count` per frame.
320
-
321
- ## Differences from ARM's reference
322
-
323
- | Reference | This port |
324
- |---|---|
325
- | `VK_ARM_data_graph` for the network | Generic WGSL conv compute shader, one dispatch per layer |
326
- | INT8 quantization with TOSA RESCALE + TABLE | Per-channel `127 * mult / 2^shift` rescale + per-head `output_zp` shift before LUT lookup; LUT dequant matches ARM's `(int8 + 127) / 255` |
327
- | 2× preset uses a 4-tap LUT pattern | Generic 4×4 KPN footprint for any upscale ratio |
328
- | Mirror-pad to round to 8 | Compute shader early-outs out-of-range threads; same effect, no extra pass |
329
- | UE's sparse motion vectors | Engine velocity is already dense and pixel-space; no convert pass |
330
- | Feedback aliased as R8G8B8A8_SNORM image | Plain rgba16f texture |
331
-
332
- ## References
333
-
334
- - ARM / Unreal plugin: <https://github.com/arm/neural-graphics-for-unreal/tree/main>
335
- - ARM SDK (kernel sources): `Source/NG-SDK/sdk/include/FidelityFX/gpu/nss/`
336
- - ARM SDK Model Parser: `Source/NG-SDK/sdk/tools/binary_store/Model_Parser.exe`
337
- - FSR2 depth-clip (used unchanged for the disocclusion mask):
338
- <https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/1bbe66e7ea0d358e84af4471a90aa9c35b583de0/sdk/include/FidelityFX/gpu/fsr2/ffx_fsr2_depth_clip.h>
339
- - Engine TAA pass (companion alternative): `../taa/TAA.js`.
@@ -1,3 +0,0 @@
1
- # References
2
-
3
- * https://github.com/Fubaxiusz/fubax-shaders/blob/235ab7b10fa72e75d002274d3266a4f4916e3213/Shaders/PerfectPerspective.fx
@@ -1,5 +0,0 @@
1
- # Screen-Space Contact Shadows
2
-
3
- ### References:
4
-
5
- * https://github.com/google/filament/blob/2456299337f2205db5c1dd038213a46679b4cd77/shaders/src/shadowing.fs#L379
@@ -1,14 +0,0 @@
1
- References:
2
-
3
- * https://github.com/stride3d/stride/blob/ab954eaa23a1c09769378fa4877bd5cafe8fb37a/sources/engine/Stride.Rendering/Rendering/Images/LocalReflections/SSLRRayTracePass.sdsl
4
- * [AMD FidelityFx/SSR](https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/main/sdk/include/FidelityFX/gpu/sssr/ffx_sssr_intersect.h)
5
-
6
- HZB tracing:
7
-
8
- * GPU Gems 5
9
- * https://sugulee.wordpress.com/2021/01/19/screen-space-reflections-implementation-and-optimization-part-2-hi-z-tracing-method/
10
-
11
- random articles:
12
-
13
- * https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html
14
- * https://zznewclear13.github.io/posts/screen-space-reflection-en/
@@ -1,286 +0,0 @@
1
- # SSR reprojection proposal
2
-
3
- Status: implemented 2026-09-08, with the limitations below. The unused, invalid
4
- FidelityFX reprojection translation was removed. This document retains the review
5
- rationale and test plan, followed by implementation and validation details.
6
-
7
- ## Objective and order of work
8
-
9
- Keep reflection history attached to the reflected image under camera motion, while
10
- rejecting history whose correspondence cannot be established. Prefer a small,
11
- testable implementation over completing the abandoned denoiser port.
12
-
13
- 1. Repair history validity, motion-vector selection, and final blend confidence.
14
- 2. Add virtual-image reprojection for coherent, approximately planar reflections.
15
- 3. Add richer motion handling or temporal statistics only when a reproducible scene
16
- demonstrates the need. Profile metadata traffic before committing to its format.
17
-
18
- The exact geometric guarantee in step 2 is for a static planar ideal mirror and a
19
- static reflected point under a perspective camera. Roughness, curvature, mixed
20
- lighting sources, and moving geometry make this an approximation. They must not
21
- silently inherit the same confidence guarantee.
22
-
23
- ## Problems identified in the original implementation
24
-
25
- - `ssr_reproject_shader.js` uses the largest 3x3 velocity, whereas depth-clip validates
26
- the nearest-depth pixel's velocity. Use `depth_clip_validated_velocity()` for the
27
- existing surface candidate. This restores agreement with depth-clip; it does not
28
- prove that the selected neighboring surface describes the reflection itself.
29
- - `SSR.reset_history` is not consumed, and `PostProcess.reset_history()` is empty.
30
- Implement explicit validity for first use, reset, resize, and skipped rendering.
31
- Publish a history generation only after it has been produced successfully. Keep
32
- radiance, metadata, previous geometry, and camera state from the same view and
33
- frame. Do not infer availability solely from global frame-number parity.
34
- - Confidence is currently applied before clamp damping and variance reweighting.
35
- Apply it to the final normalized history weight, with current weight equal to
36
- one minus that result. Hard invalidation must return the current sample before
37
- reading or clipping history. Zero times an invalid value is not a safe reset.
38
- Treat velocity magnitude as a tuning heuristic, separate from geometric validity.
39
- - Define the coordinate contract explicitly: pixel centers, internal resolution,
40
- UV Y direction, reverse-Z, and each frame's jitter. GPU camera uniforms include
41
- projection offsets, while camera velocity uses the underlying camera matrices.
42
- Do not assume the existing velocity and a new matrix lookup address the same
43
- history grid. Reconstruct from the current raster grid and project into the
44
- previous raster grid, adding jitter conversion exactly once where needed.
45
-
46
- ## Parallax geometry
47
-
48
- For camera position C, reflector point P, and Euclidean reflected-ray length L,
49
- all in world space:
50
-
51
- ```text
52
- V = P + normalize(P - C) * L
53
- virtualUV = project(previousViewProjection, V)
54
- ```
55
-
56
- V is the virtual image point behind the mirror. For an ideal planar reflection it
57
- also equals `H - 2 * N * dot(H - P, N)`, where H is the physical hit and N is the unit
58
- mirror normal. Projecting H itself addresses the directly visible object, not its
59
- reflection. Validate clip W and UV bounds before sampling. Invalid hit metadata
60
- must disable the virtual candidate; a miss is not a valid zero-distance hit.
61
-
62
- Keep surface and virtual candidates separate, including their validation results.
63
- Choose a supported candidate; do not interpolate UVs across unrelated history.
64
- Prefer virtual correspondence when the reflection is smooth and coherent. A valid
65
- surface correspondence is only a fallback heuristic for reflection radiance.
66
-
67
- For virtual-candidate reflector validation, reconstruct the previous geometry at
68
- that candidate and compare it to the reflector's local plane and normal in a common
69
- coordinate system. The corresponding point on a mirror usually changes between
70
- frames. Comparing against the old location of the current reflector point, or
71
- comparing virtual depth with G-buffer surface depth, rejects correct parallax.
72
- Use roughness/material agreement and identity where available. Plane agreement
73
- alone cannot distinguish disconnected coplanar surfaces.
74
-
75
- Validate the radiance sampling footprint too. A valid center does not make adjacent
76
- Catmull-Rom taps valid. Start with validated bilinear taps, renormalizing only the
77
- accepted nonnegative weights and rejecting an empty footprint. Keep higher-order
78
- reconstruction as a measured quality improvement, not a prerequisite for correctness.
79
-
80
- ## Metadata must describe the signal being accumulated
81
-
82
- Resolve already reconstructs hit positions and reuses neighboring traces. Produce
83
- full-resolution distance plus support/confidence there, using the same accepted
84
- contributions as radiance. A neighbor's distance from its original ray origin is
85
- not the distance from the receiving pixel. Reconstruct that distance when reused.
86
-
87
- A simple initial policy is to enable virtual reprojection only for a dominant,
88
- coherent group of finite SSR hits. A representative distance is acceptable within
89
- that group; substantial distance disagreement or mixed fallback contributions
90
- reduces support. Two equally weighted depths must not become a trusted imaginary
91
- surface at their average. Do not average invalid hits into the estimate.
92
-
93
- The spatial filter before temporal reprojection also changes the radiance mixture.
94
- Its accepted contributions must propagate or conservatively reduce metadata support.
95
- Keeping center metadata while borrowing unrelated neighboring radiance breaks the
96
- contract just as it does in resolve. This is part of step 2, not optional cleanup.
97
-
98
- SSR/environment/LPV mixtures generally do not share one correspondence. Initially
99
- disable finite-hit reprojection when its support is insufficient and shorten history
100
- on source transitions. Separate histories and direction-based distant-environment
101
- reprojection remain possible later; LPV radiance is not necessarily at infinity.
102
-
103
- Do not change the packed trace format first. Although it has spare bits, first prove
104
- which distance the resolved signal requires. Start with explicit metadata and test
105
- its semantics. Consider half precision/packing afterward using a screen-error budget,
106
- finite representable ranges, and real scenes at different world scales. One extra
107
- RG16F history pair alone costs about 16.6 MB at 1920x1080, before previous geometry
108
- or other transient metadata. Reuse existing frame resources where lifetimes permit.
109
-
110
- ## Adversarial assessment
111
-
112
- | Challenge | Consequence for the design |
113
- | --- | --- |
114
- | Mirror is static but the reflected object moves sideways | Mirror depth, normal, and roughness can all agree while virtual correspondence is wrong. Previous hit distance can also agree. Exact handling requires reflected-object motion/previous hit correspondence; otherwise use radiance disagreement or a reactive signal to shorten history and acknowledge residual ambiguity. |
115
- | Reflector moves or bends | Extending the current ray and projecting with previous camera matrices is insufficient. Support previous reflector geometry/transforms later; do not claim surface velocity alone solves this. |
116
- | Rough rays alternate between near and far objects | A single distance and large history weight produce false stability. Reduce support for a broad or inconsistent mixture; do not invent a trusted mean depth. |
117
- | Two mirrors are coplanar with identical normals | Plane/normal tests cannot establish identity. Use available identity and radiance/support checks; ambiguity must reduce confidence. |
118
- | Only the bilinear center passes depth validation | Invalid adjacent radiance can still bleed through. Validate the actual taps used to reconstruct history. |
119
- | Stable shader always rejects history | It avoids trails but fails denoising. Include a positive accumulation control, not just rejection tests. |
120
- | Large motion with accurate correspondence | A fixed 128-pixel cutoff is resolution dependent and discards valid samples. Keep this heuristic separate and tune using pixel uncertainty/footprint rather than treating speed as proof of invalidity. |
121
- | New moments and counters hide a wrong lookup | More statistical state cannot repair correspondence. Defer that state until the geometry and support contract pass. |
122
-
123
- An ordinary reflection G-buffer cannot completely disambiguate all these scenes.
124
- The first implementation should improve camera parallax without promising exact
125
- dynamic-scene reconstruction. If motion support is added later, keep it inside
126
- candidate construction/validation rather than patching the temporal blend.
127
-
128
- ## Small test plan using the current software tools
129
-
130
- Use Vitest with `ComputeShaderEmulator.fromCodeChunk()` for production math helpers,
131
- `fromImageShader()` for production fragment passes, and `CPUBitmapData` for fixtures.
132
- Reuse the patterns in `taa/shader_taa.spec.js` and
133
- `taa/shader_depth_occlusion_clip.spec.js`. Most fixtures need only 16x16 or 32x16
134
- textures and a few selected pixels; no scene loader, full renderer, golden images,
135
- or new test framework is required. Use wider textures only when a motion case needs
136
- an in-bounds lookup. Test behavioral contracts, not shader source text.
137
-
138
- | Test group | Small fixture and independent expectation | Failure it should expose |
139
- | --- | --- | --- |
140
- | 1. Planar correspondence | Fix physical hit H and a plane. In JS reflect H across the plane, then intersect the current camera-to-image ray with the plane to obtain P and L. Run the production WGSL candidate helper and compare previous UV to an independently projected mirrored H. Parameterize lateral/forward camera movement, an oblique view, and jitter-only motion. Require subpixel error with a stated tolerance, initially 0.05 pixel for ordinary scales. Include stationary and valid L=0 mathematical controls. | Surface sticking, projecting physical H, wrong matrix order, double jitter, UV sign/half-pixel errors. The oracle must not repeat the implementation's ray-extension formula. |
141
- | 2. Rejection cannot be undone | Put distinct finite colors in current/history, and give current a varied neighborhood so clipping cannot conceal wrong reuse. Exercise history invalidity, off-screen/behind-camera candidate, and zero confidence. Vary current variance from 0 to 10000 while history variance is 0. Require current output for hard rejection; lowering confidence must not increase history influence when other inputs are fixed. | Blend/variance logic restoring rejected history; reset reading stale data; edge clamping masquerading as a valid lookup. |
142
- | 3. Validate the location actually used | A depth-clip fixture selects a slow center velocity while another neighbor is faster. Distinct history colors distinguish their destinations. Add one two-surface boundary with invalid bright neighboring taps and one valid tap. Assert selected correspondence and absence of invalid-tap influence. | A second dilation after depth-clip, confidence borrowed from the other candidate, unvalidated filtering footprints. |
143
- | 4. Support follows resolved radiance | Feed tiny resolve/filter fixtures with all misses, a coherent borrowed hit, and two substantially different hit distances or an SSR/fallback transition. Dispatch the production metadata-producing helpers/passes and the pre-temporal filter. Misses have no virtual support, coherent reuse remains eligible, ambiguous mixtures cannot become highly trusted solely by averaging. | Center-ray metadata attached to borrowed/filtered radiance; invalid zeros contaminating distance; source changes keeping stale confidence. |
144
- | 5. Useful accumulation and lifecycle | Manually ping-pong tiny textures for 8 deterministic frames of the planar scene with balanced synthetic noise; require lower error than raw input against the analytical signal. Then invalidate history and require the current sample. Separately record the real host path with `SoftwareGPUDevice` across first frame, next frame, reset, resize, and a skipped frame; check generation/validity and resource identity. | An always-reject implementation passing the suite; correct helper behavior never wired into SSR; old metadata paired with new radiance. |
145
-
146
- Keep these five groups in at most two shader spec files and one host lifecycle spec.
147
- Add parameter rows only for a newly observed failure. Compile helpers once per file.
148
- For hard-rejection tests, compare complete output including variance; for valid
149
- accumulation use error bounds rather than frozen implementation-specific blend values.
150
- The dynamic reflected-object counterexample is a documented limitation of the first
151
- phase, not a test that should bless visibly wrong correspondence as correct forever.
152
-
153
- ### What the emulator can and cannot establish
154
-
155
- - Fragment dispatch, matrix/vector helpers, texture loads, and level-zero filtered
156
- sampling already work. Manually writing results into the next `CPUBitmapData` is
157
- sufficient for temporal sequences.
158
- - Mip levels are currently ignored by the emulator texture intrinsics. These tests
159
- do not validate HZB traversal or roughness-dependent radiance mip selection. Use
160
- synthetic accepted hits and level-zero radiance for reprojection tests.
161
- - `SoftwareGPURenderPassEncoder` records draws and bindings but does not rasterize
162
- or write attachment pixels. Use it for host lifecycle/wiring, not image assertions.
163
- - Derivatives throw in point-wise fragment emulation; workgroup barriers are no-ops.
164
- Keep the initial reprojection pass point-wise and express local consistency using
165
- explicit neighboring loads. No workgroup-denoiser emulation is needed.
166
- - Do not assume all GPU numeric and format behavior is reproduced. The current
167
- texture-load intrinsic constructs a Float32Array even for integer-backed textures,
168
- which can lose packed-u32 low bits. Exercise codecs as direct helper calls rather
169
- than claiming packed-trace integration coverage. Float16Array can model explicit
170
- half-precision storage when evaluating a future metadata format.
171
- - Software success does not establish GPU performance, driver validation, or visual
172
- quality on curved/rough materials. A small manual mirror/moving-object scene and
173
- actual GPU timing remain useful before shipping; no native GPU is required in CI.
174
-
175
- ## Adversarial probes performed during the initial review
176
-
177
- Three temporary adversarial Vitest probes ran successfully through the existing
178
- emulator (removed after review; permanent regression coverage is described below):
179
-
180
- 1. Production SSR at zero velocity confidence returned approximately 1.079, 1.098,
181
- and 1.100 for current radiance 1 and history 1.1 as current variance increased
182
- from 0 to 10 to 10000. An experimental final-confidence gate returned exactly
183
- current radiance and variance in all three cases. This checks the suggested
184
- ordering, not a complete implementation of lifecycle or invalid-value handling.
185
- 2. With a depth-clip selection of the center pixel, the old helper returned the
186
- neighboring 8-pixel vector while `depth_clip_validated_velocity()` returned the
187
- selected 1-pixel vector, including an 8-bit-quantized selection value.
188
- 3. A prototype WGSL virtual-point helper matched independently mirrored hit geometry
189
- for three camera positions. Moving only the reflected object by one world unit
190
- produced 142.86 pixels of lookup error at focal length 1000 pixels and virtual
191
- depth 7, despite unchanged mirror geometry. This falsifies the stronger claim
192
- that reflector validation alone establishes dynamic reflection correspondence.
193
-
194
- ## Implemented design and validation
195
-
196
- - Resolve emits radiance and an RG32F distance/support attachment in both IBL and
197
- LPV paths. Distances are measured from the receiving pixel. Missing, background,
198
- off-screen, non-finite, and zero-length hits cannot supply trusted metadata.
199
- - The first spatial pass propagates weighted distance moments and suppresses
200
- support for broad mixtures. The two post-temporal spatial passes retain their
201
- radiance-only interface to avoid unnecessary metadata traffic.
202
- - Temporal reprojection prefers the virtual image for support at least 0.75 and
203
- roughness at most 0.2. Four bilinear taps are individually checked against
204
- previous depth, world-space reflector plane/normal, roughness, support, and
205
- reflected distance. Confidence includes the accepted footprint weight.
206
- - Surface fallback uses the existing depth-clip velocity selection and a single
207
- previous-minus-current raster jitter correction. A failed smooth finite virtual
208
- candidate limits surface confidence to one quarter. Radiance disagreement reduces
209
- confidence further. These constants are initial heuristics, not geometric proofs.
210
- - Reset, resize, missing previous depth, skipped frames, and a different view disable
211
- history. Radiance, distance/support, and normal/roughness ping-pong together. A
212
- generation is committed only after successful graph execution and command
213
- submission; abandoned/failed graphs and intervening resets cannot publish it.
214
- - Existing chunks supply coordinate reconstruction, NDC/UV conversion, depth and
215
- material decoding, plane construction/distance, screen bounds, bilinear weights,
216
- finite checks, depth-clip velocity, YCoCg conversion/clipping, and statistics.
217
- Three SSR-specific chunks hold metadata moments, candidate math/blending, and
218
- validated history sampling. No FidelityFX port or duplicate general math library
219
- was introduced; the already-used edge-stopping chunks remain in use.
220
-
221
- Persistent overhead is **32 bytes per internal pixel** beyond the existing radiance
222
- pair: an RG32F metadata pair plus an RGBA16F normal/roughness pair. That is about
223
- **66.4 MB at 1920x1080** (63.3 MiB). Resolve and pre-temporal filtering also produce
224
- transient RG32F metadata; two such full-size attachments total another 33.2 MB
225
- before graph lifetime reuse. Previous depth is borrowed from the existing view
226
- resources. Reducing formats is deliberately deferred until screen-space error and
227
- GPU bandwidth are measured; this is a material cost of the initial implementation.
228
-
229
- Permanent coverage uses three spec files, with 14 tests organized around the five
230
- small groups above:
231
-
232
- - `ssr_reprojection.spec.js`: independent planar mirror oracle, translation,
233
- rotation and jitter, hard reset without bound history textures, final-confidence
234
- weighting, validated velocity, invalid bilinear taps, depth/normal/roughness/source
235
- rejection, camera parallax, and an eight-frame positive denoising control.
236
- - `ssr_metadata.spec.js`: actual resolve and spatial fragment emulation, all misses,
237
- zero-length self hits, borrowed hit distance, fallback/mixed-distance support,
238
- plus WGSL validation for both resolve variants, both spatial variants, and temporal.
239
- - `SSR.spec.js`: real frame-graph/software-device recording through the final
240
- spatial passes, matching radiance/metadata/geometry resource identities, resets,
241
- resize, skipped frames, view changes, failed/abandoned graphs, and submission timing.
242
-
243
- Validation: all 14 SSR tests pass. Related TAA/depth-clip, normal call-site and plane
244
- chunk suites pass (38 tests, one existing skipped test). Declaration emission is
245
- clean and all consumer API pins compile. The repository type-error ratchet remains
246
- blocked at 899 errors against a budget of 897. An in-memory declaration comparison
247
- with these SSR-related changes reverted yields exactly the same 899 diagnostics:
248
- no additional consumer-visible type errors are introduced here. The budget was not
249
- changed.
250
-
251
- The software render device validates host recording, not pixels. Actual pixel
252
- assertions execute production fragment shaders through the emulator. LPV shader
253
- composition is validated, but its atlas sampling is not exercised by these fixtures.
254
- The new SSR reflection lab at `src/shade/playground/ssr_reprojection/` renders the
255
- production IBL path on a native NVIDIA GPU. All six SSR shader variants compile on
256
- that GPU. Visual controls for parallax/surface/current-frame comparison, moving
257
- objects, occlusion, camera cuts, resolution and final TAA were exercised. The SSR-off
258
- control visibly removes the reflected targets. There is still no isolated GPU timing
259
- or quantitative native image-quality measurement. The emulator limitations above
260
- still apply. A moving reflected object or curved reflector still
261
- requires conservative rejection and may retain residual trails; exact dynamic
262
- reflection correspondence is outside this first implementation.
263
-
264
- ## Long-term boundary
265
-
266
- Keep geometry/candidate construction, candidate validation, and temporal accumulation
267
- as small independent production helpers. Their contract is a history location,
268
- support/confidence, and validity; temporal accumulation should not need to know
269
- whether a location came from SSR, a later ray tracer, or reflected-object motion.
270
- Keep history ownership and generation on the host explicit. Preserve independent
271
- geometric oracles and positive accumulation controls as algorithms evolve.
272
-
273
- AMD's [reflection denoiser documentation](https://gpuopen.com/manuals/fidelityfx_sdk/techniques/denoiser/)
274
- describes separate mirror-parallax and surface reprojection paths. The integration
275
- choices, limitations, and test strategy above are specific to this engine.
276
-
277
- The playground README describes the repeatable visual checks and independent
278
- planar reflection guides. Its comparison modes share production shader code;
279
- changing mode invalidates history, and Parallax remains the default.
280
-
281
- Follow-up visual validation found that zero resolve variance could make spatial
282
- denoising nearly inert. The first spatial pass now bootstraps variance from local
283
- luminance and propagates the resulting uncertainty; later passes only consume it.
284
- A same-frame GPU probe and a zero-variance noisy-input regression now cover actual
285
- filter effect, not only graph wiring. See the playground README for measurements
286
- and the remaining sharpness/noise tradeoff. The SSR suite now contains 16 tests.