
uniform sampler2D texture;
uniform int need_swap;

varying mediump vec2 Frag_UV;
varying mediump vec4 Frag_Color;

void main()
{
	mediump vec4 color_orig = vec4(texture2D(texture, Frag_UV.xy).rgb, 1.0);
	mediump vec4 color = color_orig * color_orig;
	color = vec4(mix(
		color.rgb * color.rgb * color.rgb * 0.75,
		color.rgb,
		sin(mod(Frag_UV.y, 0.00390625) * 3216.990877276) * 0.5 + 0.5
	).rgb, 1.0);
	color.rgb = sqrt(color.rgb);
	if (need_swap != 0) {
		gl_FragColor = color.bgra;
	} else {
		gl_FragColor = color;
	}
}
