From ebdcfcfa44b724a244699e4c567b999c80fdf3a2 Mon Sep 17 00:00:00 2001 From: Kalle Bladin Date: Wed, 8 Jun 2016 22:38:43 -0400 Subject: [PATCH] Update water rendering. --- modules/globebrowsing/shaders/texturetilemapping.hglsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/globebrowsing/shaders/texturetilemapping.hglsl b/modules/globebrowsing/shaders/texturetilemapping.hglsl index 9a3a0574c0..e48f97b5a6 100644 --- a/modules/globebrowsing/shaders/texturetilemapping.hglsl +++ b/modules/globebrowsing/shaders/texturetilemapping.hglsl @@ -350,7 +350,7 @@ vec4 calculateWater( const TextureTile waterTilesParent1[NUMLAYERS_WATERMASK], const TextureTile waterTilesParent2[NUMLAYERS_WATERMASK]) { - vec4 color = currentColor; + vec4 waterColor = vec4(0,0,0,0); // The shader compiler will remove unused code when variables are multiplied by // a constant 0 @@ -394,11 +394,11 @@ vec4 calculateWater( w2 * texture(waterTilesParent1[#{i}].textureSampler, samplePosParent1) + w3 * texture(waterTilesParent2[#{i}].textureSampler, samplePosParent2); - color = blendOver(color, colorSample); + waterColor = blendOver(waterColor, colorSample); } #endfor - return color; + return blendOver(currentColor, waterColor); } #endif // TEXTURETILEMAPPING_HGLSL \ No newline at end of file