#version 430

layout (location=0) in vec3 vertexPosition;

out vec2 uv;

uniform mat4 projectionMatrix;
uniform mat4 modelViewMatrix;
uniform float g_time;

uniform float flip=1.0;

void main() {
  vec3 vp = (vertexPosition*2.0-1.0*vec3(1.0, 1.0, 1.0));
  gl_Position = vec4(vp, 1.0);
  uv = vertexPosition.xy;
  if (flip > 0.5) {
      uv.y = 1.0-uv.y;
  }
}
