summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-08-27 16:49:35 -0400
committerAnsis Brammanis <brammanis@gmail.com>2015-08-27 16:52:50 -0400
commit294b307cb3f470b1cf5fb94633c9082dc0bfd719 (patch)
treed23bc9ee0de96b76fa6786ad986b2190abe003e6 /src
parente56ed2966fd8facd9164a26d0dde0834c0f14988 (diff)
downloadqtlocation-mapboxgl-294b307cb3f470b1cf5fb94633c9082dc0bfd719.tar.gz
fix line antialiasing adjustment bug
fix #2189 This puts an upper limit on how much lines can be blurred because of their y position. It's a hacky fix but the entire way lines are antialiased in perspective view is hacky.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/shader/line.vertex.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/shader/line.vertex.glsl b/src/mbgl/shader/line.vertex.glsl
index f818565ccd..3b3caaab15 100644
--- a/src/mbgl/shader/line.vertex.glsl
+++ b/src/mbgl/shader/line.vertex.glsl
@@ -49,7 +49,7 @@ void main() {
float squish_scale = length(a_extrude) / length(u_antialiasingmatrix * a_extrude);
// how much features are squished in all directions by the perspectiveness
- float perspective_scale = 1.0 / (1.0 - y * u_extra);
+ float perspective_scale = 1.0 / (1.0 - min(y * u_extra, 0.90));
v_gamma_scale = perspective_scale * squish_scale;
}