Color Shift
Shifts the rgb values of a texture towards a given color
Uniforms:
Shift Color: The color to shift to
Use Grayscale: Whether or not to convert the texture to greyscale before shifting
Shader code
shader_type canvas_item;
// --- Uniforms --- //
uniform bool use_grayscale = true;
uniform vec4 shift_color: source_color;
void fragment() {
COLOR.rgb = mix(COLOR.rgb, vec3(0.299 * COLOR.r + 0.587 * COLOR.g + 0.114 * COLOR.b), float(use_grayscale));
COLOR *= shift_color;
}