summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-04-29 11:11:05 -0700
committerGraham Linden <graham@lindenlab.com>2019-04-29 11:11:05 -0700
commit0f83696585b8810c24d535432716215caf0c21e9 (patch)
tree25bcabd6ae10702922e887c701cde9eaf1a07335 /indra/newview/app_settings/shaders/class2
parenteff7acfb1caaa092a88555fca752dc9aea11625e (diff)
SL-10956, SL-10969
Don't ignore far z in culling. Fix Mid lighting being very dark. Partial fix for broken projectors with forward rendering.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl6
2 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index a82d738ec2..9cd5592d7c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -224,7 +224,10 @@ void main()
amb_da *= dist_atten * noise;
amb_da = min(amb_da, 1.0-lit);
+#ifndef NO_AMBIANCE
col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+#endif
+
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index cd3b33eecc..957ce579c0 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -222,8 +222,10 @@ void main()
amb_da += (da*da*0.5+0.5)*(1.0-shadow)*proj_ambiance;
amb_da *= dist_atten * noise;
amb_da = min(amb_da, 1.0-lit);
-
- col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+
+#ifndef NO_AMBIANCE
+ col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+#endif
}