You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-30 16:26:50 +00:00
Fix glow in Mix mode not working correctly when FXAA is enabled
Glow must be performed after FXAA to ensure correct appearance.
This commit is contained in:
@@ -448,6 +448,11 @@ void main() {
|
|||||||
|
|
||||||
// Early Tonemap & SRGB Conversion
|
// Early Tonemap & SRGB Conversion
|
||||||
#ifndef SUBPASS
|
#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) {
|
if (params.use_glow && params.glow_mode == GLOW_MODE_MIX) {
|
||||||
vec3 glow = gather_glow(source_glow, uv_interp) * params.luminance_multiplier;
|
vec3 glow = gather_glow(source_glow, uv_interp) * params.luminance_multiplier;
|
||||||
if (params.glow_map_strength > 0.001) {
|
if (params.glow_map_strength > 0.001) {
|
||||||
@@ -455,10 +460,6 @@ void main() {
|
|||||||
}
|
}
|
||||||
color.rgb = mix(color.rgb, glow, params.glow_intensity);
|
color.rgb = mix(color.rgb, glow, params.glow_intensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.use_fxaa) {
|
|
||||||
color.rgb = do_fxaa(color.rgb, exposure, uv_interp);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (params.use_debanding) {
|
if (params.use_debanding) {
|
||||||
|
|||||||
Reference in New Issue
Block a user