model-converter/assets/shaders/shader.vert

19 lines
318 B
GLSL

#version 140
uniform mat4 perspective;
uniform mat4 view;
in vec3 vertex;
in vec2 tex_coords;
in vec3 normal;
out vec2 v_tex_coords;
out vec3 v_normal;
void main() {
v_normal = transpose(inverse(mat3(view))) * normal;
v_tex_coords = tex_coords;
gl_Position = perspective * view * vec4(vertex, 1.0);
}