I took 4 squares with the outer corners painted in black, and the other ones in white. For some reason, they have a different gradient.
fixed4 frag (v2f i) : SV_Target
{
fixed4 mainTex = tex2D(_MainTex, i.uv);
fixed4 overTex = tex2D(_OverTex, i.uv3);
fixed4 final = fixed4(lerp(mainTex.rgb, overTex.rgb, overTex.a) * i.color, 1.0);
final = lerp(float4(0, 0, 0, 1.0), final, i.color.a); // shadows
return final;
}
How can i make the same gradients as bottom-left and top-right?
In-game this is faces of blocks (like minecraft) and gradients - is smooth shadow/light. So I cannot change tris
