diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-20 19:13:05 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-20 20:02:07 +0300 |
commit | c850ce93a4ebf110a41c5cce0a2bd3258182230b (patch) | |
tree | 72da66a101150c54967b4c6fb92a2fcbcca55e8f /source/blender/draw/engines/overlay | |
parent | cec22ba8db7c2400f3a6ab4f50c26baf8f44d455 (diff) |
Fix wireframe opacity creating artifacts on sculpt overlay edges
When lowering the wireframe opacity with sculpt overlays enabled, the
wireframe overlay was creating white artifacts along the edges.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D9607
Diffstat (limited to 'source/blender/draw/engines/overlay')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index 5188d338183..4533a321909 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -555,6 +555,11 @@ static void OVERLAY_draw_scene(void *vedata) OVERLAY_extra_blend_draw(vedata); OVERLAY_volume_draw(vedata); + if (pd->ctx_mode == CTX_MODE_SCULPT) { + /* Sculpt overlays are drawn here to avoid artifacts with wireframe opacity. */ + OVERLAY_sculpt_draw(vedata); + } + if (DRW_state_is_fbo()) { GPU_framebuffer_bind(fbl->overlay_line_fb); } @@ -633,9 +638,6 @@ static void OVERLAY_draw_scene(void *vedata) case CTX_MODE_PARTICLE: OVERLAY_edit_particle_draw(vedata); break; - case CTX_MODE_SCULPT: - OVERLAY_sculpt_draw(vedata); - break; case CTX_MODE_EDIT_GPENCIL: case CTX_MODE_PAINT_GPENCIL: case CTX_MODE_SCULPT_GPENCIL: |