Shader "TexChange" {
Properties {
_Blend ("Blend", Range (0, 1) ) = 0.5
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Texture 1", 2D) = "white" {}
_Texture2 ("Texture 2", 2D) = ""
_Texture3 ("Texture 2", 2D) = ""
_Texture4 ("Texture 2", 2D) = ""
_BumpMap ("Normalmap", 2D) = "bump" {}
_Alpha("1",2D)="white"{}
_Alpha2("2",2D)="white"{}
_Alpha3("2",2D)="white"{}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 300
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma surface surf Lambert
#pragma surface surf Lambert alpha
#pragma target 3.0
sampler2D _MainTex;
sampler2D _BumpMap;
sampler2D _Alpha;
sampler2D _Alpha2;
sampler2D _Alpha3;
fixed4 _Color;
sampler2D _Texture2;
sampler2D _Texture3;
sampler2D _Texture4;
float _Blend;
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
float2 uv_Texture2;
float2 uv_Texture3;
float2 uv_Texture4;
float2 uv_Alpha;
float2 uv_Alpha2;
float2 uv_Alpha3;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 tex1 = tex2D(_MainTex, IN.uv_MainTex)* _Color;
tex1*= tex2D(_Texture2, IN.uv_Texture2)*1.8;
tex1*= tex2D(_Alpha, IN.uv_Alpha)*3;
fixed4 tex2 = tex2D(_MainTex, IN.uv_MainTex)* _Color;
tex2*= tex2D(_Texture3, IN.uv_Texture3)*1.8;
tex2*= tex2D(_Alpha2, IN.uv_Alpha2)*3;
fixed4 tex3 = tex2D(_MainTex, IN.uv_MainTex)* _Color;
tex3*= tex2D(_Texture4, IN.uv_Texture4)*1.8;
tex3*= tex2D(_Alpha3, IN.uv_Alpha3)*3;
o.Albedo = lerp(tex1,tex2,_Blend);
/// o.Albedo *= tex3;
// o.Albedo *= lerp(tex3,tex3,_Blend);
//o.Albedo *= tex3;
//o.Albedo *=tex2D(_Texture2, IN.uv_Texture2);
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
}
ENDCG
}
FallBack "Diffuse"
}