@woosh/meep-engine 3.67.0 → 3.69.0

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 (498) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +2 -17
  3. package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -1
  4. package/editor/ecs/component/editors/ecs/Trail3DEditor.js +3 -18
  5. package/package.json +1 -1
  6. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +33 -65
  7. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
  8. package/src/engine/graphics/ecs/trail3d/Trail3D.js +37 -245
  9. package/src/engine/graphics/ecs/trail3d/Trail3DFlags.d.ts +0 -4
  10. package/src/engine/graphics/ecs/trail3d/Trail3DFlags.js +4 -10
  11. package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.d.ts +13 -10
  12. package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.d.ts.map +1 -1
  13. package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.js +28 -37
  14. package/src/engine/graphics/ecs/trail3d/trail_knot_count.d.ts +10 -0
  15. package/src/engine/graphics/ecs/trail3d/trail_knot_count.d.ts.map +1 -0
  16. package/src/engine/graphics/ecs/trail3d/trail_knot_count.js +27 -0
  17. package/src/engine/graphics/trail/TrailKnots.d.ts +62 -0
  18. package/src/engine/graphics/trail/TrailKnots.d.ts.map +1 -0
  19. package/src/engine/graphics/trail/TrailKnots.js +137 -0
  20. package/src/engine/graphics/trail/tube/TubeXMaterialSpec.d.ts +1 -1
  21. package/src/engine/graphics/trail/tube/TubeXMaterialSpec.js +1 -1
  22. package/src/engine/graphics3/EntityRowHold.d.ts +48 -0
  23. package/src/engine/graphics3/EntityRowHold.d.ts.map +1 -0
  24. package/src/engine/graphics3/EntityRowHold.js +128 -0
  25. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +6 -2
  26. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  27. package/src/engine/graphics3/GPUParticleEmitterSystem.js +11 -44
  28. package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
  29. package/src/engine/graphics3/GraphicsEngine.js +4 -9
  30. package/src/engine/graphics3/Trail3DSystem.d.ts +69 -35
  31. package/src/engine/graphics3/Trail3DSystem.d.ts.map +1 -1
  32. package/src/engine/graphics3/Trail3DSystem.js +380 -81
  33. package/src/engine/graphics3/load_cube_environment.js +3 -3
  34. package/src/engine/physics/fluid/ecs/FluidObstacle.d.ts +17 -0
  35. package/src/engine/physics/fluid/ecs/FluidObstacle.d.ts.map +1 -1
  36. package/src/engine/physics/fluid/ecs/FluidObstacle.js +22 -2
  37. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +6 -5
  38. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
  39. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.js +14 -3
  40. package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.d.ts +9 -1
  41. package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.d.ts.map +1 -1
  42. package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.js +11 -1
  43. package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.d.ts +5 -0
  44. package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.d.ts.map +1 -1
  45. package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.js +2 -0
  46. package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.d.ts +4 -3
  47. package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.d.ts.map +1 -1
  48. package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.js +11 -3
  49. package/src/shade/playground/probe_clipmap/index.html +43 -0
  50. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  51. package/src/shade/playground/probe_clipmap/main.js +29 -0
  52. package/src/shade/playground/trails/index.html +50 -0
  53. package/src/shade/playground/trails/main.d.ts +2 -0
  54. package/src/shade/playground/trails/main.d.ts.map +1 -0
  55. package/src/shade/playground/trails/main.js +258 -0
  56. package/src/shade/renderer/Renderer.d.ts +7 -0
  57. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  58. package/src/shade/renderer/Renderer.js +213 -15
  59. package/src/shade/renderer/ShadeIndirectLightingMode.d.ts +1 -0
  60. package/src/shade/renderer/ShadeIndirectLightingMode.js +9 -0
  61. package/src/shade/renderer/animation/animation_curve_write_keys.d.ts +18 -0
  62. package/src/shade/renderer/animation/animation_curve_write_keys.d.ts.map +1 -0
  63. package/src/shade/renderer/animation/animation_curve_write_keys.js +34 -0
  64. package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.d.ts +22 -0
  65. package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map +1 -0
  66. package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.js +160 -0
  67. package/src/shade/renderer/atmosphere/ATMOSPHERE_UNIT_SCALE.d.ts +45 -0
  68. package/src/shade/renderer/atmosphere/ATMOSPHERE_UNIT_SCALE.d.ts.map +1 -0
  69. package/src/shade/renderer/atmosphere/ATMOSPHERE_UNIT_SCALE.js +57 -0
  70. package/src/shade/renderer/atmosphere/GPUSky.d.ts +23 -8
  71. package/src/shade/renderer/atmosphere/GPUSky.d.ts.map +1 -1
  72. package/src/shade/renderer/atmosphere/GPUSky.js +91 -34
  73. package/src/shade/renderer/atmosphere/SAMPLER_SKY_LUT.d.ts +17 -0
  74. package/src/shade/renderer/atmosphere/SAMPLER_SKY_LUT.d.ts.map +1 -1
  75. package/src/shade/renderer/atmosphere/SAMPLER_SKY_LUT.js +55 -25
  76. package/src/shade/renderer/atmosphere/SceneAtmosphere.d.ts +164 -0
  77. package/src/shade/renderer/atmosphere/SceneAtmosphere.d.ts.map +1 -0
  78. package/src/shade/renderer/atmosphere/SceneAtmosphere.js +308 -0
  79. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts +3 -12
  80. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts.map +1 -1
  81. package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.js +52 -89
  82. package/src/shade/renderer/atmosphere/chunk_raymarch_sky_scattering.d.ts +14 -0
  83. package/src/shade/renderer/atmosphere/chunk_raymarch_sky_scattering.d.ts.map +1 -0
  84. package/src/shade/renderer/atmosphere/chunk_raymarch_sky_scattering.js +103 -0
  85. package/src/shade/renderer/atmosphere/chunk_sample_multiscatter_lut.d.ts +10 -4
  86. package/src/shade/renderer/atmosphere/chunk_sample_multiscatter_lut.d.ts.map +1 -1
  87. package/src/shade/renderer/atmosphere/chunk_sample_multiscatter_lut.js +95 -57
  88. package/src/shade/renderer/atmosphere/chunk_sample_transmittance_lut.d.ts +10 -14
  89. package/src/shade/renderer/atmosphere/chunk_sample_transmittance_lut.d.ts.map +1 -1
  90. package/src/shade/renderer/atmosphere/chunk_sample_transmittance_lut.js +97 -69
  91. package/src/shade/renderer/atmosphere/chunk_sky_irradiance_lut_encode_uv.d.ts +17 -0
  92. package/src/shade/renderer/atmosphere/chunk_sky_irradiance_lut_encode_uv.d.ts.map +1 -1
  93. package/src/shade/renderer/atmosphere/chunk_sky_irradiance_lut_encode_uv.js +117 -48
  94. package/src/shade/renderer/atmosphere/chunk_sky_lut_compute_uv.d.ts +8 -0
  95. package/src/shade/renderer/atmosphere/chunk_sky_lut_compute_uv.d.ts.map +1 -1
  96. package/src/shade/renderer/atmosphere/chunk_sky_lut_compute_uv.js +65 -35
  97. package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts +2 -1
  98. package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts.map +1 -1
  99. package/src/shade/renderer/atmosphere/compute_mie_absorption.js +6 -6
  100. package/src/shade/renderer/atmosphere/resolve_atmosphere_sun.d.ts +41 -0
  101. package/src/shade/renderer/atmosphere/resolve_atmosphere_sun.d.ts.map +1 -0
  102. package/src/shade/renderer/atmosphere/resolve_atmosphere_sun.js +123 -0
  103. package/src/shade/renderer/atmosphere/shader_multiscatter_lut.d.ts.map +1 -1
  104. package/src/shade/renderer/atmosphere/shader_multiscatter_lut.js +21 -64
  105. package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.d.ts +6 -2
  106. package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.d.ts.map +1 -1
  107. package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +55 -179
  108. package/src/shade/renderer/atmosphere/shader_sky_view_lut.d.ts +7 -0
  109. package/src/shade/renderer/atmosphere/shader_sky_view_lut.d.ts.map +1 -0
  110. package/src/shade/renderer/atmosphere/shader_sky_view_lut.js +111 -0
  111. package/src/shade/renderer/atmosphere/shader_transmittance_lut.d.ts +0 -1
  112. package/src/shade/renderer/atmosphere/shader_transmittance_lut.d.ts.map +1 -1
  113. package/src/shade/renderer/atmosphere/shader_transmittance_lut.js +68 -79
  114. package/src/shade/renderer/deferred/shader_background.js +1 -1
  115. package/src/shade/renderer/deferred/shader_background_sky.d.ts +5 -0
  116. package/src/shade/renderer/deferred/shader_background_sky.d.ts.map +1 -0
  117. package/src/shade/renderer/deferred/shader_background_sky.js +130 -0
  118. package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
  119. package/src/shade/renderer/deferred/tonemap/ColorGrade.js +13 -36
  120. package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.d.ts +2 -1
  121. package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.d.ts.map +1 -1
  122. package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.js +6 -2
  123. package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.js +2 -2
  124. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts +2 -13
  125. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts.map +1 -1
  126. package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.js +6 -21
  127. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts +17 -6
  128. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts.map +1 -1
  129. package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.js +38 -178
  130. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts +7 -9
  131. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts.map +1 -1
  132. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.js +17 -106
  133. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts +7 -17
  134. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts.map +1 -1
  135. package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.js +18 -118
  136. package/src/shade/renderer/extension/ViewTextures.d.ts +3 -2
  137. package/src/shade/renderer/extension/ViewTextures.d.ts.map +1 -1
  138. package/src/shade/renderer/extension/ViewTextures.js +3 -2
  139. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  140. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  141. package/src/shade/renderer/fluid/forcing/FLUID_FORCING.d.ts +14 -0
  142. package/src/shade/renderer/fluid/forcing/FLUID_FORCING.d.ts.map +1 -1
  143. package/src/shade/renderer/fluid/forcing/FLUID_FORCING.js +18 -0
  144. package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.d.ts +3 -1
  145. package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.d.ts.map +1 -1
  146. package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.js +4 -1
  147. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +15 -6
  148. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts.map +1 -1
  149. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.js +20 -4
  150. package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.d.ts +11 -2
  151. package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.d.ts.map +1 -1
  152. package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.js +59 -2
  153. package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.d.ts +4 -1
  154. package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.d.ts.map +1 -1
  155. package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.js +367 -341
  156. package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts +6 -2
  157. package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts.map +1 -1
  158. package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.js +339 -282
  159. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  160. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  161. package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.js +1 -1
  162. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +20 -1
  163. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  164. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +29 -0
  165. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_light.d.ts +47 -0
  166. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_light.d.ts.map +1 -0
  167. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_light.js +246 -0
  168. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +4 -15
  169. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -1
  170. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +8 -148
  171. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +4 -9
  172. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  173. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +9 -58
  174. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +142 -0
  175. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -0
  176. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +938 -0
  177. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +192 -0
  178. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -0
  179. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +231 -0
  180. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts +11 -0
  181. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts.map +1 -0
  182. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.js +25 -0
  183. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +110 -0
  184. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -0
  185. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +197 -0
  186. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +150 -0
  187. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts.map +1 -0
  188. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +408 -0
  189. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +23 -0
  190. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts.map +1 -0
  191. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +63 -0
  192. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brick_origin.d.ts +24 -0
  193. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brick_origin.d.ts.map +1 -0
  194. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brick_origin.js +61 -0
  195. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +39 -0
  196. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -0
  197. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +126 -0
  198. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +21 -0
  199. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts.map +1 -0
  200. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +74 -0
  201. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_march_distance.d.ts +20 -0
  202. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_march_distance.d.ts.map +1 -0
  203. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_march_distance.js +26 -0
  204. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_ray_sort.d.ts +24 -0
  205. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_ray_sort.d.ts.map +1 -0
  206. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_ray_sort.js +57 -0
  207. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +22 -0
  208. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts.map +1 -0
  209. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +53 -0
  210. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +62 -0
  211. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -0
  212. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +156 -0
  213. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_workgroup_sum.d.ts +18 -0
  214. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_workgroup_sum.d.ts.map +1 -0
  215. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_workgroup_sum.js +50 -0
  216. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts +21 -0
  217. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts.map +1 -0
  218. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.js +54 -0
  219. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +67 -0
  220. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -0
  221. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +509 -0
  222. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_debug.d.ts +20 -0
  223. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_debug.d.ts.map +1 -0
  224. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_debug.js +128 -0
  225. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +62 -0
  226. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -0
  227. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +478 -0
  228. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +69 -0
  229. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -0
  230. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +457 -0
  231. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts +27 -0
  232. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts.map +1 -0
  233. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.js +219 -0
  234. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +22 -0
  235. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts.map +1 -0
  236. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +151 -0
  237. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +66 -0
  238. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts.map +1 -0
  239. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +301 -0
  240. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +59 -0
  241. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -0
  242. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +364 -0
  243. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +40 -0
  244. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -0
  245. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +275 -0
  246. package/src/shade/renderer/grass/blade/GPUGrassBlades.d.ts.map +1 -1
  247. package/src/shade/renderer/grass/blade/GPUGrassBlades.js +17 -2
  248. package/src/shade/renderer/grass/blade/grass_blade_resolve.d.ts +18 -8
  249. package/src/shade/renderer/grass/blade/grass_blade_resolve.d.ts.map +1 -1
  250. package/src/shade/renderer/grass/blade/grass_blade_resolve.js +114 -32
  251. package/src/shade/renderer/grass/press/shader_grass_press_mark.d.ts +3 -2
  252. package/src/shade/renderer/grass/press/shader_grass_press_mark.d.ts.map +1 -1
  253. package/src/shade/renderer/grass/press/shader_grass_press_mark.js +5 -3
  254. package/src/shade/renderer/light/GPULightCollection.d.ts +1 -1
  255. package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
  256. package/src/shade/renderer/light/GPULightCollection.js +213 -80
  257. package/src/shade/renderer/{atmosphere → light/environment}/chunk_sample_environment_color.d.ts +1 -2
  258. package/src/shade/renderer/light/environment/chunk_sample_environment_color.d.ts.map +1 -0
  259. package/src/shade/renderer/{atmosphere → light/environment}/chunk_sample_environment_color.js +3 -4
  260. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  261. package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.js +1 -1
  262. package/src/shade/renderer/postprocess/denoise/debug/graph_pass_debug_reprojection.js +1 -1
  263. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts +1 -1
  264. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.js +1 -1
  265. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts +1 -1
  266. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.js +1 -1
  267. package/src/shade/renderer/postprocess/motion_blur/shader_motion_blur_reconstruct.js +1 -1
  268. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  269. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +2 -0
  270. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +2 -0
  271. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +6 -0
  272. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
  273. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +9 -1
  274. package/src/shade/renderer/postprocess/taa/shader_depth_occlusion_clip.d.ts.map +1 -1
  275. package/src/shade/renderer/postprocess/taa/shader_depth_occlusion_clip.js +4 -3
  276. package/src/shade/renderer/postprocess/velocity/VELOCITY_BUFFER.d.ts +17 -0
  277. package/src/shade/renderer/postprocess/velocity/VELOCITY_BUFFER.d.ts.map +1 -0
  278. package/src/shade/renderer/postprocess/velocity/VELOCITY_BUFFER.js +16 -0
  279. package/src/shade/renderer/postprocess/velocity/chunk_velocity_texel.d.ts +21 -0
  280. package/src/shade/renderer/postprocess/velocity/chunk_velocity_texel.d.ts.map +1 -0
  281. package/src/shade/renderer/postprocess/velocity/chunk_velocity_texel.js +30 -0
  282. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -5
  283. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
  284. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +19 -17
  285. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +2 -0
  286. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts +49 -0
  287. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts.map +1 -0
  288. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js +144 -0
  289. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.d.ts +71 -0
  290. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.d.ts.map +1 -0
  291. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.js +152 -0
  292. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_unlit_varyings.d.ts +21 -0
  293. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_unlit_varyings.d.ts.map +1 -0
  294. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_unlit_varyings.js +30 -0
  295. package/src/shade/renderer/rasterize/native/avboit/graph_avboit_unlit.d.ts +101 -0
  296. package/src/shade/renderer/rasterize/native/avboit/graph_avboit_unlit.d.ts.map +1 -0
  297. package/src/shade/renderer/rasterize/native/avboit/graph_avboit_unlit.js +306 -0
  298. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts +9 -0
  299. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts.map +1 -1
  300. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.js +11 -4
  301. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  302. package/src/shade/renderer/scene/GPUSceneContext.js +2 -1
  303. package/src/shade/renderer/scene/Scene.d.ts +9 -2
  304. package/src/shade/renderer/scene/Scene.d.ts.map +1 -1
  305. package/src/shade/renderer/scene/Scene.js +10 -2
  306. package/src/shade/renderer/shader/ImageShader.d.ts +24 -12
  307. package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
  308. package/src/shade/renderer/shader/ImageShader.js +11 -8
  309. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_HEIGHT_DECLARATION.d.ts +3 -1
  310. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_HEIGHT_DECLARATION.d.ts.map +1 -1
  311. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_HEIGHT_DECLARATION.js +11 -3
  312. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_RADII_DECLARATION.d.ts +2 -11
  313. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_RADII_DECLARATION.d.ts.map +1 -1
  314. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_RADII_DECLARATION.js +23 -32
  315. package/src/shade/renderer/shader/chunk/atmosphere/PLANET_RADIUS_DECLARATION.d.ts +6 -0
  316. package/src/shade/renderer/shader/chunk/atmosphere/PLANET_RADIUS_DECLARATION.d.ts.map +1 -1
  317. package/src/shade/renderer/shader/chunk/atmosphere/PLANET_RADIUS_DECLARATION.js +14 -2
  318. package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_height.d.ts.map +1 -1
  319. package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_height.js +4 -2
  320. package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_intersection.d.ts.map +1 -1
  321. package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_intersection.js +11 -3
  322. package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_ray_bounds.d.ts.map +1 -1
  323. package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_ray_bounds.js +68 -69
  324. package/src/shade/renderer/shader/chunk/atmosphere/chunk_get_sun_transmittance.d.ts +4 -1
  325. package/src/shade/renderer/shader/chunk/atmosphere/chunk_get_sun_transmittance.d.ts.map +1 -1
  326. package/src/shade/renderer/shader/chunk/atmosphere/chunk_get_sun_transmittance.js +46 -39
  327. package/src/shade/renderer/shader/chunk/atmosphere/chunk_position_relative_to_planet_center.d.ts.map +1 -1
  328. package/src/shade/renderer/shader/chunk/atmosphere/chunk_position_relative_to_planet_center.js +5 -3
  329. package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.d.ts +18 -10
  330. package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.d.ts.map +1 -1
  331. package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.js +30 -27
  332. package/src/shade/renderer/shader/chunk/depth/chunk_get_device_depth.d.ts +14 -0
  333. package/src/shade/renderer/shader/chunk/depth/chunk_get_device_depth.d.ts.map +1 -0
  334. package/src/shade/renderer/shader/chunk/depth/chunk_get_device_depth.js +30 -0
  335. package/src/shade/renderer/shader/chunk/geometry/octahedron/chunk_uv_equal_area_sphere.d.ts +21 -0
  336. package/src/shade/renderer/shader/chunk/geometry/octahedron/chunk_uv_equal_area_sphere.d.ts.map +1 -0
  337. package/src/shade/renderer/shader/chunk/geometry/octahedron/chunk_uv_equal_area_sphere.js +60 -0
  338. package/src/shade/renderer/shader/chunk/light/{sky/chunk_sample_sky_color.d.ts → io/chunk_light_get_sun.d.ts} +3 -6
  339. package/src/shade/renderer/shader/chunk/light/io/chunk_light_get_sun.d.ts.map +1 -0
  340. package/src/shade/renderer/shader/chunk/light/{sky/chunk_sample_sky_color.js → io/chunk_light_get_sun.js} +6 -26
  341. package/src/shade/renderer/shadow/sdf/cascade/shader_scene_sdf_soft_shadows.js +1 -1
  342. package/src/shade/renderer/trails/GPUTrailAVBOITChannel.d.ts +69 -0
  343. package/src/shade/renderer/trails/GPUTrailAVBOITChannel.d.ts.map +1 -0
  344. package/src/shade/renderer/trails/GPUTrailAVBOITChannel.js +129 -0
  345. package/src/shade/renderer/trails/GPUTrailSystem.d.ts +164 -0
  346. package/src/shade/renderer/trails/GPUTrailSystem.d.ts.map +1 -0
  347. package/src/shade/renderer/trails/GPUTrailSystem.js +725 -0
  348. package/src/shade/renderer/trails/data/TRAIL_DATABASE_SPEC.d.ts +14 -0
  349. package/src/shade/renderer/trails/data/TRAIL_DATABASE_SPEC.d.ts.map +1 -0
  350. package/src/shade/renderer/trails/data/TRAIL_DATABASE_SPEC.js +38 -0
  351. package/src/shade/renderer/trails/data/TRAIL_KNOT.d.ts +66 -0
  352. package/src/shade/renderer/trails/data/TRAIL_KNOT.d.ts.map +1 -0
  353. package/src/shade/renderer/trails/data/TRAIL_KNOT.js +154 -0
  354. package/src/shade/renderer/trails/data/TRAIL_RECORD.d.ts +19 -0
  355. package/src/shade/renderer/trails/data/TRAIL_RECORD.d.ts.map +1 -0
  356. package/src/shade/renderer/trails/data/TRAIL_RECORD.js +68 -0
  357. package/src/shade/renderer/trails/data/TRAIL_STATE.d.ts +18 -0
  358. package/src/shade/renderer/trails/data/TRAIL_STATE.d.ts.map +1 -0
  359. package/src/shade/renderer/trails/data/TRAIL_STATE.js +43 -0
  360. package/src/shade/renderer/trails/graph_trails.d.ts +58 -0
  361. package/src/shade/renderer/trails/graph_trails.d.ts.map +1 -0
  362. package/src/shade/renderer/trails/graph_trails.js +155 -0
  363. package/src/shade/renderer/trails/graph_trails_avboit.d.ts +126 -0
  364. package/src/shade/renderer/trails/graph_trails_avboit.d.ts.map +1 -0
  365. package/src/shade/renderer/trails/graph_trails_avboit.js +300 -0
  366. package/src/shade/renderer/trails/runtime/TrailFadeCurves.d.ts +56 -0
  367. package/src/shade/renderer/trails/runtime/TrailFadeCurves.d.ts.map +1 -0
  368. package/src/shade/renderer/trails/runtime/TrailFadeCurves.js +220 -0
  369. package/src/shade/renderer/trails/runtime/TrailKnotPool.d.ts +49 -0
  370. package/src/shade/renderer/trails/runtime/TrailKnotPool.d.ts.map +1 -0
  371. package/src/shade/renderer/trails/runtime/TrailKnotPool.js +162 -0
  372. package/src/shade/renderer/trails/runtime/TrailParameters.d.ts +52 -0
  373. package/src/shade/renderer/trails/runtime/TrailParameters.d.ts.map +1 -0
  374. package/src/shade/renderer/trails/runtime/TrailParameters.js +126 -0
  375. package/src/shade/renderer/trails/shaders/chunk_trail_frame_transport.d.ts +23 -0
  376. package/src/shade/renderer/trails/shaders/chunk_trail_frame_transport.d.ts.map +1 -0
  377. package/src/shade/renderer/trails/shaders/chunk_trail_frame_transport.js +57 -0
  378. package/src/shade/renderer/trails/shaders/chunk_trail_knot_alpha.d.ts +14 -0
  379. package/src/shade/renderer/trails/shaders/chunk_trail_knot_alpha.d.ts.map +1 -0
  380. package/src/shade/renderer/trails/shaders/chunk_trail_knot_alpha.js +40 -0
  381. package/src/shade/renderer/trails/shaders/chunk_trail_seed.d.ts +18 -0
  382. package/src/shade/renderer/trails/shaders/chunk_trail_seed.d.ts.map +1 -0
  383. package/src/shade/renderer/trails/shaders/chunk_trail_seed.js +64 -0
  384. package/src/shade/renderer/trails/shaders/chunk_trail_segment.d.ts +14 -0
  385. package/src/shade/renderer/trails/shaders/chunk_trail_segment.d.ts.map +1 -0
  386. package/src/shade/renderer/trails/shaders/chunk_trail_segment.js +51 -0
  387. package/src/shade/renderer/trails/shaders/chunk_trail_update.d.ts +48 -0
  388. package/src/shade/renderer/trails/shaders/chunk_trail_update.d.ts.map +1 -0
  389. package/src/shade/renderer/trails/shaders/chunk_trail_update.js +197 -0
  390. package/src/shade/renderer/trails/shaders/chunk_trail_vertex.d.ts +34 -0
  391. package/src/shade/renderer/trails/shaders/chunk_trail_vertex.d.ts.map +1 -0
  392. package/src/shade/renderer/trails/shaders/chunk_trail_vertex.js +111 -0
  393. package/src/shade/renderer/trails/shaders/shader_trail_avboit.d.ts +24 -0
  394. package/src/shade/renderer/trails/shaders/shader_trail_avboit.d.ts.map +1 -0
  395. package/src/shade/renderer/trails/shaders/shader_trail_avboit.js +78 -0
  396. package/src/shade/renderer/trails/shaders/shader_trail_avboit_segments.d.ts +23 -0
  397. package/src/shade/renderer/trails/shaders/shader_trail_avboit_segments.d.ts.map +1 -0
  398. package/src/shade/renderer/trails/shaders/shader_trail_avboit_segments.js +130 -0
  399. package/src/shade/renderer/trails/shaders/shader_trail_draw_args.d.ts +29 -0
  400. package/src/shade/renderer/trails/shaders/shader_trail_draw_args.d.ts.map +1 -0
  401. package/src/shade/renderer/trails/shaders/shader_trail_draw_args.js +78 -0
  402. package/src/shade/renderer/trails/shaders/shader_trail_seed.d.ts +18 -0
  403. package/src/shade/renderer/trails/shaders/shader_trail_seed.d.ts.map +1 -0
  404. package/src/shade/renderer/trails/shaders/shader_trail_seed.js +79 -0
  405. package/src/shade/renderer/trails/shaders/shader_trail_update.d.ts +20 -0
  406. package/src/shade/renderer/trails/shaders/shader_trail_update.d.ts.map +1 -0
  407. package/src/shade/renderer/trails/shaders/shader_trail_update.js +101 -0
  408. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +3 -1
  409. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
  410. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +4 -2
  411. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
  412. package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +743 -739
  413. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +2 -0
  414. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
  415. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +19 -17
  416. package/src/shade/renderer/volumetrics/shader_volumetrics_build_scattering_lut.d.ts.map +1 -1
  417. package/src/shade/renderer/volumetrics/shader_volumetrics_build_scattering_lut.js +5 -3
  418. package/src/shade/renderer/water/chunk_water_gi.js +2 -0
  419. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  420. package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
  421. package/src/engine/graphics/ecs/trail3d/advance_trail.d.ts +0 -18
  422. package/src/engine/graphics/ecs/trail3d/advance_trail.d.ts.map +0 -1
  423. package/src/engine/graphics/ecs/trail3d/advance_trail.js +0 -42
  424. package/src/engine/graphics/ecs/trail3d/seed_trail_tube.d.ts +0 -14
  425. package/src/engine/graphics/ecs/trail3d/seed_trail_tube.d.ts.map +0 -1
  426. package/src/engine/graphics/ecs/trail3d/seed_trail_tube.js +0 -75
  427. package/src/engine/graphics/ecs/trail3d/trail_head_position.d.ts +0 -17
  428. package/src/engine/graphics/ecs/trail3d/trail_head_position.d.ts.map +0 -1
  429. package/src/engine/graphics/ecs/trail3d/trail_head_position.js +0 -19
  430. package/src/engine/graphics/sh3/path_tracer/make_sky_hosek.d.ts +0 -2
  431. package/src/engine/graphics/sh3/path_tracer/make_sky_hosek.d.ts.map +0 -1
  432. package/src/engine/graphics/sh3/path_tracer/make_sky_hosek.js +0 -45
  433. package/src/engine/graphics/sh3/path_tracer/make_sky_rtiw.d.ts +0 -2
  434. package/src/engine/graphics/sh3/path_tracer/make_sky_rtiw.d.ts.map +0 -1
  435. package/src/engine/graphics/sh3/path_tracer/make_sky_rtiw.js +0 -17
  436. package/src/engine/graphics/sh3/sky/hosek/README.md +0 -4
  437. package/src/engine/graphics/sh3/sky/hosek/data.d.ts +0 -17
  438. package/src/engine/graphics/sh3/sky/hosek/data.d.ts.map +0 -1
  439. package/src/engine/graphics/sh3/sky/hosek/data.js +0 -3744
  440. package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.d.ts +0 -2
  441. package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.d.ts.map +0 -1
  442. package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.js +0 -71
  443. package/src/engine/graphics/sh3/sky/hosek/render_hosek_sky_to_equirectangular.d.ts +0 -26
  444. package/src/engine/graphics/sh3/sky/hosek/render_hosek_sky_to_equirectangular.d.ts.map +0 -1
  445. package/src/engine/graphics/sh3/sky/hosek/render_hosek_sky_to_equirectangular.js +0 -70
  446. package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.d.ts +0 -22
  447. package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.d.ts.map +0 -1
  448. package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.js +0 -388
  449. package/src/engine/graphics/trail/tube/TubeX.d.ts +0 -186
  450. package/src/engine/graphics/trail/tube/TubeX.d.ts.map +0 -1
  451. package/src/engine/graphics/trail/tube/TubeX.js +0 -575
  452. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts +0 -16
  453. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts.map +0 -1
  454. package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.js +0 -34
  455. package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts +0 -27
  456. package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts.map +0 -1
  457. package/src/engine/graphics/trail/tube/tube_attributes_spec.js +0 -70
  458. package/src/engine/graphics3/make_default_environment.d.ts +0 -15
  459. package/src/engine/graphics3/make_default_environment.d.ts.map +0 -1
  460. package/src/engine/graphics3/make_default_environment.js +0 -111
  461. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +0 -38
  462. package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts.map +0 -1
  463. package/src/engine/graphics3/trail/trail_tube_write_geometry.js +0 -119
  464. package/src/shade/renderer/atmosphere/MIE_G.d.ts +0 -6
  465. package/src/shade/renderer/atmosphere/MIE_G.d.ts.map +0 -1
  466. package/src/shade/renderer/atmosphere/MIE_G.js +0 -5
  467. package/src/shade/renderer/atmosphere/chunk_sample_environment_color.d.ts.map +0 -1
  468. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.d.ts +0 -4
  469. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.d.ts.map +0 -1
  470. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js +0 -44
  471. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.d.ts +0 -2
  472. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map +0 -1
  473. package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js +0 -43
  474. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.d.ts +0 -3
  475. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.d.ts.map +0 -1
  476. package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.js +0 -6
  477. package/src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.d.ts +0 -3
  478. package/src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.d.ts.map +0 -1
  479. package/src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.js +0 -18
  480. package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.d.ts +0 -14
  481. package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.d.ts.map +0 -1
  482. package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.js +0 -86
  483. package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.d.ts +0 -8
  484. package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.d.ts.map +0 -1
  485. package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.js +0 -125
  486. package/src/shade/renderer/shader/chunk/atmosphere/chunk_planet_intersection.d.ts +0 -3
  487. package/src/shade/renderer/shader/chunk/atmosphere/chunk_planet_intersection.d.ts.map +0 -1
  488. package/src/shade/renderer/shader/chunk/atmosphere/chunk_planet_intersection.js +0 -17
  489. package/src/shade/renderer/shader/chunk/atmosphere/chunk_sphere_intersection_nearest.d.ts +0 -3
  490. package/src/shade/renderer/shader/chunk/atmosphere/chunk_sphere_intersection_nearest.d.ts.map +0 -1
  491. package/src/shade/renderer/shader/chunk/atmosphere/chunk_sphere_intersection_nearest.js +0 -38
  492. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts +0 -16
  493. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts.map +0 -1
  494. package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.js +0 -28
  495. package/src/shade/renderer/shader/chunk/light/sky/chunk_sample_sky_color.d.ts.map +0 -1
  496. package/src/shade/renderer/view/GPUViewSkyContext.d.ts +0 -26
  497. package/src/shade/renderer/view/GPUViewSkyContext.d.ts.map +0 -1
  498. package/src/shade/renderer/view/GPUViewSkyContext.js +0 -170
