vulkan-tutorial/shadersrc/red.vert

16 lines
310 B
GLSL
Raw Permalink Normal View History

2022-10-26 14:52:55 +00:00
//we will be using glsl version 4.5 syntax
#version 450
void main()
{
//const array of positions for the triangle
const vec2 positions[3] = vec2[3](
vec2(0.5, 0.5),
vec2(-0.5, 0.5),
vec2(0.0, -0.5)
);
//output the position of each vertex
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
}