109 lines
2.7 KiB
Plaintext
109 lines
2.7 KiB
Plaintext
|
Shader "PRD/CheekV2"
|
||
|
{
|
||
|
Properties
|
||
|
{
|
||
|
_BaseMap ("BaseMap", 2D) = "white" {}
|
||
|
_BaseColor ("BaseColor", Color) = (1,1,1,1)
|
||
|
[MaterialToggle] _Is_LightColor_Base ("Is_LightColor_Base", float) = 1
|
||
|
}
|
||
|
SubShader
|
||
|
{
|
||
|
Tags
|
||
|
{
|
||
|
"IGNOREPROJECTOR" = "true"
|
||
|
"QUEUE" = "Transparent"
|
||
|
"RenderType" = "Transparent"
|
||
|
}
|
||
|
Pass // ind: 1, name:
|
||
|
{
|
||
|
Tags
|
||
|
{
|
||
|
"IGNOREPROJECTOR" = "true"
|
||
|
"LIGHTMODE" = "FORWARDBASE"
|
||
|
"QUEUE" = "Transparent"
|
||
|
"RenderType" = "Transparent"
|
||
|
}
|
||
|
Blend SrcAlpha OneMinusSrcAlpha
|
||
|
// m_ProgramMask = 6
|
||
|
CGPROGRAM
|
||
|
//#pragma target 4.0
|
||
|
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
|
||
|
#include "UnityCG.cginc"
|
||
|
|
||
|
|
||
|
#define CODE_BLOCK_VERTEX
|
||
|
//uniform float4x4 unity_ObjectToWorld;
|
||
|
//uniform float4x4 unity_MatrixVP;
|
||
|
uniform float4 _LightColor0;
|
||
|
uniform float4 _BaseColor;
|
||
|
uniform float _Is_LightColor_Base;
|
||
|
uniform float _Alpha;
|
||
|
uniform float _Camouflage;
|
||
|
uniform sampler2D _BaseMap;
|
||
|
struct appdata_t
|
||
|
{
|
||
|
float4 vertex :POSITION0;
|
||
|
float2 texcoord :TEXCOORD0;
|
||
|
};
|
||
|
|
||
|
struct OUT_Data_Vert
|
||
|
{
|
||
|
float2 texcoord :TEXCOORD0;
|
||
|
float4 vertex :SV_POSITION;
|
||
|
};
|
||
|
|
||
|
struct v2f
|
||
|
{
|
||
|
float2 texcoord :TEXCOORD0;
|
||
|
};
|
||
|
|
||
|
struct OUT_Data_Frag
|
||
|
{
|
||
|
float4 color :SV_Target0;
|
||
|
};
|
||
|
|
||
|
float4 u_xlat0;
|
||
|
float4 u_xlat1;
|
||
|
OUT_Data_Vert vert(appdata_t in_v)
|
||
|
{
|
||
|
OUT_Data_Vert out_v;
|
||
|
out_v.vertex = UnityObjectToClipPos(in_v.vertex);
|
||
|
out_v.texcoord.xy = in_v.texcoord.xy;
|
||
|
return out_v;
|
||
|
}
|
||
|
|
||
|
#define CODE_BLOCK_FRAGMENT
|
||
|
float u_xlat0_d;
|
||
|
float4 u_xlat16_1;
|
||
|
float4 u_xlat10_1;
|
||
|
float3 u_xlat16_2;
|
||
|
float u_xlat3;
|
||
|
int u_xlatb3;
|
||
|
OUT_Data_Frag frag(v2f in_f)
|
||
|
{
|
||
|
OUT_Data_Frag out_f;
|
||
|
u_xlat0_d = ((-_Camouflage) + 1);
|
||
|
u_xlat0_d = (u_xlat0_d * _Alpha);
|
||
|
u_xlatb3 = (0.649999976>=_Camouflage);
|
||
|
u_xlat3 = (u_xlatb3)?(1):(float(0));
|
||
|
u_xlat0_d = (u_xlat3 * u_xlat0_d);
|
||
|
u_xlat10_1 = tex2D(_BaseMap, in_f.texcoord.xy);
|
||
|
u_xlat16_1 = (u_xlat10_1 * _BaseColor);
|
||
|
u_xlat0_d = (u_xlat0_d * u_xlat16_1.w);
|
||
|
out_f.color.w = u_xlat0_d;
|
||
|
u_xlat16_2.xyz = ((u_xlat16_1.xyz * _LightColor0.xyz) + (-u_xlat16_1.xyz));
|
||
|
out_f.color.xyz = ((float3(_Is_LightColor_Base, _Is_LightColor_Base, _Is_LightColor_Base) * u_xlat16_2.xyz) + u_xlat16_1.xyz);
|
||
|
return out_f;
|
||
|
}
|
||
|
|
||
|
|
||
|
ENDCG
|
||
|
|
||
|
} // end phase
|
||
|
}
|
||
|
FallBack Off
|
||
|
}
|