The answer is in http://answers.unity3d.com/questions/712989/using-texcoord1-in-surface-shader.html
You should do it like this:
struct Input {
float2 uv_MainTex;
float2 uv2_OverlayTex;
// removed float4 _Color because it isn't used in the surf function
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
fixed4 c2 = tex2D(_OverlayTex, IN.uv2_OverlayTex) * _Color;
o.Albedo = lerp(c.rgb, c2.rgb, c2.a);
o.Alpha = c.a;
}
↧





