aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/fragment.vsh8
-rw-r--r--shaders/vertex.vsh11
2 files changed, 19 insertions, 0 deletions
diff --git a/shaders/fragment.vsh b/shaders/fragment.vsh
new file mode 100644
index 0000000..fcb48a4
--- /dev/null
+++ b/shaders/fragment.vsh
@@ -0,0 +1,8 @@
+#version 330 core
+in vec4 vertexColor;
+out vec4 FragColor;
+
+void main()
+{
+ FragColor = vertexColor;
+}
diff --git a/shaders/vertex.vsh b/shaders/vertex.vsh
new file mode 100644
index 0000000..d195db3
--- /dev/null
+++ b/shaders/vertex.vsh
@@ -0,0 +1,11 @@
+# version 330 core
+
+layout (location = 0) in vec3 aPos;
+
+out vec4 vertexColor;
+
+void main()
+{
+ gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0f);
+ vertexColor = vec4(0.2, 0.7, 0.2, 0.8);
+}
Feel free to download, copy and edit any repo