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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-06-29 10:22:50 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-06-29 10:26:58 +0300
commit3169160a9741ff399059ce9900ac8cd503707b2f (patch)
tree88c1ebad37b81cc22d14f3e8102f8631cf7daf9e /source/blender/draw/engines/workbench/shaders
parent18d87e79e92e0cb4792ba3cb42c4ea84fcd29d90 (diff)
Workbench: TAA optimalization
First frame of the TAA is just a regular copy of the previous buffer. so we write directly to the final buffer and skip the taa shader. We do init the history buffer via blit so it will be initialized for the other iterations.
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders')
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_effect_taa_frag.glsl11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_effect_taa_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_effect_taa_frag.glsl
index ee5a46ae7c8..1da1b2ad13c 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_effect_taa_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_effect_taa_frag.glsl
@@ -8,14 +8,7 @@ uniform float mixFactor;
void main()
{
ivec2 texel = ivec2(gl_FragCoord.xy);
-
vec4 color_buffer = texelFetch(colorBuffer, texel, 0);
- if (mixFactor == 1.0)
- {
- colorOutput = color_buffer;
- }
- else {
- vec4 history_buffer = texelFetch(historyBuffer, texel, 0);
- colorOutput = mix(history_buffer, color_buffer, mixFactor);
- }
+ vec4 history_buffer = texelFetch(historyBuffer, texel, 0);
+ colorOutput = mix(history_buffer, color_buffer, mixFactor);
}