From 294b307cb3f470b1cf5fb94633c9082dc0bfd719 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 27 Aug 2015 16:49:35 -0400 Subject: [PATCH] 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. --- src/mbgl/shader/line.vertex.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/shader/line.vertex.glsl b/src/mbgl/shader/line.vertex.glsl index f818565cc..3b3caaab1 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; }