Swap Color
Shader code
shader_type canvas_item;
uniform vec4 new : source_color;
void fragment() {
vec4 current_pixel = texture(TEXTURE,UV);
vec4 current_pixel2 = texture(TEXTURE,UV);
if (current_pixel == current_pixel2)
COLOR.rgb = new.rgb * current_pixel.g;
else
COLOR = current_pixel;
}
Hi 👋 I used this shader for my first Godot game! Please check it out
https://denis23x.itch.io/deepwood
I’ve linked you in the game description, in the game itself and in the game repository, thanks for the materials you provided 🙏
https://github.com/denis23x/deepwood