model-converter/assets/shaders/color.vert

20 lines
389 B
GLSL
Raw Permalink Normal View History

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