From 8f620bed8a5c1cf350f820daa879dad2fe5c3f17 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 23 Jan 2015 19:56:26 -0500 Subject: [PATCH] reduce gamma for dashes to make them sharper because the shader uses the range [0.5 - gamma, 0.5 + gamma] gamma should be half the distance you want to blur, not the full distance. js: 35b42808922506a6039b8bfd3dc10098692c1268 --- src/mbgl/renderer/painter_line.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/renderer/painter_line.cpp b/src/mbgl/renderer/painter_line.cpp index 2d57bb26e..a28d30a52 100644 --- a/src/mbgl/renderer/painter_line.cpp +++ b/src/mbgl/renderer/painter_line.cpp @@ -91,7 +91,7 @@ void Painter::renderLine(LineBucket& bucket, util::ptr layer_desc, c linesdfShader->u_patternscale = {{ scaleX, scaleY }}; linesdfShader->u_tex_y = pos.y; linesdfShader->u_image = 0; - linesdfShader->u_sdfgamma = lineAtlas.width / (properties.dash_line_width * pos.width * 256.0 * state.getPixelRatio()); + linesdfShader->u_sdfgamma = lineAtlas.width / (properties.dash_line_width * pos.width * 256.0 * state.getPixelRatio()) / 2; bucket.drawLineSDF(*linesdfShader);