model-converter/assets/shaders/color.vert

20 lines
389 B
GLSL

#version 140
uniform mat4 perspective;
uniform mat4 view;
uniform vec3 texture_size;
in vec3 vertex;
in vec2 tex_coords;
in vec3 normal;
in vec3 face_color;
out vec3 v_color;
out vec2 v_tex_coords;
void main() {
v_color = face_color;
v_tex_coords = vec2(tex_coords.x * texture_size.x, tex_coords.y * texture_size.y);
gl_Position = perspective * view * vec4(vertex, 1.0);
}