in vec2 texCoord;

uniform sampler2D colorMap;
uniform sampler2D gradient;

uniform float time;

uniform vec4 glColor;


/*
void main (void)
{
	vec4 color = vec4(0,1,0.2,1);
	float alpha = texture2D(colorMap, texCoord).r;
	gl_FragColor = vec4(color.rgb,alpha);
}
*/

void main (void)
{
	vec4 color = vec4(0,1,0.2,1);
	float alpha = texture2D(colorMap, texCoord).r*glColor.a;
	vec4 shade = texture2D(gradient, vec2(alpha,time));
	gl_FragColor = vec4(shade.rgb,alpha);
}
