From c6ffa3f9c19ed84bcd881468f53f26dcfd4a6b82 Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Thu, 3 Jan 2019 16:06:40 -0500 Subject: [PATCH] Create sprite_vertex.glsl --- glsl/sprite_vertex.glsl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 glsl/sprite_vertex.glsl diff --git a/glsl/sprite_vertex.glsl b/glsl/sprite_vertex.glsl new file mode 100644 index 0000000..02bff08 --- /dev/null +++ b/glsl/sprite_vertex.glsl @@ -0,0 +1,20 @@ +#version 330 core + +// Vertex attributes. + +layout (location = 0) in vec2 default_screen_position; + +layout (location = 1) in vec2 default_texture_coordinates; + +// Output to fragment shader. + +out vec2 texture_coordinates; + +// Main shader code. + +void main() +{ + gl_Position = vec4(default_screen_position.x, default_screen_position.y, 0.0f, 1.0f); + + texture_coordinates = default_texture_coordinates; +} \ No newline at end of file