Shader "Custom/Shader_1"
{
Properties
{
_Color("Color Tint",Color)=(1.0,1.0,1.0,1.0)
}
SubShader
{
pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
float4 _Color;
struct a2v
{
float3 normal :NORMAL;
float4 vertex :POSITION;
float4 textcoord :TEXCOORD;
};
struct v2f
{
fixed3 color :COLOR;
float4 pos :SV_POSITION;
};
v2f vert(a2v v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.color = v.normal * 0.5 + fixed3(0.5,0.5,0.5);
return o;
}
fixed4 frag(v2f i):SV_TARGET0
{
fixed3 c = i.color;
c *= _Color.rgb;
return fixed4(c,1.0);
}
ENDCG
}
}
FallBack "Diffuse"
}