
uniform mat4 ProjMtx;
uniform int content_vflip;
uniform float height;

attribute vec2 Position;
attribute vec2 TexCoord;
attribute vec4 Color;
attribute float RelativeY;

varying vec2 Frag_UV;
varying vec4 Frag_Color;
varying float Frag_RelativeY;

void main()
{
	Frag_UV = TexCoord;
	if (content_vflip != 0) {
		Frag_UV.y = clamp((height / 512.0) - TexCoord.t, 0.0, 1.0);
	}
	Frag_Color = Color;
	Frag_RelativeY = RelativeY;
	gl_Position = ProjMtx * vec4(Position.xy, 0, 1);	
}
