diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-10 02:44:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-10 02:44:09 +0300 |
commit | 54d0234c8334bcd61ffb655a57e6147fd279b9e1 (patch) | |
tree | fa04d6f007f1facd844840a3bd2301d7e284500e /data/graphics/shaders/gles2_frag.glsl | |
parent | d4106529d69071664d6532c70a21c70da134681c (diff) | |
download | manaplus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.gz manaplus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.bz2 manaplus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.xz manaplus-54d0234c8334bcd61ffb655a57e6147fd279b9e1.zip |
Add OpenGL ES 2 shaders.
Diffstat (limited to 'data/graphics/shaders/gles2_frag.glsl')
-rw-r--r-- | data/graphics/shaders/gles2_frag.glsl | 20 |
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; + } +} |