Fix T56692: The edges are not highlighted in Mark Freestyle Edge
[blender.git] / source / blender / draw / modes / shaders / edit_mesh_overlay_facefill_vert.glsl
1
2 uniform mat4 ModelViewProjectionMatrix;
3
4 in vec3 pos;
5 in ivec4 data;
6
7 flat out vec4 faceColor;
8
9 #define FACE_ACTIVE     (1 << 2)
10 #define FACE_SELECTED   (1 << 3)
11 #define FACE_FREESTYLE  (1 << 4)
12
13 void main()
14 {
15         gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
16
17         if ((data.x & FACE_ACTIVE) != 0)
18                 faceColor = colorFaceSelect;
19         else if ((data.x & FACE_SELECTED) != 0)
20                 faceColor = colorFaceSelect;
21         else if ((data.x & FACE_FREESTYLE) != 0)
22                 faceColor = colorFaceFreestyle;
23         else
24                 faceColor = colorFace;
25 }