summaryrefslogtreecommitdiff
path: root/gl-asylum/world_vs.glsl
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2026-04-27 18:44:52 -0500
committerHunter Kvalevog <hunter@kvog.sh>2026-04-27 18:44:52 -0500
commitd57421e9f9536e8d51ea72dba41aca75ad92e98b (patch)
tree066606762d38c203b4bfe6a833b9b747bbb6c06f /gl-asylum/world_vs.glsl
parenta54c944ae2e6571799a3e83182c7ebcd6a35afed (diff)
Diffstat (limited to 'gl-asylum/world_vs.glsl')
-rw-r--r--gl-asylum/world_vs.glsl28
1 files changed, 28 insertions, 0 deletions
diff --git a/gl-asylum/world_vs.glsl b/gl-asylum/world_vs.glsl
new file mode 100644
index 0000000..9e071ed
--- /dev/null
+++ b/gl-asylum/world_vs.glsl
@@ -0,0 +1,28 @@
+#version 330 core
+
+layout (location = 0) in vec3 p;
+layout (location = 1) in vec3 n;
+layout (location = 2) in vec2 t;
+layout (location = 3) in int i;
+
+out vec3 v_p;
+out vec3 v_n;
+out vec2 v_t;
+
+out vec4 v_p_lightspace;
+
+out vec4 v_diffusion_corners;
+
+uniform mat4 u_model;
+uniform mat4 u_view;
+uniform mat4 u_lightspace;
+
+void main()
+{
+ v_p = vec3(u_model * vec4(p, 1.0f));
+ v_n = n;
+ v_t = t;
+ v_p_lightspace = u_lightspace * vec4(v_p, 1.0f);
+ gl_Position = u_view * u_model * vec4(p, 1.0f);
+}
+