diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-08-11 20:10:52 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-08-11 20:13:15 +0300 |
commit | cae4041878ebf3afe37740fac48df22b7322ea6c (patch) | |
tree | de13dd85fa8e67ce4a82f872977b8e2010772daf /source/blender/draw/engines | |
parent | 48c0a82f7a371ea0129cb041aac8c1de3d4b19ec (diff) |
Fix T79683: Dim GPencil points created by modifiers
This change makes the generated points a light dimmer than selectable points.
Before:
{F8765593}
After:
{F8765585}
Maniphest Tasks: T79683
Differential Revision: https://developer.blender.org/D8515
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/edit_gpencil_vert.glsl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/edit_gpencil_vert.glsl b/source/blender/draw/engines/overlay/shaders/edit_gpencil_vert.glsl index 732e392ffe0..5818d8eca52 100644 --- a/source/blender/draw/engines/overlay/shaders/edit_gpencil_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/edit_gpencil_vert.glsl @@ -26,6 +26,7 @@ void discard_vert() #define GP_EDIT_MULTIFRAME 4u /* 1 << 2 */ #define GP_EDIT_STROKE_START 8u /* 1 << 3 */ #define GP_EDIT_STROKE_END 16u /* 1 << 4 */ +#define GP_EDIT_POINT_DIMMED 32u /* 1 << 5 */ #ifdef USE_POINTS # define colorUnselect colorGpencilVertex @@ -60,6 +61,7 @@ void main() bool is_multiframe = (vflag & GP_EDIT_MULTIFRAME) != 0u; bool is_stroke_sel = (vflag & GP_EDIT_STROKE_SELECTED) != 0u; bool is_point_sel = (vflag & GP_EDIT_POINT_SELECTED) != 0u; + bool is_point_dimmed = (vflag & GP_EDIT_POINT_DIMMED) != 0u; if (doWeightColor) { finalColor.rgb = weight_to_rgb(weight); @@ -73,6 +75,10 @@ void main() #ifdef USE_POINTS gl_PointSize = sizeVertex * 2.0; + if (is_point_dimmed) { + finalColor.rgb = clamp(colorUnselect.rgb + vec3(0.3), 0.0, 1.0); + } + if (doStrokeEndpoints && !doWeightColor) { bool is_stroke_start = (vflag & GP_EDIT_STROKE_START) != 0u; bool is_stroke_end = (vflag & GP_EDIT_STROKE_END) != 0u; |