From 65b7cff6100a570b9b13be8391e495bd957560ce Mon Sep 17 00:00:00 2001 From: hpinkos Date: Mon, 18 Jun 2018 16:33:49 -0400 Subject: [PATCH] cleanup --- Source/Shaders/BillboardCollectionFS.glsl | 5 ++--- Source/Shaders/BillboardCollectionVS.glsl | 19 ++----------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/Source/Shaders/BillboardCollectionFS.glsl b/Source/Shaders/BillboardCollectionFS.glsl index 2aa8c03e6e50..d38c5406bd7b 100644 --- a/Source/Shaders/BillboardCollectionFS.glsl +++ b/Source/Shaders/BillboardCollectionFS.glsl @@ -11,7 +11,6 @@ varying vec4 v_color; #ifdef CLAMP_TO_GROUND varying vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates varying vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs) -varying vec4 v_leftAndRightTextureCoordinate; // texture coordinates for left and right depth test varying vec4 v_dimensionsAndImageSize; // dimensions of the bounding rectangle and the size of the image. The values will only be different for label glyphs varying vec2 v_eyeDepthAndDistance; // The depth of the billboard and the disable depth test distance @@ -88,10 +87,10 @@ void main() // negative values go into the screen if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth) { - float globeDepth2 = getGlobeDepth(adjustedST, v_leftAndRightTextureCoordinate.xy); + float globeDepth2 = getGlobeDepth(adjustedST, vec4(0.0, 1.0)); // top left corner if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth) { - float globeDepth3 = getGlobeDepth(adjustedST, v_leftAndRightTextureCoordinate.zw); + float globeDepth3 = getGlobeDepth(adjustedST, vec4(1.0, 1.0)); // top right corner if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth) { discard; diff --git a/Source/Shaders/BillboardCollectionVS.glsl b/Source/Shaders/BillboardCollectionVS.glsl index dd5f7c60a19c..e046ac8b9c31 100644 --- a/Source/Shaders/BillboardCollectionVS.glsl +++ b/Source/Shaders/BillboardCollectionVS.glsl @@ -21,7 +21,6 @@ varying vec2 v_textureCoordinates; #ifdef CLAMP_TO_GROUND varying vec4 v_textureCoordinateBounds; varying vec4 v_originTextureCoordinateAndTranslate; -varying vec4 v_leftAndRightTextureCoordinate; varying vec4 v_dimensionsAndImageSize; varying vec2 v_eyeDepthAndDistance; #endif @@ -160,28 +159,14 @@ void main() translate.y += (temp - floor(temp)) * SHIFT_LEFT8; translate.y -= UPPER_BOUND; - v_originTextureCoordinateAndTranslate.zw = translate.xy; - temp = compressedAttribute1.x * SHIFT_RIGHT8; vec2 imageSize = vec2(floor(temp), compressedAttribute2.w); #ifdef CLAMP_TO_GROUND - v_textureCoordinateBounds = textureCoordinateBounds; v_originTextureCoordinateAndTranslate.xy = vec2(1.0) - depthOrigin; //the origin - if (v_originTextureCoordinateAndTranslate.y == 1.0) //vertical origin is top - { - v_leftAndRightTextureCoordinate = vec4(0.0, 0.0, 1.0, 0.0); //bottom left, bottom right - } - else - { - if (v_originTextureCoordinateAndTranslate.y == 0.0) - { - v_originTextureCoordinateAndTranslate.y = 0.1; - } - - v_leftAndRightTextureCoordinate = vec4(0.0, 1.0, 1.0, 1.0); //top left, top right - } + v_originTextureCoordinateAndTranslate.zw = translate.xy; + v_textureCoordinateBounds = textureCoordinateBounds; temp = compressedAttribute3.w; temp = temp * SHIFT_RIGHT12;