summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/environment
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-30 10:38:41 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-30 10:38:41 -0800
commitbd25688867d824a3c21ffce93d689bb30e4ba803 (patch)
tree7e6cfed929e76b25d8ca8f69e9b45b5f1a442f08 /indra/newview/app_settings/shaders/class1/environment
parent12cd42221e16b8bbcd0ad115e0436b075d47d485 (diff)
SL-9996
Force frag depth in water shaders to avoid z-fighting at back edge of water edge pieces.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/environment')
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterF.glsl2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 19158f4505..c4b3684141 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -157,5 +157,7 @@ void main()
color.rgb = scaleSoftClip(color.rgb);
color.a = spec * sunAngle2;
+ // force frag depth to fix z-fighting at back edge of water edge pieces
+ gl_FragDepth = 0.99999;
frag_color = color;
}