diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-12-03 20:56:45 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-12-03 20:56:59 +0300 |
commit | fda791ab1241534e377bee84b3a214e1343094af (patch) | |
tree | dac66452c662b3fddce4e351cf0789865dd1f591 /source | |
parent | 574a59dfb02b40d369d3b02b17de3f2dbd598bec (diff) |
Overlay Engine: Fix T72147 Blender crashes when Lock Object Modes off
Also fix sculpt mask inverted
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_sculpt.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/sculpt_mask_vert.glsl | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_sculpt.c b/source/blender/draw/engines/overlay/overlay_sculpt.c index 3b7f12ed804..4e7daf1862d 100644 --- a/source/blender/draw/engines/overlay/overlay_sculpt.c +++ b/source/blender/draw/engines/overlay/overlay_sculpt.c @@ -51,7 +51,7 @@ void OVERLAY_sculpt_cache_populate(OVERLAY_Data *vedata, Object *ob) const bool use_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d); if (use_pbvh || !ob->sculpt->deform_modifiers_active || ob->sculpt->shapekey_active) { - if (pbvh_has_mask(pbvh)) { + if (!use_pbvh || pbvh_has_mask(pbvh)) { DRW_shgroup_call_sculpt(pd->sculpt_mask_grp, ob, false, true, false); } } diff --git a/source/blender/draw/engines/overlay/shaders/sculpt_mask_vert.glsl b/source/blender/draw/engines/overlay/shaders/sculpt_mask_vert.glsl index 18a096da61b..38559677706 100644 --- a/source/blender/draw/engines/overlay/shaders/sculpt_mask_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/sculpt_mask_vert.glsl @@ -11,8 +11,7 @@ void main() vec3 world_pos = point_object_to_world(pos); gl_Position = point_world_to_ndc(world_pos); - float mask = 1.0 - (msk * maskOpacity); - finalColor = vec4(0.0, 0.0, 0.0, mask); + finalColor = vec4(0.0, 0.0, 0.0, msk * maskOpacity); #ifdef USE_WORLD_CLIP_PLANES world_clip_planes_calc_clip_distance(world_pos); |