X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=vs.vert;h=61ad91a7cfd53c2ca962a7a28796bfff6461dfa7;hb=4254221b8923fb72b877703d8ede6c2b316b9bbf;hp=797e0c15f3e30bbb1a9fc4d0f1db2e562a6ecaee;hpb=b21b2d8045035a08dd3a3eeabfe1c9457cc5cf61;p=nageru diff --git a/vs.vert b/vs.vert index 797e0c1..61ad91a 100644 --- a/vs.vert +++ b/vs.vert @@ -1,7 +1,8 @@ #version 450 core +#extension GL_ARB_shader_viewport_layer_array : require layout(location=0) in vec2 position; -out vec2 tc; +out vec3 tc; void main() { @@ -12,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 = position; + tc.xy = position; + tc.z = gl_InstanceID; + + gl_Layer = gl_InstanceID; }