blob: 9283d6827678018dcb1c105c0dd4a073aee3d08d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#if __VERSION__ == 120
flat varying vec4 color_flat;
noperspective varying vec2 texCoord_interp;
#define fragColor gl_FragColor
#else
flat in vec4 color_flat;
noperspective in vec2 texCoord_interp;
out vec4 fragColor;
#define texture2D texture
#endif
uniform sampler2D glyph;
void main()
{
// input color replaces texture color
fragColor.rgb = color_flat.rgb;
// modulate input alpha & texture alpha
fragColor.a = color_flat.a * texture2D(glyph, texCoord_interp).a;
}
|