@woosh/meep-engine 3.78.2 → 3.78.4

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 (278) hide show
  1. package/CHANGELOG.md +46 -13
  2. package/editor/view/node-graph/NodeGraphView.d.ts +1 -1
  3. package/editor/view/node-graph/NodeGraphView.js +1 -1
  4. package/package.json +1 -1
  5. package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts +2 -1
  6. package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts.map +1 -1
  7. package/src/core/math/physics/brdf/fresnel_Schlick_optimized.js +2 -1
  8. package/src/core/math/snap_to_integer.d.ts +13 -0
  9. package/src/core/math/snap_to_integer.d.ts.map +1 -0
  10. package/src/core/math/snap_to_integer.js +20 -0
  11. package/src/core/model/node-graph/NodeGraph.d.ts +0 -1
  12. package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
  13. package/src/core/model/node-graph/NodeGraph.js +0 -1
  14. package/src/engine/asset/loaders/GroomAssetLoader.d.ts.map +1 -1
  15. package/src/engine/asset/loaders/GroomAssetLoader.js +2 -1
  16. package/src/engine/graphics/hair/Groom.d.ts +30 -0
  17. package/src/engine/graphics/hair/Groom.d.ts.map +1 -1
  18. package/src/engine/graphics/hair/Groom.js +35 -0
  19. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts +18 -2
  20. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts.map +1 -1
  21. package/src/engine/graphics/hair/GroomSerializationAdapter.js +36 -6
  22. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.d.ts +8 -0
  23. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.d.ts.map +1 -0
  24. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.js +44 -0
  25. package/src/engine/graphics/hair/groom_bake_shelter.d.ts +33 -0
  26. package/src/engine/graphics/hair/groom_bake_shelter.d.ts.map +1 -0
  27. package/src/engine/graphics/hair/groom_bake_shelter.js +288 -0
  28. package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +1 -1
  29. package/src/engine/graphics/hair/groom_bind_to_mesh.js +1 -1
  30. package/src/engine/graphics/hair/groom_build_group.d.ts +10 -2
  31. package/src/engine/graphics/hair/groom_build_group.d.ts.map +1 -1
  32. package/src/engine/graphics/hair/groom_build_group.js +8 -2
  33. package/src/engine/graphics/hair/groom_build_guides.d.ts +1 -1
  34. package/src/engine/graphics/hair/groom_build_guides.js +1 -1
  35. package/src/engine/graphics/impostors/voxel/README.md +11 -11
  36. package/src/engine/physics/cloth/collider/ClothColliderKind.js +1 -1
  37. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +1 -1
  38. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +1 -1
  39. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +2 -3
  40. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
  41. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +2 -3
  42. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts +0 -2
  43. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts.map +1 -1
  44. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +0 -5
  45. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.d.ts.map +1 -1
  46. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.js +5 -3
  47. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.d.ts.map +1 -1
  48. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js +5 -3
  49. package/src/generation/grid/coords/grid_to_texel.d.ts +7 -1
  50. package/src/generation/grid/coords/grid_to_texel.d.ts.map +1 -1
  51. package/src/generation/grid/coords/grid_to_texel.js +11 -1
  52. package/src/generation/grid/coords/grid_to_texel_span.d.ts +15 -0
  53. package/src/generation/grid/coords/grid_to_texel_span.d.ts.map +1 -0
  54. package/src/generation/grid/coords/grid_to_texel_span.js +38 -0
  55. package/src/generation/grid/coords/texel_to_grid.d.ts +2 -1
  56. package/src/generation/grid/coords/texel_to_grid.d.ts.map +1 -1
  57. package/src/generation/grid/coords/texel_to_grid.js +6 -1
  58. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts +32 -1
  59. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts.map +1 -1
  60. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.js +114 -9
  61. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts +8 -0
  62. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
  63. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +91 -29
  64. package/src/generation/grid/layers/GridDataLayer.d.ts +21 -2
  65. package/src/generation/grid/layers/GridDataLayer.d.ts.map +1 -1
  66. package/src/generation/grid/layers/GridDataLayer.js +43 -4
  67. package/src/generation/placement/action/GridCellActionPlaceTags.d.ts +7 -1
  68. package/src/generation/placement/action/GridCellActionPlaceTags.d.ts.map +1 -1
  69. package/src/generation/placement/action/GridCellActionPlaceTags.js +42 -16
  70. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts +5 -0
  71. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts.map +1 -1
  72. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +32 -9
  73. package/src/generation/rules/CellMatcherLayerBitMaskTest.d.ts.map +1 -1
  74. package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -2
  75. package/src/generation/wfc/GridWFCCompiledTileSet.d.ts +4 -2
  76. package/src/generation/wfc/GridWFCCompiledTileSet.d.ts.map +1 -1
  77. package/src/generation/wfc/GridWFCCompiledTileSet.js +2 -2
  78. package/src/generation/wfc/GridWFCTileSet.d.ts +16 -7
  79. package/src/generation/wfc/GridWFCTileSet.d.ts.map +1 -1
  80. package/src/generation/wfc/GridWFCTileSet.js +32 -8
  81. package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +2 -2
  82. package/src/shade/playground/particle_editor/README.md +2 -2
  83. package/src/shade/playground/probe_clipmap/index.html +1 -1
  84. package/src/shade/playground/screen_probes/README.md +5 -5
  85. package/src/shade/playground/screen_probes/main.js +1 -1
  86. package/src/shade/playground/tonemap_sdr/README.md +3 -2
  87. package/src/shade/playground/vgeo_scene/README.md +1 -3
  88. package/src/shade/playground/vgeo_scene/main.js +3 -3
  89. package/src/shade/renderer/Renderer.d.ts +3 -3
  90. package/src/shade/renderer/Renderer.js +4 -4
  91. package/src/shade/renderer/ShadeIndirectLightingMode.js +1 -1
  92. package/src/shade/renderer/camera/PerspectiveCamera.js +1 -1
  93. package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts +11 -13
  94. package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
  95. package/src/shade/renderer/deferred/tonemap/ColorGrade.js +11 -13
  96. package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts.map +1 -1
  97. package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js +6 -7
  98. package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +1 -1
  99. package/src/shade/renderer/deferred/tonemap/ToneMapper.js +1 -1
  100. package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts +6 -8
  101. package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts.map +1 -1
  102. package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.js +7 -10
  103. package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +1 -1
  104. package/src/shade/renderer/geometry/sdf/MESH_SDF.js +1 -1
  105. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
  106. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +1 -1
  107. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +1 -1
  108. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +1 -1
  109. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +1 -2
  110. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
  111. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +1 -2
  112. package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.d.ts.map +1 -1
  113. package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.js +2 -1
  114. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +1 -1
  115. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +1 -1
  116. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.js +1 -1
  117. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +2 -2
  118. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +2 -2
  119. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +2 -2
  120. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +4 -4
  121. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +1 -1
  122. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +1 -1
  123. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +1 -1
  124. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +3 -3
  125. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +3 -3
  126. package/src/shade/renderer/global_illumination/brick4/README.md +2 -1
  127. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +4 -6
  128. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  129. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +4 -6
  130. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.d.ts +1 -1
  131. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.js +1 -1
  132. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -1
  133. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +2 -2
  134. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +1 -1
  135. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +1 -1
  136. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +1 -1
  137. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +1 -1
  138. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +28 -35
  139. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
  140. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +28 -35
  141. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +21 -24
  142. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
  143. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +21 -24
  144. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +8 -8
  145. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +8 -8
  146. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +4 -4
  147. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +4 -4
  148. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +3 -5
  149. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -1
  150. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +3 -5
  151. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +4 -4
  152. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +4 -4
  153. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +2 -3
  154. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -1
  155. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +2 -3
  156. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +4 -4
  157. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +4 -4
  158. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +2 -4
  159. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -1
  160. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +2 -4
  161. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +2 -4
  162. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -1
  163. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +2 -4
  164. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +13 -17
  165. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
  166. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +13 -17
  167. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +11 -14
  168. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -1
  169. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +11 -14
  170. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +2 -2
  171. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +2 -2
  172. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +9 -9
  173. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +9 -9
  174. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +15 -18
  175. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
  176. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +16 -19
  177. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +10 -11
  178. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -1
  179. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +11 -12
  180. package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -1
  181. package/src/shade/renderer/hair/GPUHairSystem.js +27 -2
  182. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts.map +1 -1
  183. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.js +4 -0
  184. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts +27 -6
  185. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts.map +1 -1
  186. package/src/shade/renderer/hair/HAIR_SIMULATION.js +33 -6
  187. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +9 -8
  188. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -1
  189. package/src/shade/renderer/hair/chunk_hair_bsdf.js +10 -9
  190. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +5 -6
  191. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -1
  192. package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +5 -6
  193. package/src/shade/renderer/hair/chunk_hair_guide.d.ts +9 -2
  194. package/src/shade/renderer/hair/chunk_hair_guide.d.ts.map +1 -1
  195. package/src/shade/renderer/hair/chunk_hair_guide.js +30 -2
  196. package/src/shade/renderer/hair/hair_lighting.d.ts +3 -3
  197. package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -1
  198. package/src/shade/renderer/hair/hair_lighting.js +4 -5
  199. package/src/shade/renderer/hair/hair_scattering_lut.d.ts +5 -5
  200. package/src/shade/renderer/hair/hair_scattering_lut.js +5 -5
  201. package/src/shade/renderer/hair/shader_hair_roots.d.ts +2 -2
  202. package/src/shade/renderer/hair/shader_hair_roots.js +2 -2
  203. package/src/shade/renderer/hair/shader_hair_simulate.d.ts +5 -2
  204. package/src/shade/renderer/hair/shader_hair_simulate.d.ts.map +1 -1
  205. package/src/shade/renderer/hair/shader_hair_simulate.js +23 -5
  206. package/src/shade/renderer/light/environment/DEFINES.d.ts +1 -1
  207. package/src/shade/renderer/light/environment/DEFINES.js +1 -1
  208. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +2 -2
  209. package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts +1 -2
  210. package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts.map +1 -1
  211. package/src/shade/renderer/material/dispatch/MaterialDispatch.js +1 -2
  212. package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
  213. package/src/shade/renderer/material/standard/fragment_gbuffer.js +2 -1
  214. package/src/shade/renderer/material/util/dielectric_specular_color.d.ts +1 -1
  215. package/src/shade/renderer/material/util/dielectric_specular_color.js +1 -1
  216. package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.d.ts +1 -1
  217. package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.js +1 -1
  218. package/src/shade/renderer/postprocess/dof/gather/DOF2_PRESETS.js +1 -1
  219. package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.d.ts +1 -1
  220. package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.js +1 -1
  221. package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.d.ts +1 -1
  222. package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.js +1 -1
  223. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +3 -4
  224. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
  225. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +3 -4
  226. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +1 -1
  227. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +1 -1
  228. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +1 -1
  229. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +1 -1
  230. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
  231. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +2 -3
  232. package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts +1 -2
  233. package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts.map +1 -1
  234. package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js +1 -2
  235. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +2 -3
  236. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
  237. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +2 -3
  238. package/src/shade/renderer/postprocess/taa/filter_blackman_harris.d.ts +1 -1
  239. package/src/shade/renderer/postprocess/taa/filter_blackman_harris.js +1 -1
  240. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +1 -1
  241. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +1 -1
  242. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +1 -1
  243. package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +3 -3
  244. package/src/shade/renderer/restir/di/ReSTIRDI.js +3 -3
  245. package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.d.ts +1 -1
  246. package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.js +1 -1
  247. package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.d.ts +1 -1
  248. package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.js +1 -1
  249. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +1 -2
  250. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
  251. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +1 -2
  252. package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts +4 -5
  253. package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts.map +1 -1
  254. package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js +4 -5
  255. package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +2 -2
  256. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +2 -2
  257. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +2 -2
  258. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +14 -17
  259. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts.map +1 -1
  260. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +18 -21
  261. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.d.ts +1 -1
  262. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.js +1 -1
  263. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.d.ts +1 -1
  264. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.js +1 -1
  265. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +3 -4
  266. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
  267. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +3 -4
  268. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +1 -1
  269. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +1 -1
  270. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +3 -3
  271. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +6 -8
  272. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -1
  273. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +8 -10
  274. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +5 -7
  275. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -1
  276. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +5 -7
  277. package/src/shade/renderer/texture/virtual/README.md +257 -257
  278. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +2 -2
