Check out example codes for "fragment shader using alpha godot". It will help you in understanding the concepts better.

Code Example 1

uniform texture diffuse;

color alpha = tex(diffuse, UV).rgba;

if (alpha.r == 1.0 && alpha.g == 0.0 && alpha.b == 1.0) {
    alpha.a=0.0;
}

COLOR = alpha;

Learn ReactJs, React Native from akashmittal.com