Color Shift

Shifts the rgb values of a texture towards a given color

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;
color shift, tint
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from KingToot

Radar Blip

Dithering / Screen Door Transparency

Radar Blip Ring

Related shaders

Tilt-Shift Shader (minimal)

Samuel Wolffang based rgb shift shader

Tilt-Shift Shader

Notify of

Inline Feedbacks
View all comments