diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-01-05 18:05:58 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-01-05 18:05:58 +0300 |
commit | 9b5a11daed97f353686ab5f03cd5731807108d62 (patch) | |
tree | fc7db6e74db20b321b168218d8b8955f8d0ab512 /drape | |
parent | 4b36666f7ae12efa3a461c921e0bc74360c8f965 (diff) |
Added antialiasing to route line
Diffstat (limited to 'drape')
-rw-r--r-- | drape/shaders/route_fragment_shader.fsh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drape/shaders/route_fragment_shader.fsh b/drape/shaders/route_fragment_shader.fsh index 12bb3e5e7e..73f0300906 100644 --- a/drape/shaders/route_fragment_shader.fsh +++ b/drape/shaders/route_fragment_shader.fsh @@ -6,6 +6,8 @@ uniform sampler2D u_colorTex; uniform vec4 u_color; +const float kAntialiasingThreshold = 0.92; + void main(void) { #ifdef SAMSUNG_GOOGLE_NEXUS @@ -17,6 +19,8 @@ void main(void) vec4 color = u_color; if (v_length.x < v_length.z) color.a = 0.0; + else + color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))); #ifdef SAMSUNG_GOOGLE_NEXUS gl_FragColor = color + fakeColor; |