Welcome to mirror list, hosted at ThFree Co, Russian Federation.

edit_mesh_overlay_facefill_vert.glsl « shaders « modes « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c84d97fa1c5174ffef05f7ee08ebfeac3355b07c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

uniform mat4 ModelViewProjectionMatrix;
uniform mat4 ModelMatrix;
uniform ivec4 dataMask = ivec4(0xFF);

in vec3 pos;
in ivec4 data;

flat out vec4 faceColor;

void main()
{
  gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);

  ivec4 data_m = data & dataMask;

  faceColor = EDIT_MESH_face_color(data_m.x);

#ifdef USE_WORLD_CLIP_PLANES
  world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
#endif
}