From 54c0fd70f82eb1a6814872c78bc22380f438c9d1 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 22 Oct 2023 19:29:11 +0200 Subject: feat(engine): add translating & scaling objects --- engine/vertex.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engine/vertex.glsl') diff --git a/engine/vertex.glsl b/engine/vertex.glsl index 37d5677..db3d612 100644 --- a/engine/vertex.glsl +++ b/engine/vertex.glsl @@ -4,9 +4,11 @@ layout (location = 1) in vec3 color; out vec3 in_frag_color; +uniform mat4 transform; + void main() { - gl_Position = vec4(pos.x, pos.y, pos.z, 1.0); + gl_Position = transform * vec4(pos, 1.0); in_frag_color = color; } -- cgit v1.2.3-18-g5258