// * Darken
// This fragmentshader darkens the given texture 

struct fragment
{
	float4 position  : POSITION;
	float4 color    : COLOR0;
	float2 texcoord : TEXCOORD0;
};


void main( in fragment IN,
					 in uniform sampler2D texture,
					 in uniform float alpha,
					 out float4 OUT : COLOR0 )
{
	const float3 c = tex2D(texture, IN.texcoord).rgb;
	
	OUT = float4( c*c*c*alpha, 1 );
}
