@geoblocks/cesium-post-process 0.4.0 → 0.5.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 (502) hide show
  1. package/dist/analog-video.d.ts +71 -0
  2. package/dist/analog-video.d.ts.map +1 -0
  3. package/dist/analog-video.js +128 -0
  4. package/dist/analog-video.js.map +1 -0
  5. package/dist/blur.d.ts +13 -0
  6. package/dist/blur.d.ts.map +1 -0
  7. package/dist/blur.js +36 -0
  8. package/dist/blur.js.map +1 -0
  9. package/dist/cesium-post-process.d.ts +30 -0
  10. package/dist/cesium-post-process.d.ts.map +1 -0
  11. package/dist/cesium-post-process.js +31 -0
  12. package/dist/cesium-post-process.js.map +1 -0
  13. package/dist/cloud-cover.d.ts +28 -0
  14. package/dist/cloud-cover.d.ts.map +1 -0
  15. package/dist/cloud-cover.js +45 -0
  16. package/dist/cloud-cover.js.map +1 -0
  17. package/dist/cloud-map.d.ts +7 -0
  18. package/dist/cloud-map.d.ts.map +1 -0
  19. package/dist/cloud-map.js +118 -0
  20. package/dist/cloud-map.js.map +1 -0
  21. package/dist/cloud-noise.d.ts +13 -0
  22. package/dist/cloud-noise.d.ts.map +1 -0
  23. package/dist/cloud-noise.js +222 -0
  24. package/dist/cloud-noise.js.map +1 -0
  25. package/dist/clouds.d.ts +275 -0
  26. package/dist/clouds.d.ts.map +1 -0
  27. package/dist/clouds.js +642 -0
  28. package/dist/clouds.js.map +1 -0
  29. package/dist/color-isolation.d.ts +38 -0
  30. package/dist/color-isolation.d.ts.map +1 -0
  31. package/dist/color-isolation.js +61 -0
  32. package/dist/color-isolation.js.map +1 -0
  33. package/dist/depth-test.d.ts +9 -0
  34. package/dist/depth-test.d.ts.map +1 -0
  35. package/dist/depth-test.js +35 -0
  36. package/dist/depth-test.js.map +1 -0
  37. package/dist/digital-video.d.ts +47 -0
  38. package/dist/digital-video.d.ts.map +1 -0
  39. package/dist/digital-video.js +102 -0
  40. package/dist/digital-video.js.map +1 -0
  41. package/dist/drone-display.d.ts +70 -0
  42. package/dist/drone-display.d.ts.map +1 -0
  43. package/dist/drone-display.js +158 -0
  44. package/dist/drone-display.js.map +1 -0
  45. package/dist/dufour.d.ts +108 -0
  46. package/dist/dufour.d.ts.map +1 -0
  47. package/dist/dufour.js +201 -0
  48. package/dist/dufour.js.map +1 -0
  49. package/dist/effect.d.ts +33 -0
  50. package/dist/effect.d.ts.map +1 -0
  51. package/dist/effect.js +60 -0
  52. package/dist/effect.js.map +1 -0
  53. package/dist/focus.d.ts +11 -0
  54. package/dist/focus.d.ts.map +1 -0
  55. package/dist/focus.js +23 -0
  56. package/dist/focus.js.map +1 -0
  57. package/dist/frame-clock.d.ts +11 -0
  58. package/dist/frame-clock.d.ts.map +1 -0
  59. package/dist/frame-clock.js +57 -0
  60. package/dist/frame-clock.js.map +1 -0
  61. package/dist/height.d.ts +12 -0
  62. package/dist/height.d.ts.map +1 -0
  63. package/dist/height.js +22 -0
  64. package/dist/height.js.map +1 -0
  65. package/dist/infrared.d.ts +23 -0
  66. package/dist/infrared.d.ts.map +1 -0
  67. package/dist/infrared.js +36 -0
  68. package/dist/infrared.js.map +1 -0
  69. package/dist/jello.d.ts +52 -0
  70. package/dist/jello.d.ts.map +1 -0
  71. package/dist/jello.js +136 -0
  72. package/dist/jello.js.map +1 -0
  73. package/dist/lens-distortion.d.ts +33 -0
  74. package/dist/lens-distortion.d.ts.map +1 -0
  75. package/dist/lens-distortion.js +61 -0
  76. package/dist/lens-distortion.js.map +1 -0
  77. package/dist/lightning.d.ts +124 -0
  78. package/dist/lightning.d.ts.map +1 -0
  79. package/dist/lightning.js +301 -0
  80. package/dist/lightning.js.map +1 -0
  81. package/dist/local-frame.d.ts +38 -0
  82. package/dist/local-frame.d.ts.map +1 -0
  83. package/dist/local-frame.js +52 -0
  84. package/dist/local-frame.js.map +1 -0
  85. package/dist/motion-blur.d.ts +50 -0
  86. package/dist/motion-blur.d.ts.map +1 -0
  87. package/dist/motion-blur.js +108 -0
  88. package/dist/motion-blur.js.map +1 -0
  89. package/dist/precipitation.d.ts +146 -0
  90. package/dist/precipitation.d.ts.map +1 -0
  91. package/dist/precipitation.js +454 -0
  92. package/dist/precipitation.js.map +1 -0
  93. package/dist/rain-rings.d.ts +100 -0
  94. package/dist/rain-rings.d.ts.map +1 -0
  95. package/dist/rain-rings.js +181 -0
  96. package/dist/rain-rings.js.map +1 -0
  97. package/dist/shaders/Alpenglow.d.ts +3 -0
  98. package/dist/shaders/Alpenglow.d.ts.map +1 -0
  99. package/dist/shaders/Alpenglow.js +3 -0
  100. package/dist/shaders/Alpenglow.js.map +1 -0
  101. package/dist/shaders/AnalogVideo.d.ts +3 -0
  102. package/dist/shaders/AnalogVideo.d.ts.map +1 -0
  103. package/dist/shaders/AnalogVideo.js +3 -0
  104. package/dist/shaders/AnalogVideo.js.map +1 -0
  105. package/dist/shaders/Beam.d.ts +3 -0
  106. package/dist/shaders/Beam.d.ts.map +1 -0
  107. package/dist/shaders/Beam.js +3 -0
  108. package/dist/shaders/Beam.js.map +1 -0
  109. package/dist/shaders/CloudsBlur.d.ts +3 -0
  110. package/dist/shaders/CloudsBlur.d.ts.map +1 -0
  111. package/dist/shaders/CloudsBlur.js +3 -0
  112. package/dist/shaders/CloudsBlur.js.map +1 -0
  113. package/dist/shaders/CloudsComposite.d.ts +3 -0
  114. package/dist/shaders/CloudsComposite.d.ts.map +1 -0
  115. package/dist/shaders/CloudsComposite.js +3 -0
  116. package/dist/shaders/CloudsComposite.js.map +1 -0
  117. package/dist/shaders/CloudsDensity.d.ts +3 -0
  118. package/dist/shaders/CloudsDensity.d.ts.map +1 -0
  119. package/dist/shaders/CloudsDensity.js +3 -0
  120. package/dist/shaders/CloudsDensity.js.map +1 -0
  121. package/dist/shaders/CloudsDepth.d.ts +3 -0
  122. package/dist/shaders/CloudsDepth.d.ts.map +1 -0
  123. package/dist/shaders/CloudsDepth.js +3 -0
  124. package/dist/shaders/CloudsDepth.js.map +1 -0
  125. package/dist/shaders/CloudsMarch.d.ts +3 -0
  126. package/dist/shaders/CloudsMarch.d.ts.map +1 -0
  127. package/dist/shaders/CloudsMarch.js +3 -0
  128. package/dist/shaders/CloudsMarch.js.map +1 -0
  129. package/dist/shaders/CloudsResolve.d.ts +3 -0
  130. package/dist/shaders/CloudsResolve.d.ts.map +1 -0
  131. package/dist/shaders/CloudsResolve.js +3 -0
  132. package/dist/shaders/CloudsResolve.js.map +1 -0
  133. package/dist/shaders/CloudsShadow.d.ts +3 -0
  134. package/dist/shaders/CloudsShadow.d.ts.map +1 -0
  135. package/dist/shaders/CloudsShadow.js +3 -0
  136. package/dist/shaders/CloudsShadow.js.map +1 -0
  137. package/dist/shaders/CloudsShadowMap.d.ts +3 -0
  138. package/dist/shaders/CloudsShadowMap.d.ts.map +1 -0
  139. package/dist/shaders/CloudsShadowMap.js +3 -0
  140. package/dist/shaders/CloudsShadowMap.js.map +1 -0
  141. package/dist/shaders/CloudsSlab.d.ts +3 -0
  142. package/dist/shaders/CloudsSlab.d.ts.map +1 -0
  143. package/dist/shaders/CloudsSlab.js +3 -0
  144. package/dist/shaders/CloudsSlab.js.map +1 -0
  145. package/dist/shaders/ColorIsolation.d.ts +3 -0
  146. package/dist/shaders/ColorIsolation.d.ts.map +1 -0
  147. package/dist/shaders/ColorIsolation.js +3 -0
  148. package/dist/shaders/ColorIsolation.js.map +1 -0
  149. package/dist/shaders/DepthEdges.d.ts +3 -0
  150. package/dist/shaders/DepthEdges.d.ts.map +1 -0
  151. package/dist/shaders/DepthEdges.js +3 -0
  152. package/dist/shaders/DepthEdges.js.map +1 -0
  153. package/dist/shaders/DigitalVideo.d.ts +3 -0
  154. package/dist/shaders/DigitalVideo.d.ts.map +1 -0
  155. package/dist/shaders/DigitalVideo.js +3 -0
  156. package/dist/shaders/DigitalVideo.js.map +1 -0
  157. package/dist/shaders/DroneDisplay.d.ts +3 -0
  158. package/dist/shaders/DroneDisplay.d.ts.map +1 -0
  159. package/dist/shaders/DroneDisplay.js +3 -0
  160. package/dist/shaders/DroneDisplay.js.map +1 -0
  161. package/dist/shaders/Dufour.d.ts +3 -0
  162. package/dist/shaders/Dufour.d.ts.map +1 -0
  163. package/dist/shaders/Dufour.js +3 -0
  164. package/dist/shaders/Dufour.js.map +1 -0
  165. package/dist/shaders/EyeFromDepth.d.ts +3 -0
  166. package/dist/shaders/EyeFromDepth.d.ts.map +1 -0
  167. package/dist/shaders/EyeFromDepth.js +3 -0
  168. package/dist/shaders/EyeFromDepth.js.map +1 -0
  169. package/dist/shaders/Filmic.d.ts +3 -0
  170. package/dist/shaders/Filmic.d.ts.map +1 -0
  171. package/dist/shaders/Filmic.js +3 -0
  172. package/dist/shaders/Filmic.js.map +1 -0
  173. package/dist/shaders/Flashlight.d.ts +3 -0
  174. package/dist/shaders/Flashlight.d.ts.map +1 -0
  175. package/dist/shaders/Flashlight.js +3 -0
  176. package/dist/shaders/Flashlight.js.map +1 -0
  177. package/dist/shaders/Fog.d.ts +3 -0
  178. package/dist/shaders/Fog.d.ts.map +1 -0
  179. package/dist/shaders/Fog.js +3 -0
  180. package/dist/shaders/Fog.js.map +1 -0
  181. package/dist/shaders/Frame.d.ts +3 -0
  182. package/dist/shaders/Frame.d.ts.map +1 -0
  183. package/dist/shaders/Frame.js +3 -0
  184. package/dist/shaders/Frame.js.map +1 -0
  185. package/dist/shaders/Hash.d.ts +3 -0
  186. package/dist/shaders/Hash.d.ts.map +1 -0
  187. package/dist/shaders/Hash.js +3 -0
  188. package/dist/shaders/Hash.js.map +1 -0
  189. package/dist/shaders/Height.d.ts +3 -0
  190. package/dist/shaders/Height.d.ts.map +1 -0
  191. package/dist/shaders/Height.js +3 -0
  192. package/dist/shaders/Height.js.map +1 -0
  193. package/dist/shaders/Infrared.d.ts +3 -0
  194. package/dist/shaders/Infrared.d.ts.map +1 -0
  195. package/dist/shaders/Infrared.js +3 -0
  196. package/dist/shaders/Infrared.js.map +1 -0
  197. package/dist/shaders/Jello.d.ts +3 -0
  198. package/dist/shaders/Jello.d.ts.map +1 -0
  199. package/dist/shaders/Jello.js +3 -0
  200. package/dist/shaders/Jello.js.map +1 -0
  201. package/dist/shaders/LensDistortion.d.ts +3 -0
  202. package/dist/shaders/LensDistortion.d.ts.map +1 -0
  203. package/dist/shaders/LensDistortion.js +3 -0
  204. package/dist/shaders/LensDistortion.js.map +1 -0
  205. package/dist/shaders/Lightning.d.ts +3 -0
  206. package/dist/shaders/Lightning.d.ts.map +1 -0
  207. package/dist/shaders/Lightning.js +3 -0
  208. package/dist/shaders/Lightning.js.map +1 -0
  209. package/dist/shaders/MotionBlur.d.ts +3 -0
  210. package/dist/shaders/MotionBlur.d.ts.map +1 -0
  211. package/dist/shaders/MotionBlur.js +3 -0
  212. package/dist/shaders/MotionBlur.js.map +1 -0
  213. package/dist/shaders/MotionBlurVelocity.d.ts +3 -0
  214. package/dist/shaders/MotionBlurVelocity.d.ts.map +1 -0
  215. package/dist/shaders/MotionBlurVelocity.js +3 -0
  216. package/dist/shaders/MotionBlurVelocity.js.map +1 -0
  217. package/dist/shaders/Noise.d.ts +3 -0
  218. package/dist/shaders/Noise.d.ts.map +1 -0
  219. package/dist/shaders/Noise.js +3 -0
  220. package/dist/shaders/Noise.js.map +1 -0
  221. package/dist/shaders/Normal.d.ts +3 -0
  222. package/dist/shaders/Normal.d.ts.map +1 -0
  223. package/dist/shaders/Normal.js +3 -0
  224. package/dist/shaders/Normal.js.map +1 -0
  225. package/dist/shaders/Phase.d.ts +3 -0
  226. package/dist/shaders/Phase.d.ts.map +1 -0
  227. package/dist/shaders/Phase.js +3 -0
  228. package/dist/shaders/Phase.js.map +1 -0
  229. package/dist/shaders/Precipitation.d.ts +3 -0
  230. package/dist/shaders/Precipitation.d.ts.map +1 -0
  231. package/dist/shaders/Precipitation.js +3 -0
  232. package/dist/shaders/Precipitation.js.map +1 -0
  233. package/dist/shaders/PrecipitationShaftBlur.d.ts +3 -0
  234. package/dist/shaders/PrecipitationShaftBlur.d.ts.map +1 -0
  235. package/dist/shaders/PrecipitationShaftBlur.js +3 -0
  236. package/dist/shaders/PrecipitationShaftBlur.js.map +1 -0
  237. package/dist/shaders/PrecipitationShafts.d.ts +3 -0
  238. package/dist/shaders/PrecipitationShafts.d.ts.map +1 -0
  239. package/dist/shaders/PrecipitationShafts.js +3 -0
  240. package/dist/shaders/PrecipitationShafts.js.map +1 -0
  241. package/dist/shaders/PrecipitationWind.d.ts +3 -0
  242. package/dist/shaders/PrecipitationWind.d.ts.map +1 -0
  243. package/dist/shaders/PrecipitationWind.js +3 -0
  244. package/dist/shaders/PrecipitationWind.js.map +1 -0
  245. package/dist/shaders/RainHaze.d.ts +3 -0
  246. package/dist/shaders/RainHaze.d.ts.map +1 -0
  247. package/dist/shaders/RainHaze.js +3 -0
  248. package/dist/shaders/RainHaze.js.map +1 -0
  249. package/dist/shaders/RainRings.d.ts +3 -0
  250. package/dist/shaders/RainRings.d.ts.map +1 -0
  251. package/dist/shaders/RainRings.js +3 -0
  252. package/dist/shaders/RainRings.js.map +1 -0
  253. package/dist/shaders/Shockwave.d.ts +3 -0
  254. package/dist/shaders/Shockwave.d.ts.map +1 -0
  255. package/dist/shaders/Shockwave.js +3 -0
  256. package/dist/shaders/Shockwave.js.map +1 -0
  257. package/dist/shaders/SkyTable.d.ts +3 -0
  258. package/dist/shaders/SkyTable.d.ts.map +1 -0
  259. package/dist/shaders/SkyTable.js +3 -0
  260. package/dist/shaders/SkyTable.js.map +1 -0
  261. package/dist/shaders/SnowLine.d.ts +3 -0
  262. package/dist/shaders/SnowLine.d.ts.map +1 -0
  263. package/dist/shaders/SnowLine.js +3 -0
  264. package/dist/shaders/SnowLine.js.map +1 -0
  265. package/dist/shaders/SpeedLines.d.ts +3 -0
  266. package/dist/shaders/SpeedLines.d.ts.map +1 -0
  267. package/dist/shaders/SpeedLines.js +3 -0
  268. package/dist/shaders/SpeedLines.js.map +1 -0
  269. package/dist/shaders/Spotlight.d.ts +3 -0
  270. package/dist/shaders/Spotlight.d.ts.map +1 -0
  271. package/dist/shaders/Spotlight.js +3 -0
  272. package/dist/shaders/Spotlight.js.map +1 -0
  273. package/dist/shaders/SpotlightBeam.d.ts +3 -0
  274. package/dist/shaders/SpotlightBeam.d.ts.map +1 -0
  275. package/dist/shaders/SpotlightBeam.js +3 -0
  276. package/dist/shaders/SpotlightBeam.js.map +1 -0
  277. package/dist/shaders/SpotlightBeamBlur.d.ts +3 -0
  278. package/dist/shaders/SpotlightBeamBlur.d.ts.map +1 -0
  279. package/dist/shaders/SpotlightBeamBlur.js +3 -0
  280. package/dist/shaders/SpotlightBeamBlur.js.map +1 -0
  281. package/dist/shaders/SpotlightCone.d.ts +3 -0
  282. package/dist/shaders/SpotlightCone.d.ts.map +1 -0
  283. package/dist/shaders/SpotlightCone.js +3 -0
  284. package/dist/shaders/SpotlightCone.js.map +1 -0
  285. package/dist/shaders/Super8.d.ts +3 -0
  286. package/dist/shaders/Super8.d.ts.map +1 -0
  287. package/dist/shaders/Super8.js +3 -0
  288. package/dist/shaders/Super8.js.map +1 -0
  289. package/dist/shaders/Technicolor.d.ts +3 -0
  290. package/dist/shaders/Technicolor.d.ts.map +1 -0
  291. package/dist/shaders/Technicolor.js +3 -0
  292. package/dist/shaders/Technicolor.js.map +1 -0
  293. package/dist/shaders/TiltShift.d.ts +3 -0
  294. package/dist/shaders/TiltShift.d.ts.map +1 -0
  295. package/dist/shaders/TiltShift.js +3 -0
  296. package/dist/shaders/TiltShift.js.map +1 -0
  297. package/dist/shaders/Toy.d.ts +3 -0
  298. package/dist/shaders/Toy.d.ts.map +1 -0
  299. package/dist/shaders/Toy.js +3 -0
  300. package/dist/shaders/Toy.js.map +1 -0
  301. package/dist/shaders/Trails.d.ts +3 -0
  302. package/dist/shaders/Trails.d.ts.map +1 -0
  303. package/dist/shaders/Trails.js +3 -0
  304. package/dist/shaders/Trails.js.map +1 -0
  305. package/dist/shaders/ValleyFog.d.ts +3 -0
  306. package/dist/shaders/ValleyFog.d.ts.map +1 -0
  307. package/dist/shaders/ValleyFog.js +3 -0
  308. package/dist/shaders/ValleyFog.js.map +1 -0
  309. package/dist/shaders/WeatherMap.d.ts +3 -0
  310. package/dist/shaders/WeatherMap.d.ts.map +1 -0
  311. package/dist/shaders/WeatherMap.js +3 -0
  312. package/dist/shaders/WeatherMap.js.map +1 -0
  313. package/dist/shaders/WhiteModel.d.ts +3 -0
  314. package/dist/shaders/WhiteModel.d.ts.map +1 -0
  315. package/dist/shaders/WhiteModel.js +3 -0
  316. package/dist/shaders/WhiteModel.js.map +1 -0
  317. package/dist/snow-line.d.ts +117 -0
  318. package/dist/snow-line.d.ts.map +1 -0
  319. package/dist/snow-line.js +201 -0
  320. package/dist/snow-line.js.map +1 -0
  321. package/dist/speed-lines.d.ts +36 -0
  322. package/dist/speed-lines.d.ts.map +1 -0
  323. package/dist/speed-lines.js +65 -0
  324. package/dist/speed-lines.js.map +1 -0
  325. package/dist/spotlight.d.ts +84 -0
  326. package/dist/spotlight.d.ts.map +1 -0
  327. package/dist/spotlight.js +175 -0
  328. package/dist/spotlight.js.map +1 -0
  329. package/dist/strikes.d.ts +17 -0
  330. package/dist/strikes.d.ts.map +1 -0
  331. package/dist/strikes.js +30 -0
  332. package/dist/strikes.js.map +1 -0
  333. package/dist/super8.d.ts +78 -0
  334. package/dist/super8.d.ts.map +1 -0
  335. package/dist/super8.js +146 -0
  336. package/dist/super8.js.map +1 -0
  337. package/dist/technicolor.d.ts +32 -0
  338. package/dist/technicolor.d.ts.map +1 -0
  339. package/dist/technicolor.js +51 -0
  340. package/dist/technicolor.js.map +1 -0
  341. package/dist/tilt-shift.d.ts +60 -0
  342. package/dist/tilt-shift.d.ts.map +1 -0
  343. package/dist/tilt-shift.js +112 -0
  344. package/dist/tilt-shift.js.map +1 -0
  345. package/dist/toy.d.ts +110 -0
  346. package/dist/toy.d.ts.map +1 -0
  347. package/dist/toy.js +173 -0
  348. package/dist/toy.js.map +1 -0
  349. package/dist/valley-fog.d.ts +56 -0
  350. package/dist/valley-fog.d.ts.map +1 -0
  351. package/dist/valley-fog.js +94 -0
  352. package/dist/valley-fog.js.map +1 -0
  353. package/dist/weather-map.d.ts +132 -0
  354. package/dist/weather-map.d.ts.map +1 -0
  355. package/dist/weather-map.js +266 -0
  356. package/dist/weather-map.js.map +1 -0
  357. package/dist/white-model.d.ts +70 -0
  358. package/dist/white-model.d.ts.map +1 -0
  359. package/dist/white-model.js +94 -0
  360. package/dist/white-model.js.map +1 -0
  361. package/package.json +19 -40
  362. package/{cesium-post-process.js → src/cesium-post-process.js} +2 -0
  363. package/src/shaders/AnalogVideo.glsl +132 -0
  364. package/src/shaders/Beam.glsl +108 -0
  365. package/src/shaders/CloudsBlur.glsl +30 -0
  366. package/src/shaders/CloudsComposite.glsl +59 -0
  367. package/src/shaders/CloudsDensity.glsl +129 -0
  368. package/src/shaders/CloudsDepth.glsl +26 -0
  369. package/src/shaders/CloudsMarch.glsl +174 -0
  370. package/src/shaders/CloudsResolve.glsl +46 -0
  371. package/src/shaders/CloudsShadow.glsl +50 -0
  372. package/src/shaders/CloudsShadowMap.glsl +68 -0
  373. package/src/shaders/CloudsSlab.glsl +58 -0
  374. package/src/shaders/ColorIsolation.glsl +26 -0
  375. package/src/shaders/DepthEdges.glsl +81 -0
  376. package/src/shaders/DigitalVideo.glsl +65 -0
  377. package/src/shaders/DroneDisplay.glsl +337 -0
  378. package/src/shaders/Dufour.glsl +109 -0
  379. package/src/shaders/EyeFromDepth.glsl +36 -0
  380. package/src/shaders/Filmic.glsl +5 -0
  381. package/src/shaders/Fog.glsl +18 -0
  382. package/src/shaders/Frame.glsl +10 -0
  383. package/src/shaders/Hash.glsl +12 -0
  384. package/src/shaders/Height.glsl +25 -0
  385. package/src/shaders/Infrared.glsl +44 -0
  386. package/src/shaders/Jello.glsl +41 -0
  387. package/src/shaders/LensDistortion.glsl +24 -0
  388. package/src/shaders/Lightning.glsl +257 -0
  389. package/src/shaders/MotionBlur.glsl +71 -0
  390. package/src/shaders/MotionBlurVelocity.glsl +31 -0
  391. package/src/shaders/Noise.glsl +43 -0
  392. package/src/shaders/Normal.glsl +21 -0
  393. package/src/shaders/Phase.glsl +6 -0
  394. package/src/shaders/Precipitation.glsl +199 -0
  395. package/src/shaders/PrecipitationShaftBlur.glsl +21 -0
  396. package/src/shaders/PrecipitationShafts.glsl +84 -0
  397. package/src/shaders/PrecipitationWind.glsl +33 -0
  398. package/src/shaders/RainHaze.glsl +145 -0
  399. package/src/shaders/RainRings.glsl +64 -0
  400. package/src/shaders/SkyTable.glsl +23 -0
  401. package/src/shaders/SnowLine.glsl +97 -0
  402. package/src/shaders/SpeedLines.glsl +61 -0
  403. package/src/shaders/Spotlight.glsl +89 -0
  404. package/src/shaders/SpotlightBeam.glsl +49 -0
  405. package/src/shaders/SpotlightBeamBlur.glsl +27 -0
  406. package/src/shaders/SpotlightCone.glsl +37 -0
  407. package/src/shaders/Super8.glsl +90 -0
  408. package/src/shaders/Technicolor.glsl +30 -0
  409. package/src/shaders/TiltShift.glsl +34 -0
  410. package/src/shaders/Toy.glsl +46 -0
  411. package/src/shaders/ValleyFog.glsl +40 -0
  412. package/src/shaders/WeatherMap.glsl +33 -0
  413. package/src/shaders/WhiteModel.glsl +108 -0
  414. /package/{analog-video.js → src/analog-video.js} +0 -0
  415. /package/{blur.js → src/blur.js} +0 -0
  416. /package/{cloud-cover.js → src/cloud-cover.js} +0 -0
  417. /package/{cloud-map.js → src/cloud-map.js} +0 -0
  418. /package/{cloud-noise.js → src/cloud-noise.js} +0 -0
  419. /package/{clouds.js → src/clouds.js} +0 -0
  420. /package/{color-isolation.js → src/color-isolation.js} +0 -0
  421. /package/{depth-test.js → src/depth-test.js} +0 -0
  422. /package/{digital-video.js → src/digital-video.js} +0 -0
  423. /package/{drone-display.js → src/drone-display.js} +0 -0
  424. /package/{dufour.js → src/dufour.js} +0 -0
  425. /package/{effect.js → src/effect.js} +0 -0
  426. /package/{focus.js → src/focus.js} +0 -0
  427. /package/{frame-clock.js → src/frame-clock.js} +0 -0
  428. /package/{height.js → src/height.js} +0 -0
  429. /package/{infrared.js → src/infrared.js} +0 -0
  430. /package/{jello.js → src/jello.js} +0 -0
  431. /package/{lens-distortion.js → src/lens-distortion.js} +0 -0
  432. /package/{lightning.js → src/lightning.js} +0 -0
  433. /package/{local-frame.js → src/local-frame.js} +0 -0
  434. /package/{motion-blur.js → src/motion-blur.js} +0 -0
  435. /package/{precipitation.js → src/precipitation.js} +0 -0
  436. /package/{rain-rings.js → src/rain-rings.js} +0 -0
  437. /package/{shaders → src/shaders}/Alpenglow.js +0 -0
  438. /package/{shaders → src/shaders}/AnalogVideo.js +0 -0
  439. /package/{shaders → src/shaders}/Beam.js +0 -0
  440. /package/{shaders → src/shaders}/CloudsBlur.js +0 -0
  441. /package/{shaders → src/shaders}/CloudsComposite.js +0 -0
  442. /package/{shaders → src/shaders}/CloudsDensity.js +0 -0
  443. /package/{shaders → src/shaders}/CloudsDepth.js +0 -0
  444. /package/{shaders → src/shaders}/CloudsMarch.js +0 -0
  445. /package/{shaders → src/shaders}/CloudsResolve.js +0 -0
  446. /package/{shaders → src/shaders}/CloudsShadow.js +0 -0
  447. /package/{shaders → src/shaders}/CloudsShadowMap.js +0 -0
  448. /package/{shaders → src/shaders}/CloudsSlab.js +0 -0
  449. /package/{shaders → src/shaders}/ColorIsolation.js +0 -0
  450. /package/{shaders → src/shaders}/DepthEdges.js +0 -0
  451. /package/{shaders → src/shaders}/DigitalVideo.js +0 -0
  452. /package/{shaders → src/shaders}/DroneDisplay.js +0 -0
  453. /package/{shaders → src/shaders}/Dufour.js +0 -0
  454. /package/{shaders → src/shaders}/EyeFromDepth.js +0 -0
  455. /package/{shaders → src/shaders}/Filmic.js +0 -0
  456. /package/{shaders → src/shaders}/Flashlight.js +0 -0
  457. /package/{shaders → src/shaders}/Fog.js +0 -0
  458. /package/{shaders → src/shaders}/Frame.js +0 -0
  459. /package/{shaders → src/shaders}/Hash.js +0 -0
  460. /package/{shaders → src/shaders}/Height.js +0 -0
  461. /package/{shaders → src/shaders}/Infrared.js +0 -0
  462. /package/{shaders → src/shaders}/Jello.js +0 -0
  463. /package/{shaders → src/shaders}/LensDistortion.js +0 -0
  464. /package/{shaders → src/shaders}/Lightning.js +0 -0
  465. /package/{shaders → src/shaders}/MotionBlur.js +0 -0
  466. /package/{shaders → src/shaders}/MotionBlurVelocity.js +0 -0
  467. /package/{shaders → src/shaders}/Noise.js +0 -0
  468. /package/{shaders → src/shaders}/Normal.js +0 -0
  469. /package/{shaders → src/shaders}/Phase.js +0 -0
  470. /package/{shaders → src/shaders}/Precipitation.js +0 -0
  471. /package/{shaders → src/shaders}/PrecipitationShaftBlur.js +0 -0
  472. /package/{shaders → src/shaders}/PrecipitationShafts.js +0 -0
  473. /package/{shaders → src/shaders}/PrecipitationWind.js +0 -0
  474. /package/{shaders → src/shaders}/RainHaze.js +0 -0
  475. /package/{shaders → src/shaders}/RainRings.js +0 -0
  476. /package/{shaders → src/shaders}/Shockwave.js +0 -0
  477. /package/{shaders → src/shaders}/SkyTable.js +0 -0
  478. /package/{shaders → src/shaders}/SnowLine.js +0 -0
  479. /package/{shaders → src/shaders}/SpeedLines.js +0 -0
  480. /package/{shaders → src/shaders}/Spotlight.js +0 -0
  481. /package/{shaders → src/shaders}/SpotlightBeam.js +0 -0
  482. /package/{shaders → src/shaders}/SpotlightBeamBlur.js +0 -0
  483. /package/{shaders → src/shaders}/SpotlightCone.js +0 -0
  484. /package/{shaders → src/shaders}/Super8.js +0 -0
  485. /package/{shaders → src/shaders}/Technicolor.js +0 -0
  486. /package/{shaders → src/shaders}/TiltShift.js +0 -0
  487. /package/{shaders → src/shaders}/Toy.js +0 -0
  488. /package/{shaders → src/shaders}/Trails.js +0 -0
  489. /package/{shaders → src/shaders}/ValleyFog.js +0 -0
  490. /package/{shaders → src/shaders}/WeatherMap.js +0 -0
  491. /package/{shaders → src/shaders}/WhiteModel.js +0 -0
  492. /package/{snow-line.js → src/snow-line.js} +0 -0
  493. /package/{speed-lines.js → src/speed-lines.js} +0 -0
  494. /package/{spotlight.js → src/spotlight.js} +0 -0
  495. /package/{strikes.js → src/strikes.js} +0 -0
  496. /package/{super8.js → src/super8.js} +0 -0
  497. /package/{technicolor.js → src/technicolor.js} +0 -0
  498. /package/{tilt-shift.js → src/tilt-shift.js} +0 -0
  499. /package/{toy.js → src/toy.js} +0 -0
  500. /package/{valley-fog.js → src/valley-fog.js} +0 -0
  501. /package/{weather-map.js → src/weather-map.js} +0 -0
  502. /package/{white-model.js → src/white-model.js} +0 -0
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from SnowLine.glsl.
2
+ export default "// Snow above an altitude, on slopes gentle enough to hold it, shaded by the sun and by the\n// brightness of the scene so that the relief stays readable. The slope comes from a normal\n// rebuilt from the neighboring pixels and smoothed over the facets of the terrain. Noise anchored\n// to the ground breaks up the edge of the snow, which lasts lower on the slopes away from the sun.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\n// meters above the ellipsoid: half covered at the altitude, over a band transition meters high\nuniform float altitude;\nuniform float transition;\n// radians\nuniform float maxSlope;\n// 0 to 1\nuniform float coverage;\n// 0 to 1: how far the coverage thins the snow into patches, where 0 fades it\nuniform float patchiness;\n// meters: the noise's largest scale, its finer ones a third and a ninth of it\nuniform float grain;\n// 0 to 1: how far the snow's brightness is the scene's own (its shadows, the dusk), where 0 is the sun's shading\nuniform float sceneLight;\n// 0 to 1: the part of the snow that still covers the steep slopes at the limit, as a fraction of the coverage\nuniform float steepCover;\n// the local frame's coordinates from the eye's, made in double precision on the CPU (local-frame.js): the noise's place\nuniform mat4 localFromEye;\n// meters above the ellipsoid, far above anything with no water: none lies within a quarter meter of it\nuniform float waterLevel;\n// the sun toward which the snow is shaded, in eye coordinates, when ownSun is 1; else Cesium's\nuniform vec3 sunEC;\nuniform float ownSun;\nin vec2 v_textureCoordinates;\n\nconst vec3 SNOW_SHADE = vec3(0.80, 0.87, 1.0);\nconst vec3 SNOW_SUN = vec3(1.0, 0.98, 0.94);\n// meters the snow line moves down on a slope facing away from the sun, and up on one facing it\nconst float ASPECT_SHIFT = 0.6;\n// meters the noise moves the snow line, as a fraction of the transition\nconst float NOISE_SHIFT = 0.8;\n// half width of the slope limit, in radians (8 degrees), so that the snow thins out across the\n// facets of the terrain rather than stopping at their edges\nconst float SLOPE_EDGE = 0.14;\n// the coverage, moved by the noise, from which the snow begins and is whole when it is patches; how far the noise moves it\nconst vec2 PATCH = vec2(0.25, 0.6);\nconst float PATCH_NOISE = 1.6;\n// meters from the water's level within which a surface is water, and beyond which it is not\nconst vec2 WET = vec2(0.1, 0.25);\n\nfloat hash(vec3 p) {\n p = fract(p * 0.3183099 + 0.1);\n p *= 17.0;\n return fract(p.x * p.y * p.z * (p.x + p.y + p.z));\n}\n\nfloat valueNoise(vec3 p) {\n vec3 i = floor(p);\n vec3 f = fract(p);\n f = f * f * (3.0 - 2.0 * f);\n return mix(\n mix(mix(hash(i), hash(i + vec3(1, 0, 0)), f.x), mix(hash(i + vec3(0, 1, 0)), hash(i + vec3(1, 1, 0)), f.x), f.y),\n mix(mix(hash(i + vec3(0, 0, 1)), hash(i + vec3(1, 0, 1)), f.x), mix(hash(i + vec3(0, 1, 1)), hash(i + vec3(1, 1, 1)), f.x), f.y),\n f.z);\n}\n\n// 0 to 1, from a few octaves anchored to the ground, in the local frame: in world coordinates a float steps by half a meter\nfloat groundNoise(vec3 local) {\n return 0.55 * valueNoise(local / grain) + 0.3 * valueNoise(3.0 * local / grain) + 0.15 * valueNoise(9.0 * local / grain);\n}\n\nvoid main() {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n vec3 normal = smoothNormalAt(depthTexture, v_textureCoordinates, eye.xyz);\n float slope = acos(clamp(dot(normal, up), -1.0, 1.0));\n\n float sun = max(dot(normal, ownSun > 0.5 ? sunEC : czm_sunDirectionEC), 0.0);\n float noise = groundNoise((localFromEye * vec4(eye.xyz, 1.0)).xyz) - 0.5;\n // lower on the slopes away from the sun, irregular along the edge\n float shift = transition * (NOISE_SHIFT * noise + ASPECT_SHIFT * (0.5 - sun));\n float snowLine = altitude + shift;\n float snow = smoothstep(snowLine - 0.5 * transition, snowLine + 0.5 * transition, heightAt(eye.xyz));\n // opaque before the top of the band, so that the imagery does not show through the snow\n snow = smoothstep(0.0, 0.7, snow);\n // the steep slopes keep a thin, patchy cover, and the rock shows through\n float steep = smoothstep(maxSlope - SLOPE_EDGE, maxSlope + SLOPE_EDGE, slope);\n snow *= 1.0 - steep * (1.0 - steepCover * smoothstep(0.35, 0.65, noise + 0.5));\n // the coverage an opacity, or, by the patchiness, the share of the ground the snow covers, the noise leaving it in patches\n float scattered = smoothstep(PATCH.x, PATCH.y, coverage + PATCH_NOISE * noise);\n // eye.w is 0 for the sky\n snow *= mix(coverage, scattered, patchiness) * eye.w;\n snow *= smoothstep(WET.x, WET.y, abs(heightAt(eye.xyz) - waterLevel));\n float brightness = czm_luminance(sceneColor.rgb);\n // blue in the shade, warm in the sun, with the relief of the scene kept in the brightness; or as bright as the scene, its shadows and its\n // dusk kept on the snow\n float shaded = clamp(0.68 + 0.25 * sun + 0.1 * brightness, 0.0, 1.0);\n float scene = clamp(0.15 + 1.35 * brightness, 0.0, 1.0);\n vec3 lit = mix(SNOW_SHADE, SNOW_SUN, sun) * mix(shaded, scene, sceneLight);\n out_FragColor = vec4(mix(sceneColor.rgb, lit, snow), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=SnowLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnowLine.js","sourceRoot":"","sources":["../../src/shaders/SnowLine.js"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,eAAe,oqKAAoqK,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// Speed lines: the picture zooms toward the focus, more toward the edges of the screen, and thin\n// streaks radiate from it, a new pattern many times a second, as in comics.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// in eye coordinates; w is 0 for the middle of the screen\nuniform vec4 focus;\n// 0 to 1\nuniform float strength;\n// seconds\nuniform float time;\nin vec2 v_textureCoordinates;\n\nconst int BLUR_STEPS = 8;\n// length of the zoom blur at full strength, as a fraction of the distance to the focus\nconst float BLUR = 0.12;\n// streaks around the focus, and their changes per second\nconst float STREAK_COUNT = 360.0;\nconst float STREAK_RATE = 24.0;\nconst float STREAK_OPACITY = 0.2;\n\n// the streaks draw their randomness from hash: with a sin, they disappeared for half of each\n// cycle of frames\nvoid main() {\n vec2 uv = v_textureCoordinates;\n vec4 clip = czm_projection * vec4(focus.xyz, 1.0);\n // on the screen, in front of the camera\n vec2 center = focus.w > 0.0 && focus.z < 0.0 ? 0.5 * clip.xy / clip.w + 0.5 : vec2(0.5);\n vec2 toCenter = center - uv;\n // distance to the focus, 1 at the half height of the screen\n vec2 aspect = vec2(czm_viewport.z / czm_viewport.w, 1.0);\n float fromCenter = 2.0 * length(toCenter * aspect);\n float edge = smoothstep(0.2, 1.0, fromCenter);\n\n vec4 sceneColor = texture(colorTexture, uv);\n vec3 color = sceneColor.rgb;\n // zoom blur, from a start that varies with the pixel so that the steps blur into noise; none\n // where it would be shorter than a pixel, around the focus\n float blur = strength * BLUR * edge;\n if (blur * length(toCenter * czm_viewport.zw) > 0.5) {\n float jitter = pixelNoise(gl_FragCoord.xy);\n color = vec3(0.0);\n for (int i = 0; i < BLUR_STEPS; i++) {\n color += texture(colorTexture, uv + toCenter * blur * (float(i) + jitter) / float(BLUR_STEPS)).rgb;\n }\n color /= float(BLUR_STEPS);\n }\n\n // streaks: noise around the focus, constant along each ray from it, only toward the edges\n float streaks = STREAK_OPACITY * strength * smoothstep(0.5, 1.2, fromCenter);\n if (streaks > 0.0) {\n vec2 direction = toCenter * aspect;\n float frame = mod(floor(time * STREAK_RATE), 1000.0);\n // value noise over the angle, in whole cells so that it closes around the focus\n float around = (atan(direction.y, direction.x) / czm_twoPi + 0.5) * STREAK_COUNT;\n float cell = floor(around);\n float t = fract(around);\n float noise = mix(hash(vec2(cell, frame)), hash(vec2(mod(cell + 1.0, STREAK_COUNT), frame)), t * t * (3.0 - 2.0 * t));\n color = mix(color, vec3(1.0), streaks * smoothstep(0.72, 0.9, noise));\n }\n out_FragColor = vec4(color, sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=SpeedLines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeedLines.d.ts","sourceRoot":"","sources":["../../src/shaders/SpeedLines.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from SpeedLines.glsl.
2
+ export default "// Speed lines: the picture zooms toward the focus, more toward the edges of the screen, and thin\n// streaks radiate from it, a new pattern many times a second, as in comics.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// in eye coordinates; w is 0 for the middle of the screen\nuniform vec4 focus;\n// 0 to 1\nuniform float strength;\n// seconds\nuniform float time;\nin vec2 v_textureCoordinates;\n\nconst int BLUR_STEPS = 8;\n// length of the zoom blur at full strength, as a fraction of the distance to the focus\nconst float BLUR = 0.12;\n// streaks around the focus, and their changes per second\nconst float STREAK_COUNT = 360.0;\nconst float STREAK_RATE = 24.0;\nconst float STREAK_OPACITY = 0.2;\n\n// the streaks draw their randomness from hash: with a sin, they disappeared for half of each\n// cycle of frames\nvoid main() {\n vec2 uv = v_textureCoordinates;\n vec4 clip = czm_projection * vec4(focus.xyz, 1.0);\n // on the screen, in front of the camera\n vec2 center = focus.w > 0.0 && focus.z < 0.0 ? 0.5 * clip.xy / clip.w + 0.5 : vec2(0.5);\n vec2 toCenter = center - uv;\n // distance to the focus, 1 at the half height of the screen\n vec2 aspect = vec2(czm_viewport.z / czm_viewport.w, 1.0);\n float fromCenter = 2.0 * length(toCenter * aspect);\n float edge = smoothstep(0.2, 1.0, fromCenter);\n\n vec4 sceneColor = texture(colorTexture, uv);\n vec3 color = sceneColor.rgb;\n // zoom blur, from a start that varies with the pixel so that the steps blur into noise; none\n // where it would be shorter than a pixel, around the focus\n float blur = strength * BLUR * edge;\n if (blur * length(toCenter * czm_viewport.zw) > 0.5) {\n float jitter = pixelNoise(gl_FragCoord.xy);\n color = vec3(0.0);\n for (int i = 0; i < BLUR_STEPS; i++) {\n color += texture(colorTexture, uv + toCenter * blur * (float(i) + jitter) / float(BLUR_STEPS)).rgb;\n }\n color /= float(BLUR_STEPS);\n }\n\n // streaks: noise around the focus, constant along each ray from it, only toward the edges\n float streaks = STREAK_OPACITY * strength * smoothstep(0.5, 1.2, fromCenter);\n if (streaks > 0.0) {\n vec2 direction = toCenter * aspect;\n float frame = mod(floor(time * STREAK_RATE), 1000.0);\n // value noise over the angle, in whole cells so that it closes around the focus\n float around = (atan(direction.y, direction.x) / czm_twoPi + 0.5) * STREAK_COUNT;\n float cell = floor(around);\n float t = fract(around);\n float noise = mix(hash(vec2(cell, frame)), hash(vec2(mod(cell + 1.0, STREAK_COUNT), frame)), t * t * (3.0 - 2.0 * t));\n color = mix(color, vec3(1.0), streaks * smoothstep(0.72, 0.9, noise));\n }\n out_FragColor = vec4(color, sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=SpeedLines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeedLines.js","sourceRoot":"","sources":["../../src/shaders/SpeedLines.js"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAe,0rFAA0rF,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// A searchlight above the focus, pointing down: it throws a pool of warm light radius meters\n// wide on flat ground, with a soft penumbra, shades the relief under it and lights up the haze\n// in its beam, from SpotlightBeam.glsl; the rest of the scene darkens and loses its color. The\n// cone and the falloff follow three.js's SpotLight. Needs EyeFromDepth, Normal, Filmic and\n// SpotlightCone.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// the beam's haze and the log2 of the scene distance, at a fraction of the resolution\nuniform sampler2D beamTexture;\n// 0 to 1\nuniform float darkness;\n// brightness of the beam in the air, 0 to 1\nuniform float beam;\n// brightness of the light, 1 for the searchlight: the pool and the beam scale with it\nuniform float power;\nin vec2 v_textureCoordinates;\n\nconst vec3 LIGHT_COLOR = vec3(1.0, 0.93, 0.8);\nconst float INTENSITY = 1.4;\n// difference of the log2 of the distances, about 10 %, under which the beam's texels around a\n// pixel are interpolated\nconst float SOFT_DEPTH = 0.14;\n\n// light reaching a point fromLight away from the light: the cone around the axis with its\n// penumbra, and the inverse square, 1 at the focus, capped for what is close to the light\nfloat spotAt(vec3 fromLight, vec3 axis, float height, float coneCos, float penumbraCos) {\n float lightDistance = length(fromLight);\n float spot = smoothstep(coneCos, penumbraCos, dot(fromLight, -axis) / lightDistance);\n return spot * min(height * height / (lightDistance * lightDistance), 4.0);\n}\n\n// the beam's haze at the pixel, from the four texels of its lower resolution around it:\n// interpolated where they are all at the pixel's distance, else the one nearest to it, so that the\n// haze stops at the ridges in front of it rather than spilling onto them\nfloat beamAt(vec2 uv, float depth) {\n ivec2 size = textureSize(beamTexture, 0);\n vec2 position = uv * vec2(size) - 0.5;\n ivec2 base = ivec2(floor(position));\n vec2 f = fract(position);\n float interpolated = 0.0;\n float nearest = 0.0;\n float nearestGap = 1e38;\n float widestGap = 0.0;\n for (int i = 0; i < 4; i++) {\n ivec2 offset = ivec2(i & 1, i >> 1);\n vec2 texel = texelFetch(beamTexture, clamp(base + offset, ivec2(0), size - 1), 0).rg;\n float gap = abs(texel.g - depth);\n vec2 weights = mix(1.0 - f, f, vec2(offset));\n interpolated += weights.x * weights.y * texel.r;\n if (gap < nearestGap) {\n nearestGap = gap;\n nearest = texel.r;\n }\n widestGap = max(widestGap, gap);\n }\n return widestGap < SOFT_DEPTH ? interpolated : nearest;\n}\n\nvoid main() {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n Cone spot;\n if (!spotlightCone(spot)) {\n out_FragColor = sceneColor;\n return;\n }\n vec3 color = sceneColor.rgb;\n vec3 ambient = czm_saturation(color, 1.0 - darkness) * (1.0 - darkness);\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n\n // eye.w is 0 for the sky, where the view ray goes on\n float sceneDistance = eye.w == 0.0 ? 1e30 : length(eye.xyz);\n float scattered = beam > 0.0 ? beamAt(v_textureCoordinates, log2(sceneDistance)) : 0.0;\n vec3 haze = LIGHT_COLOR * (power * beam * scattered);\n if (eye.w == 0.0) {\n out_FragColor = vec4(filmic(ambient + haze), sceneColor.a);\n return;\n }\n\n vec3 toLight = spot.light - eye.xyz;\n // the normal over wider steps where the surface is seen at a grazing angle, where the facets\n // of the terrain mesh would show as blotches; over fine ones elsewhere, for the relief\n vec3 coarse = normalize(normalAt(depthTexture, v_textureCoordinates, eye.xyz, 6.0 * czm_pixelRatio)\n + normalAt(depthTexture, v_textureCoordinates, eye.xyz, 18.0 * czm_pixelRatio));\n float grazing = smoothstep(0.7, 0.95, 1.0 - abs(dot(coarse, normalize(-eye.xyz))));\n vec3 normal = normalize(mix(smoothNormalAt(depthTexture, v_textureCoordinates, eye.xyz), coarse, grazing));\n float lambert = max(dot(normal, normalize(toLight)), 0.0);\n vec3 light = LIGHT_COLOR * (power * INTENSITY * spotAt(-toLight, up, spot.height, spot.coneCos, spot.penumbraCos) * lambert);\n out_FragColor = vec4(filmic(ambient + color * light + haze), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=Spotlight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spotlight.d.ts","sourceRoot":"","sources":["../../src/shaders/Spotlight.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from Spotlight.glsl.
2
+ export default "// A searchlight above the focus, pointing down: it throws a pool of warm light radius meters\n// wide on flat ground, with a soft penumbra, shades the relief under it and lights up the haze\n// in its beam, from SpotlightBeam.glsl; the rest of the scene darkens and loses its color. The\n// cone and the falloff follow three.js's SpotLight. Needs EyeFromDepth, Normal, Filmic and\n// SpotlightCone.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// the beam's haze and the log2 of the scene distance, at a fraction of the resolution\nuniform sampler2D beamTexture;\n// 0 to 1\nuniform float darkness;\n// brightness of the beam in the air, 0 to 1\nuniform float beam;\n// brightness of the light, 1 for the searchlight: the pool and the beam scale with it\nuniform float power;\nin vec2 v_textureCoordinates;\n\nconst vec3 LIGHT_COLOR = vec3(1.0, 0.93, 0.8);\nconst float INTENSITY = 1.4;\n// difference of the log2 of the distances, about 10 %, under which the beam's texels around a\n// pixel are interpolated\nconst float SOFT_DEPTH = 0.14;\n\n// light reaching a point fromLight away from the light: the cone around the axis with its\n// penumbra, and the inverse square, 1 at the focus, capped for what is close to the light\nfloat spotAt(vec3 fromLight, vec3 axis, float height, float coneCos, float penumbraCos) {\n float lightDistance = length(fromLight);\n float spot = smoothstep(coneCos, penumbraCos, dot(fromLight, -axis) / lightDistance);\n return spot * min(height * height / (lightDistance * lightDistance), 4.0);\n}\n\n// the beam's haze at the pixel, from the four texels of its lower resolution around it:\n// interpolated where they are all at the pixel's distance, else the one nearest to it, so that the\n// haze stops at the ridges in front of it rather than spilling onto them\nfloat beamAt(vec2 uv, float depth) {\n ivec2 size = textureSize(beamTexture, 0);\n vec2 position = uv * vec2(size) - 0.5;\n ivec2 base = ivec2(floor(position));\n vec2 f = fract(position);\n float interpolated = 0.0;\n float nearest = 0.0;\n float nearestGap = 1e38;\n float widestGap = 0.0;\n for (int i = 0; i < 4; i++) {\n ivec2 offset = ivec2(i & 1, i >> 1);\n vec2 texel = texelFetch(beamTexture, clamp(base + offset, ivec2(0), size - 1), 0).rg;\n float gap = abs(texel.g - depth);\n vec2 weights = mix(1.0 - f, f, vec2(offset));\n interpolated += weights.x * weights.y * texel.r;\n if (gap < nearestGap) {\n nearestGap = gap;\n nearest = texel.r;\n }\n widestGap = max(widestGap, gap);\n }\n return widestGap < SOFT_DEPTH ? interpolated : nearest;\n}\n\nvoid main() {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n Cone spot;\n if (!spotlightCone(spot)) {\n out_FragColor = sceneColor;\n return;\n }\n vec3 color = sceneColor.rgb;\n vec3 ambient = czm_saturation(color, 1.0 - darkness) * (1.0 - darkness);\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n\n // eye.w is 0 for the sky, where the view ray goes on\n float sceneDistance = eye.w == 0.0 ? 1e30 : length(eye.xyz);\n float scattered = beam > 0.0 ? beamAt(v_textureCoordinates, log2(sceneDistance)) : 0.0;\n vec3 haze = LIGHT_COLOR * (power * beam * scattered);\n if (eye.w == 0.0) {\n out_FragColor = vec4(filmic(ambient + haze), sceneColor.a);\n return;\n }\n\n vec3 toLight = spot.light - eye.xyz;\n // the normal over wider steps where the surface is seen at a grazing angle, where the facets\n // of the terrain mesh would show as blotches; over fine ones elsewhere, for the relief\n vec3 coarse = normalize(normalAt(depthTexture, v_textureCoordinates, eye.xyz, 6.0 * czm_pixelRatio)\n + normalAt(depthTexture, v_textureCoordinates, eye.xyz, 18.0 * czm_pixelRatio));\n float grazing = smoothstep(0.7, 0.95, 1.0 - abs(dot(coarse, normalize(-eye.xyz))));\n vec3 normal = normalize(mix(smoothNormalAt(depthTexture, v_textureCoordinates, eye.xyz), coarse, grazing));\n float lambert = max(dot(normal, normalize(toLight)), 0.0);\n vec3 light = LIGHT_COLOR * (power * INTENSITY * spotAt(-toLight, up, spot.height, spot.coneCos, spot.penumbraCos) * lambert);\n out_FragColor = vec4(filmic(ambient + color * light + haze), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=Spotlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spotlight.js","sourceRoot":"","sources":["../../src/shaders/Spotlight.js"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAe,4oIAA4oI,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// The haze lit by the searchlight's beam, at a fraction of the resolution, as in Killzone Shadow\n// Fall's volumetrics (Valient, SIGGRAPH 2014): r is the light scattered along the view ray, g the\n// log2 of the scene distance for SpotlightBeamBlur.glsl and the upsampling: half floats hold it, and\n// distances compare as ratios. Needs EyeFromDepth, Hash, Noise, SpotlightCone and Beam.\n// brightness of the beam in the air, 0 to 1\nuniform float beam;\n// Henyey-Greenstein asymmetry of the haze, 0 to 1: it scatters mostly forward, so the beam is\n// brighter when looking toward the light\nuniform float beamAnisotropy;\nin vec2 v_textureCoordinates;\n\n// radius of the beam's bright core around the light, in heights: the inverse square is softened\n// within it, as the pool's is capped, so that the top of the beam does not burn out\nconst float BEAM_CORE = 0.25;\n// brightness of the lit haze, over the height so that it keeps with the radius, matched to the\n// searchlight's former analytic beam at the default anisotropy\nconst float BEAM_DENSITY = 19.0;\n// contrast and density of the dust streaks in the beam, across its width\nconst float STREAKS = 0.2;\nconst float STREAK_SCALE = 4.0;\n\nvoid main() {\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n // eye.w is 0 for the sky, where the view ray goes on\n float sceneDistance = eye.w == 0.0 ? 1e30 : length(eye.xyz);\n Cone spot;\n if (beam <= 0.0 || !spotlightCone(spot)) {\n out_FragColor = vec4(0.0, log2(sceneDistance), 0.0, 1.0);\n return;\n }\n Beam cone;\n cone.apex = spot.light;\n cone.forward = -up;\n cone.edgeCos = spot.coneCos;\n cone.coreCos = spot.penumbraCos;\n cone.hotCore = 0.0;\n cone.light = spot.light;\n cone.reference = spot.height;\n cone.core = BEAM_CORE * spot.height;\n cone.reach = 1e30;\n cone.extinction = 0.0;\n cone.anisotropy = beamAnisotropy;\n cone.spacing = 1.0;\n cone.nearFade = vec2(0.0);\n cone.dust = STREAKS;\n cone.dustScale = STREAK_SCALE;\n float scattered = BEAM_DENSITY / spot.height * beamAlong(normalize(eye.xyz), sceneDistance, cone);\n out_FragColor = vec4(scattered, log2(sceneDistance), 0.0, 1.0);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=SpotlightBeam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightBeam.d.ts","sourceRoot":"","sources":["../../src/shaders/SpotlightBeam.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from SpotlightBeam.glsl.
2
+ export default "// The haze lit by the searchlight's beam, at a fraction of the resolution, as in Killzone Shadow\n// Fall's volumetrics (Valient, SIGGRAPH 2014): r is the light scattered along the view ray, g the\n// log2 of the scene distance for SpotlightBeamBlur.glsl and the upsampling: half floats hold it, and\n// distances compare as ratios. Needs EyeFromDepth, Hash, Noise, SpotlightCone and Beam.\n// brightness of the beam in the air, 0 to 1\nuniform float beam;\n// Henyey-Greenstein asymmetry of the haze, 0 to 1: it scatters mostly forward, so the beam is\n// brighter when looking toward the light\nuniform float beamAnisotropy;\nin vec2 v_textureCoordinates;\n\n// radius of the beam's bright core around the light, in heights: the inverse square is softened\n// within it, as the pool's is capped, so that the top of the beam does not burn out\nconst float BEAM_CORE = 0.25;\n// brightness of the lit haze, over the height so that it keeps with the radius, matched to the\n// searchlight's former analytic beam at the default anisotropy\nconst float BEAM_DENSITY = 19.0;\n// contrast and density of the dust streaks in the beam, across its width\nconst float STREAKS = 0.2;\nconst float STREAK_SCALE = 4.0;\n\nvoid main() {\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n // eye.w is 0 for the sky, where the view ray goes on\n float sceneDistance = eye.w == 0.0 ? 1e30 : length(eye.xyz);\n Cone spot;\n if (beam <= 0.0 || !spotlightCone(spot)) {\n out_FragColor = vec4(0.0, log2(sceneDistance), 0.0, 1.0);\n return;\n }\n Beam cone;\n cone.apex = spot.light;\n cone.forward = -up;\n cone.edgeCos = spot.coneCos;\n cone.coreCos = spot.penumbraCos;\n cone.hotCore = 0.0;\n cone.light = spot.light;\n cone.reference = spot.height;\n cone.core = BEAM_CORE * spot.height;\n cone.reach = 1e30;\n cone.extinction = 0.0;\n cone.anisotropy = beamAnisotropy;\n cone.spacing = 1.0;\n cone.nearFade = vec2(0.0);\n cone.dust = STREAKS;\n cone.dustScale = STREAK_SCALE;\n float scattered = BEAM_DENSITY / spot.height * beamAlong(normalize(eye.xyz), sceneDistance, cone);\n out_FragColor = vec4(scattered, log2(sceneDistance), 0.0, 1.0);\n}\n";
3
+ //# sourceMappingURL=SpotlightBeam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightBeam.js","sourceRoot":"","sources":["../../src/shaders/SpotlightBeam.js"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,eAAe,2nEAA2nE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// The beam's haze, blurred over the neighboring texels at its own resolution, each weighted by how\n// close its scene distance is to the texel's: the dither of the samples along the rays smooths\n// out, but the haze in front of a ridge does not spill onto the ridge.\nprecision highp sampler2D;\nuniform sampler2D beamTexture;\nin vec2 v_textureCoordinates;\n\n// difference of the log2 of the distances at which a neighbor no longer counts, about 10 %\nconst float SOFT_DEPTH = 0.14;\n\nvoid main() {\n // czm_viewport is this pass's texture, the size of the beam's\n vec2 texel = 1.0 / czm_viewport.zw;\n float centerDepth = texture(beamTexture, v_textureCoordinates).g;\n float sum = 0.0;\n float total = 0.0;\n for (int y = -1; y <= 1; y++) {\n for (int x = -1; x <= 1; x++) {\n vec2 sample_ = texture(beamTexture, v_textureCoordinates + vec2(float(x), float(y)) * texel).rg;\n float gap = abs(sample_.g - centerDepth);\n float weight = (x == 0 ? 2.0 : 1.0) * (y == 0 ? 2.0 : 1.0) * clamp(1.0 - gap / SOFT_DEPTH, 0.0, 1.0);\n sum += weight * sample_.r;\n total += weight;\n }\n }\n out_FragColor = vec4(sum / total, centerDepth, 0.0, 1.0);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=SpotlightBeamBlur.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightBeamBlur.d.ts","sourceRoot":"","sources":["../../src/shaders/SpotlightBeamBlur.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from SpotlightBeamBlur.glsl.
2
+ export default "// The beam's haze, blurred over the neighboring texels at its own resolution, each weighted by how\n// close its scene distance is to the texel's: the dither of the samples along the rays smooths\n// out, but the haze in front of a ridge does not spill onto the ridge.\nprecision highp sampler2D;\nuniform sampler2D beamTexture;\nin vec2 v_textureCoordinates;\n\n// difference of the log2 of the distances at which a neighbor no longer counts, about 10 %\nconst float SOFT_DEPTH = 0.14;\n\nvoid main() {\n // czm_viewport is this pass's texture, the size of the beam's\n vec2 texel = 1.0 / czm_viewport.zw;\n float centerDepth = texture(beamTexture, v_textureCoordinates).g;\n float sum = 0.0;\n float total = 0.0;\n for (int y = -1; y <= 1; y++) {\n for (int x = -1; x <= 1; x++) {\n vec2 sample_ = texture(beamTexture, v_textureCoordinates + vec2(float(x), float(y)) * texel).rg;\n float gap = abs(sample_.g - centerDepth);\n float weight = (x == 0 ? 2.0 : 1.0) * (y == 0 ? 2.0 : 1.0) * clamp(1.0 - gap / SOFT_DEPTH, 0.0, 1.0);\n sum += weight * sample_.r;\n total += weight;\n }\n }\n out_FragColor = vec4(sum / total, centerDepth, 0.0, 1.0);\n}\n";
3
+ //# sourceMappingURL=SpotlightBeamBlur.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightBeamBlur.js","sourceRoot":"","sources":["../../src/shaders/SpotlightBeamBlur.js"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAe,wqCAAwqC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// The searchlight's cone, for its beam and for its pool of light: the light hangs above the focus,\n// pointing down. Needs EyeFromDepth.\nprecision highp sampler2D;\nuniform sampler2D depthTexture;\n// in eye coordinates; w is 0 for what is in the middle of the screen\nuniform vec4 focus;\n// local up direction, in eye coordinates\nuniform vec3 up;\n// meters\nuniform float radius;\n// width of the penumbra, as a fraction of the radius\nuniform float softness;\n\n// height of the light above the focus, in radii: a cone of 53 degrees\nconst float HEIGHT = 2.0;\n\nstruct Cone {\n vec3 light;\n float height;\n // cosines of the angles, from the light's axis, at which the pool ends and its penumbra starts\n float coneCos;\n float penumbraCos;\n};\n\n// false without a focus in front of the camera (the sky in the middle, a focus behind)\nbool spotlightCone(out Cone cone) {\n vec4 target = focus.w > 0.0 ? focus : eyeAt(depthTexture, vec2(0.5));\n if (target.w == 0.0 || target.z >= 0.0) {\n return false;\n }\n cone.height = HEIGHT * radius;\n cone.light = target.xyz + cone.height * up;\n float inner = radius * (1.0 - softness);\n cone.coneCos = cone.height / sqrt(cone.height * cone.height + radius * radius);\n cone.penumbraCos = cone.height / sqrt(cone.height * cone.height + inner * inner);\n return true;\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=SpotlightCone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightCone.d.ts","sourceRoot":"","sources":["../../src/shaders/SpotlightCone.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from SpotlightCone.glsl.
2
+ export default "// The searchlight's cone, for its beam and for its pool of light: the light hangs above the focus,\n// pointing down. Needs EyeFromDepth.\nprecision highp sampler2D;\nuniform sampler2D depthTexture;\n// in eye coordinates; w is 0 for what is in the middle of the screen\nuniform vec4 focus;\n// local up direction, in eye coordinates\nuniform vec3 up;\n// meters\nuniform float radius;\n// width of the penumbra, as a fraction of the radius\nuniform float softness;\n\n// height of the light above the focus, in radii: a cone of 53 degrees\nconst float HEIGHT = 2.0;\n\nstruct Cone {\n vec3 light;\n float height;\n // cosines of the angles, from the light's axis, at which the pool ends and its penumbra starts\n float coneCos;\n float penumbraCos;\n};\n\n// false without a focus in front of the camera (the sky in the middle, a focus behind)\nbool spotlightCone(out Cone cone) {\n vec4 target = focus.w > 0.0 ? focus : eyeAt(depthTexture, vec2(0.5));\n if (target.w == 0.0 || target.z >= 0.0) {\n return false;\n }\n cone.height = HEIGHT * radius;\n cone.light = target.xyz + cone.height * up;\n float inner = radius * (1.0 - softness);\n cone.coneCos = cone.height / sqrt(cone.height * cone.height + radius * radius);\n cone.penumbraCos = cone.height / sqrt(cone.height * cone.height + inner * inner);\n return true;\n}\n";
3
+ //# sourceMappingURL=SpotlightCone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightCone.js","sourceRoot":"","sources":["../../src/shaders/SpotlightCone.js"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,eAAe,i0CAAi0C,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// A Super 8 home movie: faded warm colors, halation around the highlights, heavy grain, the frame\n// drifting in the gate, flicker, light leaks, a strong vignette and the rounded corners of the\n// camera gate.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// the scene blurred, for the halation\nuniform sampler2D blurTexture;\n// seconds\nuniform float time;\n// 0 to 1\nuniform float fade;\nuniform float grain;\n// in CSS pixels\nuniform float weave;\n// 0 to 1\nuniform float flicker;\nuniform float lightLeaks;\nuniform float halation;\n// width over height of the visible frame, 0 for the whole canvas\nuniform float aspectRatio;\nin vec2 v_textureCoordinates;\n\n// Super 8 runs at 18 frames per second\nconst float FRAME_RATE = 18.0;\n// radius of the rounded corners, as a fraction of the frame height\nconst float CORNER = 0.05;\nconst vec3 LEAK = vec3(1.0, 0.45, 0.15);\n// size of the grain clumps, in CSS pixels, and how much they differ between the dye layers\nconst float GRAIN_SIZE = 2.0;\nconst float GRAIN_COLOR = 0.3;\n// light scattered back through the film base is red-orange\nconst vec3 HALATION = vec3(1.0, 0.35, 0.15);\n\nfloat hash(float n) {\n return fract(sin(n) * 43758.5453);\n}\n\n// smooth noise in [0, 1) over time\nfloat noise(float t) {\n float i = floor(t);\n float f = fract(t);\n return mix(hash(i), hash(i + 1.0), f * f * (3.0 - 2.0 * f));\n}\n\nvoid main() {\n vec2 size = czm_viewport.zw;\n // the time of the film frame, and its number for the noise\n float t = floor(time * FRAME_RATE) / FRAME_RATE;\n float frame = mod(floor(time * FRAME_RATE), 1000.0);\n\n // gate weave: the whole picture drifts by a pixel or two, from frame to frame\n vec2 drift = vec2(noise(t * 3.0), noise(t * 3.0 + 17.0)) * 2.0 - 1.0;\n vec2 uv = v_textureCoordinates + weave * czm_pixelRatio * drift / size;\n\n // the gate, with rounded corners, in pixels\n vec2 frameHalf = 0.5 * frameSize(aspectRatio) * size;\n float radius = CORNER * 2.0 * frameHalf.y;\n vec2 q = abs((v_textureCoordinates - 0.5) * size) - frameHalf + radius;\n float outside = length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - radius;\n float gate = 1.0 - smoothstep(-czm_pixelRatio, czm_pixelRatio, outside);\n // -0.5 to 0.5 inside the frame\n vec2 inFrame = (v_textureCoordinates - 0.5) * size / (2.0 * frameHalf);\n\n vec3 color = texture(colorTexture, uv).rgb;\n // faded film: less saturation, lifted blacks, a warm cast\n color = mix(color, vec3(czm_luminance(color)), 0.4 * fade);\n color = mix(color, color * vec3(1.05, 0.95, 0.78) * 0.88 + vec3(0.09, 0.07, 0.05), fade);\n // halation: a warm glow bleeding around the highlights\n float glow = smoothstep(0.45, 0.9, czm_luminance(texture(blurTexture, uv).rgb));\n color = 1.0 - (1.0 - color) * (1.0 - halation * glow * HALATION);\n // vignette\n color *= 1.0 - 0.6 * smoothstep(0.35, 0.85, length(inFrame));\n // a warm light leak, drifting along the right edge and coming and going\n vec2 leakAt = vec2(0.6, noise(time * 0.15) - 0.5);\n float leak = lightLeaks * smoothstep(0.3, 0.9, noise(time * 0.3 + 5.0)) * exp(-6.0 * dot(inFrame - leakAt, inFrame - leakAt));\n color = 1.0 - (1.0 - color) * (1.0 - leak * LEAK);\n // flicker: the brightness changes from frame to frame\n color *= 1.0 + flicker * (2.0 * hash(frame) - 1.0);\n // grain: clumps a few pixels wide, a new pattern with each film frame, a little different in\n // each dye layer, heaviest in the shadows and midtones and fading out in the highlights\n vec2 grainAt = gl_FragCoord.xy / (GRAIN_SIZE * czm_pixelRatio);\n float z = frame * 1.7 + 0.5;\n float mono = gradientNoise(grainAt, z);\n vec3 layers = vec3(gradientNoise(grainAt, z + 101.0), gradientNoise(grainAt, z + 211.0), gradientNoise(grainAt, z + 307.0));\n vec3 noise = mix(vec3(mono), layers, GRAIN_COLOR);\n float y = clamp(czm_luminance(color), 0.0, 1.0);\n color += grain * 1.4 * noise * 2.0 * (1.0 - y) * (0.5 + y);\n\n out_FragColor = vec4(clamp(color, 0.0, 1.0) * gate, 1.0);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=Super8.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Super8.d.ts","sourceRoot":"","sources":["../../src/shaders/Super8.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from Super8.glsl.
2
+ export default "// A Super 8 home movie: faded warm colors, halation around the highlights, heavy grain, the frame\n// drifting in the gate, flicker, light leaks, a strong vignette and the rounded corners of the\n// camera gate.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// the scene blurred, for the halation\nuniform sampler2D blurTexture;\n// seconds\nuniform float time;\n// 0 to 1\nuniform float fade;\nuniform float grain;\n// in CSS pixels\nuniform float weave;\n// 0 to 1\nuniform float flicker;\nuniform float lightLeaks;\nuniform float halation;\n// width over height of the visible frame, 0 for the whole canvas\nuniform float aspectRatio;\nin vec2 v_textureCoordinates;\n\n// Super 8 runs at 18 frames per second\nconst float FRAME_RATE = 18.0;\n// radius of the rounded corners, as a fraction of the frame height\nconst float CORNER = 0.05;\nconst vec3 LEAK = vec3(1.0, 0.45, 0.15);\n// size of the grain clumps, in CSS pixels, and how much they differ between the dye layers\nconst float GRAIN_SIZE = 2.0;\nconst float GRAIN_COLOR = 0.3;\n// light scattered back through the film base is red-orange\nconst vec3 HALATION = vec3(1.0, 0.35, 0.15);\n\nfloat hash(float n) {\n return fract(sin(n) * 43758.5453);\n}\n\n// smooth noise in [0, 1) over time\nfloat noise(float t) {\n float i = floor(t);\n float f = fract(t);\n return mix(hash(i), hash(i + 1.0), f * f * (3.0 - 2.0 * f));\n}\n\nvoid main() {\n vec2 size = czm_viewport.zw;\n // the time of the film frame, and its number for the noise\n float t = floor(time * FRAME_RATE) / FRAME_RATE;\n float frame = mod(floor(time * FRAME_RATE), 1000.0);\n\n // gate weave: the whole picture drifts by a pixel or two, from frame to frame\n vec2 drift = vec2(noise(t * 3.0), noise(t * 3.0 + 17.0)) * 2.0 - 1.0;\n vec2 uv = v_textureCoordinates + weave * czm_pixelRatio * drift / size;\n\n // the gate, with rounded corners, in pixels\n vec2 frameHalf = 0.5 * frameSize(aspectRatio) * size;\n float radius = CORNER * 2.0 * frameHalf.y;\n vec2 q = abs((v_textureCoordinates - 0.5) * size) - frameHalf + radius;\n float outside = length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - radius;\n float gate = 1.0 - smoothstep(-czm_pixelRatio, czm_pixelRatio, outside);\n // -0.5 to 0.5 inside the frame\n vec2 inFrame = (v_textureCoordinates - 0.5) * size / (2.0 * frameHalf);\n\n vec3 color = texture(colorTexture, uv).rgb;\n // faded film: less saturation, lifted blacks, a warm cast\n color = mix(color, vec3(czm_luminance(color)), 0.4 * fade);\n color = mix(color, color * vec3(1.05, 0.95, 0.78) * 0.88 + vec3(0.09, 0.07, 0.05), fade);\n // halation: a warm glow bleeding around the highlights\n float glow = smoothstep(0.45, 0.9, czm_luminance(texture(blurTexture, uv).rgb));\n color = 1.0 - (1.0 - color) * (1.0 - halation * glow * HALATION);\n // vignette\n color *= 1.0 - 0.6 * smoothstep(0.35, 0.85, length(inFrame));\n // a warm light leak, drifting along the right edge and coming and going\n vec2 leakAt = vec2(0.6, noise(time * 0.15) - 0.5);\n float leak = lightLeaks * smoothstep(0.3, 0.9, noise(time * 0.3 + 5.0)) * exp(-6.0 * dot(inFrame - leakAt, inFrame - leakAt));\n color = 1.0 - (1.0 - color) * (1.0 - leak * LEAK);\n // flicker: the brightness changes from frame to frame\n color *= 1.0 + flicker * (2.0 * hash(frame) - 1.0);\n // grain: clumps a few pixels wide, a new pattern with each film frame, a little different in\n // each dye layer, heaviest in the shadows and midtones and fading out in the highlights\n vec2 grainAt = gl_FragCoord.xy / (GRAIN_SIZE * czm_pixelRatio);\n float z = frame * 1.7 + 0.5;\n float mono = gradientNoise(grainAt, z);\n vec3 layers = vec3(gradientNoise(grainAt, z + 101.0), gradientNoise(grainAt, z + 211.0), gradientNoise(grainAt, z + 307.0));\n vec3 noise = mix(vec3(mono), layers, GRAIN_COLOR);\n float y = clamp(czm_luminance(color), 0.0, 1.0);\n color += grain * 1.4 * noise * 2.0 * (1.0 - y) * (0.5 + y);\n\n out_FragColor = vec4(clamp(color, 0.0, 1.0) * gate, 1.0);\n}\n";
3
+ //# sourceMappingURL=Super8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Super8.js","sourceRoot":"","sources":["../../src/shaders/Super8.js"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,eAAe,67HAA67H,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// Three-strip Technicolor: the camera split the scene into red, green and blue records, each\n// printed with its complementary dye, the three dyes over each other. Each color gains its purity,\n// what it has over the other two, and loses some of theirs: grays stay, primaries deepen. After\n// prod80's ReShade Technicolor (MIT), https://github.com/prod80/prod80-ReShade-Repository\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// 0 to 1\nuniform float strength;\n// width over height of the visible frame, 0 for the whole canvas\nuniform float aspectRatio;\nin vec2 v_textureCoordinates;\n\n// how much of the other colors' purity each color loses\nconst float COLOR_STRENGTH = 0.2;\n\nvoid main() {\n vec2 inFrame = (v_textureCoordinates - 0.5) / frameSize(aspectRatio);\n if (max(abs(inFrame.x), abs(inFrame.y)) > 0.5) {\n out_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n return;\n }\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = sceneColor.rgb;\n // red: r (1 - g) (1 - b), and so on\n vec3 negative = 1.0 - color;\n vec3 purity = color * negative.grg * negative.bbr;\n vec3 taken = COLOR_STRENGTH * purity;\n vec3 printed = color + purity - taken.yxy - taken.zzx;\n out_FragColor = vec4(clamp(mix(color, printed, strength), 0.0, 1.0), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=Technicolor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Technicolor.d.ts","sourceRoot":"","sources":["../../src/shaders/Technicolor.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from Technicolor.glsl.
2
+ export default "// Three-strip Technicolor: the camera split the scene into red, green and blue records, each\n// printed with its complementary dye, the three dyes over each other. Each color gains its purity,\n// what it has over the other two, and loses some of theirs: grays stay, primaries deepen. After\n// prod80's ReShade Technicolor (MIT), https://github.com/prod80/prod80-ReShade-Repository\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// 0 to 1\nuniform float strength;\n// width over height of the visible frame, 0 for the whole canvas\nuniform float aspectRatio;\nin vec2 v_textureCoordinates;\n\n// how much of the other colors' purity each color loses\nconst float COLOR_STRENGTH = 0.2;\n\nvoid main() {\n vec2 inFrame = (v_textureCoordinates - 0.5) / frameSize(aspectRatio);\n if (max(abs(inFrame.x), abs(inFrame.y)) > 0.5) {\n out_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n return;\n }\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n vec3 color = sceneColor.rgb;\n // red: r (1 - g) (1 - b), and so on\n vec3 negative = 1.0 - color;\n vec3 purity = color * negative.grg * negative.bbr;\n vec3 taken = COLOR_STRENGTH * purity;\n vec3 printed = color + purity - taken.yxy - taken.zzx;\n out_FragColor = vec4(clamp(mix(color, printed, strength), 0.0, 1.0), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=Technicolor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Technicolor.js","sourceRoot":"","sources":["../../src/shaders/Technicolor.js"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAe,8yCAA8yC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// Tilt-shift: a narrow band of sharpness around the focal distance and the blurred image further\n// off, with the punchy colors of miniature photographs. Distances compare as ratios, like a lens:\n// sharp within range factors of two of the focal distance, fully blurred at twice that. An\n// orthographic camera has no distance to compare: a band across the screen, as a miniature's fake,\n// sharp within range of the view's height above and below the focus, whatever stands there.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\n// in eye coordinates; w is 0 for what is in the middle of the screen\nuniform vec4 focus;\n// in factors of two of the focal distance, or shares of the view's height (orthographic)\nuniform float range;\n// 0 to 1\nuniform float saturation;\nin vec2 v_textureCoordinates;\n\nvoid main() {\n vec4 target = focus.w > 0.0 ? focus : eyeAt(depthTexture, vec2(0.5));\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n float fromCamera = eye.w == 0.0 ? 1e30 : length(eye.xyz);\n // the orthographic view's height: its projection's y scale is 2 over it\n float off = czm_orthographicIn3D == 1.0\n ? abs(eye.y - target.y) * czm_projection[1][1] / 2.0\n : abs(log2(fromCamera / length(target.xyz)));\n // no blur without a focus in front of the camera (the sky in the middle, a focus behind)\n float blur = target.w > 0.0 && target.z < 0.0 ? smoothstep(range, 2.0 * range, off) : 0.0;\n vec4 sceneColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), blur);\n\n vec3 color = sceneColor.rgb;\n color = czm_saturation(color, 1.0 + saturation);\n color = mix(color, smoothstep(0.0, 1.0, color), saturation);\n out_FragColor = vec4(clamp(color, 0.0, 1.0), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=TiltShift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TiltShift.d.ts","sourceRoot":"","sources":["../../src/shaders/TiltShift.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from TiltShift.glsl.
2
+ export default "// Tilt-shift: a narrow band of sharpness around the focal distance and the blurred image further\n// off, with the punchy colors of miniature photographs. Distances compare as ratios, like a lens:\n// sharp within range factors of two of the focal distance, fully blurred at twice that. An\n// orthographic camera has no distance to compare: a band across the screen, as a miniature's fake,\n// sharp within range of the view's height above and below the focus, whatever stands there.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\n// in eye coordinates; w is 0 for what is in the middle of the screen\nuniform vec4 focus;\n// in factors of two of the focal distance, or shares of the view's height (orthographic)\nuniform float range;\n// 0 to 1\nuniform float saturation;\nin vec2 v_textureCoordinates;\n\nvoid main() {\n vec4 target = focus.w > 0.0 ? focus : eyeAt(depthTexture, vec2(0.5));\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n float fromCamera = eye.w == 0.0 ? 1e30 : length(eye.xyz);\n // the orthographic view's height: its projection's y scale is 2 over it\n float off = czm_orthographicIn3D == 1.0\n ? abs(eye.y - target.y) * czm_projection[1][1] / 2.0\n : abs(log2(fromCamera / length(target.xyz)));\n // no blur without a focus in front of the camera (the sky in the middle, a focus behind)\n float blur = target.w > 0.0 && target.z < 0.0 ? smoothstep(range, 2.0 * range, off) : 0.0;\n vec4 sceneColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), blur);\n\n vec3 color = sceneColor.rgb;\n color = czm_saturation(color, 1.0 + saturation);\n color = mix(color, smoothstep(0.0, 1.0, color), saturation);\n out_FragColor = vec4(clamp(color, 0.0, 1.0), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=TiltShift.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TiltShift.js","sourceRoot":"","sources":["../../src/shaders/TiltShift.js"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAe,yzDAAyzD,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// A toy's look, as an isometric game's, after DepthEdges: the edges lit where the surface bends\n// outward and shaded where it bends inward, rounded as molded plastic close up; an outline along\n// the jumps, on their near side, a darker shade of the color; the colors a little richer and\n// warmer; the sky, if asked, a soft gradient.\n// its samplers read in high precision, whatever comes before (a phone's GPU's default is low)\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// how much brighter a convex edge gets, how much darker a concave one\nuniform float light;\nuniform float shade;\n// the edges' bevel, in meters, a pixel at the least; how much darker the outline, 0 for none\nuniform float bevel;\nuniform float outline;\n// the colors' saturation, and a factor each of red, green and blue\nuniform float saturation;\nuniform vec3 warm;\n// the sky's gradient, from the top of the screen to its bottom; w 0 to keep the sky\nuniform vec4 skyTop;\nuniform vec4 skyBottom;\nin vec2 v_textureCoordinates;\n\nvoid main() {\n vec2 uv = v_textureCoordinates;\n vec4 sceneColor = texture(colorTexture, uv);\n float c = depthAt(uv);\n if (c == SKY) {\n out_FragColor = skyTop.w > 0.0 ? vec4(skyAt(uv, skyTop, skyBottom), 1.0) : sceneColor;\n return;\n }\n float pixel = pixelAt(c);\n // the neighbors a bevel's width away: the bend measured over it, strongest on the edge and fading\n // to nothing a bevel off, a rounded edge's highlight\n float steps = clamp(bevel / pixel, 1.0, BEVEL);\n vec3 color = sceneColor.rgb;\n // the creases' neighbours read only when they light or shade: a scene drawing its own edges asks for neither\n if (light != 0.0 || shade != 0.0) {\n vec4 n = neighborsAt(uv, c, steps);\n float crease = creaseOf(n, steps * pixel, pixel);\n color *= n.x + n.y + n.z + n.w > 0.0 ? 1.0 + light * crease : 1.0 - shade * crease;\n }\n if (outline > 0.0) {\n color *= 1.0 - outline * outlineAt(uv, c, vec4(0.0), steps, pixel);\n }\n color = czm_saturation(color, saturation) * warm;\n out_FragColor = vec4(clamp(color, 0.0, 1.0), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=Toy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toy.d.ts","sourceRoot":"","sources":["../../src/shaders/Toy.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from Toy.glsl.
2
+ export default "// A toy's look, as an isometric game's, after DepthEdges: the edges lit where the surface bends\n// outward and shaded where it bends inward, rounded as molded plastic close up; an outline along\n// the jumps, on their near side, a darker shade of the color; the colors a little richer and\n// warmer; the sky, if asked, a soft gradient.\n// its samplers read in high precision, whatever comes before (a phone's GPU's default is low)\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// how much brighter a convex edge gets, how much darker a concave one\nuniform float light;\nuniform float shade;\n// the edges' bevel, in meters, a pixel at the least; how much darker the outline, 0 for none\nuniform float bevel;\nuniform float outline;\n// the colors' saturation, and a factor each of red, green and blue\nuniform float saturation;\nuniform vec3 warm;\n// the sky's gradient, from the top of the screen to its bottom; w 0 to keep the sky\nuniform vec4 skyTop;\nuniform vec4 skyBottom;\nin vec2 v_textureCoordinates;\n\nvoid main() {\n vec2 uv = v_textureCoordinates;\n vec4 sceneColor = texture(colorTexture, uv);\n float c = depthAt(uv);\n if (c == SKY) {\n out_FragColor = skyTop.w > 0.0 ? vec4(skyAt(uv, skyTop, skyBottom), 1.0) : sceneColor;\n return;\n }\n float pixel = pixelAt(c);\n // the neighbors a bevel's width away: the bend measured over it, strongest on the edge and fading\n // to nothing a bevel off, a rounded edge's highlight\n float steps = clamp(bevel / pixel, 1.0, BEVEL);\n vec3 color = sceneColor.rgb;\n // the creases' neighbours read only when they light or shade: a scene drawing its own edges asks for neither\n if (light != 0.0 || shade != 0.0) {\n vec4 n = neighborsAt(uv, c, steps);\n float crease = creaseOf(n, steps * pixel, pixel);\n color *= n.x + n.y + n.z + n.w > 0.0 ? 1.0 + light * crease : 1.0 - shade * crease;\n }\n if (outline > 0.0) {\n color *= 1.0 - outline * outlineAt(uv, c, vec4(0.0), steps, pixel);\n }\n color = czm_saturation(color, saturation) * warm;\n out_FragColor = vec4(clamp(color, 0.0, 1.0), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=Toy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toy.js","sourceRoot":"","sources":["../../src/shaders/Toy.js"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,eAAe,6kEAA6kE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// Trails: a glowing streak along the recent positions of each moving thing, fading with age.\n// The streak is measured in meters at its depth, with a floor of a few pixels so that a far one\n// still shows, and is hidden where the scene is in front of it.\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nconst int MAX_POINTS = 64;\n// in eye coordinates, consecutive points of a trail; w is the age in seconds, negative for a\n// break between trails or an unused slot\nuniform vec4 trail[MAX_POINTS];\n// seconds\nuniform float fade;\n// half width of the streak, meters\nuniform float width;\nuniform vec3 color;\nin vec2 v_textureCoordinates;\n\n// pixels\nconst float MIN_WIDTH = 1.5;\n// brightness of a streak at its center, fresh\nconst float INTENSITY = 0.5;\n// a point this far behind the depth under it is hidden, meters\nconst float OCCLUSION = 0.5;\n\nvoid main() {\n vec2 uv = v_textureCoordinates;\n vec2 aspect = vec2(czm_viewport.z / czm_viewport.w, 1.0);\n vec2 pixel = (2.0 * uv - 1.0) * aspect;\n float minWidth = MIN_WIDTH * czm_pixelRatio * 2.0 / czm_viewport.w;\n vec4 under = eyeAt(depthTexture, uv);\n float underDistance = under.w != 0.0 ? length(under.xyz) : 1e30;\n\n float glow = 0.0;\n for (int i = 0; i < MAX_POINTS - 1; i++) {\n vec4 a = trail[i];\n vec4 b = trail[i + 1];\n if (a.w < 0.0 || b.w < 0.0 || a.z >= 0.0 || b.z >= 0.0 || a.w > fade) {\n continue;\n }\n vec4 clipA = czm_projection * vec4(a.xyz, 1.0);\n vec4 clipB = czm_projection * vec4(b.xyz, 1.0);\n vec2 pa = clipA.xy / clipA.w * aspect;\n vec2 pb = clipB.xy / clipB.w * aspect;\n vec2 ab = pb - pa;\n float t = clamp(dot(pixel - pa, ab) / max(dot(ab, ab), 1e-12), 0.0, 1.0);\n float distance = length(pixel - (pa + t * ab));\n float depth = mix(-a.z, -b.z, t);\n if (mix(length(a.xyz), length(b.xyz), t) > underDistance + OCCLUSION) {\n continue;\n }\n float halfWidth = max(width * czm_projection[1][1] / depth, minWidth);\n float age = mix(a.w, b.w, t);\n glow += exp(-pow(distance / halfWidth, 2.0)) * (1.0 - age / fade);\n }\n vec4 sceneColor = texture(colorTexture, uv);\n out_FragColor = vec4(sceneColor.rgb + color * INTENSITY * min(glow, 1.0), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=Trails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trails.d.ts","sourceRoot":"","sources":["../../src/shaders/Trails.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from Trails.glsl.
2
+ export default "// Trails: a glowing streak along the recent positions of each moving thing, fading with age.\n// The streak is measured in meters at its depth, with a floor of a few pixels so that a far one\n// still shows, and is hidden where the scene is in front of it.\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nconst int MAX_POINTS = 64;\n// in eye coordinates, consecutive points of a trail; w is the age in seconds, negative for a\n// break between trails or an unused slot\nuniform vec4 trail[MAX_POINTS];\n// seconds\nuniform float fade;\n// half width of the streak, meters\nuniform float width;\nuniform vec3 color;\nin vec2 v_textureCoordinates;\n\n// pixels\nconst float MIN_WIDTH = 1.5;\n// brightness of a streak at its center, fresh\nconst float INTENSITY = 0.5;\n// a point this far behind the depth under it is hidden, meters\nconst float OCCLUSION = 0.5;\n\nvoid main() {\n vec2 uv = v_textureCoordinates;\n vec2 aspect = vec2(czm_viewport.z / czm_viewport.w, 1.0);\n vec2 pixel = (2.0 * uv - 1.0) * aspect;\n float minWidth = MIN_WIDTH * czm_pixelRatio * 2.0 / czm_viewport.w;\n vec4 under = eyeAt(depthTexture, uv);\n float underDistance = under.w != 0.0 ? length(under.xyz) : 1e30;\n\n float glow = 0.0;\n for (int i = 0; i < MAX_POINTS - 1; i++) {\n vec4 a = trail[i];\n vec4 b = trail[i + 1];\n if (a.w < 0.0 || b.w < 0.0 || a.z >= 0.0 || b.z >= 0.0 || a.w > fade) {\n continue;\n }\n vec4 clipA = czm_projection * vec4(a.xyz, 1.0);\n vec4 clipB = czm_projection * vec4(b.xyz, 1.0);\n vec2 pa = clipA.xy / clipA.w * aspect;\n vec2 pb = clipB.xy / clipB.w * aspect;\n vec2 ab = pb - pa;\n float t = clamp(dot(pixel - pa, ab) / max(dot(ab, ab), 1e-12), 0.0, 1.0);\n float distance = length(pixel - (pa + t * ab));\n float depth = mix(-a.z, -b.z, t);\n if (mix(length(a.xyz), length(b.xyz), t) > underDistance + OCCLUSION) {\n continue;\n }\n float halfWidth = max(width * czm_projection[1][1] / depth, minWidth);\n float age = mix(a.w, b.w, t);\n glow += exp(-pow(distance / halfWidth, 2.0)) * (1.0 - age / fade);\n }\n vec4 sceneColor = texture(colorTexture, uv);\n out_FragColor = vec4(sceneColor.rgb + color * INTENSITY * min(glow, 1.0), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=Trails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trails.js","sourceRoot":"","sources":["../../src/shaders/Trails.js"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,eAAe,ytEAAytE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// Fog filling the valleys below an altitude: the fog along the ray from the camera to the pixel\n// is the part of the ray below the top, the density thinning over a soft band under the top. Needs\n// EyeFromDepth, Height and Fog.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\n// meters above the ellipsoid\nuniform float top;\n// per meter\nuniform float density;\n// meters\nuniform float softness;\nuniform vec4 color;\nin vec2 v_textureCoordinates;\n\n// the integral of clamp(x, 0, 1)\nfloat ramp(float x) {\n return x <= 0.0 ? 0.0 : x < 1.0 ? 0.5 * x * x : x - 0.5;\n}\n\n// mean fraction of the density along a straight ray from height h0 to h1\nfloat fogFraction(float h0, float h1) {\n float band = max(softness, 1e-3);\n if (abs(h1 - h0) < 1e-2) {\n return clamp((top - h0) / band, 0.0, 1.0);\n }\n return band * (ramp((top - h0) / band) - ramp((top - h1) / band)) / (h1 - h0);\n}\n\nvoid main() {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n // the sky is a direction\n vec3 end = eye.w == 0.0 ? eye.xyz * SKY_DISTANCE : eye.xyz;\n float amount = 1.0 - exp(-density * length(end) * fogFraction(cameraHeight, heightAt(end)));\n // lit by the sun, as Cesium's fog: the fog color during the day, turning around sunset to a\n // moonlit blue as bright as the scene's fog.minimumBrightness, rather than a flat gray\n vec3 fogColor = byDaylight(color.rgb, daylight());\n out_FragColor = vec4(mix(sceneColor.rgb, fogColor, amount * color.a), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=ValleyFog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValleyFog.d.ts","sourceRoot":"","sources":["../../src/shaders/ValleyFog.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from ValleyFog.glsl.
2
+ export default "// Fog filling the valleys below an altitude: the fog along the ray from the camera to the pixel\n// is the part of the ray below the top, the density thinning over a soft band under the top. Needs\n// EyeFromDepth, Height and Fog.\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\n// meters above the ellipsoid\nuniform float top;\n// per meter\nuniform float density;\n// meters\nuniform float softness;\nuniform vec4 color;\nin vec2 v_textureCoordinates;\n\n// the integral of clamp(x, 0, 1)\nfloat ramp(float x) {\n return x <= 0.0 ? 0.0 : x < 1.0 ? 0.5 * x * x : x - 0.5;\n}\n\n// mean fraction of the density along a straight ray from height h0 to h1\nfloat fogFraction(float h0, float h1) {\n float band = max(softness, 1e-3);\n if (abs(h1 - h0) < 1e-2) {\n return clamp((top - h0) / band, 0.0, 1.0);\n }\n return band * (ramp((top - h0) / band) - ramp((top - h1) / band)) / (h1 - h0);\n}\n\nvoid main() {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n vec4 eye = eyeAt(depthTexture, v_textureCoordinates);\n // the sky is a direction\n vec3 end = eye.w == 0.0 ? eye.xyz * SKY_DISTANCE : eye.xyz;\n float amount = 1.0 - exp(-density * length(end) * fogFraction(cameraHeight, heightAt(end)));\n // lit by the sun, as Cesium's fog: the fog color during the day, turning around sunset to a\n // moonlit blue as bright as the scene's fog.minimumBrightness, rather than a flat gray\n vec3 fogColor = byDaylight(color.rgb, daylight());\n out_FragColor = vec4(mix(sceneColor.rgb, fogColor, amount * color.a), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=ValleyFog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValleyFog.js","sourceRoot":"","sources":["../../src/shaders/ValleyFog.js"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAe,4kDAA4kD,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// Where it rains: the map of the local intensity, 0 to 1 in its red channel, over a rectangle of\n// longitudes and latitudes, sampled bilinearly, which fades the rain in over a cell at its edges.\n// Without a map, a pixel over the whole globe: rain everywhere for Precipitation, none for Clouds.\n// A next map over the same rectangle crossfades from it by the blend, as the radar from one hour to\n// the next; without one, the map again.\nprecision highp sampler2D;\nuniform sampler2D map;\nuniform sampler2D nextMap;\nuniform float mapBlend;\n// the rectangle in the ellipsoid's texture coordinates: its west and south, and one over its width\n// and height\nuniform vec4 mapBounds;\n\n// a point in world coordinates on the map, 0 to 1 over its rectangle: single precision rounds it to\n// about half a meter, nothing at the scale of a map\nvec2 mapUv(vec3 positionWC) {\n vec3 normal = normalize(positionWC * czm_ellipsoidInverseRadii * czm_ellipsoidInverseRadii);\n return (czm_ellipsoidTextureCoordinates(normal) - mapBounds.xy) * mapBounds.zw;\n}\n\n// the map's texel at a point in world coordinates, all its channels, 0 outside the map\nvec4 mapTexelAt(vec3 positionWC) {\n vec2 uv = mapUv(positionWC);\n if (any(lessThan(uv, vec2(0.0))) || any(greaterThan(uv, vec2(1.0)))) {\n return vec4(0.0);\n }\n return mix(texture(map, uv), texture(nextMap, uv), mapBlend);\n}\n\n// the local intensity at a point in world coordinates, 0 outside the map\nfloat mapAt(vec3 positionWC) {\n return mapTexelAt(positionWC).r;\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=WeatherMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeatherMap.d.ts","sourceRoot":"","sources":["../../src/shaders/WeatherMap.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from WeatherMap.glsl.
2
+ export default "// Where it rains: the map of the local intensity, 0 to 1 in its red channel, over a rectangle of\n// longitudes and latitudes, sampled bilinearly, which fades the rain in over a cell at its edges.\n// Without a map, a pixel over the whole globe: rain everywhere for Precipitation, none for Clouds.\n// A next map over the same rectangle crossfades from it by the blend, as the radar from one hour to\n// the next; without one, the map again.\nprecision highp sampler2D;\nuniform sampler2D map;\nuniform sampler2D nextMap;\nuniform float mapBlend;\n// the rectangle in the ellipsoid's texture coordinates: its west and south, and one over its width\n// and height\nuniform vec4 mapBounds;\n\n// a point in world coordinates on the map, 0 to 1 over its rectangle: single precision rounds it to\n// about half a meter, nothing at the scale of a map\nvec2 mapUv(vec3 positionWC) {\n vec3 normal = normalize(positionWC * czm_ellipsoidInverseRadii * czm_ellipsoidInverseRadii);\n return (czm_ellipsoidTextureCoordinates(normal) - mapBounds.xy) * mapBounds.zw;\n}\n\n// the map's texel at a point in world coordinates, all its channels, 0 outside the map\nvec4 mapTexelAt(vec3 positionWC) {\n vec2 uv = mapUv(positionWC);\n if (any(lessThan(uv, vec2(0.0))) || any(greaterThan(uv, vec2(1.0)))) {\n return vec4(0.0);\n }\n return mix(texture(map, uv), texture(nextMap, uv), mapBlend);\n}\n\n// the local intensity at a point in world coordinates, 0 outside the map\nfloat mapAt(vec3 positionWC) {\n return mapTexelAt(positionWC).r;\n}\n";
3
+ //# sourceMappingURL=WeatherMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WeatherMap.js","sourceRoot":"","sources":["../../src/shaders/WeatherMap.js"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAe,ogDAAogD,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default = "// A white model's look, as an architect's plaster model or clay render, after DepthEdges: every\n// color turned to its value and the values pressed into a narrow range of whites (an accent's hue\n// kept, if asked; the darkest left black, a section's poch\u00E9), so the light and the shapes alone\n// tell the surfaces apart; darker where surfaces meet, an ambient obscurance from the depth; the\n// creases lit and shaded, a fine outline along the jumps; the sky, if asked, a pale gradient.\n// its samplers read in high precision, whatever comes before (a phone's GPU's default is low)\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// how much brighter a convex edge gets, how much darker a concave one\nuniform float light;\nuniform float shade;\n// the edges' bevel, in meters, a pixel at the least; how much darker the outline, 0 for none\nuniform float bevel;\nuniform float outline;\n// the colors' saturation, 0 for white, and a factor each of red, green and blue: the plaster's tint\nuniform float saturation;\nuniform vec3 warm;\n// the darkest and the lightest values, the scene's black and white; the value under which a color\n// keeps it, 0 for none\nuniform vec2 values;\nuniform float poche;\n// how much darker a corner gets, and how wide its shadow is, in meters\nuniform float occlusion;\nuniform float radius;\n// the sky's gradient, from the top of the screen to its bottom; w 0 to keep the sky\nuniform vec4 skyTop;\nuniform vec4 skyBottom;\nin vec2 v_textureCoordinates;\n\n// the darkest colors' values, under the poch\u00E9's, kept as they are rather than pressed into the\n// whites, fading into them over these shares of it: an architect's poch\u00E9, solid black, or a text's\nconst vec2 POCHE = vec2(0.6, 1.4);\n// the occlusion: its widest, in pixels; its samples, on a spiral turned by the golden angle, the\n// spiral itself turned from pixel to pixel; how steeply above the surface a sample rises to count\n// (the normal from the depth is not exact), and how far from the pixel, in meters, a pixel and a\n// half at the least (the depth's own steps on a flat wall not counted); how many pixels wide the\n// disc is to show, fading in (zoomed out, its samples fall within the depth's noise)\nconst float RING = 48.0;\nconst int SAMPLES = 12;\nconst float GOLDEN = 2.39996;\nconst float BIAS = 0.15;\nconst float NEAREST = 0.05;\nconst vec2 SHOWN = vec2(3.0, 8.0);\n\n// how much the surfaces around uv close in over it, from 0 to 1, as the Alchemy ambient obscurance\n// (McGuire et al. 2011): the share of the samples around it, in a disc of the radius, that rise\n// above its surface (its normal from the depth's slopes), each the more as it rises steeper, none\n// farther than the radius; a corner's foot about a half, a flat floor none. p its eye coordinates, n\n// their slopes' normal\nfloat occludedAt(vec2 uv, vec3 p, vec3 n, float pixel) {\n float reach = min(radius, RING * pixel);\n float shown = smoothstep(SHOWN.x, SHOWN.y, reach / pixel);\n if (shown == 0.0) {\n return 0.0;\n }\n // turned toward the eye\n vec3 eye = czm_orthographicIn3D == 1.0 ? vec3(0.0, 0.0, 1.0) : normalize(-p);\n n = dot(n, eye) < 0.0 ? -n : n;\n float nearest = max(NEAREST, 1.5 * pixel);\n float spin = 6.2832 * fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n float sum = 0.0;\n for (int i = 0; i < SAMPLES; i++) {\n float a = float(i) * GOLDEN + spin;\n vec2 o = vec2(cos(a), sin(a)) * (float(i) + 0.5) / float(SAMPLES) * reach / pixel / czm_viewport.zw;\n vec4 q = eyeAt(depthTexture, uv + o);\n vec3 v = q.xyz - p;\n float d = length(v);\n if (q.w > 0.0 && d > nearest) {\n sum += max(0.0, dot(v / d, n) - BIAS) * (1.0 - smoothstep(0.5 * reach, reach, d));\n }\n }\n return shown * sum / float(SAMPLES);\n}\n\nvoid main() {\n vec2 uv = v_textureCoordinates;\n // the surface's normal from the depth's slopes, read before any pixel returns, in step with its\n // neighbors\n vec3 p = eyeAt(depthTexture, uv).xyz;\n vec3 normal = normalize(cross(dFdx(p), dFdy(p)));\n vec4 sceneColor = texture(colorTexture, uv);\n float c = depthAt(uv);\n if (c == SKY) {\n out_FragColor = skyTop.w > 0.0 ? vec4(skyAt(uv, skyTop, skyBottom), 1.0) : sceneColor;\n return;\n }\n float pixel = pixelAt(c);\n // the color's value pressed between the darkest and the lightest, but the darkest's; its hue as\n // saturated as asked, scaled down rather than clipped where a channel would pass 1\n float value = czm_luminance(sceneColor.rgb);\n float kept = poche > 0.0 ? 1.0 - smoothstep(POCHE.x * poche, POCHE.y * poche, value) : 0.0;\n float pressed = mix(mix(values.x, values.y, value), value, kept);\n vec3 hue = sceneColor.rgb * pressed / max(value, 1e-4);\n vec3 color = mix(vec3(pressed), hue / max(1.0, max(hue.r, max(hue.g, hue.b))), saturation);\n float steps = clamp(bevel / pixel, 1.0, BEVEL);\n if (light != 0.0 || shade != 0.0) {\n vec4 n = neighborsAt(uv, c, steps);\n float crease = creaseOf(n, steps * pixel, pixel);\n color *= n.x + n.y + n.z + n.w > 0.0 ? 1.0 + light * crease : 1.0 - shade * crease;\n }\n if (occlusion > 0.0) {\n color *= 1.0 - occlusion * occludedAt(uv, p, normal, pixel);\n }\n if (outline > 0.0) {\n color *= 1.0 - outline * outlineAt(uv, c, vec4(0.0), steps, pixel);\n }\n out_FragColor = vec4(clamp(color * warm, 0.0, 1.0), sceneColor.a);\n}\n";
2
+ export default _default;
3
+ //# sourceMappingURL=WhiteModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhiteModel.d.ts","sourceRoot":"","sources":["../../src/shaders/WhiteModel.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ // This file is automatically rebuilt from WhiteModel.glsl.
2
+ export default "// A white model's look, as an architect's plaster model or clay render, after DepthEdges: every\n// color turned to its value and the values pressed into a narrow range of whites (an accent's hue\n// kept, if asked; the darkest left black, a section's poché), so the light and the shapes alone\n// tell the surfaces apart; darker where surfaces meet, an ambient obscurance from the depth; the\n// creases lit and shaded, a fine outline along the jumps; the sky, if asked, a pale gradient.\n// its samplers read in high precision, whatever comes before (a phone's GPU's default is low)\nprecision highp sampler2D;\nuniform sampler2D colorTexture;\n// how much brighter a convex edge gets, how much darker a concave one\nuniform float light;\nuniform float shade;\n// the edges' bevel, in meters, a pixel at the least; how much darker the outline, 0 for none\nuniform float bevel;\nuniform float outline;\n// the colors' saturation, 0 for white, and a factor each of red, green and blue: the plaster's tint\nuniform float saturation;\nuniform vec3 warm;\n// the darkest and the lightest values, the scene's black and white; the value under which a color\n// keeps it, 0 for none\nuniform vec2 values;\nuniform float poche;\n// how much darker a corner gets, and how wide its shadow is, in meters\nuniform float occlusion;\nuniform float radius;\n// the sky's gradient, from the top of the screen to its bottom; w 0 to keep the sky\nuniform vec4 skyTop;\nuniform vec4 skyBottom;\nin vec2 v_textureCoordinates;\n\n// the darkest colors' values, under the poché's, kept as they are rather than pressed into the\n// whites, fading into them over these shares of it: an architect's poché, solid black, or a text's\nconst vec2 POCHE = vec2(0.6, 1.4);\n// the occlusion: its widest, in pixels; its samples, on a spiral turned by the golden angle, the\n// spiral itself turned from pixel to pixel; how steeply above the surface a sample rises to count\n// (the normal from the depth is not exact), and how far from the pixel, in meters, a pixel and a\n// half at the least (the depth's own steps on a flat wall not counted); how many pixels wide the\n// disc is to show, fading in (zoomed out, its samples fall within the depth's noise)\nconst float RING = 48.0;\nconst int SAMPLES = 12;\nconst float GOLDEN = 2.39996;\nconst float BIAS = 0.15;\nconst float NEAREST = 0.05;\nconst vec2 SHOWN = vec2(3.0, 8.0);\n\n// how much the surfaces around uv close in over it, from 0 to 1, as the Alchemy ambient obscurance\n// (McGuire et al. 2011): the share of the samples around it, in a disc of the radius, that rise\n// above its surface (its normal from the depth's slopes), each the more as it rises steeper, none\n// farther than the radius; a corner's foot about a half, a flat floor none. p its eye coordinates, n\n// their slopes' normal\nfloat occludedAt(vec2 uv, vec3 p, vec3 n, float pixel) {\n float reach = min(radius, RING * pixel);\n float shown = smoothstep(SHOWN.x, SHOWN.y, reach / pixel);\n if (shown == 0.0) {\n return 0.0;\n }\n // turned toward the eye\n vec3 eye = czm_orthographicIn3D == 1.0 ? vec3(0.0, 0.0, 1.0) : normalize(-p);\n n = dot(n, eye) < 0.0 ? -n : n;\n float nearest = max(NEAREST, 1.5 * pixel);\n float spin = 6.2832 * fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));\n float sum = 0.0;\n for (int i = 0; i < SAMPLES; i++) {\n float a = float(i) * GOLDEN + spin;\n vec2 o = vec2(cos(a), sin(a)) * (float(i) + 0.5) / float(SAMPLES) * reach / pixel / czm_viewport.zw;\n vec4 q = eyeAt(depthTexture, uv + o);\n vec3 v = q.xyz - p;\n float d = length(v);\n if (q.w > 0.0 && d > nearest) {\n sum += max(0.0, dot(v / d, n) - BIAS) * (1.0 - smoothstep(0.5 * reach, reach, d));\n }\n }\n return shown * sum / float(SAMPLES);\n}\n\nvoid main() {\n vec2 uv = v_textureCoordinates;\n // the surface's normal from the depth's slopes, read before any pixel returns, in step with its\n // neighbors\n vec3 p = eyeAt(depthTexture, uv).xyz;\n vec3 normal = normalize(cross(dFdx(p), dFdy(p)));\n vec4 sceneColor = texture(colorTexture, uv);\n float c = depthAt(uv);\n if (c == SKY) {\n out_FragColor = skyTop.w > 0.0 ? vec4(skyAt(uv, skyTop, skyBottom), 1.0) : sceneColor;\n return;\n }\n float pixel = pixelAt(c);\n // the color's value pressed between the darkest and the lightest, but the darkest's; its hue as\n // saturated as asked, scaled down rather than clipped where a channel would pass 1\n float value = czm_luminance(sceneColor.rgb);\n float kept = poche > 0.0 ? 1.0 - smoothstep(POCHE.x * poche, POCHE.y * poche, value) : 0.0;\n float pressed = mix(mix(values.x, values.y, value), value, kept);\n vec3 hue = sceneColor.rgb * pressed / max(value, 1e-4);\n vec3 color = mix(vec3(pressed), hue / max(1.0, max(hue.r, max(hue.g, hue.b))), saturation);\n float steps = clamp(bevel / pixel, 1.0, BEVEL);\n if (light != 0.0 || shade != 0.0) {\n vec4 n = neighborsAt(uv, c, steps);\n float crease = creaseOf(n, steps * pixel, pixel);\n color *= n.x + n.y + n.z + n.w > 0.0 ? 1.0 + light * crease : 1.0 - shade * crease;\n }\n if (occlusion > 0.0) {\n color *= 1.0 - occlusion * occludedAt(uv, p, normal, pixel);\n }\n if (outline > 0.0) {\n color *= 1.0 - outline * outlineAt(uv, c, vec4(0.0), steps, pixel);\n }\n out_FragColor = vec4(clamp(color * warm, 0.0, 1.0), sceneColor.a);\n}\n";
3
+ //# sourceMappingURL=WhiteModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhiteModel.js","sourceRoot":"","sources":["../../src/shaders/WhiteModel.js"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAe,yyKAAyyK,CAAC"}
@@ -0,0 +1,117 @@
1
+ import { Cartesian3 } from '@cesium/core';
2
+ import { PostProcessStage } from '@cesium/engine';
3
+ import Effect from './effect.js';
4
+ import { LocalFrame } from './local-frame.js';
5
+ /**
6
+ * Snow above an altitude, on the slopes gentle enough to hold it, shaded by
7
+ * the sun.
8
+ */
9
+ export default class SnowLine extends Effect {
10
+ altitude_: number;
11
+ transition_: number;
12
+ maxSlope_: number;
13
+ coverage_: number;
14
+ patchiness_: number;
15
+ waterLevel_: number | undefined;
16
+ sunDirection_: Cartesian3 | undefined;
17
+ grain_: number;
18
+ sceneLight_: number;
19
+ steepCover_: number;
20
+ frame_: LocalFrame;
21
+ /**
22
+ * @param {import('@cesium/engine').CesiumWidget} viewer
23
+ * @param {{altitude?: number, transition?: number, maxSlope?: number, coverage?: number, patchiness?: number, waterLevel?: number,
24
+ * sunDirection?: Cartesian3, grain?: number, sceneLight?: number, steepCover?: number, origin?: Cartesian3}} [options]
25
+ */
26
+ constructor(viewer: import('@cesium/engine').CesiumWidget, options?: {
27
+ altitude?: number;
28
+ transition?: number;
29
+ maxSlope?: number;
30
+ coverage?: number;
31
+ patchiness?: number;
32
+ waterLevel?: number;
33
+ sunDirection?: Cartesian3;
34
+ grain?: number;
35
+ sceneLight?: number;
36
+ steepCover?: number;
37
+ origin?: Cartesian3;
38
+ });
39
+ /**
40
+ * @override
41
+ * @param {import('@cesium/engine').Scene} scene
42
+ */
43
+ createStage_(scene: import('@cesium/engine').Scene): PostProcessStage;
44
+ /**
45
+ * @override
46
+ * @param {import('@cesium/engine').Scene} scene
47
+ */
48
+ activated_(scene: import('@cesium/engine').Scene): void;
49
+ /**
50
+ * @override
51
+ * @param {import('@cesium/engine').Scene} scene
52
+ */
53
+ deactivating_(scene: import('@cesium/engine').Scene): void;
54
+ /**
55
+ * Altitude of the snow line, in meters above the ellipsoid.
56
+ */
57
+ get altitude(): number;
58
+ set altitude(value: number);
59
+ /**
60
+ * Height of the band around the altitude over which the snow thins out, in meters.
61
+ */
62
+ get transition(): number;
63
+ set transition(value: number);
64
+ /**
65
+ * Steepest slope that holds snow, in degrees.
66
+ */
67
+ get maxSlope(): number;
68
+ set maxSlope(value: number);
69
+ /**
70
+ * Opacity of the snow, 0 (none: the stage is off) to 1.
71
+ */
72
+ get coverage(): number;
73
+ set coverage(value: number);
74
+ /**
75
+ * How far the coverage thins the snow into patches, 0 to 1: at 0 the coverage is the snow's opacity, at 1 the share of the ground it
76
+ * covers, the noise leaving the rest bare.
77
+ */
78
+ get patchiness(): number;
79
+ set patchiness(value: number);
80
+ /**
81
+ * The water's height above the ellipsoid, in meters, or undefined for none: what lies within a quarter meter of it holds no snow,
82
+ * so that a flat lake stays water.
83
+ */
84
+ get waterLevel(): number | undefined;
85
+ set waterLevel(value: number | undefined);
86
+ /**
87
+ * The direction toward the sun that the snow is shaded by, in world coordinates, or undefined for Cesium's own sun. For a scene lit by a
88
+ * light of its own: `scene.light.direction` is the way the light travels, so give its negation.
89
+ */
90
+ get sunDirection(): Cartesian3 | undefined;
91
+ set sunDirection(value: Cartesian3 | undefined);
92
+ /**
93
+ * The noise's largest scale, in meters, its finer ones a third and a ninth of it: the size of the patches and of the snow line's
94
+ * irregularities. A few meters for a garden, tens for a mountainside.
95
+ */
96
+ get grain(): number;
97
+ set grain(value: number);
98
+ /**
99
+ * How far the snow's brightness is the scene's own, 0 to 1: at 0 the snow is shaded by the sun alone and stays bright at dusk; at 1 it
100
+ * keeps the scene's shadows and darkens with its light, for a scene lit by a light of its own that goes down at night.
101
+ */
102
+ get sceneLight(): number;
103
+ set sceneLight(value: number);
104
+ /**
105
+ * The thin cover the steep slopes keep at the limit, as a fraction of the coverage, 0 to 1: the rock showing through on a mountain; 0
106
+ * for none on the walls of a building.
107
+ */
108
+ get steepCover(): number;
109
+ set steepCover(value: number);
110
+ /**
111
+ * The point of the world the noise is laid about, which keeps the snow's patches where they are as the camera moves; the camera's
112
+ * position when the effect is activated if none is given. Keep it within a few kilometers of what is looked at for a grain of a few meters.
113
+ */
114
+ get origin(): Cartesian3 | undefined;
115
+ set origin(value: Cartesian3 | undefined);
116
+ }
117
+ //# sourceMappingURL=snow-line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow-line.d.ts","sourceRoot":"","sources":["../src/snow-line.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA8B,MAAM,cAAc,CAAC;AACrE,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAW5C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,MAAM;IAQnC,SAAS;IACT,WAAW;IACX,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,aAAa;IACb,MAAM;IACN,WAAW;IACX,WAAW;IACX,MAAM;IAjBb;;;;OAIG;IACH,YAAY,MAAM,EAJP,OAAO,gBAAgB,EAAE,YAIlB,EAAE,OAAO,AAHxB,CACsH,EAD9G;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAC9H,YAAY,CAAC,EAAE,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,UAAU,CAAA;KAE7E,EAa/B;IAED;;;OAGG;IACH,YAAY,CAAC,KAAK,EAFP,OAAO,gBAAgB,EAAE,KAElB,oBAsBjB;IAED;;;OAGG;IACH,UAAU,CAAC,KAAK,EAFL,OAAO,gBAAgB,EAAE,KAEpB,QAGf;IAED;;;OAGG;IACH,aAAa,CAAC,KAAK,EAFR,OAAO,gBAAgB,EAAE,KAEjB,QAElB;IAED;;OAEG;IACH,IAAI,QAAQ,WAEX;IAED,IAAI,QAAQ,CAAC,KAAK,QAAA,EAGjB;IAED;;OAEG;IACH,IAAI,UAAU,WAEb;IAED,IAAI,UAAU,CAAC,KAAK,QAAA,EAGnB;IAED;;OAEG;IACH,IAAI,QAAQ,WAEX;IAED,IAAI,QAAQ,CAAC,KAAK,QAAA,EAGjB;IAED;;OAEG;IACH,IAAI,QAAQ,WAEX;IAED,IAAI,QAAQ,CAAC,KAAK,QAAA,EAMjB;IAED;;;OAGG;IACH,IAAI,UAAU,WAEb;IAED,IAAI,UAAU,CAAC,KAAK,QAAA,EAGnB;IAED;;;OAGG;IACH,IAAI,UAAU,uBAEb;IAED,IAAI,UAAU,CAAC,KAAK,oBAAA,EAGnB;IAED;;;OAGG;IACH,IAAI,YAAY,2BAEf;IAED,IAAI,YAAY,CAAC,KAAK,wBAAA,EAGrB;IAED;;;OAGG;IACH,IAAI,KAAK,WAER;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAGd;IAED;;;OAGG;IACH,IAAI,UAAU,WAEb;IAED,IAAI,UAAU,CAAC,KAAK,QAAA,EAGnB;IAED;;;OAGG;IACH,IAAI,UAAU,WAEb;IAED,IAAI,UAAU,CAAC,KAAK,QAAA,EAGnB;IAED;;;OAGG;IACH,IAAI,MAAM,2BAET;IAED,IAAI,MAAM,CAAC,KAAK,wBAAA,EAGf;CACF"}