Skip to content

Commit

Permalink
fix color-to-alpha logic
Browse files Browse the repository at this point in the history
  • Loading branch information
likangning93 committed Apr 10, 2019
1 parent af89277 commit ef91bdb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Scene/GlobeSurfaceTileProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -1872,9 +1872,10 @@ define([
colorToAlpha = uniformMapProperties.colorsToAlpha[numberOfDayTextures] = new Cartesian4();
}

applyColorToAlpha = defined(imageryLayer.colorToAlpha) && imageryLayer.colorToAlphaThreshold > 0.0;
var hasColorToAlpha = defined(imageryLayer.colorToAlpha) && imageryLayer.colorToAlphaThreshold > 0.0;
applyColorToAlpha = applyColorToAlpha || hasColorToAlpha;

if (applyColorToAlpha) {
if (hasColorToAlpha) {
var color = imageryLayer.colorToAlpha;
colorToAlpha.x = color.red;
colorToAlpha.y = color.green;
Expand Down

0 comments on commit ef91bdb

Please sign in to comment.