From 2890cf45c1ad62bf8496f15dfb4796f9c71c02eb Mon Sep 17 00:00:00 2001 From: Hunter Kvalevog Date: Thu, 20 Nov 2025 15:37:28 -0600 Subject: shaders --- shaders/vert_cube.glsl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shaders/vert_cube.glsl (limited to 'shaders/vert_cube.glsl') diff --git a/shaders/vert_cube.glsl b/shaders/vert_cube.glsl new file mode 100644 index 0000000..629b5cd --- /dev/null +++ b/shaders/vert_cube.glsl @@ -0,0 +1,31 @@ +#version 330 core + +// -------------------------------------------------------------------------------- +// Uniforms +// -------------------------------------------------------------------------------- +uniform mat4 u_vmat; + +// -------------------------------------------------------------------------------- +// Vertex inputs +// -------------------------------------------------------------------------------- +layout (location = 0) in vec3 v_in_p; +layout (location = 1) in vec2 v_in_t; +layout (location = 2) in vec3 v_in_n; + +// -------------------------------------------------------------------------------- +// Vertex outputs +// -------------------------------------------------------------------------------- +out vec3 v_p; +out vec2 v_t; +out vec3 v_n; + +// -------------------------------------------------------------------------------- +// Main +// -------------------------------------------------------------------------------- +void main() +{ + v_p = v_in_p; + v_t = v_in_t; + v_n = v_in_n; + gl_Position = u_vmat * vec4(v_p, 1.0f); +} -- cgit v1.2.3