53 lines
1,001 B
Text
53 lines
1,001 B
Text
Shader "Custom/Arrow"
|
|
{
|
|
Properties
|
|
{
|
|
|
|
}
|
|
SubShader
|
|
{
|
|
// Tags { "Queue" = "Transparent+10" }
|
|
// ZTest Always
|
|
|
|
Pass
|
|
{
|
|
// Fog { Mode Off }
|
|
// Blend OneMinusDstColor Zero
|
|
// ZWrite Off
|
|
|
|
CGPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#include "UnityStandardBRDF.cginc"
|
|
|
|
struct appdata
|
|
{
|
|
float4 position : POSITION;
|
|
fixed3 normal : NORMAL;
|
|
};
|
|
|
|
struct v2f
|
|
{
|
|
float4 position : SV_POSITION;
|
|
fixed3 normal : TEXCOORD1;
|
|
fixed4 color : COLOR0;
|
|
};
|
|
|
|
v2f vert (appdata v)
|
|
{
|
|
v2f o;
|
|
o.position = UnityObjectToClipPos(v.position);
|
|
o.normal = UnityObjectToWorldNormal(v.normal);
|
|
|
|
o.color = fixed4(1, 1, 1, 1) * clamp(dot(v.normal, fixed3(0.8, 1, 0.6)), 0.8, 1);
|
|
// o.color +=
|
|
return o;
|
|
}
|
|
half4 frag( v2f i ) : COLOR
|
|
{
|
|
return i.color;
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
}
|