diff options
author | HampusM <hampus@hampusmat.com> | 2023-10-22 19:29:11 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-10-22 19:29:11 +0200 |
commit | 54c0fd70f82eb1a6814872c78bc22380f438c9d1 (patch) | |
tree | 7b0b67b52daa7ce18432c7b83caa862234a3255c /engine/vertex.glsl | |
parent | 30394c16ccdcdb145352e245a7a8893cef28e82d (diff) |
feat(engine): add translating & scaling objects
Diffstat (limited to 'engine/vertex.glsl')
-rw-r--r-- | engine/vertex.glsl | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |