#version 330 core

layout(location=1) in float frametime;
layout(location=0) in float timestamp;

uniform mat4 MVP;
uniform float duration;
uniform float maximum;
uniform float minimum;

void main(void)
{
    float x = timestamp / duration;
    float y = ((1.0 / frametime) / (maximum - minimum)) - (minimum / (maximum - minimum));
//    float tmp = max(0, min(0, y)) + 0.5;
    gl_Position = MVP * vec4(x, y, 0, 1);
}
