From af7378bf2aed56494e86280f716612b02de6b7e8 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 21 Sep 2020 14:34:19 +0200 Subject: [PATCH] Fix T81013: Weight Paint Overlay XRay fails with clipping When introduced in rB1ca1744c29e2, the Weight Paint Overlay XRay's corresponding depth pass was not considering clipping planes. Maniphest Tasks: T81013 Differential Revision: https://developer.blender.org/D8970 --- source/blender/draw/engines/overlay/overlay_paint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/draw/engines/overlay/overlay_paint.c b/source/blender/draw/engines/overlay/overlay_paint.c index f0a1e77cf05..89e724bcfcc 100644 --- a/source/blender/draw/engines/overlay/overlay_paint.c +++ b/source/blender/draw/engines/overlay/overlay_paint.c @@ -106,7 +106,7 @@ void OVERLAY_paint_cache_init(OVERLAY_Data *vedata) if (pd->painting.alpha_blending) { state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL; - DRW_PASS_CREATE(psl->paint_depth_ps, state); + DRW_PASS_CREATE(psl->paint_depth_ps, state | pd->clipping_state); sh = OVERLAY_shader_depth_only(); pd->paint_depth_grp = DRW_shgroup_create(sh, psl->paint_depth_ps); }