[Bf-blender-cvs] [4723644e7f5] master: Fix T67587 Overlay: WeightPaint color blends with background in wireframe mode
Clément Foucault
noreply at git.blender.org
Wed Jul 1 19:15:56 CEST 2020
Commit: 4723644e7f5b9ac607844fb9c43fafda7360e606
Author: Clément Foucault
Date: Wed Jul 1 19:11:22 2020 +0200
Branches: master
https://developer.blender.org/rB4723644e7f5b9ac607844fb9c43fafda7360e606
Fix T67587 Overlay: WeightPaint color blends with background in wireframe mode
Fix this by rendering to the overlay framebuffer when using alpha blend
mode.
===================================================================
M source/blender/draw/engines/overlay/overlay_paint.c
===================================================================
diff --git a/source/blender/draw/engines/overlay/overlay_paint.c b/source/blender/draw/engines/overlay/overlay_paint.c
index 456c56f9c03..652d6af54a2 100644
--- a/source/blender/draw/engines/overlay/overlay_paint.c
+++ b/source/blender/draw/engines/overlay/overlay_paint.c
@@ -254,11 +254,18 @@ void OVERLAY_paint_draw(OVERLAY_Data *vedata)
OVERLAY_PrivateData *pd = stl->pd;
OVERLAY_PassList *psl = vedata->psl;
+ OVERLAY_FramebufferList *fbl = vedata->fbl;
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
if (DRW_state_is_fbo()) {
- /* Paint overlay needs final color because of multiply blend mode. */
- GPU_framebuffer_bind(pd->painting.in_front ? dfbl->in_front_fb : dfbl->default_fb);
+ if (pd->painting.alpha_blending) {
+ GPU_framebuffer_bind(pd->painting.in_front ? fbl->overlay_in_front_fb :
+ fbl->overlay_default_fb);
+ }
+ else {
+ /* Paint overlay needs final color because of multiply blend mode. */
+ GPU_framebuffer_bind(pd->painting.in_front ? dfbl->in_front_fb : dfbl->default_fb);
+ }
}
if (psl->paint_depth_ps) {
More information about the Bf-blender-cvs
mailing list