diff --git a/shaders/simple.frag b/shaders/simple.frag index 6f16015..dd61cc6 100644 --- a/shaders/simple.frag +++ b/shaders/simple.frag @@ -1,7 +1,6 @@ #version 460 core -out layout(location=0) vec4 color; -in vec4 gl_FragCoord; +layout(location = 0) out vec4 color; in vec4 vColor; in vec3 vNormal; diff --git a/shaders/simple.vert b/shaders/simple.vert index a265998..27f00a3 100644 --- a/shaders/simple.vert +++ b/shaders/simple.vert @@ -1,15 +1,15 @@ #version 460 core -in layout(location=0) vec3 position; -in layout(location=1) vec4 aColor; -in layout(location=2) vec3 aNormal; +layout(location = 0) in vec3 position; +layout(location = 1) in vec4 aColor; +layout(location = 2) in vec3 aNormal; out vec4 vColor; out vec3 vNormal; -uniform mat3 normalMatrix; +layout(location = 0) uniform mat4 transform; layout(location = 1) uniform mat3 normalMatrix; void main() { - gl_Position = transform * vec4(position, 1.0f); + gl_Position = transform * vec4(position, 1.0); vColor = aColor; vNormal = normalize(normalMatrix * aNormal); }