summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-02-21 18:44:57 +0100
committerGitHub <noreply@github.com>2024-02-21 18:44:57 +0100
commit16d61427cab3a8e43f0a9a8ee724fc176b6433c6 (patch)
tree258ca27192e3b2cbd2d2b458b2d9b37b7581b615
parent846d075a2f2333b4ba4cbca48a96484015b31031 (diff)
parent1e67de5e0c667ae8c87957bdafb9bb1a41cac679 (diff)
downloadredot-engine-16d61427cab3a8e43f0a9a8ee724fc176b6433c6.tar.gz
Merge pull request #88633 from dsnopek/opengl-android-fog-fix
Fix OpenGL on Android after adding optional depth fog
-rw-r--r--drivers/gles3/shaders/scene.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 2aeec42e15..27c292d163 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) {