I have two textures. I want to overlay the second texture’s alpha over the first like in the first image. This works.
Here is the code:
fixed4 frag (v2f i) : SV_Target
{
fixed4 col1 = tex2D(_MainTex, i.uv);
float4 col2 = tex2D( _SubTex, i.uv);
float dark = col2.a * _Darken;
return fixed4(lerp(col1.rgb, col2.rgb, dark), 1.0);
}

