aboutsummaryrefslogtreecommitdiffstats
path: root/Shaders/ui.frag
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-18 14:40:23 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-18 14:40:23 -0400
commit0869328b12ff9b77000915f37443dcf2468d881e (patch)
tree1e9e4d5ca43661a4aca8f5052f1ba67d23b9d955 /Shaders/ui.frag
parent0e7f7791fd592f0240a30168a9a570c57b0f5880 (diff)
parent8b834d0440f85a452694fb5cbb2cd9f4dae07aa2 (diff)
Added UI rendering support to render loop, although fonts don't render yet
Diffstat (limited to 'Shaders/ui.frag')
-rw-r--r--Shaders/ui.frag16
1 files changed, 16 insertions, 0 deletions
diff --git a/Shaders/ui.frag b/Shaders/ui.frag
new file mode 100644
index 0000000..118108c
--- /dev/null
+++ b/Shaders/ui.frag
@@ -0,0 +1,16 @@
+#version 130
+
+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 * color;
+}