Hello, I am new in Godot. I've created in inkscape a .png where the texture (it is number 4) has only transparent, black and white pixels and I want to manipulate white pixels in godot (using shaders) so as to give the white pixels other colors dynamicly. I am testing and wrote code for white pixels to become red. But I get wierd results.
The code in shader file is:
`shader_type canvas_item;
void fragment() {
vec4 color = texture(TEXTURE, SCREEN_UV);
if (color.a > 0.0) {
if (color.rgb == vec3(1.0, 1.0, 1.0)) {
COLOR.rgb = vec3(1.0, 0.0, 0.0);
} else {
COLOR.rgb = color.rgb;
}
} else {
COLOR.rgb = vec3(0.0, 0.0, 0.0); // Black
}
COLOR.a = color.a;
}
`
The original .png is the number four and the result is the wierd red thing. Am I doing sth wrong?

