Skip to content

Commit

Permalink
Merge pull request godotengine#88633 from dsnopek/opengl-android-fog-fix
Browse files Browse the repository at this point in the history
Fix OpenGL on Android after adding optional depth fog
  • Loading branch information
akien-mga authored Feb 21, 2024
2 parents 846d075 + 1e67de5 commit 16d6142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gles3/shaders/scene.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 16d6142

Please sign in to comment.