summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-06-22 00:41:19 +0100
committerGraham Linden <graham@lindenlab.com>2018-06-22 00:41:19 +0100
commita02b3500b9979c10336eb13674279b3c07367445 (patch)
treeff8b1d336efd7d64c4ab235dbbf3a8e5d2bf8606 /indra/newview
parent52b946fd09196989e34afd7226a82060c4f8d831 (diff)
Make LLSettingsFoo::defaults() funcs only calculate the invariant values once (use static trick ala the validations).
Fix conversion of legacy settings w/ non-zero east angles to account for those values being CW radian angles.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llsettingsvo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index deaaffb1f5..44bb9fc6f5 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -525,10 +525,11 @@ void LLSettingsVOSky::updateSettings()
F32 sun_dynamic_range = llmax(gSavedSettings.getF32("RenderSunDynamicRange"), 0.0001f);
mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp);
- // Axis swaps convert from +x right, +z up, +y at
- // to CFR +x at, +z up, +y right coord sys
- LLVector3 sun_direction_cfr(sun_direction.mV[0], -sun_direction.mV[1], sun_direction.mV[2]);
- LLVector3 moon_direction_cfr(moon_direction.mV[0], -moon_direction.mV[1], moon_direction.mV[2]);
+ // Axis swaps convert from "normal" (+x right, +z up, +y at)
+ // to CFR (+x at, +z up, +y right) coord sys
+ LLVector3 sun_direction_cfr(sun_direction.mV[1], sun_direction.mV[0], sun_direction.mV[2]);
+ LLVector3 moon_direction_cfr(moon_direction.mV[1], moon_direction.mV[0], moon_direction.mV[2]);
+
gSky.setSunAndMoonDirectionsCFR(sun_direction_cfr, moon_direction_cfr);
gSky.setSunTextures(getSunTextureId(), getNextSunTextureId());
gSky.setMoonTextures(getMoonTextureId(), getNextMoonTextureId());