diff options
author | Joshua Rothe <joshrothe@gmail.com> | 2024-07-20 15:34:55 -0600 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-23 11:25:10 +0200 |
commit | d7515453916cf9dd7b3d039160a2415de55a2e4d (patch) | |
tree | 7d29cdef7159a0986b30dda8a1be5bcfa05e7834 /drivers | |
parent | 4e5ed0bbfb56f0a71eb61c868f965476652c23df (diff) | |
download | redot-engine-d7515453916cf9dd7b3d039160a2415de55a2e4d.tar.gz |
Fix FOG shader issue in Compatibility mode
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index be7a6aba57..f0f04b563e 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1920,11 +1920,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 @@ -2131,11 +2127,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 |