From 1e67de5e0c667ae8c87957bdafb9bb1a41cac679 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Wed, 21 Feb 2024 09:54:38 -0600 Subject: [PATCH] Fix OpenGL on Android after adding optional depth fog --- drivers/gles3/shaders/scene.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 2aeec42e154..27c292d1635 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1268,7 +1268,7 @@ vec4 fog_process(vec3 vertex) { float fog_z = smoothstep(scene_data.fog_depth_begin, scene_data.fog_depth_end, length(vertex)); fog_amount = pow(fog_z, scene_data.fog_depth_curve) * scene_data.fog_density; #else - fog_amount = 1 - exp(min(0.0, -length(vertex) * scene_data.fog_density)); + fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density)); #endif // USE_DEPTH_FOG if (abs(scene_data.fog_height_density) >= 0.0001) {