Skip to content

Commit

Permalink
Merge pull request #9139 from CesiumGS/fix-classification-artifact
Browse files Browse the repository at this point in the history
Extend far plane slightly to prevent clipping
  • Loading branch information
IanLilleyT authored Sep 5, 2020
2 parents b84b70a + b062edf commit 2202fd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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

0 comments on commit 2202fd0

Please sign in to comment.