diff options
author | HampusM <hampus@hampusmat.com> | 2023-10-23 22:23:25 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-10-23 22:23:25 +0200 |
commit | 386aad9dac7c22cabb0f1bbba33d248c40bb0310 (patch) | |
tree | 1f4379ab50ffc85e9ad511b9fe9e9dd8a7f8c321 /engine/vertex.glsl | |
parent | fee2320189d6e758748a939c56d539043cbffde6 (diff) |
feat(engine): add perspective
Diffstat (limited to 'engine/vertex.glsl')
-rw-r--r-- | engine/vertex.glsl | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |