From 3c9af3ef27b3979d56fac49106156d928258dfa7 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Thu, 21 May 2020 23:02:05 -0400 Subject: [PATCH] Updates from review --- Source/Scene/SkyAtmosphere.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Scene/SkyAtmosphere.js b/Source/Scene/SkyAtmosphere.js index 0dddd4bd161a..327dd0715ce0 100644 --- a/Source/Scene/SkyAtmosphere.js +++ b/Source/Scene/SkyAtmosphere.js @@ -166,7 +166,6 @@ SkyAtmosphere.prototype.setDynamicAtmosphereColor = function ( this._radiiAndDynamicAtmosphereColorAndInverseScale.z = lightEnum; }; -var scratchRotationMatrix = new Matrix3(); var scratchModelMatrix = new Matrix4(); /** @@ -189,10 +188,8 @@ SkyAtmosphere.prototype.update = function (frameState) { // Align the ellipsoid geometry so it always faces the same direction as the // camera to reduce artifacts when rendering atmosphere per-vertex - var view = frameState.context.uniformState.viewRotation; - var inverseView = Matrix3.inverse(view, scratchRotationMatrix); var rotationMatrix = Matrix4.fromRotationTranslation( - inverseView, + frameState.context.uniformState.inverseViewRotation, Cartesian3.ZERO, scratchModelMatrix );