uniform float ptimer;
uniform sampler1D ctex, stex;

void main()
{
	float t = ptimer * 0.0005;

	float x0 = gl_TexCoord[0].x;
	float y0 = gl_TexCoord[0].y;

	float c = texture1D(stex, x0*2.0).r + texture1D(stex, y0 - t).r + texture1D(stex, x0 + y0*2.0 + t).r;

	vec4 color = texture1D(ctex, c);

	color.g = color.g*color.g*x0;
	color.b = color.b*y0;

	gl_FragColor = color;
}
