diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2017-05-16 14:42:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-16 14:42:32 +0300 |
commit | d2f79bd2c7004af2d1459e8d5b7748763f241a54 (patch) | |
tree | 64300bccb750e59f7c3a05800eafcd5c3b3f89cb /drape_frontend/shaders/text_fixed.fsh.glsl | |
parent | aa6703383e8d4c2ff8445e8b3c27728846cdab4b (diff) | |
parent | 086d6f9cf247cea07cff6bc33d5567dc7c64806b (diff) |
Merge pull request #6040 from rokuz/es3-supportbeta-810
Added OpenGL ES3 support
Diffstat (limited to 'drape_frontend/shaders/text_fixed.fsh.glsl')
-rwxr-xr-x | drape_frontend/shaders/text_fixed.fsh.glsl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drape_frontend/shaders/text_fixed.fsh.glsl b/drape_frontend/shaders/text_fixed.fsh.glsl index 7931b21546..1fe61a0eeb 100755 --- a/drape_frontend/shaders/text_fixed.fsh.glsl +++ b/drape_frontend/shaders/text_fixed.fsh.glsl @@ -11,14 +11,18 @@ uniform sampler2D u_maskTex; uniform float u_opacity; uniform vec2 u_contrastGamma; -void main (void) +void main() { #ifdef ENABLE_VTF lowp vec4 glyphColor = v_color; #else lowp vec4 glyphColor = texture2D(u_colorTex, v_colorTexCoord); #endif +#ifdef GLES3 + float alpha = texture2D(u_maskTex, v_maskTexCoord).r; +#else float alpha = texture2D(u_maskTex, v_maskTexCoord).a; +#endif glyphColor.a *= u_opacity * alpha; gl_FragColor = glyphColor; } |