Fix T58551: Dragged in images do not display orange highlight border when selected
authorClément Foucault <foucault.clem@gmail.com>
Wed, 5 Dec 2018 02:45:02 +0000 (03:45 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Wed, 5 Dec 2018 02:45:12 +0000 (03:45 +0100)
source/blender/draw/modes/object_mode.c
source/blender/draw/modes/shaders/object_empty_image_vert.glsl

index 8b91aff29693ab2b6a2e61be05ad3f8c67d04f94..90d499aebd601d6633f0a62aecf4244434a5d005 100644 (file)
@@ -895,7 +895,7 @@ static void DRW_shgroup_empty_image(
                DRW_shgroup_uniform_int_copy(grp, "depthMode", ob->empty_image_depth);
                DRW_shgroup_uniform_float(grp, "size", &ob->empty_drawsize, 1);
                DRW_shgroup_uniform_vec2(grp, "offset", ob->ima_ofs, 1);
-               DRW_shgroup_uniform_vec4(grp, "color", color, 1);
+               DRW_shgroup_uniform_vec3(grp, "color", color, 1);
                DRW_shgroup_call_add(grp, DRW_cache_image_plane_wire_get(), ob->obmat);
        }
 }
index 3469e37358e9c1ba014bdd2abb08525c588f1046..1c1525696fbe25d704d956004b20c235aea55c34 100644 (file)
@@ -24,6 +24,7 @@ void main()
                (pos + offset) * (size * vec2(aspectX, aspectY)),
                0.0, 1.0);
 #ifdef USE_WIRE
+       gl_Position.z -= 1e-5;
        finalColor = vec4(color, 1.0);
 #else
        texCoord_interp = texCoord;