summaryrefslogtreecommitdiff
path: root/resources/shaders/texture.vert
diff options
context:
space:
mode:
authorSebastian Park <SebPark03@gmail.com>2024-04-23 00:30:37 -0400
committerSebastian Park <SebPark03@gmail.com>2024-04-23 00:30:37 -0400
commitf2d61fc06387ccb22ecb5cb6c42210736ac64c9f (patch)
tree9191e1e91a79514a5231dc6e50c2ecc4feb03b16 /resources/shaders/texture.vert
parentb4be9e522b51b01c7870821648e85f97c1fdb09b (diff)
Get ground textures working, but not yet abstracted to the shape class.
Diffstat (limited to 'resources/shaders/texture.vert')
-rw-r--r--resources/shaders/texture.vert15
1 files changed, 15 insertions, 0 deletions
diff --git a/resources/shaders/texture.vert b/resources/shaders/texture.vert
new file mode 100644
index 0000000..c87f366
--- /dev/null
+++ b/resources/shaders/texture.vert
@@ -0,0 +1,15 @@
+#version 330 core
+
+// TASK 15: add a second layout variable representing a UV coordinate
+layout (location = 0) in vec3 position;
+layout (location = 1) in vec2 uv_raw;
+
+// TASK 16: create an "out" variable representing a UV coordinate
+out vec2 uv;
+
+void main() {
+ // TASK 16: assign the UV layout variable to the UV "out" variable
+ uv = uv_raw;
+
+ gl_Position = vec4(position, 1.0);
+}