Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/drape
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-01-05 18:05:58 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-01-05 18:05:58 +0300
commit9b5a11daed97f353686ab5f03cd5731807108d62 (patch)
treefc7db6e74db20b321b168218d8b8955f8d0ab512 /drape
parent4b36666f7ae12efa3a461c921e0bc74360c8f965 (diff)
Added antialiasing to route line
Diffstat (limited to 'drape')
-rw-r--r--drape/shaders/route_fragment_shader.fsh4
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;