aboutsummaryrefslogtreecommitdiffstats
path: root/Shaders/ui.frag
blob: 63e7eb06aa14e9dddce472bef1c72b64cc4ac864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#version 130

#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif

uniform sampler2D sampler;

in vec2 texCoord;
in vec4 color;

out vec4 FragColor;

void main(){
    vec4 pixelColor = texture2D(sampler, vec2(texCoord.x, texCoord.y));
    //TODO allow antialiasing
	//if (pixelColor.w != 1.0f)
	//	discard;
	FragColor = pixelColor.r * color;
}