diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-01-04 16:18:32 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-01-04 16:21:49 +0300 |
commit | 7313db4344dfccbd5c4d3b91f76435b63a72812d (patch) | |
tree | 4dd3a5911aa58dc170bdcc89c804c81cb3110c33 /drape | |
parent | ecb1a6b3f06ab67a32f6bb22e25ac346b870fe5c (diff) |
Fixed 3d arrow rendering on Samsung Galaxy Nexus.
Diffstat (limited to 'drape')
-rw-r--r-- | drape/shaders/arrow3d_fragment_shader.fsh | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drape/shaders/arrow3d_fragment_shader.fsh b/drape/shaders/arrow3d_fragment_shader.fsh index bcdff2015e..467ec1587e 100644 --- a/drape/shaders/arrow3d_fragment_shader.fsh +++ b/drape/shaders/arrow3d_fragment_shader.fsh @@ -1,9 +1,24 @@ varying float v_intensity; +#ifdef SAMSUNG_GOOGLE_NEXUS +uniform sampler2D u_colorTex; +#endif + const vec3 color = vec3(0.0, 0.75, 1.0); void main() { - gl_FragColor.rgb = (v_intensity * 0.4 + 0.6) * color; - gl_FragColor.a = 1.0; +#ifdef SAMSUNG_GOOGLE_NEXUS + // Because of a bug in OpenGL driver on Samsung Google Nexus this workaround is here. + const float kFakeColorScalar = 0.0; + lowp vec4 fakeColor = texture2D(u_colorTex, vec2(0.0, 0.0)) * kFakeColorScalar; +#endif + + vec4 resColor = vec4((v_intensity * 0.4 + 0.6) * color, 1.0); + +#ifdef SAMSUNG_GOOGLE_NEXUS + gl_FragColor = resColor + fakeColor; +#else + gl_FragColor = resColor; +#endif } |