quakeforge/libs/video/renderer/vulkan/twod.vert
Bill Currie bb4ca7683e [vulkan] Get the 2D pipeline up and running
First pixels! This was a nightmare of little issues that the validation
layers couldn't help with: incorrect input assembly, incorrect vertex
attribute specs. Though the layers did help with getting the queues
working. Still, lots of work to go but this is a major breakthrough as
I now have access to visual debugging for textures and the like.
2021-01-12 11:27:41 +09:00

26 lines
554 B
GLSL

#version 450
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection;
};
/** Vertex position.
x, y, s, t
\a vertex provides the onscreen location at which to draw the icon
(\a x, \a y) and texture coordinate for the icon (\a s=z, \a t=w).
*/
layout (location = 0) in vec2 vertex;
layout (location = 1) in ivec2 uv;
layout (location = 2) in vec4 vcolor;
layout (location = 0) out vec2 st;
layout (location = 1) out vec4 color;
void
main (void)
{
gl_Position = Projection * vec4 (vertex.xy, 0.0, 1.0);
st = vec2(uv);
color = vcolor;
}