summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-23 13:08:12 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-23 13:08:12 +0200
commit6a79d848a8af4a7c91f7c034b7dca990c0dcbfa6 (patch)
tree6e5c98059a050122ca742cf6e0b3ccf078327f9c /drivers
parent87d498a357db72a52d2019ab92d0b4f5d1cd2b2b (diff)
parentd7515453916cf9dd7b3d039160a2415de55a2e4d (diff)
downloadredot-engine-6a79d848a8af4a7c91f7c034b7dca990c0dcbfa6.tar.gz
Merge pull request #94564 from rothej/fix-94183
Fix FOG shader issue in Compatibility mode
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/shaders/scene.glsl12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 07f81e8108..6dd04af6b6 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1922,11 +1922,7 @@ void main() {
fog.xy = unpackHalf2x16(fog_rg);
fog.zw = unpackHalf2x16(fog_ba);
-#ifndef DISABLE_FOG
- if (scene_data.fog_enabled) {
- frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
- }
-#endif // !DISABLE_FOG
+ frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
#endif // !FOG_DISABLED
// Tonemap before writing as we are writing to an sRGB framebuffer
@@ -2133,11 +2129,7 @@ void main() {
fog.xy = unpackHalf2x16(fog_rg);
fog.zw = unpackHalf2x16(fog_ba);
-#ifndef DISABLE_FOG
- if (scene_data.fog_enabled) {
- additive_light_color *= (1.0 - fog.a);
- }
-#endif // !DISABLE_FOG
+ additive_light_color *= (1.0 - fog.a);
#endif // !FOG_DISABLED
// Tonemap before writing as we are writing to an sRGB framebuffer