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-06-20 16:24:33 +01:00
|
|
|
uniform vec3 texture_size;
|
2018-02-26 13:59:32 +00:00
|
|
|
|
2018-02-27 10:42:35 +00:00
|
|
|
in vec3 vertex;
|
|
|
|
in vec2 tex_coords;
|
|
|
|
in vec3 normal;
|
2018-10-30 16:58:07 +00:00
|
|
|
in vec3 face_color;
|
2018-02-27 10:42:35 +00:00
|
|
|
|
2018-10-30 16:58:07 +00:00
|
|
|
out vec3 v_color;
|
2018-10-31 10:55:17 +00:00
|
|
|
out vec2 v_tex_coords;
|
2018-02-23 16:35:39 +00:00
|
|
|
|
2018-02-26 10:45:53 +00:00
|
|
|
void main() {
|
2018-10-30 16:58:07 +00:00
|
|
|
v_color = face_color;
|
2018-10-31 10:55:17 +00:00
|
|
|
v_tex_coords = vec2(tex_coords.x * texture_size.x, tex_coords.y * texture_size.y);
|
2018-02-26 13:59:32 +00:00
|
|
|
gl_Position = perspective * view * vec4(vertex, 1.0);
|
2018-02-23 16:35:39 +00:00
|
|
|
}
|