Is it possible to apply a shader while preserving the self color?
so far this is what I've come up with
shader_type canvas_item;
void fragment(){
vec4 self_color = texture(TEXTURE, UV);
vec4 back_color = texture(SCREEN_TEXTURE, SCREEN_UV);
if(self_color.a==0.0)
COLOR=back_color;
else // invert color
COLOR = mix(self_color,vec4(1.0 - back_color.rgb, back_color.a),0.5);
}
but as you can see (on left) it's faded and merges with the editor's gray background
as compared to the original image (on right)
This is what I'm trying to achieve: