diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-06-12 12:17:46 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@gmail.com> | 2018-06-12 12:17:46 -0700 |
commit | 5a2dfa9a6f65397ee4caf94fed9b513171831854 (patch) | |
tree | ca154fc966247862aacb69690c2eae091e668b13 | |
parent | 50797992c2c20b90a0712f84eebd467b711d824b (diff) | |
download | qtlocation-mapboxgl-5a2dfa9a6f65397ee4caf94fed9b513171831854.tar.gz |
Update line shaders.
-rw-r--r-- | src/mbgl/shaders/line.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/shaders/line_pattern.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/shaders/line_sdf.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/shaders/line.cpp b/src/mbgl/shaders/line.cpp index 68d2dcc468..a4df33d9b6 100644 --- a/src/mbgl/shaders/line.cpp +++ b/src/mbgl/shaders/line.cpp @@ -148,7 +148,7 @@ void main() { offset = -1.0 * offset; float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); - float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING; + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); // Scale the extrusion vector down to a normal and then up by the line width // of this vertex. diff --git a/src/mbgl/shaders/line_pattern.cpp b/src/mbgl/shaders/line_pattern.cpp index be88255e3c..374fc0a995 100644 --- a/src/mbgl/shaders/line_pattern.cpp +++ b/src/mbgl/shaders/line_pattern.cpp @@ -133,7 +133,7 @@ void main() { offset = -1.0 * offset; float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); - float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING; + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); // Scale the extrusion vector down to a normal and then up by the line width // of this vertex. diff --git a/src/mbgl/shaders/line_sdf.cpp b/src/mbgl/shaders/line_sdf.cpp index c5d50566e8..9b6bf47301 100644 --- a/src/mbgl/shaders/line_sdf.cpp +++ b/src/mbgl/shaders/line_sdf.cpp @@ -171,7 +171,7 @@ void main() { offset = -1.0 * offset; float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); - float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING; + float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); // Scale the extrusion vector down to a normal and then up by the line width // of this vertex. |