summaryrefslogtreecommitdiff
path: root/data/graphics/shaders/gles2_vertex.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'data/graphics/shaders/gles2_vertex.glsl')
-rw-r--r--data/graphics/shaders/gles2_vertex.glsl12
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);
+}