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

12 lines
223 B
Plaintext
Raw Normal View History

2020-03-18 22:42:04 +01:00
#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);
}