Browse Source

Merge pull request #94564 from rothej/fix-94183

Fix FOG shader issue in Compatibility mode
Rémi Verschelde 1 year ago
parent
commit
6a79d848a8
1 changed files with 2 additions and 10 deletions
  1. 2 10
      drivers/gles3/shaders/scene.glsl

+ 2 - 10
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