aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-02-19 23:23:41 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-02-19 23:23:41 +0100
commit45783d96ec6f84893c85789ff5e5e2243e7f3db9 (patch)
tree28d10972594a325d3cdd9171b3533bc921dd2fba /shaders
parent14a79645579d6f4a9e541915017976619f24ecfb (diff)
Attempt at rendering imgui content
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);
+}