diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-05-11 18:54:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-05-11 18:54:32 +0300 |
commit | dfbb3d82f78735e45dd2269687a46c62ae528264 (patch) | |
tree | 81ba47f0fd4d2f3f18d31425284adb6e071e421b /source/blender/draw/engines/overlay | |
parent | 15e71781b91525d6e05e1f1f5d6fd065166dbaa8 (diff) | |
parent | 365e9cb6aa86869f2f1ddf01ec236b2d77451f4b (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/draw/engines/overlay')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_antialiasing.c | 17 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_private.h | 1 |
2 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_antialiasing.c b/source/blender/draw/engines/overlay/overlay_antialiasing.c index efd2f6588ba..a32242d6292 100644 --- a/source/blender/draw/engines/overlay/overlay_antialiasing.c +++ b/source/blender/draw/engines/overlay/overlay_antialiasing.c @@ -193,12 +193,6 @@ void OVERLAY_antialiasing_cache_finish(OVERLAY_Data *vedata) pd->antialiasing.do_depth_infront_copy; if (pd->xray_enabled || do_wireframe) { DRW_texture_ensure_fullscreen_2d(&txl->temp_depth_tx, GPU_DEPTH24_STENCIL8, 0); - - GPU_framebuffer_ensure_config(&fbl->overlay_xray_depth_copy_fb, - { - GPU_ATTACHMENT_TEXTURE(txl->temp_depth_tx), - GPU_ATTACHMENT_NONE, - }); } } @@ -224,12 +218,13 @@ void OVERLAY_antialiasing_start(OVERLAY_Data *vedata) void OVERLAY_xray_depth_copy(OVERLAY_Data *vedata) { OVERLAY_FramebufferList *fbl = vedata->fbl; + OVERLAY_TextureList *txl = vedata->txl; OVERLAY_PrivateData *pd = vedata->stl->pd; if (DRW_state_is_fbo() && pd->antialiasing.do_depth_copy) { + DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); /* We copy the depth of the rendered geometry to be able to compare to the overlays depth. */ - GPU_framebuffer_blit( - fbl->overlay_default_fb, 0, fbl->overlay_xray_depth_copy_fb, 0, GPU_DEPTH_BIT); + GPU_texture_copy(txl->temp_depth_tx, dtxl->depth); } if (DRW_state_is_fbo() && pd->xray_enabled) { @@ -241,13 +236,13 @@ void OVERLAY_xray_depth_copy(OVERLAY_Data *vedata) void OVERLAY_xray_depth_infront_copy(OVERLAY_Data *vedata) { - OVERLAY_FramebufferList *fbl = vedata->fbl; + OVERLAY_TextureList *txl = vedata->txl; OVERLAY_PrivateData *pd = vedata->stl->pd; if (DRW_state_is_fbo() && pd->antialiasing.do_depth_infront_copy) { + DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); /* We copy the depth of the rendered geometry to be able to compare to the overlays depth. */ - GPU_framebuffer_blit( - fbl->overlay_in_front_fb, 0, fbl->overlay_xray_depth_copy_fb, 0, GPU_DEPTH_BIT); + GPU_texture_copy(txl->temp_depth_tx, dtxl->depth_in_front); } } diff --git a/source/blender/draw/engines/overlay/overlay_private.h b/source/blender/draw/engines/overlay/overlay_private.h index 995c9aa6b3d..0c29fe9d2e4 100644 --- a/source/blender/draw/engines/overlay/overlay_private.h +++ b/source/blender/draw/engines/overlay/overlay_private.h @@ -35,7 +35,6 @@ typedef struct OVERLAY_FramebufferList { struct GPUFrameBuffer *overlay_color_only_fb; struct GPUFrameBuffer *overlay_in_front_fb; struct GPUFrameBuffer *overlay_line_in_front_fb; - struct GPUFrameBuffer *overlay_xray_depth_copy_fb; struct GPUFrameBuffer *outlines_prepass_fb; struct GPUFrameBuffer *outlines_resolve_fb; } OVERLAY_FramebufferList; |