diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-02-01 18:19:57 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-02-01 18:40:23 +0300 |
commit | bc41aaaaaaebe437c30d75b664e52836bed6939c (patch) | |
tree | 673af00f262a2de8eead3630bfef761960e463e5 /source | |
parent | 006e70dbd7e29c105809eded93169754ade03de5 (diff) |
Overlay: Fix Z axis planes rendered even if not needed
This remove some drawn completely transparent pixels.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_grid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_grid.c b/source/blender/draw/engines/overlay/overlay_grid.c index 988c35e387a..87aa013f03a 100644 --- a/source/blender/draw/engines/overlay/overlay_grid.c +++ b/source/blender/draw/engines/overlay/overlay_grid.c @@ -232,7 +232,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata) DRW_shgroup_uniform_vec3(grp, "gridSize", shd->grid_size, 1); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth); - if (shd->zneg_flag) { + if (shd->zneg_flag & SHOW_AXIS_Z) { DRW_shgroup_call(grp, geom, NULL); } @@ -251,7 +251,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata) DRW_shgroup_uniform_vec3(grp, "planeAxes", shd->zplane_axes, 1); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth); - if (shd->zpos_flag) { + if (shd->zpos_flag & SHOW_AXIS_Z) { DRW_shgroup_call(grp, geom, NULL); } |