#version 440 core

in vec2 fTexCoord;

out vec4 outColor;

uniform sampler2D tex;
uniform float livedTime;
layout (location = 3) uniform float maxTime;

void main(void) {
	vec4 textureColor = texture(tex, fTexCoord);
	outColor = vec4(textureColor.xyz, textureColor.a - (livedTime / maxTime));
	/*if (textureColor.a < 0.2) {
		discard;
	}*/
	//outColor = textureColor;
}