summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-17 19:40:21 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-17 19:40:21 +0100
commit57d89c80945ee0944f745b812487b6e3c16631d2 (patch)
treebe297b69118b9331fe57307ad45cb46da5bf2b57 /indra/newview/app_settings/shaders/class1
parent636839a47c6881b10d676d19c65d6c34a956622a (diff)
SL-1491 take two: fix non-ALM/class2 atmospherics additive artifacts
Modulate class1 softenLight atmospheric additive by specular.a (same fix as for class2). Clamp additive color to <= vec3(0.2) to avoid similar artifacts in non-deferred render path.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl3
1 files changed, 2 insertions, 1 deletions
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);
}