summaryrefslogtreecommitdiff
path: root/assets/shaders/shadows.vert
diff options
context:
space:
mode:
authorOmni <omniscient.oce@gmail.com>2024-06-22 23:06:19 +1000
committerOmni <omniscient.oce@gmail.com>2024-06-22 23:06:19 +1000
commit39e7122b5cd1e0d56a4a7cfd3c4114032d14e9b6 (patch)
treeb879e9796146f2a1d57cf9d44cfb3a6991b5d8cc /assets/shaders/shadows.vert
parenta2b43f8f93365874ba46dfaacd59df9e197c32e7 (diff)
creating shadowmap pipeline
Diffstat (limited to 'assets/shaders/shadows.vert')
-rw-r--r--assets/shaders/shadows.vert19
1 files changed, 19 insertions, 0 deletions
diff --git a/assets/shaders/shadows.vert b/assets/shaders/shadows.vert
new file mode 100644
index 0000000..00b1a81
--- /dev/null
+++ b/assets/shaders/shadows.vert
@@ -0,0 +1,19 @@
+#version 410 core
+
+// Vertex attributes
+layout(location = 0) in vec3 inPosition;
+layout(location = 1) in vec3 inNormal;
+layout(location = 2) in vec2 inTexCoords;
+
+// Uniforms
+uniform Model {
+ mat4 mat;
+};
+
+uniform LightSpace {
+ mat4 mat;
+};
+
+void main() {
+ gl_Position = LightSpace.mat * Model.mat * vec4(inPosition, 1.0);
+}