12 lines
338 B
Plaintext
12 lines
338 B
Plaintext
|
#version 330 core
|
||
|
|
||
|
layout (location = 0) in vec2 inputVertex;
|
||
|
uniform float zoom;
|
||
|
uniform vec2 center_pos;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
vec4 translated = (vec4(inputVertex.x, inputVertex.y, 0.0, 1.0) - vec4(center_pos.x, center_pos.y, 0.0, 0.0));
|
||
|
gl_Position = vec4(translated.x, translated.y, translated.z, translated.w) * vec4(zoom, zoom, 1, 1);
|
||
|
}
|