Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-05-08 15:31:08 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-08 15:31:17 +0300
commitd89f9d70c52001e09ee3ab80a3547ba140e00aec (patch)
tree943c9723ac750c6d42440c388b119551aa739ca8 /source/blender/draw/engines/eevee/eevee_volumes.c
parentb857b8f4c441ba40c7848f176ba750c4a4b093cb (diff)
Eevee: Fix bug with transparent object + volume rendering.
This was because the main_fb was not bound back to be updated. Following draw calls were drawn without depth buffer.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_volumes.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_volumes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c
index 9b039345fce..700a8d81565 100644
--- a/source/blender/draw/engines/eevee/eevee_volumes.c
+++ b/source/blender/draw/engines/eevee/eevee_volumes.c
@@ -572,7 +572,11 @@ void EEVEE_volumes_resolve(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *veda
SWAP(GPUFrameBuffer *, fbl->main_fb, fbl->effect_fb);
SWAP(GPUFrameBuffer *, fbl->main_color_fb, fbl->effect_color_fb);
SWAP(GPUTexture *, txl->color, txl->color_post);
+
+ /* Restore */
+ GPU_framebuffer_texture_detach(fbl->effect_fb, dtxl->depth);
GPU_framebuffer_texture_attach(fbl->main_fb, dtxl->depth, 0, 0);
+ GPU_framebuffer_bind(fbl->main_fb);
}
}