@@ -1,20 +1,13 @@
1
- import { MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
2
- import { chunk_light_cluster_counts } from "../../../light/cluster/chunk_light_cluster_counts.js";
3
1
  import { LIGHT_DATA_RESOURCE } from "../../../light/LIGHT_DATA_RESOURCE.js";
4
- import { LIGHT_DATABASE_SPEC } from "../../../light/LIGHT_DATABASE_SPEC.js";
5
- import { LIGHT_FLAGS } from "../../../light/model/io/LIGHT_FLAGS.js";
6
2
  import {
7
- chunk_world_light_cluster_lookup_at,
8
3
  WORLD_CLUSTER_DATA_RESOURCE,
9
4
  WORLD_CLUSTER_LOOKUP_RESOURCE
10
5
  } from "../../../light/world_cluster/chunk_world_light_cluster_lookup.js";
11
- import { chunk_rgb_to_luminance } from "../../../shader/chunk/color/chunk_rgb_to_luminance.js";
12
6
  import { chunk_rgbe9995_decode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.js";
13
7
  import { chunk_rgbe9995_encode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_encode.js";
14
8
  import {
15
9
  chunk_uv_octahedral_unit_decode
16
10
  } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
17
- import { chunk_sphere_sample_volume } from "../../../shader/chunk/geometry/sphere/chunk_sphere_sample_volume.js";
18
11
  import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
19
12
  import { RECIPROCAL_PI_DECLARATION } from "../../../shader/chunk/math/RECIPROCAL_PI_DECLARATION.js";
20
13
  import { chunk_hash_to_float01 } from "../../../shader/chunk/random/chunk_hash_to_float01.js";
@@ -22,18 +15,13 @@ import { chunk_pcg4d } from "../../../shader/chunk/random/pcg/chunk_pcg4d.js";
22
15
  import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
23
16
  import { ComputeShader } from "../../../shader/ComputeShader.js";
24
17
  import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
25
- import {
26
- chunk_irradiance_clipmap_local_light
27
- } from "../../../volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_local_light.js";
28
- import { IRRADIANCE_CLIPMAP_LIGHT_BUDGET } from "../../../volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.js";
29
18
  import { BRICK_TRACE_HIT } from "../brick/BRICK_CLIPMAP.js";
30
19
  import {
31
20
  BRICK_ATLAS_TEXTURE_RESOURCE,
32
21
  BRICK_LEVELS_RESOURCE,
33
22
  BRICK_MAP_TEXTURE_RESOURCE,
34
23
  BRICK_OCCUPANCY_TEXTURE_RESOURCE,
35
- BRICK_SAMPLER_RESOURCE,
36
- chunk_brick_clipmap_trace
24
+ BRICK_SAMPLER_RESOURCE
37
25
  } from "../brick/chunk_brick_clipmap_trace.js";
38
26
  import {
39
27
  chunk_probe_clipmap,
@@ -42,12 +30,10 @@ import {
42
30
  PROBE_RAYS_WRITE_RESOURCE,
43
31
  PROBE_TRACE_READ_RESOURCE
44
32
  } from "./chunk_probe_clipmap.js";
33
+ import { chunk_probe_clipmap_local_irradiance } from "./chunk_probe_clipmap_hit_light.js";
45
34
  import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
46
35
  import { PROBE_TRACE_SETTINGS } from "./shader_probe_clipmap_trace.js";
47
36
 
48
- const POINT = LIGHT_DATABASE_SPEC.get('light_point');
49
- const SPOT = LIGHT_DATABASE_SPEC.get('light_spot');
50
-
51
37
  const resources = new ShaderResourceSetDescriptor();
52
38
 
53
39
  resources.setImmediate("settings", PROBE_TRACE_SETTINGS);
@@ -73,21 +59,10 @@ resources.createGroup()
73
59
  * into its flags. It adds ρ_d·E_loc/π to the radiance shade left, ρ_d being the albedo shade left in the
74
60
  * ray's \`albedo\`; the next bounce, E_ind, is the bounce pass's, after it (`shader_probe_clipmap_bounce`).
75
61
  *
76
- * - **E_loc, the local lights**: one of the point and spot lights of the hit's cell of the world light
77
- * clusters, built over the bricks' cascades so that every hit has one, at most
78
- * `IRRADIANCE_CLIPMAP_LIGHT_BUDGET` of each; past them lights are dropped. Each light's unshadowed
79
- * irradiance is the irradiance clipmap's, at the footprint of a voxel of the hit's cascade, by its
80
- * cosine at the hit's normal.
81
- * - One is picked by weighted reservoir sampling over the cell's lights, its weight the luminance of
82
- * that irradiance, with one number stretched over the candidates as `sample_discrete_wrs` does; it
83
- * lights the hit by its irradiance over the chance of its pick, w/W. The probe's blend of its rays
84
- * averages the picks to the cell's sum.
85
- * - The picked light's shadow is a ray traced through the brick clipmap, as the hit's own ray was:
86
- * from a voxel off the surface, past the field's half-voxel expand, toward a point of the light's
87
- * sphere drawn as the path tracer draws it, stopping short of that point by the light's near clip or
88
- * a voxel, whichever is more, for the expand at that end. It sees the light if it misses; a hit, or a
89
- * march that spends its steps, is no light. A light that casts no shadow traces none.
90
- * - The pick and the point are drawn from the ray's slot and direction, fresh every update.
62
+ * - **E_loc, the local lights**: one of the hit's world light cluster cell's point and spot lights, picked by
63
+ * weighted reservoir sampling and shadowed by a ray traced through the brick clipmap
64
+ * (`probe_clipmap_local_irradiance`). The probe's blend of its rays averages the picks to the cell's sum.
65
+ * - The pick and the point are drawn from the ray's slot and direction, fresh every update.
91
66
  *
92
67
  * Its own pass because shade binds nine of a stage's ten storage buffers; apart from the bounce because the
93
68
  * two together would bind twelve storage buffers, and a shadow march is another cost than probe taps
@@ -101,114 +76,6 @@ export const shader_probe_clipmap_light = ComputeShader.from({
101
76
  body: CodeChunk.from(
102
77
  //language=WGSL
103
78
  `
104
- // E_loc at a front-face hit in brick cascade \`cascade\`: one of its world cluster cell's point and spot lights,
105
- // picked by \`random.x\` in proportion to its light at the hit and over the chance of its pick, shadowed by a ray
106
- // toward the point of the light's sphere \`random.yzw\` draws
107
- fn probe_clipmap_local_irradiance(cascade: u32, position: vec3<f32>, normal: vec3<f32>, random: vec4<f32>) -> vec3<f32> {
108
- let level = brick_levels[cascade];
109
- let voxel = level.cell_size / ${MESH_SDF_BRICK_VOXELS}.0;
110
- let cell = world_light_cluster_metadata_at(cascade, level, 0.0, position);
111
- let point_count = min(light_cluster_count_point(cell.counts), ${IRRADIANCE_CLIPMAP_LIGHT_BUDGET}u);
112
- let spot_count = min(light_cluster_count_spot(cell.counts), ${IRRADIANCE_CLIPMAP_LIGHT_BUDGET}u);
113
-
114
- // the cell's spot lights follow its point lights
115
- let spots = cell.offset + light_cluster_count_point(cell.counts);
116
-
117
- // the reservoir: the weights so far, and the light it holds
118
- var u = random.x;
119
- var total = 0.0;
120
- var picked = vec3<f32>(0.0);
121
- var picked_weight = 0.0;
122
- var picked_index = 0u;
123
- var picked_spot = false;
124
-
125
- for (var j = 0u; j < point_count + spot_count; j++) {
126
- let spot = j >= point_count;
127
- let index = world_cluster_data[select(cell.offset + j, spots + (j - point_count), spot)];
128
-
129
- var irradiance: vec3<f32>;
130
-
131
- if (spot) {
132
- let light = irradiance_clipmap_get_spot_light_info_by_index(&light_data, index, position, voxel);
133
-
134
- irradiance = light.color * max(dot(normal, light.direction), 0.0);
135
- } else {
136
- let light = irradiance_clipmap_get_point_light_info_by_index(&light_data, index, position, voxel);
137
-
138
- irradiance = light.color * max(dot(normal, light.direction), 0.0);
139
- }
140
-
141
- let weight = rgb_to_luminance(irradiance);
142
-
143
- if (weight <= 0.0) {
144
- continue;
145
- }
146
-
147
- // the light takes the reservoir by its share of the weights so far, and the number is stretched back
148
- // over [0, 1) from whichever side of the share it fell
149
- total += weight;
150
-
151
- let share = weight / total;
152
-
153
- if (u < share) {
154
- u = u / share;
155
- picked = irradiance;
156
- picked_weight = weight;
157
- picked_index = index;
158
- picked_spot = spot;
159
- } else {
160
- u = (u - share) / (1.0 - share);
161
- }
162
- }
163
-
164
- if (total <= 0.0) {
165
- return vec3<f32>(0.0);
166
- }
167
-
168
- // the pick's light over the chance of the pick, w / W
169
- let estimate = picked * (total / picked_weight);
170
-
171
- var source: vec3<f32>;
172
- var radius: f32;
173
- var near_clip: f32;
174
- var flags: u32;
175
-
176
- if (picked_spot) {
177
- let light = ${SPOT.marshalling_method_read}(&light_data, picked_index);
178
-
179
- source = light.position;
180
- radius = light.radius;
181
- near_clip = light.near_clip_distance;
182
- flags = light.flags;
183
- } else {
184
- let light = ${POINT.marshalling_method_read}(&light_data, picked_index);
185
-
186
- source = light.position.xyz;
187
- radius = light.radius;
188
- near_clip = light.near_clip_distance;
189
- flags = light.flags;
190
- }
191
-
192
- if ((flags & ${LIGHT_FLAGS.CASTS_SHADOW_BIT}u) == 0u) {
193
- return estimate;
194
- }
195
-
196
- // from a voxel off the surface, past the half voxel the field's surface may sit off it, to a point of the
197
- // light, short of it by the light's near clip or by a voxel for the expand at that end
198
- let lifted = position + normal * voxel;
199
- let to_light = source + radius * sphere_sample_volume(random.yzw) - lifted;
200
- let span = length(to_light);
201
- let reach = span - max(near_clip, voxel);
202
-
203
- if (reach <= 0.0) {
204
- return estimate;
205
- }
206
-
207
- let shadow = brick_clipmap_trace(lifted, to_light / span, 0.0, reach, settings.brick_cascade_count, settings.brick_atlas_shift);
208
-
209
- return select(vec3<f32>(0.0), estimate, shadow.kind == BRICK_TRACE_MISS);
210
- }
211
-
212
79
  @compute @workgroup_size(${PROBE_THREAD_WORKGROUP_SIZE})
213
80
  fn main(
214
81
  @builtin(workgroup_id) workgroup_id: vec3<u32>,
@@ -236,7 +103,7 @@ fn main(
236
103
  let random = vec4<f32>(hash_to_float01(hash.x), hash_to_float01(hash.y), hash_to_float01(hash.z), hash_to_float01(hash.w));
237
104
 
238
105
  // E/π of the local lights
239
- let e = probe_clipmap_local_irradiance((record.flags >> PROBE_RAY_CASCADE_SHIFT) & PROBE_RAY_CASCADE_MASK, position, normal, random) * RECIPROCAL_PI;
106
+ let e = probe_clipmap_local_irradiance((record.flags >> PROBE_RAY_CASCADE_SHIFT) & PROBE_RAY_CASCADE_MASK, position, normal, random, settings.brick_cascade_count, settings.brick_atlas_shift) * RECIPROCAL_PI;
240
107
 
241
108
  if (all(e == vec3<f32>(0.0))) {
242
109
  return;
@@ -250,16 +117,9 @@ fn main(
250
117
  chunk_folded_workgroup_index,
251
118
  chunk_uv_octahedral_unit_decode,
252
119
  RECIPROCAL_PI_DECLARATION,
253
- chunk_world_light_cluster_lookup_at,
254
- chunk_light_cluster_counts,
255
- chunk_irradiance_clipmap_local_light,
256
- chunk_rgb_to_luminance,
257
- chunk_brick_clipmap_trace,
120
+ chunk_probe_clipmap_local_irradiance,
258
121
  chunk_pcg4d,
259
122
  chunk_hash_to_float01,
260
- chunk_sphere_sample_volume,
261
- POINT.chunk_read,
262
- SPOT.chunk_read,
263
123
  chunk_rgbe9995_decode,
264
124
  chunk_rgbe9995_encode,
265
125
  ]),
@@ -18,15 +18,10 @@ export const PROBE_TRACE_SETTINGS: WebGPUStruct;
18
18
  * rays of a round and kind are stratified inside it over the updates of that kind it takes them on.
19
19
  * - **Origin**: a point of a small ball around the probe where relocation left it, `probe_origins`, one a
20
20
  * ray (`probe_clipmap_ray_origin`); t_min one voxel of the brick cascade there.
21
- * - **Direct light**: a hit off a front face takes E_dir = Σ colour·max(0, n·l)·visibility over the
22
- * directional lights (§8.7). The visibility is a shadow ray, traced through the brick clipmap as the
23
- * ray itself was, toward each of the first {@link PROBE_SHADOWED_SUNS} lights that cast shadows, in the
24
- * table's order; lights past them are unshadowed at hits. It starts a voxel off the hit along its
25
- * normal, outside the half-voxel expand, and heads for a point of the light's disk drawn as the path
26
- * tracer draws it (`cone_sample_direction`), from the ray's slot and direction, so that the probe's
27
- * blend of its rays integrates the penumbra. The light is seen whole if the ray misses, and not at all
28
- * if it hits or spends its steps: what the march could not answer is no light, not all of it. A
29
- * surface turned from a light traces no ray toward it, since the light gives it nothing.
21
+ * - **Direct light**: a hit off a front face takes E_dir over the directional lights, shadowed by rays
22
+ * traced through the brick clipmap as the ray itself was (`probe_clipmap_sun_irradiance`, §8.7). Each
23
+ * light's point of its disk is drawn from the ray's slot and direction, so that the probe's blend of its
24
+ * rays integrates the penumbra.
30
25
  * - **Back face**: a hit whose field's gradient is along the ray, so it came from inside a solid.
31
26
  *
32
27
  * Writes the ray's `PROBE_RAY_STRUCT`, with E_dir as its light, which shade turns into the ray's
@@ -1 +1 @@
1
- {"version":3,"file":"shader_probe_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js"],"names":[],"mappings":"AAkDA;;GAEG;AACH,mCAFU,YAAY,CAiBG;AAsBzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,yCAFU,aAAa,CAuJpB;6BAzP0B,sCAAsC;8BAHrC,kCAAkC"}
1
+ {"version":3,"file":"shader_probe_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js"],"names":[],"mappings":"AAyCA;;GAEG;AACH,mCAFU,YAAY,CAiBG;AAsBzB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,yCAFU,aAAa,CAoHpB;6BAhN0B,sCAAsC;8BAHrC,kCAAkC"}
@@ -1,9 +1,6 @@
1
1
  import { MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
2
2
  import { LIGHT_DATA_RESOURCE } from "../../../light/LIGHT_DATA_RESOURCE.js";
3
- import { LIGHT_DATABASE_SPEC } from "../../../light/LIGHT_DATABASE_SPEC.js";
4
- import { LIGHT_FLAGS } from "../../../light/model/io/LIGHT_FLAGS.js";
5
3
  import { chunk_rgbe9995_encode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_encode.js";
6
- import { chunk_cone_sample_direction } from "../../../shader/chunk/geometry/cone/chunk_cone_sample_direction.js";
7
4
  import {
8
5
  chunk_uv_octahedral_unit_decode
9
6
  } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
@@ -11,11 +8,6 @@ import {
11
8
  chunk_uv_octahedral_unit_encode
12
9
  } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_encode.js";
13
10
  import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
14
- import {
15
- chunk_directional_lights_iteration_mask
16
- } from "../../../shader/chunk/light/io/chunk_directional_lights_iteration_mask.js";
17
- import { chunk_hash_to_float01 } from "../../../shader/chunk/random/chunk_hash_to_float01.js";
18
- import { chunk_pcg3d } from "../../../shader/chunk/random/pcg/chunk_pcg3d.js";
19
11
  import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
20
12
  import { ComputeShader } from "../../../shader/ComputeShader.js";
21
13
  import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
@@ -44,9 +36,8 @@ import {
44
36
  PROBE_STATES_READ_RESOURCE,
45
37
  PROBE_TRACE_READ_RESOURCE
46
38
  } from "./chunk_probe_clipmap.js";
47
- import { PROBE_SHADOWED_SUNS, PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
48
-
49
- const DIRECTIONAL = LIGHT_DATABASE_SPEC.get('light_directional');
39
+ import { chunk_probe_clipmap_sun_irradiance } from "./chunk_probe_clipmap_hit_light.js";
40
+ import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
50
41
 
51
42
  /**
52
43
  * @type {WebGPUStruct}
@@ -104,15 +95,10 @@ resources.createGroup()
104
95
  * rays of a round and kind are stratified inside it over the updates of that kind it takes them on.
105
96
  * - **Origin**: a point of a small ball around the probe where relocation left it, `probe_origins`, one a
106
97
  * ray (`probe_clipmap_ray_origin`); t_min one voxel of the brick cascade there.
107
- * - **Direct light**: a hit off a front face takes E_dir = Σ colour·max(0, n·l)·visibility over the
108
- * directional lights (§8.7). The visibility is a shadow ray, traced through the brick clipmap as the
109
- * ray itself was, toward each of the first {@link PROBE_SHADOWED_SUNS} lights that cast shadows, in the
110
- * table's order; lights past them are unshadowed at hits. It starts a voxel off the hit along its
111
- * normal, outside the half-voxel expand, and heads for a point of the light's disk drawn as the path
112
- * tracer draws it (`cone_sample_direction`), from the ray's slot and direction, so that the probe's
113
- * blend of its rays integrates the penumbra. The light is seen whole if the ray misses, and not at all
114
- * if it hits or spends its steps: what the march could not answer is no light, not all of it. A
115
- * surface turned from a light traces no ray toward it, since the light gives it nothing.
98
+ * - **Direct light**: a hit off a front face takes E_dir over the directional lights, shadowed by rays
99
+ * traced through the brick clipmap as the ray itself was (`probe_clipmap_sun_irradiance`, §8.7). Each
100
+ * light's point of its disk is drawn from the ray's slot and direction, so that the probe's blend of its
101
+ * rays integrates the penumbra.
116
102
  * - **Back face**: a hit whose field's gradient is along the ray, so it came from inside a solid.
117
103
  *
118
104
  * Writes the ray's `PROBE_RAY_STRUCT`, with E_dir as its light, which shade turns into the ray's
@@ -208,39 +194,8 @@ fn main(
208
194
  var direct = vec3<f32>(0.0);
209
195
 
210
196
  if (is_hit && !back_face) {
211
- let voxel = brick_levels[hit.cascade].cell_size / ${MESH_SDF_BRICK_VOXELS}.0;
212
- let lifted = hit.position + voxel * hit.normal;
213
-
214
- var bits = directional_lights_iteration_mask(&light_data);
215
- var shadowed = 0u;
216
-
217
- while (bits != 0u) {
218
- let index = countTrailingZeros(bits);
219
-
220
- bits &= ~(1u << index);
221
-
222
- let light = ${DIRECTIONAL.marshalling_method_read}(&light_data, index);
223
- let n_dot_l = dot(hit.normal, -light.direction);
224
-
225
- var visible = 1.0;
226
-
227
- if ((light.flags & ${LIGHT_FLAGS.CASTS_SHADOW_BIT}u) != 0u && shadowed < ${PROBE_SHADOWED_SUNS}u) {
228
- // a surface turned from the light takes none of it whatever the shadow, so it traces none;
229
- // the light keeps its place among the shadowed all the same
230
- if (n_dot_l > 0.0) {
231
- // a point of the disk of its own for each light, apart from the origin's draw
232
- let hash = pcg3d(vec3<u32>(slot, packed, 0x3C6EF372u + shadowed));
233
- let toward = cone_sample_direction(-light.direction, light.disk_radius, vec2<f32>(hash_to_float01(hash.x), hash_to_float01(hash.y)));
234
- let shadow = brick_clipmap_trace(lifted, toward, 0.0, settings.t_max, cascade_count, settings.brick_atlas_shift);
235
-
236
- visible = select(0.0, 1.0, shadow.kind == BRICK_TRACE_MISS);
237
- }
238
-
239
- shadowed++;
240
- }
241
-
242
- direct += light.color * max(n_dot_l, 0.0) * visible;
243
- }
197
+ // each light's point of its disk drawn from the ray's slot and direction, apart from the origin's draw
198
+ direct = probe_clipmap_sun_irradiance(hit.position, hit.normal, hit.cascade, vec2<u32>(slot, packed), settings.t_max, cascade_count, settings.brick_atlas_shift);
244
199
  }
245
200
 
246
201
  probe_rays[ray].t = hit.t;
@@ -262,11 +217,7 @@ fn main(
262
217
  chunk_uv_octahedral_unit_decode,
263
218
  chunk_uv_octahedral_unit_encode,
264
219
  chunk_brick_clipmap_trace,
265
- chunk_cone_sample_direction,
266
- chunk_pcg3d,
267
- chunk_hash_to_float01,
268
- chunk_directional_lights_iteration_mask,
220
+ chunk_probe_clipmap_sun_irradiance,
269
221
  chunk_rgbe9995_encode,
270
- DIRECTIONAL.chunk_read,
271
222
  ]),
272
223
  });
@@ -0,0 +1,142 @@
1
+ /**
2
+ * {@link ShadeIndirectLightingMode.ScreenProbes} for one view: Lumen's screen probe gather, over the world the probe
3
+ * clipmap holds (`GPUProbeClipmapGI`): its bricks, which rays traverse, its surface material, which hits read, its
4
+ * world light clusters, and its two sets of world-space probes, which stand in for what lies past a screen probe's reach
5
+ * and give a hit its next bounce.
6
+ *
7
+ * **A frame**, in three passes and a capture:
8
+ * 1. **Place** ({@link graph_update}): a uniform probe in every tile of `downsample_factor` pixels at the frame's
9
+ * jitter, then the adaptive levels, finest last, each placing a probe where the probes so far would not
10
+ * interpolate to a point of its grid; then the commands over the frame's probes.
11
+ * 2. **Trace**, after the world's bricks: each probe's world-space pick, reach and brick origin (and the world probes
12
+ * it wants); its BRDF and lighting densities and its rays, reassigned to where its light is; the screen trace; the
13
+ * bricks' trace, shade, local light and bounce of what the screen left; the hits' wants; the composite into each
14
+ * probe's radiance, the spatial filter's passes, and the probes' SH3.
15
+ * 3. **Resolve** ({@link graph_resolve}), once the bent normals exist: each pixel's irradiance from its probes, then
16
+ * the temporal filter into the frame's diffuse, which the deferred passes read.
17
+ * 4. **Capture** ({@link graph_capture}): the lit colour of the opaque surfaces, for the next frame's screen hits.
18
+ *
19
+ * **Its history**: last frame's probes (their records and filtered radiance, for the lighting density), its diffuse
20
+ * and frames (for the temporal filter) and its colour (for the screen hits) are kept while the structure and the view
21
+ * stay, until {@link reset_history}; any change starts it again. Nothing is allocated on a frame that changes neither: the adaptive probes' slots
22
+ * are made with the rest, as many as the uniform probes (`screen_probe_adaptive_capacity`), and a frame that would
23
+ * place more places no more.
24
+ */
25
+ export class GPUScreenProbeGI {
26
+ /**
27
+ * @param {GPUDevice} device
28
+ */
29
+ constructor(device: GPUDevice);
30
+ /**
31
+ * Drop the history: the next frame takes nothing from the frames before it, as a first frame does. For a cut, or a
32
+ * change of scene or lighting the temporal filters must not blend across (`Renderer#indicate_view_change`).
33
+ */
34
+ reset_history(): void;
35
+ /**
36
+ * @returns {boolean} whether its resources stand: a frame of the mode has run and not been left since
37
+ */
38
+ get built(): boolean;
39
+ /**
40
+ * @returns {number} uniform probes this frame's structure places
41
+ */
42
+ get uniform_count(): number;
43
+ /**
44
+ * @returns {number} adaptive probe slots
45
+ */
46
+ get adaptive_capacity(): number;
47
+ /**
48
+ * Take the frame's placement and traces, after the world's update ({@link GPUProbeClipmapGI#graph_update}) in the
49
+ * same frame: make the resources for the view and the structure the settings describe, unless they already are,
50
+ * and record the place and trace passes. {@link graph_resolve} follows once the bent normals exist.
51
+ *
52
+ * @param {Object} options
53
+ * @param {FrameGraph} options.graph
54
+ * @param {GPUViewContext} options.view
55
+ * @param {ScreenProbeSettings} options.settings
56
+ * @param {GPUProbeClipmapGI} options.world the probe clipmap GI, updated this frame: the bricks, material, light
57
+ * clusters and world-space probes the screen probes trace and read
58
+ * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
59
+ * @param {number} options.depth graph handle of the view's reverse-Z depth
60
+ * @param {number} options.normal graph handle of the G-buffer's shading normals
61
+ * @param {number} options.pbr graph handle of the G-buffer's PBR target, which holds the face normal
62
+ * @param {number} options.velocity graph handle of the frame's motion, internal pixels
63
+ * @param {number} options.occlusion graph handle of the TAA's history confidence (`shader_depth_occlusion_clip`)
64
+ * @param {number} options.hzb graph handle of the view's hierarchical Z buffer, from mip 1
65
+ * @param {number} options.exposure graph handle of the factor the display multiplies radiance by, as the last frame
66
+ * was shown
67
+ */
68
+ graph_update({ graph, view, settings, world, stbn, depth, normal, pbr, velocity, occlusion, hzb, exposure }: {
69
+ graph: FrameGraph;
70
+ view: GPUViewContext;
71
+ settings: ScreenProbeSettings;
72
+ world: GPUProbeClipmapGI;
73
+ stbn: any;
74
+ depth: number;
75
+ normal: number;
76
+ pbr: number;
77
+ velocity: number;
78
+ occlusion: number;
79
+ hzb: number;
80
+ exposure: number;
81
+ }): void;
82
+ /**
83
+ * Take the frame's resolve, once the bent normals exist: each pixel's irradiance from its probes, then the temporal
84
+ * filter into the frame's diffuse.
85
+ *
86
+ * @param {Object} options
87
+ * @param {FrameGraph} options.graph
88
+ * @param {number} options.depth graph handle of the view's reverse-Z depth
89
+ * @param {number} options.depth_previous graph handle of last frame's
90
+ * @param {number} options.pbr graph handle of the G-buffer's PBR target
91
+ * @param {number} options.velocity graph handle of the frame's motion
92
+ * @param {number} options.bent_normals graph handle of the bent normals (the shading normals where GTAO is off)
93
+ * @param {number} options.exposure graph handle of the factor the display multiplies radiance by, as the last frame
94
+ * was shown, the one {@link graph_update} took: what the probes' radiance is pre-exposed by
95
+ * @returns {number} graph handle of the frame's diffuse, `rgba16float`: E at the bent normal, before AO
96
+ */
97
+ graph_resolve({ graph, depth, depth_previous, pbr, velocity, bent_normals, exposure }: {
98
+ graph: FrameGraph;
99
+ depth: number;
100
+ depth_previous: number;
101
+ pbr: number;
102
+ velocity: number;
103
+ bent_normals: number;
104
+ exposure: number;
105
+ }): number;
106
+ /**
107
+ * @returns {number} graph handle of the diffuse this frame's {@link graph_resolve} wrote
108
+ */
109
+ get diffuse_handle(): number;
110
+ /**
111
+ * Put what the debug views read of the frame's probes into `bindings`: the frame uniform, the probes and their
112
+ * tiles' adaptive lists, the integration's output and the rays' hit words, as this frame left them.
113
+ *
114
+ * @param {Object} bindings
115
+ * @returns {Object} bindings
116
+ */
117
+ write_debug_bindings(bindings: any): any;
118
+ /**
119
+ * Keep the frame's lit colour of the opaque surfaces for the next frame's screen hits: once the indirect light is
120
+ * added, before fog and transparencies.
121
+ *
122
+ * @param {Object} options
123
+ * @param {FrameGraph} options.graph
124
+ * @param {number} options.color graph handle of the scene's colour, the view's size
125
+ */
126
+ graph_capture({ graph, color }: {
127
+ graph: FrameGraph;
128
+ color: number;
129
+ }): void;
130
+ /**
131
+ * Give back every resource, as on the first frame out of the mode: the next {@link graph_update} starts again
132
+ * from nothing.
133
+ */
134
+ release(): void;
135
+ destroy(): void;
136
+ #private;
137
+ }
138
+ export type FrameGraph = import("../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
139
+ export type GPUViewContext = import("../../view/GPUViewContext.js").GPUViewContext;
140
+ export type ScreenProbeSettings = import("./ScreenProbeSettings.js").ScreenProbeSettings;
141
+ export type GPUProbeClipmapGI = import("../probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI;
142
+ //# sourceMappingURL=GPUScreenProbeGI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GPUScreenProbeGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAsHI;;OAEG;IACH,+BAIC;IAED;;;OAGG;IACH,sBAEC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,gCAEC;IAiBD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH;QAf+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACe,QAAQ,EAArC,mBAAmB;QACQ,KAAK,EAAhC,iBAAiB;QAEN,IAAI;QACC,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;QACU,SAAS,EAAzB,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;aAoFhB;IAED;;;;;;;;;;;;;;OAcG;IACH;QAV+B,KAAK,EAAzB,UAAU;QACM,KAAK,EAArB,MAAM;QACU,cAAc,EAA9B,MAAM;QACU,GAAG,EAAnB,MAAM;QACU,QAAQ,EAAxB,MAAM;QACU,YAAY,EAA5B,MAAM;QACU,QAAQ,EAAxB,MAAM;QAEJ,MAAM,CAqBlB;IAED;;OAEG;IACH,6BAEC;IAED;;;;;;OAMG;IACH,yCASC;IAED;;;;;;;OAOG;IACH;QAH+B,KAAK,EAAzB,UAAU;QACM,KAAK,EAArB,MAAM;aAWhB;IA6bD;;;OAGG;IACH,gBA+BC;IAED,gBAQC;;CACJ;yBAh3BY,OAAO,8DAA8D,EAAE,UAAU;6BACjF,OAAO,8BAA8B,EAAE,cAAc;kCACrD,OAAO,0BAA0B,EAAE,mBAAmB;gCACtD,OAAO,uCAAuC,EAAE,iBAAiB"}