@@ -1,3 +1,4 @@
1
+ import { GROOM_SHELTER_WORDS } from "../../../engine/graphics/hair/Groom.js";
1
2
  import { chunk_quat_rotate_v3 } from "../shader/chunk/geometry/quaternion/chunk_v3_apply_quat.js";
2
3
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
3
4
  import { ShaderResourceDescriptor } from "../shader/resource/ShaderResourceDescriptor.js";
@@ -41,7 +42,9 @@ export const HAIR_GUIDE_STATE_RESOURCE = ShaderResourceDescriptor.storageBuffer(
41
42
  * fn hair_state_index(instance: HairInstance, plane: u32, node: u32, guide: u32) -> u32
42
43
  * fn hair_guide_record(instance: HairInstance, guide: u32) -> vec4<u32>
43
44
  * fn hair_quat_nlerp(a: vec4<f32>, b: vec4<f32>, t: f32) -> vec4<f32>
45
+ * fn hair_drag_coefficient(speed: f32, diameter: f32) -> f32
44
46
  * fn hair_drag_rate(speed: f32, diameter: f32, mass_per_length: f32) -> f32
47
+ * fn hair_guide_reach(instance: HairInstance, node: u32, guide: u32, upwind: vec3<f32>, half_drag: f32) -> f32
45
48
  * ```
46
49
  *
47
50
  * `hair_strand_frame` is what carries a strand's rest points into the world: its root frame (`shader_hair_roots.js`)
@@ -50,8 +53,13 @@ export const HAIR_GUIDE_STATE_RESOURCE = ShaderResourceDescriptor.storageBuffer(
50
53
  * frame's step holds another tenant's nodes, or none, and its strands ride the entity until the next step lays it.
51
54
  * Reads the state's header. `hair_state_index` is a vector of the state pool, node-interleaved. `hair_guide_record` is a guide's four words in
52
55
  * the groom pool: its strand's rank, its wisp's strand count, its wisp's diameter and its length (f32 bits).
53
- * `hair_quat_nlerp` blends two unit quaternions along the shorter arc. `hair_drag_rate` is `hair_drag_rate`'s twin
54
- * (`HAIR_SIMULATION.js`): the rate a node's velocity relaxes toward the air's.
56
+ * `hair_quat_nlerp` blends two unit quaternions along the shorter arc. `hair_drag_coefficient` and `hair_drag_rate`
57
+ * are their namesakes' twins (`HAIR_SIMULATION.js`): a cylinder's drag coefficient, and the rate its velocity relaxes
58
+ * toward the air's. `hair_guide_reach` is the share of a wind that reaches a guide's node through the hair of its
59
+ * group, from the node's shelter (`GroomGroup#guide_shelter`): `upwind` is where the wind comes from, a unit vector
60
+ * in the groom's rest space, and `half_drag` half a fibre's drag coefficient at the wind's speed. Each axis gives
61
+ * `e^(−half_drag · depth)` for the depth on the side the wind comes from, and the three are weighed by the squares of
62
+ * `upwind`'s parts; an `upwind` of no length gives none.
55
63
  *
56
64
  * @type {CodeChunk}
57
65
  */
@@ -101,6 +109,26 @@ fn hair_quat_nlerp(a: vec4<f32>, b: vec4<f32>, t: f32) -> vec4<f32> {
101
109
  return normalize(mix(a, b * side, t));
102
110
  }
103
111
 
112
+ fn hair_drag_coefficient(speed: f32, diameter: f32) -> f32 {
113
+ let reynolds = ${HAIR_AIR_DENSITY} * speed * diameter / ${HAIR_AIR_VISCOSITY};
114
+
115
+ return 1.0 + 10.0 * pow(max(reynolds, 1.0), -2.0 / 3.0);
116
+ }
117
+
118
+ fn hair_guide_reach(instance: ${HAIR_INSTANCE_STRUCT.wgsl_ref}, node: u32, guide: u32, upwind: vec3<f32>, half_drag: f32) -> f32 {
119
+ let at = instance.guides + instance.guide_count * ${HAIR_GUIDE_RECORD_WORDS}u
120
+ + (guide * instance.guide_point_count + node) * ${GROOM_SHELTER_WORDS}u;
121
+
122
+ // each axis's depth on the side the wind comes from
123
+ let depth = vec3<f32>(
124
+ bitcast<f32>(hair_grooms[at + select(0u, 1u, upwind.x < 0.0)]),
125
+ bitcast<f32>(hair_grooms[at + select(2u, 3u, upwind.y < 0.0)]),
126
+ bitcast<f32>(hair_grooms[at + select(4u, 5u, upwind.z < 0.0)]),
127
+ );
128
+
129
+ return dot(upwind * upwind, exp(-half_drag * depth));
130
+ }
131
+
104
132
  fn hair_drag_rate(speed: f32, diameter: f32, mass_per_length: f32) -> f32 {
105
133
  let reynolds_per_speed = ${HAIR_AIR_DENSITY} * diameter / ${HAIR_AIR_VISCOSITY};
106
134
 
@@ -3,12 +3,12 @@
3
3
  * rectangle (4 vertices, a triangle strip). One pipeline per switch set, which picks the shadow technique and the
4
4
  * indirect lighting the fragment links, and per format of the scene colour.
5
5
  *
6
- * A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe: Unreal's hair
6
+ * A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe: the hair
7
7
  * BSDF with dual scattering (`chunk_hair_dual_scattering`), the strands between the point and each light counted
8
8
  * by a march through the instance's density volume (`chunk_hair_count_along`), each light's shadow taken from the
9
9
  * scene's maps at the strand point with the light's own way as the normal. Indirect light is the renderer's mode's
10
- * irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (Unreal's strands
11
- * under Lumen, `area` 0.2) and dual scattering over the strands counted along the normal, which occludes the sky.
10
+ * irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (`area` 0.2) and
11
+ * dual scattering over the strands counted along the normal, which occludes the sky.
12
12
  * The marches' taps are jittered by the frame's blue noise.
13
13
  * The strand's colour is its instance's melanin, moved by the strand's variation byte, its redness and its dye.
14
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"hair_lighting.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/hair_lighting.js"],"names":[],"mappings":"AAkOA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iDAJW,OAAO,uCAAuC,EAAE,eAAe,6BAE7D,wBAAwB,CA+BpC;AAtPD;;;GAGG;AACH,uCAFU,6BAA6B,CAM8B;AAErE;;;;GAIG;AACH,uCAFU,6BAA6B,CAaA;AAYvC;;;;;GAKG;AACH,sCAFU,2BAA2B,CAEY;AAyIjD;;;;GAIG;AACH,qCAFU,gBAAgB,CAEgC;yCAxNjB,8DAA8D;8CAYzD,qDAAqD;4CACvD,mDAAmD;iCAC9D,+BAA+B"}
1
+ {"version":3,"file":"hair_lighting.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/hair_lighting.js"],"names":[],"mappings":"AAiOA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iDAJW,OAAO,uCAAuC,EAAE,eAAe,6BAE7D,wBAAwB,CA+BpC;AArPD;;;GAGG;AACH,uCAFU,6BAA6B,CAM8B;AAErE;;;;GAIG;AACH,uCAFU,6BAA6B,CAaA;AAYvC;;;;;GAKG;AACH,sCAFU,2BAA2B,CAEY;AAwIjD;;;;GAIG;AACH,qCAFU,gBAAgB,CAEgC;yCAvNjB,8DAA8D;8CAYzD,qDAAqD;4CACvD,mDAAmD;iCAC9D,+BAA+B"}
@@ -170,8 +170,7 @@ fn fs_main(in: HairQuadVertex) -> @location(0) vec4<f32> {
170
170
 
171
171
  shade_direct_lights(&context, position, view_direction, coord, view_depth);
172
172
 
173
- // the light around the strand's normal, through the fibre seen from the eye with every lobe widened, as Unreal's
174
- // strands take it from Lumen
173
+ // the light around the strand's normal, through the fibre seen from the eye with every lobe widened
175
174
  let normal = hair_normal(-towards_root, view_direction);
176
175
 
177
176
  var radiance: vec3<f32>;
@@ -229,12 +228,12 @@ const pipelines = new Map();
229
228
  * rectangle (4 vertices, a triangle strip). One pipeline per switch set, which picks the shadow technique and the
230
229
  * indirect lighting the fragment links, and per format of the scene colour.
231
230
  *
232
- * A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe: Unreal's hair
231
+ * A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe: the hair
233
232
  * BSDF with dual scattering (`chunk_hair_dual_scattering`), the strands between the point and each light counted
234
233
  * by a march through the instance's density volume (`chunk_hair_count_along`), each light's shadow taken from the
235
234
  * scene's maps at the strand point with the light's own way as the normal. Indirect light is the renderer's mode's
236
- * irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (Unreal's strands
237
- * under Lumen, `area` 0.2) and dual scattering over the strands counted along the normal, which occludes the sky.
235
+ * irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (`area` 0.2) and
236
+ * dual scattering over the strands counted along the normal, which occludes the sky.
238
237
  * The marches' taps are jittered by the frame's blue noise.
239
238
  * The strand's colour is its instance's melanin, moved by the strand's variation byte, its redness and its dye.
240
239
  *
@@ -51,12 +51,12 @@ export function hair_scattering_lut_generate({ phi_steps }?: {
51
51
  phi_steps?: number;
52
52
  }): Float32Array;
53
53
  /**
54
- * The hair's average scattering table, which dual scattering reads (Zinke et al. 2008, as Unreal 5.4 tabulates it in
55
- * HairStrandsLUT.usf): for a fibre seen at `sin θ_v = |V·T|`, of longitudinal roughness `r` and colour `C`, the
56
- * single-scattering BSDF integrated over the hemisphere of directions in front of the view (`A_front`, what passes
57
- * through) and behind it (`A_back`, what comes back), no cosine, each clamped to [0, 1].
54
+ * The hair's average scattering table, which dual scattering reads (Zinke et al. 2008): for a fibre seen at
55
+ * `sin θ_v = |V·T|`, of longitudinal roughness `r` and colour `C`, the single-scattering BSDF integrated over the
56
+ * hemisphere of directions in front of the view (`A_front`, what passes through) and behind it (`A_back`, what comes
57
+ * back), no cosine, each clamped to [0, 1].
58
58
  *
59
- * Laid out as Unreal's: x is `sin θ_v`, y is `r`, z is `sqrt(C)`, each at texel centres; two channels, front then back.
59
+ * Laid out with x `sin θ_v`, y `r`, z `sqrt(C)`, each at texel centres; two channels, front then back.
60
60
  * The BSDF is `chunk_hair_shading` at area 0 and backlit 1, here as a lobe-wise twin that `hair_scattering_lut.spec.js`
61
61
  * holds to the shader.
62
62
  */
@@ -1,10 +1,10 @@
1
1
  /**
2
- * The hair's average scattering table, which dual scattering reads (Zinke et al. 2008, as Unreal 5.4 tabulates it in
3
- * HairStrandsLUT.usf): for a fibre seen at `sin θ_v = |V·T|`, of longitudinal roughness `r` and colour `C`, the
4
- * single-scattering BSDF integrated over the hemisphere of directions in front of the view (`A_front`, what passes
5
- * through) and behind it (`A_back`, what comes back), no cosine, each clamped to [0, 1].
2
+ * The hair's average scattering table, which dual scattering reads (Zinke et al. 2008): for a fibre seen at
3
+ * `sin θ_v = |V·T|`, of longitudinal roughness `r` and colour `C`, the single-scattering BSDF integrated over the
4
+ * hemisphere of directions in front of the view (`A_front`, what passes through) and behind it (`A_back`, what comes
5
+ * back), no cosine, each clamped to [0, 1].
6
6
  *
7
- * Laid out as Unreal's: x is `sin θ_v`, y is `r`, z is `sqrt(C)`, each at texel centres; two channels, front then back.
7
+ * Laid out with x `sin θ_v`, y `r`, z `sqrt(C)`, each at texel centres; two channels, front then back.
8
8
  * The BSDF is `chunk_hair_shading` at area 0 and backlit 1, here as a lobe-wise twin that `hair_scattering_lut.spec.js`
9
9
  * holds to the shader.
10
10
  */
@@ -1,7 +1,7 @@
1
1
  export const HAIR_ROOTS_SETTINGS: WebGPUStruct;
2
2
  /**
3
- * A triangle's frame, Unreal's: the tangent along its first edge, the normal of its face, the bitangent the normal
4
- * across the tangent, as the columns of a rotation:
3
+ * A triangle's frame: the tangent along its first edge, the normal of its face, the bitangent the normal across the
4
+ * tangent, as the columns of a rotation:
5
5
  *
6
6
  * ```wgsl
7
7
  * fn hair_triangle_frame(a: vec3<f32>, b: vec3<f32>, c: vec3<f32>) -> mat3x3<f32>
@@ -42,8 +42,8 @@ resources.createGroup()
42
42
  .addStorageBuffer("hair_guide_bounds", WebGPUArray.from(atomic_u32), true);
43
43
 
44
44
  /**
45
- * A triangle's frame, Unreal's: the tangent along its first edge, the normal of its face, the bitangent the normal
46
- * across the tangent, as the columns of a rotation:
45
+ * A triangle's frame: the tangent along its first edge, the normal of its face, the bitangent the normal across the
46
+ * tangent, as the columns of a rotation:
47
47
  *
48
48
  * ```wgsl
49
49
  * fn hair_triangle_frame(a: vec3<f32>, b: vec3<f32>, c: vec3<f32>) -> mat3x3<f32>
@@ -32,8 +32,11 @@ export const HAIR_SIMULATE_SETTINGS: WebGPUStruct;
32
32
  * carried. Each step, from the node after the root to the tip, a node:
33
33
  *
34
34
  * - **predicts**: its velocity loses `1 − e^(−damping·h)`, gains gravity, and relaxes toward the air's
35
- * (`wind_field_sample` at the node) as `v ← u + (v − u) e^(−k h)`, `k` the wisp's drag rate
36
- * (`hair_drag_rate`); it moves by the velocity;
35
+ * (`wind_field_sample` at the node) as `v ← u + (v − u) e^(−k h)`; it moves by the velocity. The drag rate `k`
36
+ * lies between two (`hair_drag_rate`): at the least the node's even share of the drag of its group as one body in
37
+ * the wind's way, and at the most `HAIR_EXPOSED_DRAG_SHARE` of a fibre's own in open air, by the share of the wind
38
+ * that reaches the node through the hair upwind of it (`hair_guide_reach`, from the groom's baked shelter); never
39
+ * more than the fibre's own;
37
40
  * - is pulled toward its rest place in the entity's frame (**global shape**) at a rate that falls from
38
41
  * `global_shape_rate` at the root to nothing at `global_shape_range` of the length, and toward its rest
39
42
  * direction turned by its parent's frame (**local shape**) at `local_shape_rate`, each a share
@@ -1 +1 @@
1
- {"version":3,"file":"shader_hair_simulate.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/shader_hair_simulate.js"],"names":[],"mappings":";AAuDA;;;;;;;;GAQG;AACH,yCAFU,aAAa,CAkEpB;AAEH,uDAK+B;AAU/B;;;;;;GAMG;AACH,yCAFU,aAAa,CAqCpB;AAEH,kDAe2B;AAuY3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,mCAFU,aAAa,CAMpB;8BA/mB2B,4BAA4B;6BAK7B,gCAAgC"}
1
+ {"version":3,"file":"shader_hair_simulate.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/shader_hair_simulate.js"],"names":[],"mappings":";AAwDA;;;;;;;;GAQG;AACH,yCAFU,aAAa,CAkEpB;AAEH,uDAK+B;AAU/B;;;;;;GAMG;AACH,yCAFU,aAAa,CAqCpB;AAEH,kDAe2B;AAqZ3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,mCAFU,aAAa,CAMpB;8BAjoB2B,4BAA4B;6BAK7B,gCAAgC"}
@@ -25,6 +25,7 @@ import {
25
25
  HAIR_BINDING_NONE,
26
26
  HAIR_COLLIDER_LIMIT,
27
27
  HAIR_COLLIDER_WORDS,
28
+ HAIR_EXPOSED_DRAG_SHARE,
28
29
  HAIR_FIBRE_DENSITY,
29
30
  HAIR_FOLLOW_THE_LEADER_DAMPING,
30
31
  HAIR_GUIDE_BOUNDS_WORDS,
@@ -341,7 +342,10 @@ fn main(@builtin(workgroup_id) workgroup_id: vec3<u32>, @builtin(local_invocatio
341
342
  let scale = max(length(now[0]), max(length(now[1]), length(now[2])));
342
343
  let diameter = bitcast<f32>(record.z) * scale;
343
344
  let width = instance.width_mean * scale;
344
- let mass = f32(record.y) * ${HAIR_FIBRE_DENSITY}.0 * 0.78539816 * width * width;
345
+ // a fibre's mass a unit length; and the group as one body in the wind's way, as the entity scales it
346
+ let fibre_mass = ${HAIR_FIBRE_DENSITY}.0 * 0.78539816 * width * width;
347
+ let body_diameter = instance.body_diameter * scale;
348
+ let body_mass = instance.body_mass * scale * scale;
345
349
  let radius = 0.5 * diameter + instance.thickness;
346
350
 
347
351
  const IDENTITY = vec4<f32>(0.0, 0.0, 0.0, 1.0);
@@ -451,13 +455,24 @@ fn main(@builtin(workgroup_id) workgroup_id: vec3<u32>, @builtin(local_invocatio
451
455
  let x = hair_guide_state[hair_state_index(instance, ${HAIR_STATE_SOLVED_POSITION}u, i, guide)].xyz;
452
456
  var v = hair_guide_state[hair_state_index(instance, ${HAIR_STATE_VELOCITY}u, i, guide)].xyz;
453
457
 
454
- // predict: damping and gravity, then the drag of the wisp relaxing the velocity toward the air's
458
+ // predict: damping and gravity, then drag relaxing the velocity toward the air's
455
459
  v = v * keep_velocity + gravity * h;
456
460
 
457
461
  let air = wind_field_sample(anchor + x);
458
462
  let relative = v - air;
463
+ let speed = length(relative);
459
464
 
460
- v = air + relative * exp(-hair_drag_rate(length(relative), diameter, mass) * h);
465
+ // a fibre's own drag in open air, and its even share of the group's as one body: never more than its own
466
+ let own = hair_drag_rate(speed, width, fibre_mass);
467
+ let even = min(own, hair_drag_rate(speed, body_diameter, body_mass));
468
+
469
+ // what of the wind reaches the node through the hair upwind of it, in the groom's rest space
470
+ let upwind = quat_rotate_v3(quat_conjugate(turn), relative / max(speed, 1e-30));
471
+ let exposed = hair_guide_reach(instance, i, guide, upwind, 0.5 * hair_drag_coefficient(speed, width));
472
+
473
+ let drag = mix(even, max(even, ${HAIR_EXPOSED_DRAG_SHARE} * own), exposed);
474
+
475
+ v = air + relative * exp(-drag * h);
461
476
 
462
477
  var p = x + v * h;
463
478
 
@@ -606,8 +621,11 @@ fn main(@builtin(workgroup_id) workgroup_id: vec3<u32>, @builtin(local_invocatio
606
621
  * carried. Each step, from the node after the root to the tip, a node:
607
622
  *
608
623
  * - **predicts**: its velocity loses `1 − e^(−damping·h)`, gains gravity, and relaxes toward the air's
609
- * (`wind_field_sample` at the node) as `v ← u + (v − u) e^(−k h)`, `k` the wisp's drag rate
610
- * (`hair_drag_rate`); it moves by the velocity;
624
+ * (`wind_field_sample` at the node) as `v ← u + (v − u) e^(−k h)`; it moves by the velocity. The drag rate `k`
625
+ * lies between two (`hair_drag_rate`): at the least the node's even share of the drag of its group as one body in
626
+ * the wind's way, and at the most `HAIR_EXPOSED_DRAG_SHARE` of a fibre's own in open air, by the share of the wind
627
+ * that reaches the node through the hair upwind of it (`hair_guide_reach`, from the groom's baked shelter); never
628
+ * more than the fibre's own;
611
629
  * - is pulled toward its rest place in the entity's frame (**global shape**) at a rate that falls from
612
630
  * `global_shape_rate` at the root to nothing at `global_shape_range` of the length, and toward its rest
613
631
  * direction turned by its parent's frame (**local shape**) at `local_shape_rate`, each a share
@@ -14,7 +14,7 @@ export const BSDF_ROUGHNESS_MINIMUM: 0.02;
14
14
  /**
15
15
  * Specifies minimal reflectance for dielectrics (when metalness is zero)
16
16
  * Nothing has lower reflectance than 2%.
17
- * Popular engines use 4% such as UE4, Frostbite, et al.
17
+ * Popular engines use 4%, such as Frostbite, et al.
18
18
  * @see "Physics and Math of Shading" by Natty Hoffman ( https://www.youtube.com/watch?v=j-A0mwsJRmk )
19
19
  * @type {number}
20
20
  */
@@ -16,7 +16,7 @@ export const BSDF_ROUGHNESS_MINIMUM = 0.02
16
16
  /**
17
17
  * Specifies minimal reflectance for dielectrics (when metalness is zero)
18
18
  * Nothing has lower reflectance than 2%.
19
- * Popular engines use 4% such as UE4, Frostbite, et al.
19
+ * Popular engines use 4%, such as Frostbite, et al.
20
20
  * @see "Physics and Math of Shading" by Natty Hoffman ( https://www.youtube.com/watch?v=j-A0mwsJRmk )
21
21
  * @type {number}
22
22
  */
@@ -46,8 +46,8 @@ resources.createGroup()
46
46
  * texel lands in level 1 once, whatever the sample pattern. The blur and the lobe are both Gaussians,
47
47
  * so the lobe narrows by the blur's variance and level 1 comes out the lobe it is asked for.
48
48
  *
49
- * Samples are uniform in the cone, so each stands for the same solid angle. UE importance-samples
50
- * and reads a coarser average in the lobe's tail than in its core; here the sun came out in blocks.
49
+ * Samples are uniform in the cone, so each stands for the same solid angle. Importance sampling
50
+ * instead reads a coarser average in the lobe's tail than in its core; here the sun came out in blocks.
51
51
  *
52
52
  * Level 1 only. The levels after it read the level above, already smooth at their sample spacing
53
53
  * (see shader_convolve_reflection_map).
@@ -14,8 +14,7 @@ export const MaterialDispatch: Readonly<{
14
14
  /**
15
15
  * The default, and the main path. A fullscreen triangle per material, masked to the material's
16
16
  * pixels by a depth-equal test against a material-id depth buffer written from the visibility
17
- * buffer first — the material-depth trick of [Doghramachi17], and Nanite's without compute
18
- * materials. The rasterizer finds each material's pixels, once per material, over the whole
17
+ * buffer first — the material-depth trick of [Doghramachi17]. The rasterizer finds each material's pixels, once per material, over the whole
19
18
  * screen.
20
19
  */
21
20
  Quad: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialDispatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/dispatch/MaterialDispatch.js"],"names":[],"mappings":";;;;+BAKU,MAAM;AALhB;;;;;;GAMG;AACH;IACI;;;;;;OAMG;;IAEH;;;;;;;;;;;;OAYG;;GAEJ"}
1
+ {"version":3,"file":"MaterialDispatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/dispatch/MaterialDispatch.js"],"names":[],"mappings":";;;;+BAKU,MAAM;AALhB;;;;;;GAMG;AACH;IACI;;;;;OAKG;;IAEH;;;;;;;;;;;;OAYG;;GAEJ"}
@@ -9,8 +9,7 @@ export const MaterialDispatch = Object.freeze({
9
9
  /**
10
10
  * The default, and the main path. A fullscreen triangle per material, masked to the material's
11
11
  * pixels by a depth-equal test against a material-id depth buffer written from the visibility
12
- * buffer first — the material-depth trick of [Doghramachi17], and Nanite's without compute
13
- * materials. The rasterizer finds each material's pixels, once per material, over the whole
12
+ * buffer first — the material-depth trick of [Doghramachi17]. The rasterizer finds each material's pixels, once per material, over the whole
14
13
  * screen.
15
14
  */
16
15
  Quad: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"fragment_gbuffer.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/standard/fragment_gbuffer.js"],"names":[],"mappings":"AA0FA;;;;;;GAMG;AACH,kDAHW,6BAA6B,GAC3B,6BAA6B,CASzC;AAoBD;;;;;;;;GAQG;AACH,+DAHW,6BAA6B,GAC3B,2BAA2B,CAUvC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,+CALW,SAAS,eACT,SAAS,GAEP,SAAS,CAqOrB;AAgBD;;;;;;GAMG;AACH,qDAHW,SAAS,GACP,SAAS,CAerB;AAED;;;;;;;;;GASG;AACH;IAL2B,KAAK,EAArB,MAAM;IACiC,cAAc,EAArD,6BAA6B;IACV,OAAO,EAA1B,SAAS;IACP,wBAAwB,CAUpC;AAED;;;;;;;GAOG;AACH,8DAJW,MAAM,UACN,gBAAgB,GACd,wBAAwB,CA4BpC;AAnbD;;;GAGG;AAGH;;;;;;;;;GASG;AACH,qCAFU,6BAA6B,CAEmC;AA8B1E;;;;GAIG;AACH,uCAFU,6BAA6B,CAEqC;AAgC5E;;;;GAIG;AACH,wCAFU,2BAA2B,CAEoE;AAiQzG;;;;;GAKG;AACH,4CAFU,SAAS,CAQhB;AAgFH;;;;GAIG;AACH,6BAFU,gBAAgB,CAMvB;8CAxc2C,wDAAwD;4CAC1D,sDAAsD;0BAFxE,oCAAoC;yCA/CrB,iEAAiE;iCAkDzE,kCAAkC"}
1
+ {"version":3,"file":"fragment_gbuffer.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/standard/fragment_gbuffer.js"],"names":[],"mappings":"AA0FA;;;;;;GAMG;AACH,kDAHW,6BAA6B,GAC3B,6BAA6B,CASzC;AAoBD;;;;;;;;GAQG;AACH,+DAHW,6BAA6B,GAC3B,2BAA2B,CAUvC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,+CALW,SAAS,eACT,SAAS,GAEP,SAAS,CAqOrB;AAgBD;;;;;;GAMG;AACH,qDAHW,SAAS,GACP,SAAS,CAerB;AAED;;;;;;;;;GASG;AACH;IAL2B,KAAK,EAArB,MAAM;IACiC,cAAc,EAArD,6BAA6B;IACV,OAAO,EAA1B,SAAS;IACP,wBAAwB,CAUpC;AAED;;;;;;;GAOG;AACH,8DAJW,MAAM,UACN,gBAAgB,GACd,wBAAwB,CA6BpC;AApbD;;;GAGG;AAGH;;;;;;;;;GASG;AACH,qCAFU,6BAA6B,CAEmC;AA8B1E;;;;GAIG;AACH,uCAFU,6BAA6B,CAEqC;AAgC5E;;;;GAIG;AACH,wCAFU,2BAA2B,CAEoE;AAiQzG;;;;;GAKG;AACH,4CAFU,SAAS,CAQhB;AAiFH;;;;GAIG;AACH,6BAFU,gBAAgB,CAMvB;8CAzc2C,wDAAwD;4CAC1D,sDAAsD;0BAFxE,oCAAoC;yCA/CrB,iEAAiE;iCAkDzE,kCAAkC"}
@@ -483,7 +483,8 @@ export function gbuffer_pipeline_descriptor_for_shader(label, shader) {
483
483
  targets: G_BUFFER_COLOR_TARGETS
484
484
  },
