summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-04-08 13:07:44 -0700
committerGraham Linden <graham@lindenlab.com>2019-04-08 13:07:44 -0700
commit759525040ac11a2edee541c944ad0c6e9cc04d0f (patch)
treea555b46f2359436ebcc571b75ab17a59f1a08532 /indra/newview
parent282f91aaf38cd108ee96475e351623ae203c57a6 (diff)
SL-10912
Fix conversion of star brightness, density mult, and distance mult to legacy ranges. Make settings look in both legacyhaze and top-level settings for haze params.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llsettingsvo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 6556380f28..60f4cd3f5a 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -568,9 +568,11 @@ void LLSettingsVOSky::convertAtmosphericsToLegacy(LLSD& legacy, LLSD& settings)
F32 density_multiplier = legacyhaze[SETTING_DENSITY_MULTIPLIER].asReal();
density_multiplier = (density_multiplier < 0.0001f) ? 0.0001f : density_multiplier;
+ density_multiplier *= 0.9f / 2.0f; // take 0 - 2.0 range to 0 - 0.9 range
legacy[SETTING_DENSITY_MULTIPLIER] = LLSDArray(density_multiplier)(0.0f)(0.0f)(1.0f);
F32 distance_multiplier = legacyhaze[SETTING_DISTANCE_MULTIPLIER].asReal();
+ distance_multiplier *= 0.1f; // take 0 - 1000 range to 0 - 100 range
legacy[SETTING_DISTANCE_MULTIPLIER] = LLSDArray(distance_multiplier)(0.0f)(0.0f)(1.0f);
legacy[SETTING_HAZE_DENSITY] = LLSDArray(legacyhaze[SETTING_HAZE_DENSITY])(0.0f)(0.0f)(1.0f);
@@ -597,7 +599,7 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky, bool isA
legacy[SETTING_GLOW] = ensure_array_4(settings[SETTING_GLOW], 1.0);
legacy[SETTING_LIGHT_NORMAL] = ensure_array_4(psky->getLightDirection().getValue(), 0.0f);
legacy[SETTING_MAX_Y] = LLSDArray(settings[SETTING_MAX_Y])(0.0f)(0.0f)(1.0f);
- legacy[SETTING_STAR_BRIGHTNESS] = settings[SETTING_STAR_BRIGHTNESS];
+ legacy[SETTING_STAR_BRIGHTNESS] = settings[SETTING_STAR_BRIGHTNESS].asReal() / 250.0f; // convert from 0-500 -> 0-2 ala pre-FS-compat changes
legacy[SETTING_SUNLIGHT_COLOR] = ensure_array_4(settings[SETTING_SUNLIGHT_COLOR], 1.0f);
LLVector3 dir = psky->getLightDirection();