From 20f1e487c8cbb8a23b2759d1934fffc5b6b38156 Mon Sep 17 00:00:00 2001 From: iurii plugatarov Date: Sat, 17 Aug 2024 18:38:07 +0300 Subject: transformations --- res/shaders/triangle.vs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'res') diff --git a/res/shaders/triangle.vs b/res/shaders/triangle.vs index a6b5b4b..c607a81 100644 --- a/res/shaders/triangle.vs +++ b/res/shaders/triangle.vs @@ -6,11 +6,13 @@ layout (location = 2) in vec2 a_tex_coord; out vec3 our_color; out vec2 TexCoord; -uniform mat4 transform; +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; void main() { - gl_Position = transform * vec4(a_pos, 1.0); + gl_Position = projection * view * model * vec4(a_pos, 1.0); our_color = a_color; TexCoord = vec2(a_tex_coord.x, a_tex_coord.y); } -- cgit 1.4.1-2-gfad0