summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-09-17 19:04:32 +0000
committerRider Linden <rider@lindenlab.com>2018-09-17 19:04:32 +0000
commit027bc36259ebd27fe99b35feb4ec3c4680fb0bcf (patch)
treed2de6d723c3028c43057a7921508c2dfb8203b26
parent53a93d3e73892f633b1d79de359924d733489bdb (diff)
parent9581a197aceba7647ab9153513089570f11c4f9a (diff)
Merged in graham_linden/viewer-eep-graham (pull request #92)
SL-1491 and SL-1873
-rw-r--r--indra/llinventory/llsettingssky.cpp4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl3
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml2
5 files changed, 9 insertions, 5 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 56449c0598..399692d80b 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -534,7 +534,7 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
validation.push_back(Validator(SETTING_MOON_TEXTUREID, false, LLSD::TypeUUID));
validation.push_back(Validator(SETTING_STAR_BRIGHTNESS, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(512.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(500.0f)))));
validation.push_back(Validator(SETTING_SUNLIGHT_COLOR, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
@@ -784,7 +784,7 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
}
if (legacy.has(SETTING_STAR_BRIGHTNESS))
{
- newsettings[SETTING_STAR_BRIGHTNESS] = LLSD::Real(legacy[SETTING_STAR_BRIGHTNESS].asReal()) * 256.0f;
+ newsettings[SETTING_STAR_BRIGHTNESS] = LLSD::Real(legacy[SETTING_STAR_BRIGHTNESS].asReal() * 250.0f);
}
if (legacy.has(SETTING_SUNLIGHT_COLOR))
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 4e11a7e2f5..7a1968efee 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -174,7 +174,8 @@ void main()
if (norm.w < 0.5)
{
- col = mix(atmosFragLighting(col, additive, atten), fullbrightFragAtmosTransport(col, atten, additive), diffuse.a);
+ vec3 add = additive * spec.a;
+ col = mix(atmosFragLighting(col, add, atten), fullbrightFragAtmosTransport(col, atten, add), diffuse.a);
col = mix(scaleFragSoftClip(col), fullbrightScaleSoftClipFrag(col, atten), diffuse.a);
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 99dbee15ee..3b87c70932 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -73,6 +73,9 @@ void setAmblitColor(vec3 v)
void setAdditiveColor(vec3 v)
{
+ // SL-1491 clamp additive term to something reasonable to prevent
+ // lens flares over non-reflective surfaces
+ v = clamp(v, vec3(0), vec3(0.2));
additive_color = v;
vary_AdditiveColor = v;
}
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index def2c5263d..76c0bd5abf 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -293,7 +293,7 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
- F32 star_alpha = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / 512.0f;
+ F32 star_alpha = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / 500.0f;
// If start_brightness is not set, exit
if(star_alpha < 0.001f)
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
index 0ec3528718..841a8c3199 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
@@ -171,7 +171,7 @@
layout="topleft"
left_delta="5"
min_val="0"
- max_val="512"
+ max_val="500"
name="star_brightness"
top_delta="15"
width="250"