Invert Color

Inverts the color of a texture by subtracting the original color value from 1.0

Example:
    (0.28, 0.55, 0.75) => (0.72, 0.45, 0.25)

Shader code
shader_type canvas_item;

// --- Functions --- //
void fragment() {
	COLOR.rgb = 1.0 - COLOR.rgb;
}
Tags
inverse, invert, reverse
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

Radial Rainbow

Erase

Radial Blur

Related shaders

Simple color invert area.

Invert color

color splash (show only one color)

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments