- 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 ??