Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend far plane slightly to prevent clipping #9139

Merged
merged 2 commits into from
Sep 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fixed an issue where the camera zooming is stuck when looking up. [#9126](https://github.com/CesiumGS/cesium/pull/9126)
- Fixed an issue where Plane doesn't rotate correctly around the main local axis. [#8268](https://github.com/CesiumGS/cesium/issues/8268)
- Fixed an issue where ground primitives would get clipped at certain camera angles. [#9114](https://github.com/CesiumGS/cesium/issues/9114)

### 1.73 - 2020-09-01

Expand Down
3 changes: 3 additions & 0 deletions Source/Scene/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ function updateFrustums(view, scene, near, far) {
var is2D = scene.mode === SceneMode.SCENE2D;
var nearToFarDistance2D = scene.nearToFarDistance2D;

// Extend the far plane slightly further to prevent geometry clipping against the far plane.
far *= 1.0 + CesiumMath.EPSILON2;

// The computed near plane must be between the user defined near and far planes.
// The computed far plane must between the user defined far and computed near.
// This will handle the case where the computed near plane is further than the user defined far plane.
Expand Down