opengl-playground/shaders/textured-rectangle-vertex.glsl

16 lines
356 B
GLSL

#version 330 core
layout (location = 0) in vec2 inputVertex;
layout (location = 1) in vec2 textureInputVertex;
out vec2 textureCoord;
uniform mat4 model_matrix;
uniform mat4 projection_view_matrix;
void main()
{
textureCoord = textureInputVertex;
gl_Position = projection_view_matrix * model_matrix * vec4(inputVertex.x , inputVertex.y, 0.0, 1.0);
}