Fix In front option not working in solid mode
authorClément Foucault <foucault.clem@gmail.com>
Wed, 5 Dec 2018 15:15:48 +0000 (16:15 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Wed, 5 Dec 2018 15:57:44 +0000 (16:57 +0100)
source/blender/draw/engines/workbench/workbench_deferred.c

index 357dbe50c6774afe884d8af745816d9cf73d4e3c..0d82cab283eba61bc2c50d12135e09cf65847d80 100644 (file)
@@ -539,11 +539,11 @@ static void workbench_setup_ghost_framebuffer(WORKBENCH_FramebufferList *fbl)
        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
        e_data.ghost_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH_COMPONENT24, &draw_engine_workbench_solid);
+
        GPU_framebuffer_ensure_config(&fbl->ghost_prepass_fb, {
                GPU_ATTACHMENT_TEXTURE(e_data.ghost_depth_tx),
-               GPU_ATTACHMENT_TEXTURE(e_data.object_id_tx),
                GPU_ATTACHMENT_TEXTURE(e_data.color_buffer_tx),
-               GPU_ATTACHMENT_TEXTURE(e_data.metallic_buffer_tx),
+               GPU_ATTACHMENT_TEXTURE(e_data.object_id_tx),
                GPU_ATTACHMENT_TEXTURE(e_data.normal_buffer_tx),
        });
 }