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-04-20 19:24:14 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-20 19:29:33 +0300
commit73d2e6f2021e649a1bf8952c37ce870562a884e4 (patch)
tree915c066afd7d92a433720b0a415da4de177d8720 /source/blender/draw/engines/eevee/eevee_effects.c
parentbe307d6032f390cd71bcbb92402c1929a085db1f (diff)
Eevee: TAA Reprojection: Initial implementation
This "improve" the viewport experience by reducing the noise from random sampling effects (SSAO, Contact Shadows, SSR) when moving the viewport or during playback. This does not do Anti Aliasing because this would conflict with the outline pass. We could enable AA jittering in "only render" mode though. There are many things to improve but this is a solid basis to build upon.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_effects.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_effects.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c
index 14924345d3e..ccb61d3e328 100644
--- a/source/blender/draw/engines/eevee/eevee_effects.c
+++ b/source/blender/draw/engines/eevee/eevee_effects.c
@@ -251,6 +251,22 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object
}
/**
+ * Setup depth double buffer.
+ */
+ if ((effects->enabled_effects & EFFECT_DEPTH_DOUBLE_BUFFER) != 0) {
+ DRW_texture_ensure_fullscreen_2D(&txl->depth_double_buffer, DRW_TEX_DEPTH_24_STENCIL_8, 0);
+
+ GPU_framebuffer_ensure_config(&fbl->double_buffer_depth_fb, {
+ GPU_ATTACHMENT_TEXTURE(txl->depth_double_buffer)
+ });
+ }
+ else {
+ /* Cleanup to release memory */
+ DRW_TEXTURE_FREE_SAFE(txl->depth_double_buffer);
+ GPU_FRAMEBUFFER_FREE_SAFE(fbl->double_buffer_depth_fb);
+ }
+
+ /**
* Setup double buffer so we can access last frame as it was before post processes.
*/
if ((effects->enabled_effects & EFFECT_DOUBLE_BUFFER) != 0) {