Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/modes/shaders/object_empty_image_frag.glsl')
-rw-r--r--source/blender/draw/modes/shaders/object_empty_image_frag.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl
index 7dfbf469adc..e33aa6cdcc1 100644
--- a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl
+++ b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl
@@ -37,9 +37,15 @@ void main()
if (depthMode == DEPTH_BACK) {
gl_FragDepth = 0.999999;
+#ifdef USE_WIRE
+ gl_FragDepth -= 1e-5;
+#endif
}
else if (depthMode == DEPTH_FRONT) {
gl_FragDepth = 0.000001;
+#ifdef USE_WIRE
+ gl_FragDepth -= 1e-5;
+#endif
}
else if (depthMode == DEPTH_UNCHANGED) {
gl_FragDepth = gl_FragCoord.z;