aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-02-14 10:43:26 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-18 15:22:09 +0100
commit83c78e2b5cc9b0cb737ec3785722ae280bd29b65 (patch)
tree8c1f522bc19d4adc7df849fe09f8afc9513f9d65 /shaders
parent23a37b2cdd8ffde8bb85a4159888bf3a7ec35966 (diff)
Use shader from file..
Diffstat (limited to 'shaders')
-rw-r--r--shaders/fragment.frag3
-rw-r--r--shaders/vertex.vert8
2 files changed, 8 insertions, 3 deletions
diff --git a/shaders/fragment.frag b/shaders/fragment.frag
index ea1ca7d..60791c2 100644
--- a/shaders/fragment.frag
+++ b/shaders/fragment.frag
@@ -1,8 +1,9 @@
#version 330 core
-uniform vec3 triangle_color;
out vec4 out_color;
+uniform vec3 triangle_color;
+
void main() {
out_color = vec4(triangle_color, 1.0);
} \ No newline at end of file
diff --git a/shaders/vertex.vert b/shaders/vertex.vert
index d1cc433..a44217b 100644
--- a/shaders/vertex.vert
+++ b/shaders/vertex.vert
@@ -1,7 +1,11 @@
#version 330 core
-in vec2 position;
+in vec3 position;
+
+uniform mat4 proj;
+uniform mat4 view;
+uniform mat4 model;
void main() {
- gl_Position = vec4(position, 0.0, 1.0);
+ gl_Position = proj * view * model * vec4(position, 1.0);
} \ No newline at end of file