#version 450 layout(location = 0) out vec3 frag_normal; layout(push_constant) uniform vp_t { mat4 view; mat4 proj; } vp; vec2 vertices[4] = vec2[]( vec2(-1, -1), vec2(-1, 1), vec2(1, 1), vec2(1, -1) ); void main() { const vec2 pos = 3 * vertices[gl_VertexIndex]; gl_Position = vp.proj * vp.view * vec4(pos.x, 0, pos.y, 1); frag_normal = vec3(0, 1, 0); }