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

void main( in fragment IN,
					 in uniform sampler2D texture,
					 in uniform float time,
					 out float4 OUT : COLOR0 )
{
	const float multiply = 0.2f + 0.05f * sin(time*30);
	float2 newtexcoord = IN.color0.xy*multiply;
	newtexcoord += 4 * IN.texcoord0;
	
	float4 texelcolor = tex2D(texture, newtexcoord);
	texelcolor *= texelcolor;

	OUT = tex2D(texture, newtexcoord);
}
