diff options
Diffstat (limited to 'source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl b/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl new file mode 100644 index 00000000000..57e96143c75 --- /dev/null +++ b/source/blender/draw/modes/shaders/edit_curve_overlay_frag.glsl @@ -0,0 +1,26 @@ + +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; + } +} |