diff options
author | iurii plugatarov <[email protected]> | 2024-08-10 14:22:45 +0200 |
---|---|---|
committer | iurii plugatarov <[email protected]> | 2024-08-10 14:22:45 +0200 |
commit | 90e85b2fe655a2643535b0f49d99836ac72e724c (patch) | |
tree | 66c0656984da7b2b8a6c06c4b0af764919e0e318 /src/shaders/triangle.vert.glsl | |
parent | 86eb1bfcf21819492e0ec55cd08127fa8a5c6769 (diff) | |
download | ogl-90e85b2fe655a2643535b0f49d99836ac72e724c.tar.gz |
custom shader loader
Diffstat (limited to 'src/shaders/triangle.vert.glsl')
-rw-r--r-- | src/shaders/triangle.vert.glsl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shaders/triangle.vert.glsl b/src/shaders/triangle.vert.glsl index dbef13e..f1dbe00 100644 --- a/src/shaders/triangle.vert.glsl +++ b/src/shaders/triangle.vert.glsl @@ -1,6 +1,9 @@ #version 330 core -layout (location = 0) in vec2 aPos; +layout (location = 0) in vec3 aPos; +layout (location = 1) in vec3 aColor; +out vec3 ourColor; void main() { - gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0); + gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0); + ourColor = aColor; } |