@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,70 +0,0 @@
1
- import { EndianType } from "../../../../core/binary/EndianType.js";
2
- import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
3
- import { RowFirstTableSpec } from "../../../../core/collection/table/RowFirstTableSpec.js";
4
-
5
- /**
6
- * Per-vertex attribute layout for a {@link TubeX}.
7
- *
8
- * Unlike {@link RibbonX} (which extrudes in screen space and therefore stores
9
- * the neighbouring positions to derive a 2D normal), the tube extrudes in WORLD
10
- * space inside the vertex shader using a per-knot tangent frame. Every vertex of
11
- * a knot's ring shares the same centre/frame/colour/etc and differs only by `off`
12
- * (its angular position around the ring), so the heavy per-frame work is just
13
- * writing the knot centre + frame to the ring's `radial+1` rows.
14
- *
15
- * Layout is floats-first then a float16 colour triple, padded to a 4-byte multiple
16
- * so the interleaved Float32 view (stride = bytesPerRecord >> 2) stays aligned —
17
- * the same trick {@link ribbon_attributes_spec} relies on. The colour is linear and
18
- * not limited to 0..1, so a trail can be brighter than white.
19
- */
20
- export const tube_attributes_spec = new RowFirstTableSpec([
21
- // age (CPU-side bookkeeping for the simulator; NOT a GPU attribute)
22
- BinaryDataType.Float32,
23
-
24
- // position (ring centre, world space)
25
- BinaryDataType.Float32,
26
- BinaryDataType.Float32,
27
- BinaryDataType.Float32,
28
-
29
- // frame normal (ring basis axis 1, world space, unit)
30
- BinaryDataType.Float32,
31
- BinaryDataType.Float32,
32
- BinaryDataType.Float32,
33
-
34
- // frame binormal (ring basis axis 2, world space, unit)
35
- BinaryDataType.Float32,
36
- BinaryDataType.Float32,
37
- BinaryDataType.Float32,
38
-
39
- // off (angular position around the ring, 0..1; STATIC per radial index = uv.x)
40
- BinaryDataType.Float32,
41
-
42
- // uv_v (position along the tube; DYNAMIC = uv.y)
43
- BinaryDataType.Float32,
44
-
45
- // alpha
46
- BinaryDataType.Float32,
47
-
48
- // thickness (tube diameter; radius = thickness * 0.5)
49
- BinaryDataType.Float32,
50
-
51
- // color (linear, unbounded)
52
- BinaryDataType.Float16,
53
- BinaryDataType.Float16,
54
- BinaryDataType.Float16,
55
-
56
- // padding -> bytesPerRecord = 64 (divisible by 4, keeps the Float32 view aligned)
57
- BinaryDataType.Uint16,
58
-
59
- ], EndianType.LittleEndian);
60
-
61
- // Column indices into {@link tube_attributes_spec} for RowFirstTable read/write.
62
- export const TUBE_ATTRIBUTE_ADDRESS_AGE = 0;
63
- export const TUBE_ATTRIBUTE_ADDRESS_POSITION = 1;
64
- export const TUBE_ATTRIBUTE_ADDRESS_NORMAL = 4;
65
- export const TUBE_ATTRIBUTE_ADDRESS_BINORMAL = 7;
66
- export const TUBE_ATTRIBUTE_ADDRESS_OFF = 10;
67
- export const TUBE_ATTRIBUTE_ADDRESS_UV_V = 11;
68
- export const TUBE_ATTRIBUTE_ADDRESS_ALPHA = 12;
69
- export const TUBE_ATTRIBUTE_ADDRESS_THICKNESS = 13;
70
- export const TUBE_ATTRIBUTE_ADDRESS_COLOR = 14;
@@ -1,15 +0,0 @@
1
- /**
2
- * Build the environment the engine lights with when nobody has supplied one.
3
- *
4
- * **Shade assumes global illumination**, and that is a deliberate quality decision rather than a
5
- * limitation: indirect light is on, and a scene with no environment renders unlit. So the default is
6
- * something the engine *provides*. Turning GI off is the thing that takes an explicit choice.
7
- *
8
- * The map is octahedral because that is the projection `scene.lights.environment` is sampled with,
9
- * and half-float because that is what the octahedral path is built for.
10
- *
11
- * @returns {ShadeTexture}
12
- */
13
- export function make_default_environment(): ShadeTexture;
14
- import { ShadeTexture } from "../../shade/renderer/texture/ShadeTexture.js";
15
- //# sourceMappingURL=make_default_environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"make_default_environment.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/make_default_environment.js"],"names":[],"mappings":"AA4DA;;;;;;;;;;;GAWG;AACH,4CAFa,YAAY,CAwCxB;6BAvG4B,8CAA8C"}
@@ -1,111 +0,0 @@
1
- import Vector3 from "../../core/geom/Vector3.js";
2
- import { Sampler2D } from "../graphics/texture/sampler/Sampler2D.js";
3
- import { sampler2d_to_f16 } from "../graphics/texture/sampler/sampler2d_to_f16.js";
4
- import { octahedral_z_pole_uv_to_direction } from "../../shade/renderer/light/environment/octahedral_z_pole_uv_to_direction.js";
5
- import { sampler2d_octahedral_skirt_fill } from "../../shade/renderer/light/environment/sampler2d_octahedral_skirt_fill.js";
6
- import { ColorSpace } from "../../shade/renderer/texture/ColorSpace.js";
7
- import { ShadeImage } from "../../shade/renderer/texture/source/ShadeImage.js";
8
- import { ShadeTexture } from "../../shade/renderer/texture/ShadeTexture.js";
9
-
10
- /**
11
- * Side of the generated map, its one-texel octahedral skirt included.
12
- *
13
- * Small on purpose. This is an *ambient* source — it is convolved into irradiance and a handful of
14
- * roughness mips before anything samples it, so detail here buys nothing. What it has to be is
15
- * smooth and correctly oriented.
16
- *
17
- * @type {number}
18
- */
19
- const RESOLUTION = 128;
20
-
21
- /**
22
- * @type {Vector3}
23
- */
24
- const SCRATCH_DIRECTION = new Vector3();
25
-
26
- /**
27
- * Radiance arriving from a direction, in linear space.
28
- *
29
- * A plausible outdoor sky, not a simulation: sky above, ground below, and a brighter band where they
30
- * meet. The engine has a full atmosphere model available and this deliberately does not use it —
31
- * what is wanted is a sane default, and an atmospheric solve is a much larger thing to own.
32
- *
33
- * @param {number[]} out rgb
34
- * @param {number} x direction
35
- * @param {number} y direction, +Y is up
36
- * @param {number} z direction
37
- */
38
- function sky_radiance(out, x, y, z) {
39
- if (y >= 0) {
40
- // Zenith to horizon. The falloff is steep near the top and flattens toward the horizon,
41
- // which is what makes a gradient read as sky rather than as a ramp.
42
- const t = Math.pow(1 - y, 3);
43
-
44
- out[0] = 0.18 + t * 0.62;
45
- out[1] = 0.32 + t * 0.60;
46
- out[2] = 0.62 + t * 0.34;
47
-
48
- return;
49
- }
50
-
51
- // Below the horizon: diffuse bounce off the ground, dimmer and warmer than the sky, fading as it
52
- // points further down. Getting this wrong is what makes objects look like they are floating —
53
- // the underside of everything is lit by it.
54
- const t = Math.pow(1 + y, 2);
55
-
56
- out[0] = 0.10 + t * 0.28;
57
- out[1] = 0.09 + t * 0.25;
58
- out[2] = 0.08 + t * 0.20;
59
- }
60
-
61
- /**
62
- * Build the environment the engine lights with when nobody has supplied one.
63
- *
64
- * **Shade assumes global illumination**, and that is a deliberate quality decision rather than a
65
- * limitation: indirect light is on, and a scene with no environment renders unlit. So the default is
66
- * something the engine *provides*. Turning GI off is the thing that takes an explicit choice.
67
- *
68
- * The map is octahedral because that is the projection `scene.lights.environment` is sampled with,
69
- * and half-float because that is what the octahedral path is built for.
70
- *
71
- * @returns {ShadeTexture}
72
- */
73
- export function make_default_environment() {
74
- const sampler = Sampler2D.float32(4, RESOLUTION, RESOLUTION);
75
-
76
- const data = sampler.data;
77
- const rgb = [0, 0, 0];
78
-
79
- // the octahedral square inside the one-texel skirt an environment map carries
80
- const interior = RESOLUTION - 2;
81
-
82
- for (let v = 1; v <= interior; v++) {
83
- for (let u = 1; u <= interior; u++) {
84
- // texel centres, so the mapping is symmetric across the octahedron's folds
85
- octahedral_z_pole_uv_to_direction(
86
- SCRATCH_DIRECTION,
87
- (u - 0.5) / interior,
88
- (v - 0.5) / interior
89
- );
90
-
91
- sky_radiance(rgb, SCRATCH_DIRECTION.x, SCRATCH_DIRECTION.y, SCRATCH_DIRECTION.z);
92
-
93
- const offset = (v * RESOLUTION + u) * 4;
94
-
95
- data[offset] = rgb[0];
96
- data[offset + 1] = rgb[1];
97
- data[offset + 2] = rgb[2];
98
- data[offset + 3] = 1;
99
- }
100
- }
101
-
102
- sampler2d_octahedral_skirt_fill(sampler);
103
-
104
- const image = ShadeImage.fromSampler2D(sampler2d_to_f16(sampler));
105
-
106
- // radiance, not colour: the values above are light arriving, and treating them as sRGB would
107
- // put a transfer curve through numbers that never had one
108
- image.color_space = ColorSpace.LinearSRGB;
109
-
110
- return ShadeTexture.from(image);
111
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Extrude a {@link TubeX}'s knots into the geometry a {@link DynamicMesh} is already holding.
3
- *
4
- * **The ring is built here rather than in a shader, and that is what the path costs.** The legacy
5
- * renderer draws a tube through a material of its own, so its vertex stage can hold the knot's
6
- * frame and expand a ring from it; the dynamic path has one pipeline and one vertex layout —
7
- * position and colour (D11) — so the same expansion happens on the CPU, once per knot ring per
8
- * frame the trail moves. Widening the layout to carry a frame would mean a second pipeline for
9
- * every dynamic mesh in the engine, which is the trade D5/D11 already refused.
10
- *
11
- * The arithmetic is `TubeMaterialX`'s, exactly: a ring vertex sits at its knot's centre displaced
12
- * by `cos(angle) * normal + sin(angle) * binormal`, half a thickness out, at `angle = off * 2π`.
13
- *
14
- * **Written into rather than replaced.** GPU residency on the dynamic path is keyed on the geometry
15
- * and survives leaving the batch, so a trail that produced a fresh geometry each frame would strand
16
- * a vertex buffer per frame.
17
- *
18
- * Colour rides the vertices because that is what fades a trail along its length: the knot's own
19
- * half-float colour as is, unclamped so HDR survives, with its alpha — the simulator's age fade, already scaled by the trail's
20
- * base opacity — as the fourth channel. A knot that has aged out is written transparent rather than
21
- * dropped, which is what the index buffer expects, and blending takes it out of the picture.
22
- *
23
- * **A knot's alpha is the opacity of the tube as seen, not of one face of it.** The tube is a closed
24
- * hull drawn from both sides, so a line of sight through it crosses two faces, and the transparency
25
- * pipeline composes their transmittances: written as is, an alpha of 0.5 would cover 0.75, and a
26
- * linear fade would hold near solid for most of the trail's life and collapse at its tail. Each face
27
- * therefore takes half the optical depth, `1 - √(1 - α)`, and the two together cover exactly `α`.
28
- * This is the one place that knows the hull is crossed twice, so it is the one place that splits it;
29
- * a ray through a bend crosses the tube twice over, and that overlap is real and reads denser. The
30
- * alpha is clamped to `0..1` first, the range an opacity has — an authored fade curve may overshoot
31
- * it, and the square root has no answer above one.
32
- *
33
- * @param {Geometry} geometry
34
- * @param {TubeX} tube
35
- * @returns {void}
36
- */
37
- export function trail_tube_write_geometry(geometry: Geometry, tube: TubeX): void;
38
- //# sourceMappingURL=trail_tube_write_geometry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trail_tube_write_geometry.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics3/trail/trail_tube_write_geometry.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,4EAFa,IAAI,CAiEhB"}
@@ -1,119 +0,0 @@
1
- import { assert } from "../../../core/assert.js";
2
- import { clamp01 } from "../../../core/math/clamp01.js";
3
- import {
4
- geometry_obtain_attribute,
5
- geometry_obtain_index
6
- } from "../../../shade/renderer/geometry/geometry_obtain_attribute.js";
7
- import { StandardAttributes } from "../../../shade/renderer/geometry/StandardAttributes.js";
8
- import {
9
- TUBE_ATTRIBUTE_ADDRESS_ALPHA,
10
- TUBE_ATTRIBUTE_ADDRESS_BINORMAL,
11
- TUBE_ATTRIBUTE_ADDRESS_COLOR,
12
- TUBE_ATTRIBUTE_ADDRESS_NORMAL,
13
- TUBE_ATTRIBUTE_ADDRESS_OFF,
14
- TUBE_ATTRIBUTE_ADDRESS_POSITION,
15
- TUBE_ATTRIBUTE_ADDRESS_THICKNESS
16
- } from "../../graphics/trail/tube/tube_attributes_spec.js";
17
-
18
- const TWO_PI = Math.PI * 2;
19
-
20
- /**
21
- * Extrude a {@link TubeX}'s knots into the geometry a {@link DynamicMesh} is already holding.
22
- *
23
- * **The ring is built here rather than in a shader, and that is what the path costs.** The legacy
24
- * renderer draws a tube through a material of its own, so its vertex stage can hold the knot's
25
- * frame and expand a ring from it; the dynamic path has one pipeline and one vertex layout —
26
- * position and colour (D11) — so the same expansion happens on the CPU, once per knot ring per
27
- * frame the trail moves. Widening the layout to carry a frame would mean a second pipeline for
28
- * every dynamic mesh in the engine, which is the trade D5/D11 already refused.
29
- *
30
- * The arithmetic is `TubeMaterialX`'s, exactly: a ring vertex sits at its knot's centre displaced
31
- * by `cos(angle) * normal + sin(angle) * binormal`, half a thickness out, at `angle = off * 2π`.
32
- *
33
- * **Written into rather than replaced.** GPU residency on the dynamic path is keyed on the geometry
34
- * and survives leaving the batch, so a trail that produced a fresh geometry each frame would strand
35
- * a vertex buffer per frame.
36
- *
37
- * Colour rides the vertices because that is what fades a trail along its length: the knot's own
38
- * half-float colour as is, unclamped so HDR survives, with its alpha — the simulator's age fade, already scaled by the trail's
39
- * base opacity — as the fourth channel. A knot that has aged out is written transparent rather than
40
- * dropped, which is what the index buffer expects, and blending takes it out of the picture.
41
- *
42
- * **A knot's alpha is the opacity of the tube as seen, not of one face of it.** The tube is a closed
43
- * hull drawn from both sides, so a line of sight through it crosses two faces, and the transparency
44
- * pipeline composes their transmittances: written as is, an alpha of 0.5 would cover 0.75, and a
45
- * linear fade would hold near solid for most of the trail's life and collapse at its tail. Each face
46
- * therefore takes half the optical depth, `1 - √(1 - α)`, and the two together cover exactly `α`.
47
- * This is the one place that knows the hull is crossed twice, so it is the one place that splits it;
48
- * a ray through a bend crosses the tube twice over, and that overlap is real and reads denser. The
49
- * alpha is clamped to `0..1` first, the range an opacity has — an authored fade curve may overshoot
50
- * it, and the square root has no answer above one.
51
- *
52
- * @param {Geometry} geometry
53
- * @param {TubeX} tube
54
- * @returns {void}
55
- */
56
- export function trail_tube_write_geometry(geometry, tube) {
57
- assert.defined(geometry, 'geometry');
58
- assert.defined(tube, 'tube');
59
-
60
- const vertex_count = tube.vertex_count;
61
-
62
- const positions = geometry_obtain_attribute(geometry, StandardAttributes.Position, 3, vertex_count);
63
- const colors = geometry_obtain_attribute(geometry, StandardAttributes.Color, 4, vertex_count);
64
-
65
- const table = tube.table;
66
-
67
- // Views over the knot rows, not a copy of them. Every attribute up to the colour is a float, so
68
- // a column index is also its offset in the float view; the colour is three half floats at the
69
- // column that follows them.
70
- const floats = new Float32Array(table.data);
71
- const halves = new Float16Array(table.data);
72
-
73
- const float_stride = tube.bytes_per_vertex >> 2;
74
- const half_stride = tube.bytes_per_vertex >> 1;
75
-
76
- const color_offset = TUBE_ATTRIBUTE_ADDRESS_COLOR * 2;
77
-
78
- for (let i = 0; i < vertex_count; i++) {
79
- const f = i * float_stride;
80
-
81
- const angle = floats[f + TUBE_ATTRIBUTE_ADDRESS_OFF] * TWO_PI;
82
-
83
- const c = Math.cos(angle);
84
- const s = Math.sin(angle);
85
-
86
- const radius = floats[f + TUBE_ATTRIBUTE_ADDRESS_THICKNESS] * 0.5;
87
-
88
- const nx = floats[f + TUBE_ATTRIBUTE_ADDRESS_NORMAL];
89
- const ny = floats[f + TUBE_ATTRIBUTE_ADDRESS_NORMAL + 1];
90
- const nz = floats[f + TUBE_ATTRIBUTE_ADDRESS_NORMAL + 2];
91
-
92
- const bx = floats[f + TUBE_ATTRIBUTE_ADDRESS_BINORMAL];
93
- const by = floats[f + TUBE_ATTRIBUTE_ADDRESS_BINORMAL + 1];
94
- const bz = floats[f + TUBE_ATTRIBUTE_ADDRESS_BINORMAL + 2];
95
-
96
- const p = i * 3;
97
-
98
- positions[p] = floats[f + TUBE_ATTRIBUTE_ADDRESS_POSITION] + (c * nx + s * bx) * radius;
99
- positions[p + 1] = floats[f + TUBE_ATTRIBUTE_ADDRESS_POSITION + 1] + (c * ny + s * by) * radius;
100
- positions[p + 2] = floats[f + TUBE_ATTRIBUTE_ADDRESS_POSITION + 2] + (c * nz + s * bz) * radius;
101
-
102
- const h = i * half_stride + color_offset;
103
- const o = i * 4;
104
-
105
- colors[o] = halves[h];
106
- colors[o + 1] = halves[h + 1];
107
- colors[o + 2] = halves[h + 2];
108
- // half the optical depth: the face behind this one carries the other half
109
- colors[o + 3] = 1 - Math.sqrt(1 - clamp01(floats[f + TUBE_ATTRIBUTE_ADDRESS_ALPHA]));
110
- }
111
-
112
- const source_indices = tube.indices;
113
-
114
- const indices = geometry_obtain_index(geometry, source_indices.length);
115
-
116
- indices.set(source_indices);
117
-
118
- geometry.needsUpdate = true;
119
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Mie G factor
3
- * @type {number}
4
- */
5
- export const MIE_G: number;
6
- //# sourceMappingURL=MIE_G.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MIE_G.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/atmosphere/MIE_G.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAFU,MAAM,CAES"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Mie G factor
3
- * @type {number}
4
- */
5
- export const MIE_G = 0.8;
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_sample_environment_color.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/atmosphere/chunk_sample_environment_color.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,6CAFU,SAAS,CAcjB;0BArBwB,iCAAiC"}
@@ -1,4 +0,0 @@
1
- export namespace ATMOSPHERE_EARTH {
2
- let MieAbsorption: number[];
3
- }
4
- //# sourceMappingURL=ATMOSPHERE_EARTH.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ATMOSPHERE_EARTH.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js"],"names":[],"mappings":""}
@@ -1,44 +0,0 @@
1
- import { compute_mie_absorption } from "../compute_mie_absorption.js";
2
-
3
- /**
4
- * info.absorption_density.layers[0] = { 25.0f, 0.0f, 0.0f, 1.0f / 15.0f, -2.0f / 3.0f };
5
- * info.absorption_density.layers[1] = { 0.0f, 0.0f, 0.0f, -1.0f / 15.0f, 8.0f / 3.0f };
6
- * info.absorption_extinction = { 0.000650f, 0.001881f, 0.000085f }; // 1/km
7
- */
8
-
9
- /**
10
- * Earth-like atmospheric parametrization
11
- *
12
- * NOTE: all values are in Km (not m)
13
- * @see "A Scalable and Production Ready Sky and Atmosphere Rendering Technique", Hillaire (2020)
14
- */
15
- export const ATMOSPHERE_EARTH = {
16
- BottomRadius: 6378,
17
-
18
- // 100km atmosphere radius, less edge visible and it contains 99.99% of the atmosphere medium https://en.wikipedia.org/wiki/K%C3%A1rm%C3%A1n_line
19
- TopRadius: 6378 + 100,
20
-
21
-
22
- RayleighDensityExpScale: -1 / 8,
23
- RayleighScattering: [0.005802, 0.013558, 0.033100], // 1/km
24
-
25
- MieDensityExpScale: -1 / 1.2,
26
- MieScattering: [0.003996, 0.003996, 0.003996], // 1/km
27
- MieExtinction: [0.004440, 0.004440, 0.004440], // 1/km
28
-
29
- MiePhaseG: 0.8,
30
-
31
- // Ozone
32
- AbsorptionDensity0LayerWidth: 25.0,
33
- AbsorptionDensity0ConstantTerm: -2.0 / 3.0,
34
- AbsorptionDensity0LinearTerm: 1.0 / 15.0,
35
-
36
- AbsorptionDensity1ConstantTerm: 8.0 / 3.0,
37
- AbsorptionDensity1LinearTerm: -1.0 / 15.0,
38
-
39
- AbsorptionExtinction: [0.000650, 0.001881, 0.000085], // 1/km
40
-
41
- GroundAlbedo: [0.0, 0.0, 0.0]
42
- };
43
-
44
- ATMOSPHERE_EARTH.MieAbsorption = compute_mie_absorption(ATMOSPHERE_EARTH.MieScattering, ATMOSPHERE_EARTH.MieExtinction);
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ATMOSPHERE_PARAMETERS_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js"],"names":[],"mappings":""}
@@ -1,43 +0,0 @@
1
- import { f32, vec3f } from "../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
2
- import { WebGPUStruct } from "../../shader/type/WebGPUStruct.js";
3
-
4
- /**
5
- * Atmosphere parameters uniform struct ("A Scalable and Production Ready Sky and Atmosphere Rendering Technique", Hillaire 2020).
6
- * @type {WebGPUStruct}
7
- */
8
- const ATMOSPHERE_PARAMETERS_STRUCT = WebGPUStruct.from({
9
-
10
- // Radius of the planet (center to ground)
11
- BottomRadius: f32,
12
- // Maximum considered atmosphere height (center to atmosphere top)
13
- TopRadius: f32,
14
-
15
- // Rayleigh scattering exponential distribution scale in the atmosphere
16
- RayleighDensityExpScale: f32,
17
- // Rayleigh scattering coefficients
18
- RayleighScattering: vec3f,
19
-
20
- // Mie scattering exponential distribution scale in the atmosphere
21
- MieDensityExpScale: f32,
22
- // Mie scattering coefficients
23
- MieScattering: vec3f,
24
- // Mie extinction coefficients
25
- MieExtinction: vec3f,
26
- // Mie absorption coefficients
27
- MieAbsorption: vec3f,
28
- // Mie phase function excentricity
29
- MiePhaseG: f32,
30
-
31
- // Another medium type in the atmosphere
32
- AbsorptionDensity0LayerWidth: "f32",
33
- AbsorptionDensity0ConstantTerm: "f32",
34
- AbsorptionDensity0LinearTerm: "f32",
35
- AbsorptionDensity1ConstantTerm: "f32",
36
- AbsorptionDensity1LinearTerm: "f32",
37
- // This other medium only absorb light, e.g. useful to represent ozone in the earth atmosphere
38
- AbsorptionExtinction: "vec3<f32>",
39
-
40
- // The albedo of the ground.
41
- GroundAlbedo: "vec3<f32>"
42
-
43
- })
@@ -1,3 +0,0 @@
1
- export const ATMOSPHERE_DENSITY_DECLARATION: CodeChunk;
2
- import { CodeChunk } from "../../compiler/CodeChunk.js";
3
- //# sourceMappingURL=ATMOSPHERE_DENSITY_DECLARATION.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ATMOSPHERE_DENSITY_DECLARATION.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.js"],"names":[],"mappings":"AAEA,uDAGE;0BALwB,6BAA6B"}
@@ -1,6 +0,0 @@
1
- import { CodeChunk } from "../../compiler/CodeChunk.js";
2
-
3
- export const ATMOSPHERE_DENSITY_DECLARATION = CodeChunk.from(
4
- //language=WGSL
5
- "const ATMOSPHERE_DENSITY = 1;"
6
- );
@@ -1,3 +0,0 @@
1
- export const chunk_absorb: CodeChunk;
2
- import { CodeChunk } from "../../compiler/CodeChunk.js";
3
- //# sourceMappingURL=chunk_absorb.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_absorb.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.js"],"names":[],"mappings":"AAIA,qCAaC;0BAjByB,6BAA6B"}
@@ -1,18 +0,0 @@
1
- import { CodeChunk } from "../../compiler/CodeChunk.js";
2
- import { ATMOSPHERE_DENSITY_DECLARATION } from "./ATMOSPHERE_DENSITY_DECLARATION.js";
3
- import { chunk_compute_extinction } from "./chunk_compute_extinction.js";
4
- // Calculate a luminance transmittance value from optical depth.
5
- export const chunk_absorb = CodeChunk.from(
6
- //language=WGSL
7
- `
8
- fn absorb ( optical_depth:vec3<f32> ) -> vec3<f32>
9
- {
10
- let extinction = compute_extinction(optical_depth);
11
-
12
- return exp(- extinction * ATMOSPHERE_DENSITY);
13
- }
14
- `, [
15
- ATMOSPHERE_DENSITY_DECLARATION,
16
- chunk_compute_extinction,
17
- ]
18
- )
@@ -1,14 +0,0 @@
1
- /**
2
- * Optical depth is a unitless measurement of the amount of absorption of a participating medium (such as the atmosphere).
3
- * This function calculates just that for our three atmospheric elements:
4
- * R: Rayleigh
5
- * G: Mie
6
- * B: Ozone
7
- * If you find the term "optical depth" confusing, you can think of it as "how much density was found along the ray in total".
8
- *
9
- * @see https://github.com/blender/blender/blob/7675b5a0b4edc4480818abb626b38f799f15acf8/intern/sky/source/sky_nishita.cpp#L177
10
- * @see https://github.com/Fewes/MinimalAtmosphere
11
- */
12
- export const chunk_integrate_optical_depth: CodeChunk;
13
- import { CodeChunk } from "../../compiler/CodeChunk.js";
14
- //# sourceMappingURL=chunk_integrate_optical_depth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_integrate_optical_depth.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.js"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,sDAqEM;0BArFoB,6BAA6B"}
@@ -1,86 +0,0 @@
1
- import { CodeChunk } from "../../compiler/CodeChunk.js";
2
- import { chunk_atmosphere_density } from "./chunk_atmosphere_density.js";
3
- import { chunk_atmosphere_height } from "./chunk_atmosphere_height.js";
4
- import { chunk_atmosphere_intersection } from "./chunk_atmosphere_intersection.js";
5
-
6
- /**
7
- * Optical depth is a unitless measurement of the amount of absorption of a participating medium (such as the atmosphere).
8
- * This function calculates just that for our three atmospheric elements:
9
- * R: Rayleigh
10
- * G: Mie
11
- * B: Ozone
12
- * If you find the term "optical depth" confusing, you can think of it as "how much density was found along the ray in total".
13
- *
14
- * @see https://github.com/blender/blender/blob/7675b5a0b4edc4480818abb626b38f799f15acf8/intern/sky/source/sky_nishita.cpp#L177
15
- * @see https://github.com/Fewes/MinimalAtmosphere
16
- */
17
- export const chunk_integrate_optical_depth = CodeChunk.from(
18
- //language=WGSL
19
- `
20
- fn integrate_optical_depth (
21
- ray_origin:vec3<f32>,
22
- ray_direction:vec3<f32>,
23
- ) -> vec3<f32> {
24
-
25
- /* Parameters for optical depth quadrature.
26
- * See the comment in ray_optical_depth for more detail.
27
- * Computed using sympy and following Python code:
28
- * # from sympy.integrals.quadrature import gauss_laguerre
29
- * # from sympy import exp
30
- * # x, w = gauss_laguerre(8, 50)
31
- * # xend = 25
32
- * # print([(xi / xend).evalf(10) for xi in x])
33
- * # print([(wi * exp(xi) / xend).evalf(10) for xi, wi in zip(x, w)])
34
- */
35
- const quadrature_steps = 8;
36
-
37
- const quadrature_nodes = array<f32,8>(
38
- 0.006811185292f,
39
- 0.03614807107f,
40
- 0.09004346519f,
41
- 0.1706680068f,
42
- 0.2818362161f,
43
- 0.4303406404f,
44
- 0.6296271457f,
45
- 0.9145252695f
46
- );
47
-
48
- const quadrature_weights = array<f32,8>(
49
- 0.01750893642f,
50
- 0.04135477391f,
51
- 0.06678839063f,
52
- 0.09507698807f,
53
- 0.1283416365f,
54
- 0.1707430204f,
55
- 0.2327233347f,
56
- 0.3562490486f
57
- );
58
-
59
- let intersection = atmosphere_intersection(ray_origin, ray_direction);
60
- let ray_length = intersection.y;
61
-
62
- let segment = ray_length * ray_direction;
63
-
64
- var optical_depth = vec3(0.0);
65
-
66
- for (var i = 0; i < quadrature_steps; i++) {
67
-
68
- let local_position = ray_origin + quadrature_nodes[i] * segment;
69
-
70
- // height above the sea level
71
- let local_height = atmosphere_height(local_position);
72
-
73
- let local_density = atmosphere_density(local_height);
74
-
75
- optical_depth += local_density * quadrature_weights[i];
76
-
77
- }
78
-
79
- return optical_depth * ray_length;
80
- }
81
-
82
- `, [
83
- chunk_atmosphere_intersection,
84
- chunk_atmosphere_height,
85
- chunk_atmosphere_density,
86
- ])
@@ -1,8 +0,0 @@
1
- /**
2
- * Integrate scattering over a ray for a single directional light source.
3
- * Also return the transmittance for the same ray as we are already calculating the optical depth anyway.
4
- * Ported from https://github.com/Fewes/MinimalAtmosphere
5
- */
6
- export const chunk_integrate_scattering: CodeChunk;
7
- import { CodeChunk } from "../../compiler/CodeChunk.js";
8
- //# sourceMappingURL=chunk_integrate_scattering.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_integrate_scattering.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.js"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,mDAyGO;0BA3HmB,6BAA6B"}