From 386aad9dac7c22cabb0f1bbba33d248c40bb0310 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 23 Oct 2023 22:23:25 +0200 Subject: feat(engine): add perspective --- engine/vertex.glsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine/vertex.glsl') diff --git a/engine/vertex.glsl b/engine/vertex.glsl index db3d612..b0a2a13 100644 --- a/engine/vertex.glsl +++ b/engine/vertex.glsl @@ -4,11 +4,13 @@ layout (location = 1) in vec3 color; out vec3 in_frag_color; -uniform mat4 transform; +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; void main() { - gl_Position = transform * vec4(pos, 1.0); + gl_Position = projection * view * model * vec4(pos, 1.0); in_frag_color = color; } -- cgit v1.2.3-18-g5258