struct fragment
{
	float4 position  : POSITION;
	float4 color0    : COLOR0;
	float2 texcoord0 : TEXCOORD0;
};


void main( in fragment IN,
					 in uniform sampler2D texture,
					 in uniform sampler2D texture_old,
					 in uniform float alpha,
					 out float4 OUT : COLOR0 )
{
	const float4 oldcolor = tex2D( texture_old, IN.texcoord0 );
	const float4 newcolor = tex2D( texture, IN.texcoord0 );
	
	const float p = 0.9f;
	const float c = 0.25f;

	OUT = oldcolor * p + newcolor * c - float4(0.004f, 0.004f, 0.004f, 0);	
}
