#version 330 core

in vec2 texCoord;
in vec4 vertexFragColor;
out vec4 fragColor;
uniform sampler2D texture0;
uniform vec4 color = vec4(0,0,0,1);

uniform float fadeStart = 0.35;
uniform float fadeEnd = 0.5;

void main()
{
    vec2 coord = texCoord;
    vec2 screenCoords = coord;
    float fade = 1.0;

    fade = smoothstep(fadeStart, fadeEnd, distance(screenCoords,vec2(0.5, 0.5)));

    vec4 color1 = color;
    color1 *= vec4(0,0,0,fade);


    fragColor = color1;
}
