summaryrefslogtreecommitdiff
path: root/data/graphics/shaders/gles2_frag.glsl
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-10 02:44:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-10 02:44:09 +0300
commit54d0234c8334bcd61ffb655a57e6147fd279b9e1 (patch)
treefa04d6f007f1facd844840a3bd2301d7e284500e /data/graphics/shaders/gles2_frag.glsl
parentd4106529d69071664d6532c70a21c70da134681c (diff)
downloadplus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.gz
plus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.bz2
plus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.xz
plus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.zip
Add OpenGL ES 2 shaders.
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;
+ }
+}