diff options
author | jvech <jmvalenciae@unal.edu.co> | 2022-08-29 09:12:18 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2022-08-29 09:12:18 -0500 |
commit | d7bd9a3dbd3486a4b0615dc9f30a890ff6d04ec6 (patch) | |
tree | 4d4e2a4770fae453a6ac541931216d5e353102b9 /shaders | |
parent | 3b24a477cf566296aa758058aaca96cf0c117141 (diff) |
feat: 3D support added
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/fragment.fsh (renamed from shaders/fragment.vsh) | 2 | ||||
-rw-r--r-- | shaders/vertex.vsh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/shaders/fragment.vsh b/shaders/fragment.fsh index 38bc00d..2d87daa 100644 --- a/shaders/fragment.vsh +++ b/shaders/fragment.fsh @@ -5,5 +5,5 @@ out vec4 FragColor; void main() { - FragColor = vec4(vertexColor, 1.0); + FragColor = vec4(vertexColor, 0.0f); } diff --git a/shaders/vertex.vsh b/shaders/vertex.vsh index 220041d..987dc3b 100644 --- a/shaders/vertex.vsh +++ b/shaders/vertex.vsh @@ -2,12 +2,12 @@ layout (location = 0) in vec3 aPos; layout (location = 1) in vec3 aColor; -uniform mat4 trans; +uniform mat4 model, view, proj; out vec3 vertexColor; void main() { - gl_Position = trans * vec4(aPos, 1.0f); + gl_Position = proj * view * model * vec4(aPos, 1.0f); vertexColor = aColor; } |