model-converter/assets/shaders/shader.vert

19 lines
318 B
GLSL
Raw Normal View History

2018-02-26 10:45:53 +00:00
#version 140
2018-02-23 16:35:39 +00:00
2018-02-26 13:59:32 +00:00
uniform mat4 perspective;
uniform mat4 view;
2018-02-27 10:42:35 +00:00
in vec3 vertex;
in vec2 tex_coords;
in vec3 normal;
2018-02-26 13:59:32 +00:00
out vec2 v_tex_coords;
2018-02-27 10:42:35 +00:00
out vec3 v_normal;
2018-02-23 16:35:39 +00:00
2018-02-26 10:45:53 +00:00
void main() {
2018-02-27 10:42:35 +00:00
v_normal = transpose(inverse(mat3(view))) * normal;
2018-02-26 13:59:32 +00:00
v_tex_coords = tex_coords;
2018-02-27 10:42:35 +00:00
2018-02-26 13:59:32 +00:00
gl_Position = perspective * view * vec4(vertex, 1.0);
2018-02-23 16:35:39 +00:00
}