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

12 lines
223 B
GLSL

#version 330 core
layout (location = 0) in vec2 inputVertex;
uniform float zoom;
uniform vec2 pos_offset;
void main()
{
vec2 pos2d = (inputVertex - pos_offset) * zoom;
gl_Position = vec4(pos2d.x , pos2d.y, 0.0, 1.0);
}