aboutsummaryrefslogtreecommitdiffstats
path: root/shaders/ui.vert
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/ui.vert')
-rw-r--r--shaders/ui.vert20
1 files changed, 17 insertions, 3 deletions
diff --git a/shaders/ui.vert b/shaders/ui.vert
index 020eabb..cc1091c 100644
--- a/shaders/ui.vert
+++ b/shaders/ui.vert
@@ -1,13 +1,27 @@
struct Vertex {
vec2 pos;
vec2 uv;
- uint col;
+ vec4 color;
};
layout(set = 0, binding = 0) uniform Vertices {
- Vertex[158] vertices;
+ Vertex vertices[158];
};
+out gl_PerVertex {
+ vec4 gl_Position;
+};
+
+layout(location = 0) out struct {
+ vec2 uv;
+ vec4 color;
+} Out;
+
void main() {
- gl_Position = vec4(vertices[gl_VertexIndex].pos, 0.0, 1.0);
+ Vertex v = vertices[gl_VertexIndex];
+
+ Out.color = v.color;
+ Out.uv = v.uv;
+
+ gl_Position = vec4(v.pos, 0.0, 1.0);
}