summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-16 20:00:32 +0200
committerGitHub <noreply@github.com>2022-06-16 20:00:32 +0200
commit285e20d550b073c0693e3e65215ead56868aa9ea (patch)
tree2b99f0de39d2a8943164f4d57297c3f336917df8 /servers/rendering
parent4df25f23f85276214b5aeb9427f0f2f0e3006c9b (diff)
parent787a1e006bcedafd6656f732d82fd6c9d5c14c36 (diff)
Merge pull request #62081 from Calinou/glow-mix-mode-apply-after-fxaa
Fix glow in Mix mode not working correctly when FXAA is enabled
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_rd/shaders/effects/tonemap.glsl9
1 files changed, 5 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl b/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl
index a8ccdea60b..62a7b0e7d7 100644
--- a/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl
+++ b/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl
@@ -448,6 +448,11 @@ void main() {
// Early Tonemap & SRGB Conversion
#ifndef SUBPASS
+ if (params.use_fxaa) {
+ // FXAA must be performed before glow to preserve the "bleed" effect of glow.
+ color.rgb = do_fxaa(color.rgb, exposure, uv_interp);
+ }
+
if (params.use_glow && params.glow_mode == GLOW_MODE_MIX) {
vec3 glow = gather_glow(source_glow, uv_interp) * params.luminance_multiplier;
if (params.glow_map_strength > 0.001) {
@@ -455,10 +460,6 @@ void main() {
}
color.rgb = mix(color.rgb, glow, params.glow_intensity);
}
-
- if (params.use_fxaa) {
- color.rgb = do_fxaa(color.rgb, exposure, uv_interp);
- }
#endif
if (params.use_debanding) {