From 3b24a477cf566296aa758058aaca96cf0c117141 Mon Sep 17 00:00:00 2001 From: jvech Date: Thu, 25 Aug 2022 21:39:11 -0500 Subject: feat: linear library implemented --- shaders/vertex.vsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'shaders/vertex.vsh') diff --git a/shaders/vertex.vsh b/shaders/vertex.vsh index d195db3..220041d 100644 --- a/shaders/vertex.vsh +++ b/shaders/vertex.vsh @@ -1,11 +1,13 @@ # version 330 core layout (location = 0) in vec3 aPos; +layout (location = 1) in vec3 aColor; +uniform mat4 trans; -out vec4 vertexColor; +out vec3 vertexColor; void main() { - gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0f); - vertexColor = vec4(0.2, 0.7, 0.2, 0.8); + gl_Position = trans * vec4(aPos, 1.0f); + vertexColor = aColor; } -- cgit v1.2.3-70-g09d2