#version 110

uniform sampler2D texture;
uniform vec2 screen;
uniform float phase; // Phase from 0.0 to 1.0

void main()
{
	vec2 uv = gl_FragCoord.xy / screen;
	vec4 final = texture2D(texture, uv);
	/*
	float g = dot(final.rgb, vec3(0.299, 0.587, 0.114));
	
	vec4 c = vec4(g*0.5, g*0.8, g*1.5, 1.0);
	
	float m = 1.0-phase;
	
	final = final * (phase*0.33) + c * (m*0.67);*/
	
	gl_FragColor = vec4(final.rgb * (1.0-(phase / 3.0)), 1.0);
}

