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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-03 12:13:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-03 12:16:37 +0300
commit9be138bf639644230116caf8098d60d2d24a4dee (patch)
tree500fb72d6c8a9f8c1cfc0844b3d78b71a7c0bb22 /source/blender/draw
parent65db18fc56c3f64fad02a3d02cb10b49b13adccc (diff)
Fix empty image wire drawing with front/back depth
The vertex shaders depth offset was ignored in this case.
Diffstat (limited to 'source/blender/draw')
-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;