summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditsky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-10 18:44:03 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-10 18:44:03 +0100
commit79d33f9d19a0c6e5ed34ffbd01a31cb2625e1ecc (patch)
treef0bbe587871419ecd36363c5c1d0def6e9166825 /indra/newview/llpaneleditsky.cpp
parent4b174a31c8db1bf7f378f9b088c1335651a34ec5 (diff)
Fix names of WATER_BLUR_MULTIPILER.
Give wave direction uniforms more meaningful names in shaders. Add comments on glow size/focus conversions for clarity.
Diffstat (limited to 'indra/newview/llpaneleditsky.cpp')
-rw-r--r--indra/newview/llpaneleditsky.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 1ae220a5ca..6d9f016aba 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -481,8 +481,10 @@ void LLPanelSettingsSkySunMoonTab::refresh()
LLColor3 glow(mSkySettings->getGlow());
+ // takes 40 - 0.2 range -> 0 - 1.99 UI range
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setValue(2.0 - (glow.mV[0] / SLIDER_SCALE_GLOW_R));
getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[2] / SLIDER_SCALE_GLOW_B);
+
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setValue(mSkySettings->getStarBrightness());
getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(mSkySettings->getSunRotation());
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setValue(mSkySettings->getSunTextureId());
@@ -509,6 +511,7 @@ void LLPanelSettingsSkySunMoonTab::onGlowChanged()
{
LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
+ // takes 0 - 1.99 UI range -> 40 -> 0.2 range
glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R;
glow.mV[2] *= SLIDER_SCALE_GLOW_B;