53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
|
|
Shader "MapEditor/cellShader"
|
|||
|
|
{
|
|||
|
|
Properties
|
|||
|
|
{
|
|||
|
|
_Color("Color", Color) = (0, 0, 0, 0.3)
|
|||
|
|
}
|
|||
|
|
SubShader
|
|||
|
|
{
|
|||
|
|
//Tags { "QUEUE" = "AlphaTest" "RenderType"="Transparent" }
|
|||
|
|
Tags { "QUEUE" = "Overlay" "IGNOREPROJECTOR" = "true" "RenderType"="Transparent" }
|
|||
|
|
ZWrite Off
|
|||
|
|
//LOD 1000
|
|||
|
|
Blend SrcAlpha OneMinusSrcAlpha // <20><>ͳ<CDB3><CDB8><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
Pass
|
|||
|
|
{
|
|||
|
|
CGPROGRAM
|
|||
|
|
#pragma vertex vert
|
|||
|
|
#pragma fragment frag
|
|||
|
|
|
|||
|
|
#include "UnityCG.cginc"
|
|||
|
|
|
|||
|
|
fixed4 _Color;
|
|||
|
|
|
|||
|
|
struct appdata
|
|||
|
|
{
|
|||
|
|
float4 vertex : POSITION;
|
|||
|
|
fixed4 color : COLOR;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
struct v2f
|
|||
|
|
{
|
|||
|
|
float4 vertex : SV_POSITION;
|
|||
|
|
fixed4 color : COLOR;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
v2f vert (appdata v)
|
|||
|
|
{
|
|||
|
|
v2f o;
|
|||
|
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
|||
|
|
o.color = v.color;
|
|||
|
|
return o;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
fixed4 frag (v2f i) : SV_Target
|
|||
|
|
{
|
|||
|
|
return i.color * _Color;
|
|||
|
|
}
|
|||
|
|
ENDCG
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|