Next, we must modify vertexcolvert.vs so that it accepts the vertex normal value and passes it onto the fragment shader:
#version 330 core
in vec3 position;
in vec3 vertex_normal;
uniform mat4 projection_mat;
uniform mat4 view_mat;
uniform mat4 model_mat;
out vec3 normal;
void main()
{
gl_Position = projection_mat *
inverse(transpose(view_mat)) *
transpose(model_mat) *
vec4(position, 1);
normal = mat3(transpose(model_mat)) *
vertex_normal;
}