Shader "Legacy Shaders/Self-Illumin/DiffuseSpecial" {
|
|
Properties {
|
|
_Color ("Main Color", Color) = (1,1,1,1)
|
|
_MainTex ("Base (RGB)", 2D) = "white" {}
|
|
_Illum ("Illumin (A)", 2D) = "white" {}
|
|
_Emission ("Emission (Lightmapper)", Float) = 1.0
|
|
//_GlobalSceneAlpha ("GlobalSceneAlpha", Float) = 1.0
|
|
}
|
|
SubShader {
|
|
Tags{ "RenderType" = "Queue" "Queue" = "Transparent" }
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
|
|
|
CGPROGRAM
|
|
#pragma surface surf Lambert alphatest:_Cutoff
|
|
|
|
sampler2D _MainTex;
|
|
sampler2D _Illum;
|
|
fixed4 _Color;
|
|
fixed _Emission;
|
|
half _GlobalSceneAlpha;
|
|
|
|
struct Input {
|
|
float2 uv_MainTex;
|
|
float2 uv_Illum;
|
|
};
|
|
|
|
void surf (Input IN, inout SurfaceOutput o) {
|
|
fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
|
|
fixed4 c = tex * _Color;
|
|
o.Albedo = c.rgb;
|
|
o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a;
|
|
#if defined (UNITY_PASS_META)
|
|
o.Emission *= _Emission.rrr;
|
|
#endif
|
|
o.Alpha = c.a*_GlobalSceneAlpha;
|
|
}
|
|
ENDCG
|
|
}
|
|
FallBack "Legacy Shaders/Self-Illumin/VertexLit"
|
|
CustomEditor "LegacyIlluminShaderGUI"
|
|
}
|