diff --git a/Source/Scene/GlobeSurfaceShaderSet.js b/Source/Scene/GlobeSurfaceShaderSet.js index b4a0c20abe17..88e35e780ca8 100644 --- a/Source/Scene/GlobeSurfaceShaderSet.js +++ b/Source/Scene/GlobeSurfaceShaderSet.js @@ -70,7 +70,7 @@ define([ var quantization = 0; var quantizationDefine = ''; - var mesh = surfaceTile.mesh || surfaceTile.fillMesh; + var mesh = surfaceTile.vertexArray !== undefined ? surfaceTile.mesh : surfaceTile.fillMesh; var terrainEncoding = mesh.encoding; var quantizationMode = terrainEncoding.quantization; if (quantizationMode === TerrainQuantization.BITS12) { diff --git a/Source/Scene/GlobeSurfaceTileProvider.js b/Source/Scene/GlobeSurfaceTileProvider.js index eadf2cee5ac2..d56404c9f1db 100644 --- a/Source/Scene/GlobeSurfaceTileProvider.js +++ b/Source/Scene/GlobeSurfaceTileProvider.js @@ -1107,6 +1107,9 @@ define([ u_initialColor : function() { return this.properties.initialColor; }, + u_isFill : function() { + return this.properties.isFill; + }, u_zoomedOutOceanSpecularIntensity : function() { return this.properties.zoomedOutOceanSpecularIntensity; }, @@ -1218,6 +1221,7 @@ define([ // derived commands that combine another uniform map with this one. properties : { initialColor : new Cartesian4(0.0, 0.0, 0.5, 1.0), + isFill : false, zoomedOutOceanSpecularIntensity : 0.5, oceanNormalMap : undefined, lightingFadeDistance : new Cartesian2(6500000.0, 9000000.0), @@ -1997,6 +2001,7 @@ define([ var uniformMapProperties = uniformMap.properties; Cartesian4.clone(initialColor, uniformMapProperties.initialColor); + uniformMapProperties.isFill = surfaceTile.vertexArray === undefined; uniformMapProperties.oceanNormalMap = oceanNormalMap; uniformMapProperties.lightingFadeDistance.x = tileProvider.lightingFadeOutDistance; uniformMapProperties.lightingFadeDistance.y = tileProvider.lightingFadeInDistance; diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 2997f2358be3..005eeead955d 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -817,7 +817,7 @@ define([ tile._lastSelectionResult = TileSelectionResult.RENDERED; - // EXCEPT if we're waiting heaps of descendants, the above will take too long. So in that case, + // EXCEPT if we're waiting on heaps of descendants, the above will take too long. So in that case, // load this tile INSTEAD of loading any of the descendants, and tell the up-level we're only waiting // on this tile. var wasRenderedLastFrame = tile._frameRendered === primitive._lastSelectionFrameNumber; diff --git a/Source/Shaders/GlobeFS.glsl b/Source/Shaders/GlobeFS.glsl index b11715a13e96..6b9190d103cd 100644 --- a/Source/Shaders/GlobeFS.glsl +++ b/Source/Shaders/GlobeFS.glsl @@ -1,5 +1,6 @@ //#define SHOW_TILE_BOUNDARIES uniform vec4 u_initialColor; +uniform bool u_isFill; #if TEXTURE_UNITS > 0 uniform sampler2D u_dayTextures[TEXTURE_UNITS]; @@ -249,6 +250,11 @@ void main() } #endif + if (u_isFill) + { + finalColor = vec4(mix(vec3(1.0, 0.0, 0.0), finalColor.rgb, 0.25), finalColor.a); + } + #ifdef FOG const float fExposure = 2.0; vec3 fogColor = v_mieColor + finalColor.rgb * v_rayleighColor;