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
This commit is contained in:
Philipp Oeser 2020-09-21 14:34:19 +02:00
parent b67c90a822
commit af7378bf2a
Notes: blender-bot 2023-02-14 00:20:15 +01:00
Referenced by issue #81013, In Weight Paint mode, draw error when using X-Ray + Clipping Region
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}