aboutsummaryrefslogtreecommitdiff
path: root/shaders/color.vsh
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/color.vsh')
-rw-r--r--shaders/color.vsh17
1 files changed, 17 insertions, 0 deletions
diff --git a/shaders/color.vsh b/shaders/color.vsh
new file mode 100644
index 0000000..ff878be
--- /dev/null
+++ b/shaders/color.vsh
@@ -0,0 +1,17 @@
+# version 330 core
+
+layout (location = 0) in vec3 aPos;
+layout (location = 1) in vec3 aNormal;
+
+uniform mat4 model, view, proj;
+uniform mat4 rotNormals;
+
+out vec3 FragPos;
+out vec3 Normal;
+
+void main()
+{
+ gl_Position = proj * view * model * vec4(aPos, 1.0f);
+ FragPos = vec3(model * vec4(aPos, 1.0));
+ Normal = vec3(rotNormals * vec4(aNormal, 1.0));
+}
Feel free to download, copy and edit any repo