diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_wireframe.c | 3 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_transparent.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c index eebfc88fdce..ea45ad5190c 100644 --- a/source/blender/draw/engines/overlay/overlay_wireframe.c +++ b/source/blender/draw/engines/overlay/overlay_wireframe.c @@ -76,7 +76,8 @@ void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata) DRWState state = DRW_STATE_FIRST_VERTEX_CONVENTION | DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL; DRWPass *pass; - GPUTexture **depth_tx = ((pd->xray_enabled || pd->xray_opacity > 0.0f) && DRW_state_is_fbo()) ? + GPUTexture **depth_tx = ((!pd->xray_enabled || pd->xray_opacity > 0.0f) && + DRW_state_is_fbo()) ? &txl->temp_depth_tx : &txl->dummy_depth_tx; diff --git a/source/blender/draw/engines/workbench/workbench_transparent.c b/source/blender/draw/engines/workbench/workbench_transparent.c index 5fd8229304a..32bd5584ddc 100644 --- a/source/blender/draw/engines/workbench/workbench_transparent.c +++ b/source/blender/draw/engines/workbench/workbench_transparent.c @@ -157,7 +157,7 @@ void workbench_transparent_draw_depth_pass(WORKBENCH_Data *data) WORKBENCH_FramebufferList *fbl = data->fbl; WORKBENCH_PassList *psl = data->psl; - const bool do_xray_depth_pass = XRAY_ALPHA(wpd) > 0.0f; + const bool do_xray_depth_pass = !XRAY_FLAG_ENABLED(wpd) || XRAY_ALPHA(wpd) > 0.0f; const bool do_transparent_depth_pass = psl->outline_ps || wpd->dof_enabled || do_xray_depth_pass; if (do_transparent_depth_pass) { |