485
485
  depthStencil: {
486
- // depth is actually a material mask, we use trick from Unreal to mask materials using depth
486
+ // depth is actually a material mask (`MATERIAL_MASK_FORMAT`): an `equal` test against the material's
487
+ // place, written as depth, keeps only that material's pixels
487
488
  depthCompare: 'equal',
488
489
  format: MATERIAL_MASK_FORMAT,
489
490
  depthWriteEnabled: false
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Specifies minimal reflectance for dielectrics (when metalness is zero)
3
- * Nothing has lower reflectance than 2%, but we use 4% to have consistent results with UE4, Frostbite, et al.
3
+ * Nothing has lower reflectance than 2%, but we use 4% to have consistent results with Frostbite, et al.
4
4
  * @type {Readonly<Color>}
5
5
  */
6
6
  export const dielectric_specular_color: Readonly<Color>;
@@ -2,7 +2,7 @@ import { Color } from "../../../../core/color/Color.js";
2
2
 
3
3
  /**
4
4
  * Specifies minimal reflectance for dielectrics (when metalness is zero)
5
- * Nothing has lower reflectance than 2%, but we use 4% to have consistent results with UE4, Frostbite, et al.
5
+ * Nothing has lower reflectance than 2%, but we use 4% to have consistent results with Frostbite, et al.
6
6
  * @type {Readonly<Color>}
7
7
  */
8
8
  export const dielectric_specular_color = Object.freeze(new Color(0.04, 0.04, 0.04));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Tuning constants for the Unreal-style (Diaphragm / Cinematic) gather DoF.
2
+ * Tuning constants for the gather-based (diaphragm / cinematic) DoF.
3
3
  *
4
4
  * Unlike the ray-march path (which marches `sample_count × step_count` taps
5
5
  * at full resolution), this is a scatter-as-gather over a half-resolution
@@ -1,7 +1,7 @@
1
1
  import { DOF_MAX_COC_RADIUS } from "../DOF_CONFIG.js";
2
2
 
3
3
  /**
4
- * Tuning constants for the Unreal-style (Diaphragm / Cinematic) gather DoF.
4
+ * Tuning constants for the gather-based (diaphragm / cinematic) DoF.
5
5
  *
6
6
  * Unlike the ray-march path (which marches `sample_count × step_count` taps
7
7
  * at full resolution), this is a scatter-as-gather over a half-resolution
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Named DoF looks for the Unreal-style gather path. The front-end fields a
2
+ * Named DoF looks for the gather path. The front-end fields a
3
3
  * preset writes (`f_number`, `physical_gain`, `focus_region`, `blade_count`,
4
4
  * `blade_rotation`, `highlight_boost`) are identical to the ray-march path's,
5
5
  * so the presets are shared verbatim — a thin re-export of {@link DOF_PRESETS}.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Per-frame parameters for the Unreal-style gather DoF — everything *except*
2
+ * Per-frame parameters for the gather-based DoF — everything *except*
3
3
  * the focus distance, which is GPU-resident in {@link DOF_FOCUS_STATE_STRUCT}
4
4
  * (written by the shared autofocus compute pass). The physical fields mirror
5
5
  * the ray-march {@link DOF_SETTINGS_STRUCT}; the gather replaces the march
@@ -2,7 +2,7 @@ import { f32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
2
2
  import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
3
3
 
4
4
  /**
5
- * Per-frame parameters for the Unreal-style gather DoF — everything *except*
5
+ * Per-frame parameters for the gather-based DoF — everything *except*
6
6
  * the focus distance, which is GPU-resident in {@link DOF_FOCUS_STATE_STRUCT}
7
7
  * (written by the shared autofocus compute pass). The physical fields mirror
8
8
  * the ray-march {@link DOF_SETTINGS_STRUCT}; the gather replaces the march
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Texture formats for the Unreal-style (Diaphragm / Cinematic) gather DoF.
2
+ * Texture formats for the gather-based (diaphragm / cinematic) DoF.
3
3
  *
4
4
  * The setup pass emits two HDR fields and the gathers write HDR colour, so
5
5
  * rgba16float is required throughout: the blur averages scene radiance in
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Texture formats for the Unreal-style (Diaphragm / Cinematic) gather DoF.
2
+ * Texture formats for the gather-based (diaphragm / cinematic) DoF.
3
3
  *
4
4
  * The setup pass emits two HDR fields and the gathers write HDR colour, so
5
5
  * rgba16float is required throughout: the blur averages scene radiance in
@@ -3,11 +3,10 @@
3
3
  * @typedef {import("../../../camera/PerspectiveCamera.js").PerspectiveCamera} PerspectiveCamera
4
4
  */
5
5
  /**
6
- * Unreal-style (Diaphragm / Cinematic) depth of field — a half-resolution
6
+ * Gather-based (diaphragm / cinematic) depth of field — a half-resolution
7
7
  * scatter-as-gather with separate near/far fields, a near-field coverage alpha
8
- * (the foreground bleeds over in-focus geometry), and a full-res recombine.
9
- * The recognizable modern "Unreal look": true bokeh discs and out-of-focus
10
- * foreground spilling past its silhouette.
8
+ * (the foreground bleeds over in-focus geometry), and a full-res recombine:
9
+ * true bokeh discs and out-of-focus foreground spilling past its silhouette.
11
10
  *
12
11
  * A drop-in alternative to {@link DepthOfField} (the ray-march path): the same
13
12
  * construction (a device), the same public parameters and focus helpers, and
@@ -1 +1 @@
1
- {"version":3,"file":"DepthOfFieldU.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH;IA0GI;;OAEG;IACH,+BAEC;IAhGD;;;;OAIG;IACH,SAFU,KAAK,GAAC,QAAQ,GAAC,MAAM,GAAC,OAAO,CAEpB;IAEnB;;;OAGG;IACH,QAFU,MAAM,GAAC,IAAI,CAEP;IAEd;;;;;;;;;;OAUG;IACH,OAFU,MAAM,CAES;IAEzB;;;;OAIG;IACH,iBAFU,MAAM,CAEO;IAEvB;;;;OAIG;IACH,cAFU,MAAM,CAEG;IAEnB;;;;OAIG;IACH,UAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,iBAFU,MAAM,GAAC,IAAI,CAEE;IAEvB;;;OAGG;IACH,kBAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,eAFU,MAAM,CAEI;IAEpB;;;;OAIG;IACH,aAFU,MAAM,CAEA;IAEhB,qEAAqE;IACrE,gBAD2D,MAAM,CAC5C;IAErB;;;;OAIG;IACH,iBAFU,MAAM,CAEM;IAEtB;;;;;OAKG;IACH,gBAFU,MAAM,CAEK;IASrB,6DAA6D;IAC7D,kBAA8C;IAE9C,0DAA0D;IAC1D,qCAAwE;IAExE,uEAAuE;IACvE,gDAAqF;IAErF,kEAAkE;IAClE,yCAA0E;IAE1E,4EAA4E;IAC5E,uBAAsD;IAEtD;;;;OAIG;IACH,oBAFW,MAAM,QAahB;IAED;;;;OAIG;IACH,kBAFW,MAAM,QAehB;IAWD;;;;OAIG;IACH,0BAFW,OAAO,gDAAgD,EAAE,eAAe,QAIlF;IAkBD;;;;;;;;;;;;;OAaG;IACH;QAR4B,KAAK,EAAtB,UAAU;QACG,WAAW,EAAxB,MAAM;QACO,KAAK,EAAlB,MAAM;QACkB,MAAM,EAA9B,iBAAiB;QACD,aAAa;QACd,UAAU,EAAzB,MAAM,EAAE;QACN,MAAM,CAmDlB;IAED,uDAAuD;IACvD,gBAKC;;CACJ;yBAtSY,OAAO,iEAAiE,EAAE,UAAU;gCACpF,OAAO,sCAAsC,EAAE,iBAAiB"}
1
+ {"version":3,"file":"DepthOfFieldU.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IA0GI;;OAEG;IACH,+BAEC;IAhGD;;;;OAIG;IACH,SAFU,KAAK,GAAC,QAAQ,GAAC,MAAM,GAAC,OAAO,CAEpB;IAEnB;;;OAGG;IACH,QAFU,MAAM,GAAC,IAAI,CAEP;IAEd;;;;;;;;;;OAUG;IACH,OAFU,MAAM,CAES;IAEzB;;;;OAIG;IACH,iBAFU,MAAM,CAEO;IAEvB;;;;OAIG;IACH,cAFU,MAAM,CAEG;IAEnB;;;;OAIG;IACH,UAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,iBAFU,MAAM,GAAC,IAAI,CAEE;IAEvB;;;OAGG;IACH,kBAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,eAFU,MAAM,CAEI;IAEpB;;;;OAIG;IACH,aAFU,MAAM,CAEA;IAEhB,qEAAqE;IACrE,gBAD2D,MAAM,CAC5C;IAErB;;;;OAIG;IACH,iBAFU,MAAM,CAEM;IAEtB;;;;;OAKG;IACH,gBAFU,MAAM,CAEK;IASrB,6DAA6D;IAC7D,kBAA8C;IAE9C,0DAA0D;IAC1D,qCAAwE;IAExE,uEAAuE;IACvE,gDAAqF;IAErF,kEAAkE;IAClE,yCAA0E;IAE1E,4EAA4E;IAC5E,uBAAsD;IAEtD;;;;OAIG;IACH,oBAFW,MAAM,QAahB;IAED;;;;OAIG;IACH,kBAFW,MAAM,QAehB;IAWD;;;;OAIG;IACH,0BAFW,OAAO,gDAAgD,EAAE,eAAe,QAIlF;IAkBD;;;;;;;;;;;;;OAaG;IACH;QAR4B,KAAK,EAAtB,UAAU;QACG,WAAW,EAAxB,MAAM;QACO,KAAK,EAAlB,MAAM;QACkB,MAAM,EAA9B,iBAAiB;QACD,aAAa;QACd,UAAU,EAAzB,MAAM,EAAE;QACN,MAAM,CAmDlB;IAED,uDAAuD;IACvD,gBAKC;;CACJ;yBArSY,OAAO,iEAAiE,EAAE,UAAU;gCACpF,OAAO,sCAAsC,EAAE,iBAAiB"}
@@ -14,11 +14,10 @@ import { enquire_postprocess_dof2_pipelines, graph_postprocess_dof2 } from "./gr
14
14
  */
15
15
 
16
16
  /**
17
- * Unreal-style (Diaphragm / Cinematic) depth of field — a half-resolution
17
+ * Gather-based (diaphragm / cinematic) depth of field — a half-resolution
18
18
  * scatter-as-gather with separate near/far fields, a near-field coverage alpha
19
- * (the foreground bleeds over in-focus geometry), and a full-res recombine.
20
- * The recognizable modern "Unreal look": true bokeh discs and out-of-focus
21
- * foreground spilling past its silhouette.
19
+ * (the foreground bleeds over in-focus geometry), and a full-res recombine:
20
+ * true bokeh discs and out-of-focus foreground spilling past its silhouette.
22
21
  *
23
22
  * A drop-in alternative to {@link DepthOfField} (the ray-march path): the same
24
23
  * construction (a device), the same public parameters and focus helpers, and
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export function enquire_postprocess_dof2_pipelines(enquiry: import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry, fill: boolean): void;
8
8
  /**
9
- * Unreal-style (Diaphragm / Cinematic) gather depth of field. Passes:
9
+ * Gather-based (diaphragm / cinematic) depth of field. Passes:
10
10
  *
11
11
  * 0. **Autofocus** (compute, 1 thread — REUSED from the ray-march path) —
12
12
  * reads the depth buffer (or a CPU explicit target), eases the
@@ -33,7 +33,7 @@ export function enquire_postprocess_dof2_pipelines(enquiry, fill) {
33
33
  }
34
34
 
35
35
  /**
36
- * Unreal-style (Diaphragm / Cinematic) gather depth of field. Passes:
36
+ * Gather-based (diaphragm / cinematic) depth of field. Passes:
37
37
  *
38
38
  * 0. **Autofocus** (compute, 1 thread — REUSED from the ray-march path) —
39
39
  * reads the depth buffer (or a CPU explicit target), eases the
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * The factor lives in one buffer for the manager's life, {@link multiplier}, which a frame's {@link update} or
6
6
  * {@link unadapted} writes over. A pass recorded ahead of that write in the frame reads the factor the last frame was
7
- * shown with: the exposure of the image on screen, Unreal Engine's `View.PreExposure`.
7
+ * shown with: the exposure of the image on screen, the frame's pre-exposure.
8
8
  *
9
9
  * Beside it, {@link adaptation}: the luminance the view is adapted to, cd/m², written by the same pass. Adapted, it is
10
10
  * the luminance the eye has adapted to, without {@link exposure_compensation}; unadapted, it is the luminance the
@@ -33,7 +33,7 @@ const TARGET_LUMINANCE_DESCRIPTOR = BufferResourceDescriptor.from(
33
33
  *
34
34
  * The factor lives in one buffer for the manager's life, {@link multiplier}, which a frame's {@link update} or
35
35
  * {@link unadapted} writes over. A pass recorded ahead of that write in the frame reads the factor the last frame was
36
- * shown with: the exposure of the image on screen, Unreal Engine's `View.PreExposure`.
36
+ * shown with: the exposure of the image on screen, the frame's pre-exposure.
37
37
  *
38
38
  * Beside it, {@link adaptation}: the luminance the view is adapted to, cd/m², written by the same pass. Adapted, it is
39
39
  * the luminance the eye has adapted to, without {@link exposure_compensation}; unadapted, it is the luminance the
@@ -1 +1 @@
1
- {"version":3,"file":"ao_reproject_shader.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/gtao/ao_reproject_shader.js"],"names":[],"mappings":"AA6RA;;;;;;;;;;;;;GAaG;AACH,kCAFU,WAAW,CAqBnB;4BAhT0B,6BAA6B"}
1
+ {"version":3,"file":"ao_reproject_shader.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/gtao/ao_reproject_shader.js"],"names":[],"mappings":"AA4RA;;;;;;;;;;;;;GAaG;AACH,kCAFU,WAAW,CAqBnB;4BA/S0B,6BAA6B"}
@@ -100,9 +100,8 @@ fn compute_center_statistics(
100
100
  return NeighbourhoodStatistics(moments * rcp_divider, bend * rcp_divider, bend_square * rcp_divider);
101
101
  }
102
102
 
103
- // A face this far from another is another surface: half a right angle, as UE's Lumen takes it
104
- // (r.Lumen.ScreenProbeGather.Temporal.NormalThreshold). A tessellated curve's faces sit well inside it, a
105
- // crease's well outside.
103
+ // A face this far from another is another surface: half a right angle. A tessellated curve's faces sit well inside
104
+ // it, a crease's well outside.
106
105
  const SAME_SURFACE_COS = 0.70710678;
107
106
 
108
107
  // 1 where the history texel at tap was written on this texel's surface, by its face normal: last frame's
@@ -13,8 +13,7 @@
13
13
  * NeighborMax 3×3 neighborhood only reaches 3K pixels — fast-
14
14
  * moving content can outpace its tile's expansion.
15
15
  *
16
- * Jimenez 2014 uses 20; 16 is the next power-of-two below that and
17
- * what UE / most modern engines settle on.
16
+ * Jimenez 2014 uses 20; 16 is the next power-of-two below that.
18
17
  *
19
18
  * @type {number}
20
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MOTION_BLUR_CONFIG.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,oCAFU,MAAM,CAEwB;AAExC;;;;;;;;;;GAUG;AACH,uCAFU,MAAM,CAE2B;AAE3C;;;;;;;GAOG;AACH,+CAFU,MAAM,CAEoC;AAEpD;;;;;;;;;GASG;AACH,wCAFU,MAAM,CAE8B"}
1
+ {"version":3,"file":"MOTION_BLUR_CONFIG.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,oCAFU,MAAM,CAEwB;AAExC;;;;;;;;;;GAUG;AACH,uCAFU,MAAM,CAE2B;AAE3C;;;;;;;GAOG;AACH,+CAFU,MAAM,CAEoC;AAEpD;;;;;;;;;GASG;AACH,wCAFU,MAAM,CAE8B"}
@@ -13,8 +13,7 @@
13
13
  * NeighborMax 3×3 neighborhood only reaches 3K pixels — fast-
14
14
  * moving content can outpace its tile's expansion.
15
15
  *
16
- * Jimenez 2014 uses 20; 16 is the next power-of-two below that and
17
- * what UE / most modern engines settle on.
16
+ * Jimenez 2014 uses 20; 16 is the next power-of-two below that.
18
17
  *
19
18
  * @type {number}
20
19
  */
@@ -3,9 +3,8 @@
3
3
  *
4
4
  * `depth_motion` is the view depth the point moved through since last frame, the velocity buffer's z
5
5
  * (`VELOCITY_FORMAT`). Last frame's depth is weighed against the point's depth then, its depth now
6
- * less that, as UE's TSR weighs it (`PrevClosestDeviceZ`, TSRDilateVelocity.usf). FSR2 has no depth
7
- * in its motion and weighs against the depth now, which reads a surface moving away from the camera
8
- * as a disocclusion.
6
+ * less that. FSR2 has no depth in its motion and weighs against the depth now, which reads a surface
7
+ * moving away from the camera as a disocclusion.
9
8
  *
10
9
  * NOTE: deliberately uses a 2x2 *min*-gather over inverted-depth prev samples (= farthest
11
10
  * in view space), which is the OPPOSITE of FSR2's "closest reconstructed prev depth"
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_fsr2_compute_depth_clip.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,4CAFU,SAAS,CAoGjB;0BAtIwB,oCAAoC"}
1
+ {"version":3,"file":"chunk_fsr2_compute_depth_clip.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,4CAFU,SAAS,CAoGjB;0BArIwB,oCAAoC"}
@@ -11,9 +11,8 @@ import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
11
11
  *
12
12
  * `depth_motion` is the view depth the point moved through since last frame, the velocity buffer's z
13
13
  * (`VELOCITY_FORMAT`). Last frame's depth is weighed against the point's depth then, its depth now
14
- * less that, as UE's TSR weighs it (`PrevClosestDeviceZ`, TSRDilateVelocity.usf). FSR2 has no depth
15
- * in its motion and weighs against the depth now, which reads a surface moving away from the camera
16
- * as a disocclusion.
14
+ * less that. FSR2 has no depth in its motion and weighs against the depth now, which reads a surface
15
+ * moving away from the camera as a disocclusion.
17
16
  *
18
17
  * NOTE: deliberately uses a 2x2 *min*-gather over inverted-depth prev samples (= farthest
19
18
  * in view space), which is the OPPOSITE of FSR2's "closest reconstructed prev depth"
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Based on Brian Karis' paper on TAA, from Epic Games
2
+ * Based on Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH 2014 Advances in Real-Time Rendering course
3
3
  * @see https://github.com/TheRealMJP/MSAAFilter/blob/cfc1c19411e24dc07f74272c17f423330ac96941/MSAAFilter/Resolve.hlsl#L133* @param {number} x
4
4
  * @returns {number}
5
5
  */
@@ -1,7 +1,7 @@
1
1
  import { clamp01 } from "../../../../core/math/clamp01.js";
2
2
 
3
3
  /**
4
- * Based on Brian Karis' paper on TAA, from Epic Games
4
+ * Based on Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH 2014 Advances in Real-Time Rendering course
5
5
  * @see https://github.com/TheRealMJP/MSAAFilter/blob/cfc1c19411e24dc07f74272c17f423330ac96941/MSAAFilter/Resolve.hlsl#L133* @param {number} x
6
6
  * @returns {number}
7
7
  */