aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/ui.frag5
-rw-r--r--shaders/ui.vert18
2 files changed, 23 insertions, 0 deletions
diff --git a/shaders/ui.frag b/shaders/ui.frag
new file mode 100644
index 0000000..e5a6aa3
--- /dev/null
+++ b/shaders/ui.frag
@@ -0,0 +1,5 @@
+layout(location = 0) out vec4 o_Color;
+
+void main() {
+ o_Color = vec4(1.0, 0.0, 0.0, 1.0);
+}
diff --git a/shaders/ui.vert b/shaders/ui.vert
new file mode 100644
index 0000000..fc427d8
--- /dev/null
+++ b/shaders/ui.vert
@@ -0,0 +1,18 @@
+struct Vertex {
+ vec2 pos;
+ vec2 uv;
+ uint col;
+};
+
+layout(set = 0, binding = 0) uniform Vertices {
+ Vertex[10000] vertices;
+};
+
+out gl_PerVertex
+{
+ vec4 gl_Position;
+};
+
+void main() {
+ gl_Position = vec4(vertices[gl_VertexIndex].pos, 0.0, 1.0);
+}