spacebox/demo/squircle/flat.vert

22 lines
402 B
GLSL

#version 130
in vec2 position;
in vec2 vertex_uv;
uniform mat4 transformation;
uniform int mode;
out vec2 original_coordinates;
out vec4 clip_coordinates;
out vec2 frag_uv;
void main(void)
{
gl_Position = vec4(position, 0, 1);
if (mode > 0)
{
gl_Position *= transformation;
}
original_coordinates = position;
clip_coordinates = gl_Position;
frag_uv = vertex_uv;
}