源战役客户端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

46 rader
1.1 KiB

// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "MyShader/Illusion/Diffuse"
{
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
_EmissionIntensity("EmissionIntensity", Range(0, 10)) = 1
}
SubShader{
Tags{ "RenderType" = "Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
sampler2D _Illum;
fixed4 _Color;
fixed _Emission;
fixed _EmissionIntensity;
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.Emission *= _EmissionIntensity;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Legacy Shaders/Self-Illumin/VertexLit"
CustomEditor "LegacyIlluminShaderGUI"
}