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
This commit is contained in:
Pablo Dobarro
2020-11-20 17:13:05 +01:00
parent cec22ba8db
commit c850ce93a4

View File

@@ -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: