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
This commit is contained in:
Ansis Brammanis
2015-01-23 19:56:26 -05:00
parent 0c2ffc251c
commit 8f620bed8a

View File

@@ -91,7 +91,7 @@ void Painter::renderLine(LineBucket& bucket, util::ptr<StyleLayer> 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);