Skip to content

Commit

Permalink
Merge pull request #9172 from CesiumGS/fix-shadow-crash
Browse files Browse the repository at this point in the history
Fixed a crash when loading OSM buildings with shadows enabled
  • Loading branch information
IanLilleyT authored Sep 26, 2020
2 parents cdeae1b + 971753c commit 759e8f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fixed an issue where Plane doesn't rotate correctly around the main local axis. [#8268](https://github.com/CesiumGS/cesium/issues/8268)
- Fixed clipping planes with non-uniform scale. [#9135](https://github.com/CesiumGS/cesium/pull/9135)
- Fixed an issue where ground primitives would get clipped at certain camera angles. [#9114](https://github.com/CesiumGS/cesium/issues/9114)
- Fixed a crash when loading Cesium OSM buildings with shadows enabled. [#9172](https://github.com/CesiumGS/cesium/pull/9172)

### 1.73 - 2020-09-01

Expand Down
6 changes: 2 additions & 4 deletions Source/Scene/ShadowMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,10 +1518,8 @@ function updateCameras(shadowMap, frameState) {
frameState.shadowState.nearPlane,
shadowMap.maximumDistance
);
far = Math.min(
frameState.shadowState.farPlane,
shadowMap.maximumDistance + 1.0
);
far = Math.min(frameState.shadowState.farPlane, shadowMap.maximumDistance);
far = Math.max(far, near + 1.0);
} else {
near = camera.frustum.near;
far = shadowMap.maximumDistance;
Expand Down

0 comments on commit 759e8f4

Please sign in to comment.