summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-10-25 00:35:12 +0200
committerGitHub <noreply@github.com>2020-10-25 00:35:12 +0200
commit6c173e2f7ffdb972ec3754b3d78fe51bfbfb4f22 (patch)
tree0769e454f5154e81f0e87c9907f795182bdf46ec
parentd3dd8fb0f3070387f51a905de8ece3272cb573f5 (diff)
parent8e3e9e37555a375c262e2bdeb6f286d35c9e7496 (diff)
Merge pull request #43058 from clayjohn/VULKAN-FXAA-bug
[4.0]Remove extra exposure multiply in FXAA
-rw-r--r--servers/rendering/rasterizer_rd/shaders/tonemap.glsl5
1 files changed, 2 insertions, 3 deletions
diff --git a/servers/rendering/rasterizer_rd/shaders/tonemap.glsl b/servers/rendering/rasterizer_rd/shaders/tonemap.glsl
index 341cdab1ef..4cc4fd3f64 100644
--- a/servers/rendering/rasterizer_rd/shaders/tonemap.glsl
+++ b/servers/rendering/rasterizer_rd/shaders/tonemap.glsl
@@ -293,9 +293,8 @@ vec3 do_fxaa(vec3 color, float exposure, vec2 uv_interp) {
dir * rcpDirMin)) *
params.pixel_size;
- vec3 rgbA = 0.5 * (textureLod(source_color, uv_interp + dir * (1.0 / 3.0 - 0.5), 0.0).xyz * exposure + textureLod(source_color, uv_interp + dir * (2.0 / 3.0 - 0.5), 0.0).xyz) * exposure;
- vec3 rgbB = rgbA * 0.5 + 0.25 * (textureLod(source_color, uv_interp + dir * -0.5, 0.0).xyz * exposure +
- textureLod(source_color, uv_interp + dir * 0.5, 0.0).xyz * exposure);
+ vec3 rgbA = 0.5 * exposure * (textureLod(source_color, uv_interp + dir * (1.0 / 3.0 - 0.5), 0.0).xyz + textureLod(source_color, uv_interp + dir * (2.0 / 3.0 - 0.5), 0.0).xyz);
+ vec3 rgbB = rgbA * 0.5 + 0.25 * exposure * (textureLod(source_color, uv_interp + dir * -0.5, 0.0).xyz + textureLod(source_color, uv_interp + dir * 0.5, 0.0).xyz);
float lumaB = dot(rgbB, luma);
if ((lumaB < lumaMin) || (lumaB > lumaMax)) {