why one minus vertex color (zero value) is zero?

  • hi ,I’m writing a UI shader and simulate photoshop effect

the code like (IN.color is vertex color) :

fixed4 frag(v2f IN) : SV_Target
{
float4 testColor = tex2D(_MainTex, IN.texcoord) * IN.color;
return (1 - testColor.a);
}

and This seems to be working well , but when i set vertex color zero , i get zero output , why ??

ok , I get the idea the image will ignore when color alpha zero object rendering, i use frame debugger confirmed, so this is an optimization