]> git.sesse.net Git - nageru/blobdiff - vs.vert
Allow symlinked frame files. Useful for testing.
[nageru] / vs.vert
diff --git a/vs.vert b/vs.vert
index a8bf48e4832c5aec737939852b5c77393819e120..61ad91a7cfd53c2ca962a7a28796bfff6461dfa7 100644 (file)
--- a/vs.vert
+++ b/vs.vert
@@ -1,8 +1,8 @@
 #version 450 core
+#extension GL_ARB_shader_viewport_layer_array : require
 
-in vec2 position;
-in vec2 texcoord;
-out vec2 tc;
+layout(location=0) in vec2 position;
+out vec3 tc;
 
 void main()
 {
@@ -13,5 +13,8 @@ void main()
        //   0.000  0.000 -2.000 -1.000
        //   0.000  0.000  0.000  1.000
        gl_Position = vec4(2.0 * position.x - 1.0, 2.0 * position.y - 1.0, -1.0, 1.0);
-       tc = texcoord;
+       tc.xy = position;
+       tc.z = gl_InstanceID;
+
+       gl_Layer = gl_InstanceID;
 }