shader_type canvas_item;

uniform float amount : hint_range(0.0, 1.0, 0.1);

vec4 luminance(vec4 col)
{
	return vec4(vec3(0.2126*col.r+0.7152*col.g+0.0722*col.b),col.a);
}

void fragment() {
	COLOR = mix(COLOR, luminance(COLOR),amount);
}
