llsettingssky.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. /**
  2. * @file llsettingssky.h
  3. * @brief The sky settings asset support class.
  4. *
  5. * $LicenseInfo:firstyear=2018&license=viewergpl$
  6. *
  7. * Copyright (c) 2001-2019, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_SETTINGSSKY_H
  33. #define LL_SETTINGSSKY_H
  34. #include "llsettingsbase.h"
  35. #include "imageids.h"
  36. // Change this to 1 whenever LL implements cariable sky domes for extended
  37. // environment... For now (and this was the case with Windlight as well), the
  38. // sky dome is of fixed size and the SKY_DOME_OFFSET and SKY_DOME_RADIUS below
  39. // are used.
  40. #define LL_VARIABLE_SKY_DOME_SIZE 0
  41. constexpr F32 SKY_DOME_OFFSET = 0.96f;
  42. constexpr F32 SKY_DOME_RADIUS = 15000.f;
  43. class LLSettingsSky : public LLSettingsBase
  44. {
  45. protected:
  46. LOG_CLASS(LLSettingsSky);
  47. LLSettingsSky();
  48. const stringset_t& getSlerpKeys() const override;
  49. const stringset_t& getSkipInterpolateKeys() const override;
  50. public:
  51. LLSettingsSky(const LLSD& data);
  52. ~LLSettingsSky() override {}
  53. typedef std::shared_ptr<LLSettingsSky> ptr_t;
  54. virtual ptr_t buildClone() const = 0;
  55. LL_INLINE LLSettingsBase::ptr_t buildDerivedClone() const override
  56. {
  57. return buildClone();
  58. }
  59. LL_INLINE std::string getSettingsType() const override
  60. {
  61. return "sky";
  62. }
  63. LL_INLINE LLSettingsType::EType getSettingsTypeValue() const override
  64. {
  65. return LLSettingsType::ST_SKY;
  66. }
  67. // Settings status
  68. void blend(const LLSettingsBase::ptr_t& end, F64 blendfactor) override;
  69. void replaceSettings(const LLSD& settings) override;
  70. void replaceWithSky(ptr_t otherp);
  71. static LLSD defaults(F32 position = 0.f);
  72. // Used to create a day cycle out of an existing sky setting. HB
  73. static void adjustTime(LLSD& settings, F32 position);
  74. LL_INLINE F32 getSkyMoistureLevel() const
  75. {
  76. update();
  77. return mSkyMoistureLevel;
  78. }
  79. LL_INLINE F32 getSkyDropletRadius() const
  80. {
  81. update();
  82. return mSkyDropletRadius;
  83. }
  84. LL_INLINE F32 getSkyIceLevel() const
  85. {
  86. update();
  87. return mSkyIceLevel;
  88. }
  89. LL_INLINE LLUUID getBloomTextureId() const
  90. {
  91. return mSettings[SETTING_BLOOM_TEXTUREID].asUUID();
  92. }
  93. LL_INLINE LLUUID getRainbowTextureId() const
  94. {
  95. return mSettings[SETTING_RAINBOW_TEXTUREID].asUUID();
  96. }
  97. LL_INLINE LLUUID getHaloTextureId() const
  98. {
  99. return mSettings[SETTING_HALO_TEXTUREID].asUUID();
  100. }
  101. LL_INLINE void setSkyMoistureLevel(F32 moisture_level)
  102. {
  103. setValue(SETTING_SKY_MOISTURE_LEVEL, moisture_level);
  104. }
  105. LL_INLINE void setSkyDropletRadius(F32 radius)
  106. {
  107. setValue(SETTING_SKY_DROPLET_RADIUS, radius);
  108. }
  109. LL_INLINE void setSkyIceLevel(F32 ice_level)
  110. {
  111. setValue(SETTING_SKY_ICE_LEVEL, ice_level);
  112. }
  113. LL_INLINE void setReflectionProbeAmbiance(F32 val)
  114. {
  115. setValue(SETTING_REFLECTION_PROBE_AMBIANCE, val);
  116. setDirtyFlag(true);
  117. }
  118. LL_INLINE F32 getReflectionProbeAmbiance(bool auto_adjust = false) const
  119. {
  120. update();
  121. return auto_adjust && mCanAutoAdjust ? sAutoAdjustProbeAmbiance
  122. : mReflectionProbeAmbiance;
  123. }
  124. // Removes entirely the probe ambiance parameter to turn the sky settings
  125. // back to a legacy (pre-PBR) sky and let the final users choose whether to
  126. // auto-adjust the probe ambiance for HDR display or not, depending on what
  127. // their monitor can manage. HB
  128. void removeProbeAmbiance();
  129. LL_INLINE bool canAutoAdjust() const
  130. {
  131. update();
  132. return mCanAutoAdjust;
  133. }
  134. LL_INLINE LLColor3 getAmbientColor() const
  135. {
  136. static const LLColor3 default_color(0.25f, 0.25f, 0.25f);
  137. return getColor(SETTING_AMBIENT, default_color);
  138. }
  139. LLColor3 getAmbientColorClamped() const;
  140. LL_INLINE void setAmbientColor(const LLColor3& val)
  141. {
  142. mSettings[SETTING_LEGACY_HAZE][SETTING_AMBIENT] = val.getValue();
  143. setDirtyFlag(true);
  144. }
  145. LL_INLINE LLColor3 getCloudColor() const
  146. {
  147. update();
  148. return mCloudColor;
  149. }
  150. LL_INLINE void setCloudColor(const LLColor3& val)
  151. {
  152. setValue(SETTING_CLOUD_COLOR, val);
  153. }
  154. LL_INLINE LLUUID getCloudNoiseTextureId() const
  155. {
  156. return mSettings[SETTING_CLOUD_TEXTUREID].asUUID();
  157. }
  158. LL_INLINE void setCloudNoiseTextureId(const LLUUID& id)
  159. {
  160. setValue(SETTING_CLOUD_TEXTUREID, LLSD(id));
  161. }
  162. LL_INLINE LLColor3 getCloudPosDensity1() const
  163. {
  164. update();
  165. return mCloudPosDensity1;
  166. }
  167. LL_INLINE void setCloudPosDensity1(const LLColor3& val)
  168. {
  169. setValue(SETTING_CLOUD_POS_DENSITY1, val);
  170. }
  171. // NOTE: getCloudPosDensity2() is not actually used for rendering... HB
  172. LL_INLINE LLColor3 getCloudPosDensity2() const
  173. {
  174. return LLColor3(mSettings[SETTING_CLOUD_POS_DENSITY2]);
  175. }
  176. // NOTE: setCloudPosDensity2() is not actually used for rendering... HB
  177. LL_INLINE void setCloudPosDensity2(const LLColor3& val)
  178. {
  179. setValue(SETTING_CLOUD_POS_DENSITY2, val);
  180. }
  181. // NOTE: getCloudScale() is not actually used for rendering... HB
  182. LL_INLINE F32 getCloudScale() const
  183. {
  184. return mSettings[SETTING_CLOUD_SCALE].asReal();
  185. }
  186. // NOTE: setCloudScale() is not actually used for rendering... HB
  187. LL_INLINE void setCloudScale(F32 val)
  188. {
  189. setValue(SETTING_CLOUD_SCALE, val);
  190. }
  191. LL_INLINE LLVector2 getCloudScrollRate() const
  192. {
  193. update();
  194. return mCloudScrollRate;
  195. }
  196. LL_INLINE void setCloudScrollRate(const LLVector2& val)
  197. {
  198. setValue(SETTING_CLOUD_SCROLL_RATE, val);
  199. }
  200. LL_INLINE void setCloudScrollRateX(F32 val)
  201. {
  202. mSettings[SETTING_CLOUD_SCROLL_RATE][0] = val;
  203. setDirtyFlag(true);
  204. }
  205. LL_INLINE void setCloudScrollRateY(F32 val)
  206. {
  207. mSettings[SETTING_CLOUD_SCROLL_RATE][1] = val;
  208. setDirtyFlag(true);
  209. }
  210. LL_INLINE F32 getCloudShadow() const
  211. {
  212. update();
  213. return mCloudShadow;
  214. }
  215. LL_INLINE void setCloudShadow(F32 val)
  216. {
  217. setValue(SETTING_CLOUD_SHADOW, val);
  218. }
  219. LL_INLINE F32 getCloudVariance() const
  220. {
  221. update();
  222. return mCloudVariance;
  223. }
  224. LL_INLINE void setCloudVariance(F32 val)
  225. {
  226. setValue(SETTING_CLOUD_VARIANCE, val);
  227. }
  228. #if LL_VARIABLE_SKY_DOME_SIZE
  229. F32 getDomeOffset() const;
  230. F32 getDomeRadius() const;
  231. #else
  232. LL_INLINE F32 getDomeOffset() const { return SKY_DOME_OFFSET; }
  233. LL_INLINE F32 getDomeRadius() const { return SKY_DOME_RADIUS; }
  234. #endif
  235. LL_INLINE F32 getGamma() const
  236. {
  237. update();
  238. return mGamma;
  239. }
  240. LL_INLINE void setGamma(F32 val)
  241. {
  242. mSettings[SETTING_GAMMA] = LLSD::Real(val);
  243. setDirtyFlag(true);
  244. }
  245. LL_INLINE LLColor3 getGlow() const
  246. {
  247. update();
  248. return mGlow;
  249. }
  250. LL_INLINE void setGlow(const LLColor3& val)
  251. {
  252. setValue(SETTING_GLOW, val);
  253. }
  254. LL_INLINE F32 getMaxY() const
  255. {
  256. update();
  257. return mMaxY;
  258. }
  259. LL_INLINE void setMaxY(F32 val)
  260. {
  261. setValue(SETTING_MAX_Y, val);
  262. }
  263. LL_INLINE LLQuaternion getMoonRotation() const
  264. {
  265. return LLQuaternion(mSettings[SETTING_MOON_ROTATION]);
  266. }
  267. LL_INLINE void setMoonRotation(const LLQuaternion& val)
  268. {
  269. setValue(SETTING_MOON_ROTATION, val);
  270. }
  271. LL_INLINE F32 getMoonScale() const
  272. {
  273. update();
  274. return mMoonScale;
  275. }
  276. LL_INLINE void setMoonScale(F32 val)
  277. {
  278. setValue(SETTING_MOON_SCALE, val);
  279. }
  280. LL_INLINE LLUUID getMoonTextureId() const
  281. {
  282. return mSettings[SETTING_MOON_TEXTUREID].asUUID();
  283. }
  284. LL_INLINE void setMoonTextureId(const LLUUID& id)
  285. {
  286. setValue(SETTING_MOON_TEXTUREID, LLSD(id));
  287. }
  288. LL_INLINE F32 getMoonBrightness() const
  289. {
  290. update();
  291. return mMoonBrightness;
  292. }
  293. LL_INLINE void setMoonBrightness(F32 brightness_factor)
  294. {
  295. setValue(SETTING_MOON_BRIGHTNESS, brightness_factor);
  296. }
  297. // Color based on brightness
  298. LL_INLINE const LLColor3& getMoonlightColor() const
  299. {
  300. return getSunlightColor(); // The Moon reflects the Sun light...
  301. }
  302. LL_INLINE F32 getStarBrightness() const
  303. {
  304. update();
  305. return mStarBrightness;
  306. }
  307. LL_INLINE void setStarBrightness(F32 val)
  308. {
  309. setValue(SETTING_STAR_BRIGHTNESS, val);
  310. }
  311. LL_INLINE const LLColor3& getSunlightColor() const
  312. {
  313. update();
  314. return mSunlightColor;
  315. }
  316. LLColor3 getSunlightColorClamped() const;
  317. LL_INLINE void setSunlightColor(const LLColor3& val)
  318. {
  319. setValue(SETTING_SUNLIGHT_COLOR, val);
  320. }
  321. LL_INLINE LLQuaternion getSunRotation() const
  322. {
  323. return LLQuaternion(mSettings[SETTING_SUN_ROTATION]);
  324. }
  325. LL_INLINE void setSunRotation(const LLQuaternion& val)
  326. {
  327. setValue(SETTING_SUN_ROTATION, val);
  328. }
  329. LL_INLINE F32 getSunScale() const
  330. {
  331. update();
  332. return mSunScale;
  333. }
  334. LL_INLINE void setSunScale(F32 val)
  335. {
  336. setValue(SETTING_SUN_SCALE, val);
  337. }
  338. LL_INLINE LLUUID getSunTextureId() const
  339. {
  340. return mSettings[SETTING_SUN_TEXTUREID].asUUID();
  341. }
  342. LL_INLINE void setSunTextureId(const LLUUID& id)
  343. {
  344. setValue(SETTING_SUN_TEXTUREID, LLSD(id));
  345. }
  346. // Transient properties used in animations.
  347. LL_INLINE LLUUID getNextSunTextureId() const { return mNextSunTextureId; }
  348. LL_INLINE LLUUID getNextMoonTextureId() const { return mNextMoonTextureId; }
  349. LL_INLINE LLUUID getNextBloomTextureId() const { return mNextBloomTextureId; }
  350. LL_INLINE LLUUID getNextCloudNoiseTextureId() const
  351. {
  352. return mNextCloudTextureId;
  353. }
  354. const validation_list_t& getValidationList() const override;
  355. static const validation_list_t& validationList();
  356. static LLSD translateLegacySettings(const LLSD& legacy);
  357. // Legacy_atmospherics
  358. static LLSD translateLegacyHazeSettings(const LLSD& legacy);
  359. static LLColor3 gammaCorrect(const LLColor3& in, F32 gamma);
  360. LLColor3 getTotalDensity() const;
  361. // Fast version to avoid calling slow getColor() and getFloat() many times
  362. LL_INLINE static LLColor3 totalDensity(const LLColor3& bd, F32 hd)
  363. {
  364. return bd + smear(hd);
  365. }
  366. LLColor3 getLightAttenuation(F32 distance) const;
  367. // Fast version to avoid calling slow getColor() and getFloat() many times
  368. LL_INLINE static LLColor3 lightAttenuation(const LLColor3& bd, F32 hd,
  369. F32 dm, F32 dist)
  370. {
  371. return (bd + smear(hd * 0.25f)) * (dm * dist);
  372. }
  373. LLColor3 getLightTransmittance(F32 distance) const;
  374. // Fast version to avoid calling slow getColor() and getFloat() many times
  375. LL_INLINE static LLColor3 lightTransmittance(const LLColor3& td, F32 dm,
  376. F32 dist)
  377. {
  378. return componentExp(td * (-dm * dist));
  379. }
  380. LL_INLINE LLColor3 getBlueDensity() const
  381. {
  382. static const LLColor3 default_color(0.2447f, 0.4487f, 0.7599f);
  383. return getColor(SETTING_BLUE_DENSITY, default_color);
  384. }
  385. LL_INLINE LLColor3 getBlueHorizon() const
  386. {
  387. static const LLColor3 default_color(0.4954f, 0.4954f, 0.6399f);
  388. return getColor(SETTING_BLUE_HORIZON, default_color);
  389. }
  390. LL_INLINE F32 getHazeDensity() const
  391. {
  392. return getFloat(SETTING_HAZE_DENSITY, 0.7f);
  393. }
  394. LL_INLINE F32 getHazeHorizon() const
  395. {
  396. return getFloat(SETTING_HAZE_HORIZON, 0.19f);
  397. }
  398. LL_INLINE F32 getDensityMultiplier() const
  399. {
  400. update();
  401. return mDensityMultiplier;
  402. }
  403. LL_INLINE F32 getDistanceMultiplier() const
  404. {
  405. update();
  406. return mDistanceMultiplier;
  407. }
  408. LL_INLINE void setBlueDensity(const LLColor3& val)
  409. {
  410. mSettings[SETTING_LEGACY_HAZE][SETTING_BLUE_DENSITY] = val.getValue();
  411. setDirtyFlag(true);
  412. }
  413. LL_INLINE void setBlueHorizon(const LLColor3& val)
  414. {
  415. mSettings[SETTING_LEGACY_HAZE][SETTING_BLUE_HORIZON] = val.getValue();
  416. setDirtyFlag(true);
  417. }
  418. LL_INLINE void setDensityMultiplier(F32 val)
  419. {
  420. mSettings[SETTING_LEGACY_HAZE][SETTING_DENSITY_MULTIPLIER] = val;
  421. setDirtyFlag(true);
  422. }
  423. LL_INLINE void setDistanceMultiplier(F32 val)
  424. {
  425. mSettings[SETTING_LEGACY_HAZE][SETTING_DISTANCE_MULTIPLIER] = val;
  426. setDirtyFlag(true);
  427. }
  428. LL_INLINE void setHazeDensity(F32 val)
  429. {
  430. mSettings[SETTING_LEGACY_HAZE][SETTING_HAZE_DENSITY] = val;
  431. setDirtyFlag(true);
  432. }
  433. LL_INLINE void setHazeHorizon(F32 val)
  434. {
  435. mSettings[SETTING_LEGACY_HAZE][SETTING_HAZE_HORIZON] = val;
  436. setDirtyFlag(true);
  437. }
  438. // Internal/calculated settings
  439. bool getIsSunUp() const;
  440. bool getIsMoonUp() const;
  441. // Determines how much the haze glow effect occurs in rendering
  442. F32 getSunMoonGlowFactor() const;
  443. LLVector3 getLightDirection() const;
  444. LLColor3 getLightDiffuse() const;
  445. LL_INLINE const LLVector3& getSunDirection() const
  446. {
  447. update();
  448. return mSunDirection;
  449. }
  450. LL_INLINE const LLVector3& getMoonDirection() const
  451. {
  452. update();
  453. return mMoonDirection;
  454. }
  455. LL_INLINE const LLColor4& getMoonAmbient() const
  456. {
  457. update();
  458. return mMoonAmbient;
  459. }
  460. LL_INLINE const LLColor3& getMoonDiffuse() const
  461. {
  462. update();
  463. return mMoonDiffuse;
  464. }
  465. LL_INLINE const LLColor4& getSunAmbient() const
  466. {
  467. update();
  468. return mSunAmbient;
  469. }
  470. LL_INLINE const LLColor3& getSunDiffuse() const
  471. {
  472. update();
  473. return mSunDiffuse;
  474. }
  475. LL_INLINE const LLColor4& getTotalAmbient() const
  476. {
  477. update();
  478. return mTotalAmbient;
  479. }
  480. LL_INLINE const LLColor4& getHazeColor() const
  481. {
  482. update();
  483. return mHazeColor;
  484. }
  485. LL_INLINE static const LLUUID& getDefaultAssetId() { return DEFAULT_ASSET_ID; }
  486. LL_INLINE static const LLUUID& getDefaultSunTextureId()
  487. {
  488. return LLUUID::null;
  489. }
  490. LL_INLINE static const LLUUID& getBlankSunTextureId()
  491. {
  492. return DEFAULT_SUN_ID;
  493. }
  494. LL_INLINE static const LLUUID& getDefaultMoonTextureId()
  495. {
  496. return DEFAULT_MOON_ID;
  497. }
  498. LL_INLINE static const LLUUID& getDefaultCloudNoiseTextureId()
  499. {
  500. return DEFAULT_CLOUD_ID;
  501. }
  502. LL_INLINE static const LLUUID& getDefaultBloomTextureId()
  503. {
  504. return IMG_BLOOM1;
  505. }
  506. LL_INLINE static const LLUUID& getDefaultRainbowTextureId()
  507. {
  508. return IMG_RAINBOW;
  509. }
  510. LL_INLINE static const LLUUID& getDefaultHaloTextureId()
  511. {
  512. return IMG_HALO;
  513. }
  514. static LLSD createDensityProfileLayer(F32 width, F32 exponential_term,
  515. F32 exponential_scale_factor,
  516. F32 linear_term, F32 constant_term,
  517. F32 aniso_factor = 0.f);
  518. static LLSD createSingleLayerDensityProfile(F32 width,
  519. F32 exponential_term,
  520. F32 exponential_scale_factor,
  521. F32 linear_term,
  522. F32 constant_term,
  523. F32 aniso_factor = 0.f);
  524. void updateSettings() override;
  525. protected:
  526. // Note: we need an override for this method, because we must deal with
  527. // "reflection_probe_ambiance", which does not exist in pre-PBR sky
  528. // settings. HB
  529. LLSD interpolateSDValue(const std::string& name, const LLSD& value,
  530. const LLSD& other, const parammapping_t& defaults,
  531. F64 mix, const stringset_t& slerps) const override;
  532. private:
  533. LLColor3 getColor(const std::string& key,
  534. const LLColor3& default_value) const;
  535. F32 getFloat(const std::string& key, F32 default_value) const;
  536. void calculateHeavenlyBodyPositions() const;
  537. void calculateLightSettings() const;
  538. static LLSD rayleighConfigDefault();
  539. static LLSD absorptionConfigDefault();
  540. static LLSD mieConfigDefault();
  541. static validation_list_t legacyHazeValidationList();
  542. static validation_list_t rayleighValidationList();
  543. static validation_list_t absorptionValidationList();
  544. static validation_list_t mieValidationList();
  545. static bool validateLegacyHaze(LLSD& value, U32 flags);
  546. static bool validateRayleighLayers(LLSD& value, U32 flags);
  547. static bool validateAbsorptionLayers(LLSD& value, U32 flags);
  548. static bool validateMieLayers(LLSD& value, U32 flags);
  549. public:
  550. static const std::string SETTING_AMBIENT;
  551. static const std::string SETTING_BLOOM_TEXTUREID;
  552. static const std::string SETTING_RAINBOW_TEXTUREID;
  553. static const std::string SETTING_HALO_TEXTUREID;
  554. static const std::string SETTING_BLUE_DENSITY;
  555. static const std::string SETTING_BLUE_HORIZON;
  556. static const std::string SETTING_DENSITY_MULTIPLIER;
  557. static const std::string SETTING_DISTANCE_MULTIPLIER;
  558. static const std::string SETTING_HAZE_DENSITY;
  559. static const std::string SETTING_HAZE_HORIZON;
  560. static const std::string SETTING_CLOUD_COLOR;
  561. static const std::string SETTING_CLOUD_POS_DENSITY1;
  562. static const std::string SETTING_CLOUD_POS_DENSITY2;
  563. static const std::string SETTING_CLOUD_SCALE;
  564. static const std::string SETTING_CLOUD_SCROLL_RATE;
  565. static const std::string SETTING_CLOUD_SHADOW;
  566. static const std::string SETTING_CLOUD_TEXTUREID;
  567. static const std::string SETTING_CLOUD_VARIANCE;
  568. static const std::string SETTING_DOME_OFFSET;
  569. static const std::string SETTING_DOME_RADIUS;
  570. static const std::string SETTING_GAMMA;
  571. static const std::string SETTING_GLOW;
  572. static const std::string SETTING_LIGHT_NORMAL;
  573. static const std::string SETTING_MAX_Y;
  574. static const std::string SETTING_MOON_ROTATION;
  575. static const std::string SETTING_MOON_SCALE;
  576. static const std::string SETTING_MOON_TEXTUREID;
  577. static const std::string SETTING_MOON_BRIGHTNESS;
  578. static const std::string SETTING_STAR_BRIGHTNESS;
  579. static const std::string SETTING_SUNLIGHT_COLOR;
  580. static const std::string SETTING_SUN_ROTATION;
  581. static const std::string SETTING_SUN_SCALE;
  582. static const std::string SETTING_SUN_TEXTUREID;
  583. static const std::string SETTING_PLANET_RADIUS;
  584. static const std::string SETTING_SKY_BOTTOM_RADIUS;
  585. static const std::string SETTING_SKY_TOP_RADIUS;
  586. static const std::string SETTING_SUN_ARC_RADIANS;
  587. static const std::string SETTING_MIE_ANISOTROPY_FACTOR;
  588. static const std::string SETTING_RAYLEIGH_CONFIG;
  589. static const std::string SETTING_MIE_CONFIG;
  590. static const std::string SETTING_ABSORPTION_CONFIG;
  591. static const std::string KEY_DENSITY_PROFILE;
  592. static const std::string SETTING_DENSITY_PROFILE_WIDTH;
  593. static const std::string SETTING_DENSITY_PROFILE_EXP_TERM;
  594. static const std::string SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR;
  595. static const std::string SETTING_DENSITY_PROFILE_LINEAR_TERM;
  596. static const std::string SETTING_DENSITY_PROFILE_CONSTANT_TERM;
  597. static const std::string SETTING_SKY_MOISTURE_LEVEL;
  598. static const std::string SETTING_SKY_DROPLET_RADIUS;
  599. static const std::string SETTING_SKY_ICE_LEVEL;
  600. static const std::string SETTING_REFLECTION_PROBE_AMBIANCE;
  601. static const std::string SETTING_LEGACY_HAZE;
  602. static const LLUUID DEFAULT_ASSET_ID;
  603. static F32 sAutoAdjustProbeAmbiance;
  604. protected:
  605. static const std::string SETTING_LEGACY_EAST_ANGLE;
  606. static const std::string SETTING_LEGACY_ENABLE_CLOUD_SCROLL;
  607. static const std::string SETTING_LEGACY_SUN_ANGLE;
  608. LLUUID mNextSunTextureId;
  609. LLUUID mNextMoonTextureId;
  610. LLUUID mNextCloudTextureId;
  611. LLUUID mNextBloomTextureId;
  612. LLUUID mNextRainbowTextureId;
  613. LLUUID mNextHaloTextureId;
  614. private:
  615. mutable LLColor4 mMoonAmbient;
  616. mutable LLColor4 mSunAmbient;
  617. mutable LLColor4 mTotalAmbient;
  618. mutable LLColor4 mHazeColor;
  619. mutable LLVector2 mCloudScrollRate;
  620. mutable LLVector3 mSunDirection;
  621. mutable LLVector3 mMoonDirection;
  622. mutable LLVector3 mLightDirection;
  623. mutable LLColor3 mMoonDiffuse;
  624. mutable LLColor3 mSunDiffuse;
  625. mutable LLColor3 mCloudPosDensity1;
  626. mutable LLColor3 mSunlightColor;
  627. mutable LLColor3 mCloudColor;
  628. mutable LLColor3 mGlow;
  629. mutable F32 mDensityMultiplier;
  630. mutable F32 mDistanceMultiplier;
  631. mutable F32 mGamma;
  632. mutable F32 mMaxY;
  633. mutable F32 mSunScale;
  634. mutable F32 mMoonScale;
  635. mutable F32 mMoonBrightness;
  636. mutable F32 mStarBrightness;
  637. mutable F32 mSkyMoistureLevel;
  638. mutable F32 mSkyDropletRadius;
  639. mutable F32 mSkyIceLevel;
  640. mutable F32 mCloudShadow;
  641. mutable F32 mCloudVariance;
  642. mutable F32 mReflectionProbeAmbiance;
  643. // If true, this sky is a candidate for auto-adjustment in PBR viewers.
  644. mutable bool mCanAutoAdjust;
  645. };
  646. #endif // LL_SETTINGSSKY_H