diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-10-12 16:04:28 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-10-12 16:04:28 +0300 |
commit | 662c0ac970b3fe9fd63105f9ff1f2bb2553378f4 (patch) | |
tree | 1aa0a39e7fb9b3e5d887895071cb7be20a22421e /source/blender | |
parent | 60ba69ffb58f77355be628283f4bb5cb7a6669e1 (diff) |
Overlay: Fix Line antialiasing broken for some objects
Fix regression introduced in rBe12767a0352a9e113892b4a07c6c8446d3ff361f
The volumes are not a line type and should not be render into the line
framebuffer nor it should change the framebuffer.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_volume.c | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index 76697b42a52..30b39e5d5e1 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -547,6 +547,7 @@ static void OVERLAY_draw_scene(void *vedata) OVERLAY_fade_draw(vedata); OVERLAY_facing_draw(vedata); OVERLAY_extra_blend_draw(vedata); + OVERLAY_volume_draw(vedata); if (DRW_state_is_fbo()) { GPU_framebuffer_bind(fbl->overlay_line_fb); @@ -557,7 +558,6 @@ static void OVERLAY_draw_scene(void *vedata) OVERLAY_particle_draw(vedata); OVERLAY_metaball_draw(vedata); OVERLAY_gpencil_draw(vedata); - OVERLAY_volume_draw(vedata); OVERLAY_extra_draw(vedata); if (DRW_state_is_fbo()) { diff --git a/source/blender/draw/engines/overlay/overlay_volume.c b/source/blender/draw/engines/overlay/overlay_volume.c index ffa664c90d5..ad0ccf1c7c4 100644 --- a/source/blender/draw/engines/overlay/overlay_volume.c +++ b/source/blender/draw/engines/overlay/overlay_volume.c @@ -39,6 +39,10 @@ void OVERLAY_volume_cache_init(OVERLAY_Data *vedata) pd->volume_selection_surface_grp = grp; DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); } + else { + psl->volume_ps = NULL; + pd->volume_selection_surface_grp = NULL; + } } void OVERLAY_volume_cache_populate(OVERLAY_Data *vedata, Object *ob) @@ -57,11 +61,8 @@ void OVERLAY_volume_cache_populate(OVERLAY_Data *vedata, Object *ob) void OVERLAY_volume_draw(OVERLAY_Data *vedata) { OVERLAY_PassList *psl = vedata->psl; - OVERLAY_FramebufferList *fbl = vedata->fbl; - if (DRW_state_is_fbo()) { - GPU_framebuffer_bind(fbl->overlay_default_fb); + if (psl->volume_ps) { + DRW_draw_pass(psl->volume_ps); } - - DRW_draw_pass(psl->volume_ps); } |