This shader i wrote is suppose to take the background sample color provided by user, and make it transparent.
It seems to work while in the editor but when i run it, the background color is not transparent.
Shader is applied to an animated sprite.
shader_type canvas_item;
uniform vec4 bg_color : hint_color;
void fragment(){
vec4 col = texture(TEXTURE,UV).rgba;
if (col == bg_color){
col.a = 0.0;
}
COLOR = col;
}