diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-09-27 17:21:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-09-27 22:21:39 +0300 |
commit | 40f5ac4977969832c7fa941e694b59c2b4186d58 (patch) | |
tree | 07cb0a0dc97ec89858daec2c693cb5598ed6719b /source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl | |
parent | 88a3323a47e08ea123c73501e97a8f053bad2557 (diff) |
Eevee : TAA : Change post process chain to allow more flexibility
This basically do not use hardware blending and do the blending in the shader.
This will allow neighborhood clamping if we ever implement that.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl b/source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl index 6481ae7abc5..f3df1864317 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl @@ -1,5 +1,6 @@ uniform sampler2D colorBuffer; +uniform sampler2D historyBuffer; uniform float alpha; out vec4 FragColor; @@ -7,5 +8,7 @@ out vec4 FragColor; void main() { /* TODO History buffer Reprojection */ - FragColor = vec4(texelFetch(colorBuffer, ivec2(gl_FragCoord.xy), 0).rgb, alpha); + vec4 history = texelFetch(historyBuffer, ivec2(gl_FragCoord.xy), 0).rgba; + vec4 color = texelFetch(colorBuffer, ivec2(gl_FragCoord.xy), 0).rgba; + FragColor = mix(history, color, alpha); }
\ No newline at end of file |