summaryrefslogtreecommitdiff
path: root/data/graphics/shaders/gles2_frag.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'data/graphics/shaders/gles2_frag.glsl')
-rw-r--r--data/graphics/shaders/gles2_frag.glsl20
1 files changed, 20 insertions, 0 deletions
diff --git a/data/graphics/shaders/gles2_frag.glsl b/data/graphics/shaders/gles2_frag.glsl
new file mode 100644
index 000000000..ab642fcf6
--- /dev/null
+++ b/data/graphics/shaders/gles2_frag.glsl
@@ -0,0 +1,20 @@
+#version 100
+precision mediump float;
+
+uniform sampler2D tex;
+uniform vec4 color;
+uniform float drawType;
+uniform float alpha;
+varying mediump vec2 Texcoord;
+
+void main()
+{
+ if (drawType >= 0.1)
+ {
+ gl_FragColor = texture2D(tex, Texcoord) * vec4(1.0, 1.0, 1.0, alpha);
+ }
+ else
+ {
+ gl_FragColor = color;
+ }
+}