blob: 5755ba4095113d736222a589f91cbf7c9bb21151 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
uniform mat4 ModelViewProjectionMatrix;
in vec3 pos;
in ivec4 data;
flat out vec4 faceColor;
flat out int faceActive;
#define FACE_ACTIVE (1 << 2)
#define FACE_SELECTED (1 << 3)
void main()
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
if ((data.x & FACE_ACTIVE) != 0) {
faceColor = colorEditMeshActive;
faceActive = 1;
}
else if ((data.x & FACE_SELECTED) != 0) {
faceColor = colorFaceSelect;
faceActive = 0;
}
else {
faceColor = colorFace;
faceActive = 0;
}
}
|