From c56be9782333150cf9849a0f66b3aa8e808215e7 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Fri, 16 Jun 2017 14:03:30 -0400 Subject: [PATCH 1/3] Don't allow picking on the sunPostProcess framebuffer. --- Source/Scene/Scene.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 79dae9125212..f14383734100 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -2468,7 +2468,7 @@ define([ scene._fxaa.clear(context, passState, clearColor); } - if (environmentState.isSunVisible && scene.sunBloom && !useWebVR) { + if (environmentState.isSunVisible && scene.sunBloom && !useWebVR && !picking) { passState.framebuffer = scene._sunPostProcess.update(passState); } else if (useGlobeDepthFramebuffer) { passState.framebuffer = scene._globeDepth.framebuffer; From 52392354a1140d24690a35a40f54d1a20a4d767d Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Fri, 16 Jun 2017 14:14:44 -0400 Subject: [PATCH 2/3] CHANGES.md --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3c77d74ee45a..301c25770ee3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,12 +4,13 @@ Change Log ### 1.35 - 2017-07-05 * Deprecated - * `GoogleEarthImageryProvider` has been deprecated and will be removed in Cesium 1.37, use `GoogleEarthEnterpriseMapsProvider` instead. + * `GoogleEarthImageryProvider` has been deprecated and will be removed in Cesium 1.37, use `GoogleEarthEnterpriseMapsProvider` instead. * The `throttleRequest` parameter for `TerrainProvider.requestTileGeometry`, `CesiumTerrainProvider.requestTileGeometry`, `VRTheWorldTerrainProvider.requestTileGeometry`, and `EllipsoidTerrainProvider.requestTileGeometry` is deprecated and will be replaced with an optional `Request` object. The `throttleRequests` parameter will be removed in 1.37. Instead to throttle requests set the request's `throttle` property to `true`. * The ability to provide a Promise for the `options.url` parameter of `loadWithXhr` and for the `url` parameter of `loadArrayBuffer`, `loadBlob`, `loadImageViaBlob`, `loadText`, `loadJson`, `loadXML`, `loadImage`, `loadCRN`, `loadKTX`, and `loadCubeMap` is deprecated. This will be removed in 1.37, instead `url` must be a string. * Added an `options.request` parameter to `loadWithXhr` and a `request` parameter to `loadArrayBuffer`, `loadBlob`, `loadImageViaBlob`, `loadText`, `loadJson`, `loadJsonp`, `loadXML`, `loadImageFromTypedArray`, `loadImage`, `loadCRN`, and `loadKTX`. * Fixed bug where if polylines were set to follow the surface of an undefined globe, Cesium would crash [#5413] https://github.com/AnalyticalGraphicsInc/cesium/pull/5413 * Fixed a bug where picking clusters would return undefined instead of a list of the clustered entities. [#5286](https://github.com/AnalyticalGraphicsInc/cesium/issues/5286) +* Fixed a bug where picking would break when the Sun came into view [#5478](https://github.com/AnalyticalGraphicsInc/cesium/issues/5478) * Reduced the amount of Sun bloom post-process effect near the horizon. [#5381](https://github.com/AnalyticalGraphicsInc/cesium/issues/5381) * Updated glTF/glb MIME types. [#5420](https://github.com/AnalyticalGraphicsInc/cesium/issues/5420) * Fixed a bug where camera zooming worked incorrectly when the display height was greater than the display width [#5421] (https://github.com/AnalyticalGraphicsInc/cesium/pull/5421) From 400b0ba6b5a4f147f3eb030cfbf7381604d74cd6 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Mon, 19 Jun 2017 15:26:04 -0400 Subject: [PATCH 3/3] Change the way this fix is implemented. --- Source/Scene/Scene.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 6e8664b3c472..de241e2f88b7 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -2480,7 +2480,7 @@ define([ scene._fxaa.clear(context, passState, clearColor); } - if (environmentState.isSunVisible && scene.sunBloom && !useWebVR && !picking) { + if (environmentState.isSunVisible && scene.sunBloom && !useWebVR) { passState.framebuffer = scene._sunPostProcess.update(passState); } else if (useGlobeDepthFramebuffer) { passState.framebuffer = scene._globeDepth.framebuffer; @@ -2829,6 +2829,7 @@ define([ var passState = this._pickFramebuffer.begin(scratchRectangle); + updateEnvironment(this, passState); updateAndExecuteCommands(this, passState, scratchColorZero); resolveFramebuffers(this, passState); @@ -2975,6 +2976,7 @@ define([ passState.scissorTest.rectangle.width = 1; passState.scissorTest.rectangle.height = 1; + updateEnvironment(scene, passState); updateAndExecuteCommands(scene, passState, scratchColorZero); resolveFramebuffers(scene, passState);