summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-10-19 22:28:26 +0000
committerRider Linden <rider@lindenlab.com>2018-10-19 22:28:26 +0000
commite0557054c23a26c3eccfa408cc91d2aba874850d (patch)
treea49a18d9140ad48ad4de44e0726904f1de34d69f /indra
parent135720248c90d2f2d98f367151d16b516ed69b8a (diff)
parentc06bd45df96c117172b83e7f8b2a8e03c5fd88e5 (diff)
Merged in graham_linden/viewer-eep-graham (pull request #162)
SL-9928
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl3
5 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 7a1968efee..c3827e3a56 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -174,7 +174,7 @@ void main()
if (norm.w < 0.5)
{
- vec3 add = additive * spec.a;
+ vec3 add = additive;
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/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index c7950a2a31..af199fd78c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -186,7 +186,7 @@ void main()
if (norm.w < 0.5)
{
- vec3 add = additive * spec.a;
+ vec3 add = additive;
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/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
index 770f9a5f4f..20c4d82ded 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -149,6 +149,7 @@ void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit,
//brightness of surface both sunlight and ambient
sunlit = vec3(sunlight * .5);
amblit = vec3(tmpAmbient * .25);
- additive *= vec3(1.0 - temp1);
+ additive = normalize(additive);
+ additive *= vec3(1.0 - exp(-temp2.z * distance_multiplier)) * 0.5;
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index d174805cc0..7a6bcd53a1 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -124,16 +124,22 @@ void calcAtmospherics(vec3 inPositionEye) {
//increase ambient when there are more clouds
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
- //haze color
- setAdditiveColor(
+ vec3 additive =
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
- + tmpAmbient)));
+ + tmpAmbient));
+ additive = normalize(additive);
+
+ //haze color
+ //setAdditiveColor(
+ // vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ // + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ // + tmpAmbient)));
//brightness of surface both sunlight and ambient
setSunlitColor(vec3(sunlight * .5));
setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
+ setAdditiveColor(additive * vec3(1.0 - exp(-temp2.z * distance_multiplier)) * 0.5);
// vary_SunlitColor = vec3(0);
// vary_AmblitColor = vec3(0);
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 414ba3236a..99dbee15ee 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -73,9 +73,6 @@ 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.8));
additive_color = v;
vary_AdditiveColor = v;
}