shader_type canvas_item;

// Regular saturation is between 0 and 1
// But I'm gonna leave this unbounded for fun because you can also supersaturate & anti-saturate o_O
uniform float saturation;

uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;

void fragment() {
	vec4 source = texture(screen_texture, SCREEN_UV);

	COLOR.rgb = mix(vec3(dot(source.rgb, vec3(0.299, 0.587, 0.114))), source.rgb, saturation);
	COLOR.a = source.a;
}