Workbench: FXAA Artifacts
authorJeroen Bakker <j.bakker@atmind.nl>
Wed, 22 May 2019 12:02:36 +0000 (14:02 +0200)
committerJeroen Bakker <j.bakker@atmind.nl>
Wed, 22 May 2019 12:50:23 +0000 (14:50 +0200)
commit083f932a252c1a88b85999188ff1aeccc87eab66
treefb4d37dbb15b9640d6937ce644e702779e618b4b
parent53781d577148e1fcedb45ba6fdfac1b4f42a33b9
Workbench: FXAA Artifacts

When using FXAA when rendering to an image the alpha channel was not
correct what lead to visual artifacts.

These artifacts come from the FXAA function that overwrites the alpha
channel with the original Luma of the texel. In the shader this can be
turned on or off. But at the end it always overwrites the alpha with the
luminance.

We didn't use this feature, but the alpha of the resulting pixel still
contained the luma value what lead to render artifacts.
By overwriting the alpha channel with the original alpha we remove these
artifacts.

Reviewed By: fclem

Maniphest Tasks: T64947

Differential Revision: https://developer.blender.org/D4924
source/blender/draw/engines/workbench/shaders/workbench_effect_fxaa_frag.glsl