diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 5572b52d3447..034e49870814 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -1488,7 +1488,8 @@ define([ Cartesian3.equalsEpsilon(camera0.direction, camera1.direction, epsilon) && Cartesian3.equalsEpsilon(camera0.up, camera1.up, epsilon) && Cartesian3.equalsEpsilon(camera0.right, camera1.right, epsilon) && - Matrix4.equalsEpsilon(camera0.transform, camera1.transform, epsilon); + Matrix4.equalsEpsilon(camera0.transform, camera1.transform, epsilon) && + camera0.frustum.equalsEpsilon(camera1.frustum, epsilon); } function updateDerivedCommands(scene, command) { @@ -3171,13 +3172,17 @@ define([ function checkForCameraUpdates(scene) { var camera = scene._camera; - if (!cameraEqual(camera, scene._cameraClone, CesiumMath.EPSILON15)) { + var cameraClone = scene._cameraClone; + + scene._frustumChanged = !camera.frustum.equals(cameraClone.frustum); + + if (!cameraEqual(camera, cameraClone, CesiumMath.EPSILON15)) { if (!scene._cameraStartFired) { camera.moveStart.raiseEvent(); scene._cameraStartFired = true; } scene._cameraMovedTime = getTimestamp(); - Camera.clone(camera, scene._cameraClone); + Camera.clone(camera, cameraClone); return true; } @@ -3309,10 +3314,8 @@ define([ tryAndCatchError(this, time, update); this._postUpdate.raiseEvent(this, time); - this._frustumChanged = !this._camera.frustum.equals(this._cameraClone.frustum); - var cameraChanged = checkForCameraUpdates(this); - var shouldRender = !this.requestRenderMode || this._renderRequested || cameraChanged || this._frustumChanged || this._logDepthBufferDirty || (this.mode === SceneMode.MORPHING); + var shouldRender = !this.requestRenderMode || this._renderRequested || cameraChanged || this._logDepthBufferDirty || (this.mode === SceneMode.MORPHING); if (!shouldRender && defined(this.maximumRenderTimeChange) && defined(this._lastRenderTime)) { var difference = Math.abs(JulianDate.secondsDifference(this._lastRenderTime, time)); shouldRender = shouldRender || difference > this.maximumRenderTimeChange;