
uniform sampler2D texture;
uniform int need_swap;

varying mediump vec2 Frag_UV;
varying mediump vec4 Frag_Color;

void main()
{
	mediump vec4 color = texture2D(texture, Frag_UV);
	color = vec4(mix(
		color * color,
		color,
		(sin(Frag_UV.y * 1024.0 * 3.14159265359) + 1.0) * 0.5
	).rgb, 1.0);
	if (need_swap != 0) {
		gl_FragColor = Frag_Color * color.bgra;
	} else {
		gl_FragColor = Frag_Color * color;
	}
}
