Edit Mode: Make active face hint part of the face color
authorClément Foucault <foucault.clem@gmail.com>
Thu, 7 Feb 2019 16:47:55 +0000 (17:47 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Thu, 7 Feb 2019 16:47:55 +0000 (17:47 +0100)
This remove the hint on the face edges. This is because the hint was
displayed on both sides and was requiring to draw every edges twice.

source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl

index 51b6e628debf5bec5b9a22e9c0665eec0fd8f745..a1b3f9762a0514f9c38f42b4b6308ca3e9f75108 100644 (file)
@@ -9,10 +9,6 @@ vec4 EDIT_MESH_edge_color_outer(int edge_flag, int face_flag, float crease, floa
        color = (crease > 0.0) ? vec4(colorEdgeCrease.rgb, crease) : color;
        color = (bweight > 0.0) ? vec4(colorEdgeBWeight.rgb, bweight) : color;
        color = ((edge_flag & EDGE_SEAM) != 0) ? colorEdgeSeam : color;
-
-       if ((face_flag & FACE_ACTIVE) != 0) {
-               color = vec4(colorEditMeshActive.rgb, 1.0);
-       }
        return color;
 }
 
@@ -47,7 +43,7 @@ vec4 EDIT_MESH_vertex_color(int vertex_flag)
 vec4 EDIT_MESH_face_color(int face_flag)
 {
        if ((face_flag & FACE_ACTIVE) != 0) {
-               return colorFaceSelect;
+               return mix(colorFaceSelect, colorEditMeshActive, 0.5);
        }
        else if ((face_flag & FACE_SELECTED) != 0) {
                return colorFaceSelect;