#version 330 core uniform mat4 u_mvp; layout (location = 0) in vec3 position; layout (location = 1) in vec3 normal; layout (location = 2) in vec2 texcoord; layout (location = 3) in vec3 tangent; layout (location = 4) in vec3 bitangent; out vec3 v_position; out vec3 v_normal; out vec3 v_proj_normal; out vec2 v_texcoord; out vec3 v_tangent; out vec3 v_bitangent; out float v_id; void main() { v_position = position; v_normal = normal; v_proj_normal = vec4(u_mvp * vec4(normal, 1.0)).xyz; v_texcoord = vec2(texcoord.x, -texcoord.y); v_tangent = tangent; v_bitangent = bitangent; v_id = gl_VertexID; gl_Position = u_mvp * vec4(v_position, 1.0); }