

uniform sampler2D baseMap;

varying vec2 Texcoord;

uniform vec4 bgColor;

uniform float throb;

void main( void )
{
   vec4 c = texture2D( baseMap, Texcoord );
   
   // first deal with non-set pixels
   
   if (c.w < 1.0)
		c = vec4(0,0,0,1);
	
	vec4 final = bgColor + (vec4(1,1,1,0) - c * throb) * 0.05;
		
   //vec4 final = clamp(mostLit - (c * 0.1), vec4(0,0,0,0), vec4(1,1,1,1));
   final.w = 1.0;
   
   
   gl_FragColor = final;
}