diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-05-18 16:51:19 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-05-18 17:01:07 +0300 |
commit | cb8d8335b21cded9da30ff100bcb62b878d5a880 (patch) | |
tree | d0fd50996a67e72e89f51d61b109c38d70e882ae /source | |
parent | 19413c4a822eb3d553c1b15ead48fee629d4b7c7 (diff) |
Fix T76828 Grease Pencil: Toggle Caps doesn't work
This was a logic error.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index e2606473d07..fb5073b3dc7 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -473,8 +473,8 @@ void stroke_vertex() float miter_dot = dot(miter_tan, line_adj); /* Break corners after a certain angle to avoid really thick corners. */ const float miter_limit = 0.5; /* cos(60°) */ - bool miter_break = (miter_dot < miter_limit) || is_stroke_start || is_stroke_end; - miter_tan = (miter_break) ? line : (miter_tan / miter_dot); + bool miter_break = (miter_dot < miter_limit); + miter_tan = (miter_break || is_stroke_start || is_stroke_end) ? line : (miter_tan / miter_dot); vec2 miter = rotate_90deg(miter_tan); @@ -487,7 +487,7 @@ void stroke_vertex() /* Reminder: we packed the cap flag into the sign of stength and thickness sign. */ if ((is_stroke_start && strength1 > 0.0) || (is_stroke_end && thickness1 > 0.0) || - miter_break) { + (miter_break && !is_stroke_start && !is_stroke_end)) { screen_ofs += line * x; } |