diff options
Diffstat (limited to 'src/mbgl/shader/line.fragment.glsl')
-rw-r--r-- | src/mbgl/shader/line.fragment.glsl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/shader/line.fragment.glsl b/src/mbgl/shader/line.fragment.glsl index 717c46e10d..e0ef649965 100644 --- a/src/mbgl/shader/line.fragment.glsl +++ b/src/mbgl/shader/line.fragment.glsl @@ -3,6 +3,7 @@ uniform vec4 u_color; uniform float u_blur; varying vec2 v_normal; +varying float v_gamma_scale; void main() { // Calculate the distance of the pixel from the line in pixels. @@ -11,7 +12,8 @@ void main() { // Calculate the antialiasing fade factor. This is either when fading in // the line in case of an offset line (v_linewidth.t) or when fading out // (v_linewidth.s) - float alpha = clamp(min(dist - (u_linewidth.t - u_blur), u_linewidth.s - dist) / u_blur, 0.0, 1.0); + float blur = u_blur * v_gamma_scale; + float alpha = clamp(min(dist - (u_linewidth.t - blur), u_linewidth.s - dist) / blur, 0.0, 1.0); gl_FragColor = u_color * alpha; } |