Skip to content

Commit

Permalink
Reorder updateFrameState
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed May 23, 2020
1 parent 5c47b77 commit aad027b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Source/Scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -1878,15 +1878,6 @@ Scene.prototype.updateFrameState = function () {
var globeTranslucencyFramebuffer = this._view.globeTranslucencyFramebuffer;
var frameState = this._frameState;

frameState.cameraUnderground = this._cameraUnderground;
frameState.globeTranslucencyState = globeTranslucencyState;

globeTranslucencyState.update(
globe,
globeTranslucencyFramebuffer,
frameState
);

frameState.commandList.length = 0;
frameState.shadowMaps.length = 0;
frameState.brdfLutGenerator = this._brdfLutGenerator;
Expand All @@ -1900,7 +1891,6 @@ Scene.prototype.updateFrameState = function () {
camera.directionWC,
camera.upWC
);
frameState.occluder = getOccluder(this);
frameState.terrainExaggeration = this._terrainExaggeration;
frameState.minimumTerrainHeight = 0.0;
frameState.minimumDisableDepthTestDistance = this._minimumDisableDepthTestDistance;
Expand All @@ -1912,6 +1902,8 @@ Scene.prototype.updateFrameState = function () {
this.camera.frustum instanceof OrthographicOffCenterFrustum
);
frameState.light = this.light;
frameState.cameraUnderground = this._cameraUnderground;
frameState.globeTranslucencyState = globeTranslucencyState;

if (
defined(this._specularEnvironmentMapAtlas) &&
Expand Down Expand Up @@ -1942,6 +1934,14 @@ Scene.prototype.updateFrameState = function () {
frameState.maximumScreenSpaceError = 2;
}

globeTranslucencyState.update(
globe,
globeTranslucencyFramebuffer,
frameState
);

frameState.occluder = getOccluder(this);

this.clearPasses(frameState.passes);

frameState.tilesetPassState = undefined;
Expand Down

0 comments on commit aad027b

Please sign in to comment.