View difference between Paste ID: XYBd9ZRz and haZLJEnq
SHOW: | | - or go back to the newest paste.
1
Shader "Custom" {
2
3
Properties {
4
5
	_Color ("Main Color", Color) = (1,1,1,1)
6
	_Color2 ("Main Color2", Color) = (1,1,1,
7
	_MainTex ("Base (RGB) Trans (A)", 2D) = "black" {}
8
	_MyTexture ("B", 2D) = "white" {}
9
}
10
SubShader {
11
12
	Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
13
	LOD 200
14
	Pass {
15
	SetTexture[_MainTex]
16
	SetTexture[_MyTexture] { 
17
	Combine texture Lerp(constant) previous
18
} 
19
20
}
21
22
CGPROGRAM
23
#pragma surface surf Lambert alpha
24
25
sampler2D _MainTex;
26
fixed4 _Color;
27
28
sampler2D _MyTexture;
29
fixed4 _Color2;
30
31
	struct Input {
32
		float2 uv_MainTex;
33
		float2 uv_MyTexture;
34
35
	};
36
37
	void surf (Input IN, inout SurfaceOutput o) {
38
39
	fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
40
	fixed4 d = tex2D(_MyTexture, IN.uv_MyTexture) * _Color2;
41-
	o.Albedo = c.rgb;
41+
	o.Albedo = c.rgb * (d.rgb*2);
42
	o.Alpha = d.a;
43
}
44
45
ENDCG
46
}
47
48
	Fallback "Transparent/VertexLit"
49
50
}