From 802eb0b1a076f05ddcdc8ab18e5a6a27246be90e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Nov 2025 14:26:50 +0000 Subject: [PATCH] Fix glow visual compatibility regression (issue #112469) Reverts the default value of Environment.glow_hdr_threshold from 0.0 back to 1.0 to restore the expected glow appearance in existing projects. The default was inadvertently changed from 1.0 to 0.0 in PR #110077, which caused glow effects to render dramatically different across all rendering methods (Forward+, Mobile, and GL Compatibility). This broke backward compatibility with existing projects like the Kenney 3D Platformer starter kit. Changed files: - scene/resources/environment.h - servers/rendering/storage/environment_storage.h - drivers/gles3/effects/glow.h - drivers/gles3/rasterizer_scene_gles3.cpp - doc/classes/Environment.xml Setting the value back to 1.0 aligns with documented recommendations and restores visual consistency. Fixes #112469 --- doc/classes/Environment.xml | 2 +- drivers/gles3/effects/glow.h | 2 +- drivers/gles3/rasterizer_scene_gles3.cpp | 2 +- scene/resources/environment.h | 2 +- servers/rendering/storage/environment_storage.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 66639965425..6ee6c2e7e7d 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -143,7 +143,7 @@ The bleed scale of the HDR glow. - + The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to [code]2.0[/code]), this may need to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case. This value also needs to be decreased below [code]1.0[/code] when using glow in 2D, as 2D rendering is performed in SDR. diff --git a/drivers/gles3/effects/glow.h b/drivers/gles3/effects/glow.h index 7d52666464e..faeb99e8342 100644 --- a/drivers/gles3/effects/glow.h +++ b/drivers/gles3/effects/glow.h @@ -49,7 +49,7 @@ private: float glow_intensity = 1.0; float glow_bloom = 0.0; - float glow_hdr_bleed_threshold = 0.0; + float glow_hdr_bleed_threshold = 1.0; float glow_hdr_bleed_scale = 2.0; float glow_hdr_luminance_cap = 12.0; diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 9ed3bba5672..f8cf3773b7a 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2829,7 +2829,7 @@ void RasterizerSceneGLES3::_render_post_processing(const RenderDataGLES3 *p_rend bool glow_enabled = false; float glow_intensity = 1.0; float glow_bloom = 0.0; - float glow_hdr_bleed_threshold = 0.0; + float glow_hdr_bleed_threshold = 1.0; float glow_hdr_bleed_scale = 2.0; float glow_hdr_luminance_cap = 12.0; float srgb_white = 1.0; diff --git a/scene/resources/environment.h b/scene/resources/environment.h index 9c710ac25a5..cb6fa57775c 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -168,7 +168,7 @@ private: float glow_mix = 0.05; float glow_bloom = 0.0; GlowBlendMode glow_blend_mode = GLOW_BLEND_MODE_SCREEN; - float glow_hdr_bleed_threshold = 0.0; + float glow_hdr_bleed_threshold = 1.0; float glow_hdr_bleed_scale = 2.0; float glow_hdr_luminance_cap = 12.0; float glow_map_strength = 0.8f; diff --git a/servers/rendering/storage/environment_storage.h b/servers/rendering/storage/environment_storage.h index 67f92052804..62852cf37f3 100644 --- a/servers/rendering/storage/environment_storage.h +++ b/servers/rendering/storage/environment_storage.h @@ -103,7 +103,7 @@ private: float glow_bloom = 0.0; float glow_mix = 0.01; RS::EnvironmentGlowBlendMode glow_blend_mode = RS::ENV_GLOW_BLEND_MODE_SCREEN; - float glow_hdr_bleed_threshold = 0.0; + float glow_hdr_bleed_threshold = 1.0; float glow_hdr_luminance_cap = 12.0; float glow_hdr_bleed_scale = 2.0; float glow_map_strength = 0.0f; // 1.0f in GLES3 ??