Skip to content

Commit 4b92d28

Browse files
authored
Merge pull request #7736 from AnalyticalGraphicsInc/colorToAlpha
prevent colorToAlpha from carrying over from one imagery layer to its replacement
2 parents e54bc95 + ef91bdb commit 4b92d28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Source/Scene/GlobeSurfaceTileProvider.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1872,14 +1872,17 @@ define([
18721872
colorToAlpha = uniformMapProperties.colorsToAlpha[numberOfDayTextures] = new Cartesian4();
18731873
}
18741874

1875-
applyColorToAlpha = defined(imageryLayer.colorToAlpha) && imageryLayer.colorToAlphaThreshold > 0.0;
1875+
var hasColorToAlpha = defined(imageryLayer.colorToAlpha) && imageryLayer.colorToAlphaThreshold > 0.0;
1876+
applyColorToAlpha = applyColorToAlpha || hasColorToAlpha;
18761877

1877-
if (applyColorToAlpha) {
1878+
if (hasColorToAlpha) {
18781879
var color = imageryLayer.colorToAlpha;
18791880
colorToAlpha.x = color.red;
18801881
colorToAlpha.y = color.green;
18811882
colorToAlpha.z = color.blue;
18821883
colorToAlpha.w = imageryLayer.colorToAlphaThreshold;
1884+
} else {
1885+
colorToAlpha.w = -1.0;
18831886
}
18841887

18851888
if (defined(imagery.credits)) {

0 commit comments

Comments
 (0)