diff options
author | HampusM <hampus@hampusmat.com> | 2023-10-12 21:29:36 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-10-12 21:29:36 +0200 |
commit | 341826e9a2b89713fc47ffbc914d18e23c7d9287 (patch) | |
tree | b92b85bd85690d3e6475eac7e8c254700865bded /engine/vertex.glsl | |
parent | a4d66f8272c08c722a0a3fa6843ccf61e05d2928 (diff) |
feat(engine): add vertex coloring
Diffstat (limited to 'engine/vertex.glsl')
-rw-r--r-- | engine/vertex.glsl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/vertex.glsl b/engine/vertex.glsl index c74ea10..37d5677 100644 --- a/engine/vertex.glsl +++ b/engine/vertex.glsl @@ -1,7 +1,12 @@ #version 330 core -layout (location = 0) in vec3 aPos; +layout (location = 0) in vec3 pos; +layout (location = 1) in vec3 color; + +out vec3 in_frag_color; void main() { - gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0); + gl_Position = vec4(pos.x, pos.y, pos.z, 1.0); + + in_frag_color = color; } |