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;
}
Tags
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

Pixelize

Panning

Linear Rainbow

Related shaders

Tilt-Shift Shader (minimal)

Samuel Wolffang based rgb shift shader

Tilt-Shift Shader

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments