2018-02-26 11:45:53 +01:00
|
|
|
#version 140
|
2018-02-23 17:35:39 +01:00
|
|
|
|
2018-02-26 14:59:32 +01:00
|
|
|
uniform mat4 perspective;
|
|
|
|
uniform mat4 view;
|
2018-06-20 17:24:33 +02:00
|
|
|
uniform vec3 texture_size;
|
2018-02-26 14:59:32 +01:00
|
|
|
|
2018-02-27 11:42:35 +01:00
|
|
|
in vec3 vertex;
|
|
|
|
in vec2 tex_coords;
|
|
|
|
in vec3 normal;
|
|
|
|
|
2018-02-26 14:59:32 +01:00
|
|
|
out vec2 v_tex_coords;
|
2018-02-27 11:42:35 +01:00
|
|
|
out vec3 v_normal;
|
2018-02-23 17:35:39 +01:00
|
|
|
|
2018-02-26 11:45:53 +01:00
|
|
|
void main() {
|
2018-04-24 14:03:34 +02:00
|
|
|
v_normal = normal;
|
2018-06-20 17:24:33 +02:00
|
|
|
v_tex_coords = vec2(tex_coords.x * texture_size.x, tex_coords.y * texture_size.y);
|
2018-02-27 11:42:35 +01:00
|
|
|
|
2018-02-26 14:59:32 +01:00
|
|
|
gl_Position = perspective * view * vec4(vertex, 1.0);
|
2018-02-23 17:35:39 +01:00
|
|
|
}
|