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_vertex.glsl | |
parent | d4106529d69071664d6532c70a21c70da134681c (diff) | |
download | mv-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.gz mv-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.bz2 mv-54d0234c8334bcd61ffb655a57e6147fd279b9e1.tar.xz mv-54d0234c8334bcd61ffb655a57e6147fd279b9e1.zip |
Add OpenGL ES 2 shaders.
Diffstat (limited to 'data/graphics/shaders/gles2_vertex.glsl')
-rw-r--r-- | data/graphics/shaders/gles2_vertex.glsl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/data/graphics/shaders/gles2_vertex.glsl b/data/graphics/shaders/gles2_vertex.glsl new file mode 100644 index 000000000..83bd7f42d --- /dev/null +++ b/data/graphics/shaders/gles2_vertex.glsl @@ -0,0 +1,12 @@ +#version 100 + +attribute vec4 position; +varying vec2 Texcoord; +uniform vec2 screen; +uniform vec2 textureSize; + +void main() +{ + Texcoord = vec2(position.z / textureSize.x, position.w / textureSize.y); + gl_Position = vec4(position.x / screen.x - 1.0, 1.0 - position.y / screen.y, 0.0, 1.0); +} |