Skip to content

Commit

Permalink
don't draw SkyAtmosphere on picking
Browse files Browse the repository at this point in the history
  • Loading branch information
rutsky committed Dec 28, 2016
1 parent 53738d9 commit 149d540
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/Scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ define([
var scratchPerspectiveOffCenterFrustum = new PerspectiveOffCenterFrustum();
var scratchOrthographicFrustum = new OrthographicFrustum();

function executeCommands(scene, passState) {
function executeCommands(scene, passState, picking) {
var camera = scene._camera;
var context = scene.context;
var us = context.uniformState;
Expand Down Expand Up @@ -1654,7 +1654,7 @@ define([
executeCommand(skyBoxCommand, scene, context, passState);
}

if (environmentState.isSkyAtmosphereVisible) {
if (environmentState.isSkyAtmosphereVisible && !picking) {
executeCommand(environmentState.skyAtmosphereCommand, scene, context, passState);
}

Expand Down Expand Up @@ -1954,14 +1954,14 @@ define([
Cartesian3.add(savedCamera.position, eyeTranslation, camera.position);
camera.frustum.xOffset = offset;

executeCommands(scene, passState);
executeCommands(scene, passState, picking);

viewport.x = passState.viewport.width;

Cartesian3.subtract(savedCamera.position, eyeTranslation, camera.position);
camera.frustum.xOffset = -offset;

executeCommands(scene, passState);
executeCommands(scene, passState, picking);

Camera.clone(savedCamera, camera);
} else {
Expand Down Expand Up @@ -2112,7 +2112,7 @@ define([
executeShadowMapCastCommands(scene);
}

executeCommands(scene, passState);
executeCommands(scene, passState, picking);
}

function updateEnvironment(scene) {
Expand Down Expand Up @@ -2341,7 +2341,7 @@ define([
if (defined(this._deviceOrientationCameraController)) {
this._deviceOrientationCameraController.update();
}

this._camera.update(this._mode);
this._camera._updateCameraChanged();
};
Expand Down

0 comments on commit 149d540

Please sign in to comment.