diff --git a/CHANGES.md b/CHANGES.md index fcfa67f43159..fb451197a1c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/Source/Scene/ShadowMap.js b/Source/Scene/ShadowMap.js index 458f61835938..7a6138faf62a 100644 --- a/Source/Scene/ShadowMap.js +++ b/Source/Scene/ShadowMap.js @@ -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;