cluter/stage: Use 1.0 for z-near

It doesn't actually matter, since we don't really have cases where we
cross this value, but it's enough to prevent catastrophic cancellation
due to very small float numbers.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
This commit is contained in:
Georges Basile Stavracas Neto 2020-10-11 13:27:46 -03:00
parent d08f724bc3
commit 78c648f947

View File

@ -2797,7 +2797,7 @@ clutter_stage_update_view_perspective (ClutterStage *stage)
perspective = priv->perspective; perspective = priv->perspective;
perspective.fovy = 60.0; /* 60 Degrees */ perspective.fovy = 60.0; /* 60 Degrees */
perspective.z_near = 0.1; perspective.z_near = 1.0;
perspective.aspect = priv->viewport[2] / priv->viewport[3]; perspective.aspect = priv->viewport[2] / priv->viewport[3];
z_2d = calculate_z_translation (perspective.z_near); z_2d = calculate_z_translation (perspective.z_near);