aboutsummaryrefslogtreecommitdiffstats
path: root/Shaders/ui.frag
diff options
context:
space:
mode:
authorclyne <clyne@bitgloo.com>2019-09-25 14:35:10 -0400
committerGitHub <noreply@github.com>2019-09-25 14:35:10 -0400
commit5de39474dd9c17cc7f09015f291769fbe3fd5931 (patch)
tree73de6ae8aad4418cd19d55d5b468a20b404446ec /Shaders/ui.frag
parentec0ab456cf869f2daa6dea41158c54da745626d8 (diff)
parent1703f84121f18277c2a9bd671e204730c131c102 (diff)
Merge pull request #2 from tcsullivan/font-support
Font support
Diffstat (limited to 'Shaders/ui.frag')
-rw-r--r--Shaders/ui.frag16
1 files changed, 13 insertions, 3 deletions
diff --git a/Shaders/ui.frag b/Shaders/ui.frag
index 737344e..63e7eb0 100644
--- a/Shaders/ui.frag
+++ b/Shaders/ui.frag
@@ -1,12 +1,22 @@
+#version 130
+
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+
uniform sampler2D sampler;
-varying vec2 texCoord;
-varying vec4 color;
+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;
- gl_FragColor = pixelColor * color;
+ FragColor = pixelColor.r * color;
}