[Bf-blender-cvs] [0cac3c79cc2] master: Fix T80927: UV Edges Not Visible When Repeat Image Active

Jeroen Bakker noreply at git.blender.org
Fri Sep 18 18:01:17 CEST 2020


Commit: 0cac3c79cc2298c5a704ec7b55a96292793f49b8
Author: Jeroen Bakker
Date:   Fri Sep 18 17:17:19 2020 +0200
Branches: master
https://developer.blender.org/rB0cac3c79cc2298c5a704ec7b55a96292793f49b8

Fix T80927: UV Edges Not Visible When Repeat Image Active

When repeat image was active the image was drawn in the foreground
making most uv overlays not visible. This change creates a shared
defined value for repeating and not repeating images.

===================================================================

M	source/blender/draw/engines/image/shaders/engine_image_vert.glsl

===================================================================

diff --git a/source/blender/draw/engines/image/shaders/engine_image_vert.glsl b/source/blender/draw/engines/image/shaders/engine_image_vert.glsl
index 47bad8e4db0..dbc8105bcf5 100644
--- a/source/blender/draw/engines/image/shaders/engine_image_vert.glsl
+++ b/source/blender/draw/engines/image/shaders/engine_image_vert.glsl
@@ -2,6 +2,8 @@
 
 #define SIMA_DRAW_FLAG_DO_REPEAT (1 << 4)
 
+#define DEPTH_IMAGE 0.75
+
 uniform int drawFlags;
 
 in vec3 pos;
@@ -14,7 +16,7 @@ void main()
   vec3 image_pos = pos * 0.5 + 0.5;
 
   if ((drawFlags & SIMA_DRAW_FLAG_DO_REPEAT) != 0) {
-    gl_Position = vec4(pos.xy, 0.0, 1.0);
+    gl_Position = vec4(pos.xy, DEPTH_IMAGE, 1.0);
     uvs = point_view_to_object(image_pos).xy;
   }
   else {
@@ -24,7 +26,7 @@ void main()
      * to detect if a transparency texture or the background color should be drawn.
      * Vertices are between 0.0 and 0.2, Edges between 0.2 and 0.4
      * actual pixels are at 0.75, 1.0 is used for the background. */
-    position.z = 0.75;
+    position.z = DEPTH_IMAGE;
     gl_Position = position;
     uvs = world_pos.xy;
   }



More information about the Bf-blender-cvs mailing list