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

text_fixed.fsh.glsl « shaders « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1fe61a0eeb9662a7a1dceaeb65b91df81c886aeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
varying vec2 v_maskTexCoord;

#ifdef ENABLE_VTF
varying lowp vec4 v_color;
#else
varying vec2 v_colorTexCoord;
uniform sampler2D u_colorTex;
#endif

uniform sampler2D u_maskTex;
uniform float u_opacity;
uniform vec2 u_contrastGamma;

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;
}