This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl
Campbell Barton cdba73c8fa Draw Manager: curve support
Draws the curve centerline and editmode verts/handles.

Handle theme colors, and normal display still need adding.
2017-04-20 00:38:44 +10:00

27 lines
422 B
GLSL

flat in int vertFlag;
#define VERTEX_SELECTED (1 << 0)
#define VERTEX_ACTIVE (1 << 1)
#if __VERSION__ == 120
#define FragColor gl_FragColor
#else
out vec4 FragColor;
#endif
void main()
{
/* TODO: vertex size */
if ((vertFlag & VERTEX_SELECTED) != 0) {
FragColor = colorVertexSelect;
}
else if ((vertFlag & VERTEX_ACTIVE) != 0) {
FragColor = colorEditMeshActive;
}
else {
FragColor = colorVertex;
}
}