Skip to content

Commit

Permalink
Fix shadow crash by preventing shadowNear from equaling shadowFar
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Sep 26, 2020
1 parent cdeae1b commit c46d27a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Scene/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,10 @@ View.prototype.createPotentiallyVisibleSet = function (scene) {
Math.max(shadowNear, camera.frustum.near),
camera.frustum.far
);
shadowFar = Math.max(Math.min(shadowFar, camera.frustum.far), shadowNear);
shadowFar = Math.max(
Math.min(shadowFar, camera.frustum.far),
shadowNear + CesiumMath.EPSILON7
);
}

// Use the computed near and far for shadows
Expand Down

0 comments on commit c46d27a

Please sign in to comment.