75 lines
1.3 KiB
Plaintext
75 lines
1.3 KiB
Plaintext
|
Shader "Zhanyou/SkillWarning" {
|
||
|
Properties
|
||
|
{
|
||
|
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
|
||
|
_MainTex ("Particle Texture", 2D) = "white" {}
|
||
|
}
|
||
|
Subshader{
|
||
|
Tags{ "Queue" = "Transparent-1" }
|
||
|
ZWrite Off
|
||
|
Lighting Off
|
||
|
ColorMask RGB
|
||
|
Blend SrcAlpha One
|
||
|
|
||
|
CGINCLUDE
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
#include "UnityCG.cginc"
|
||
|
|
||
|
struct v2f {
|
||
|
float2 uv : TEXCOORD0;
|
||
|
float4 pos : SV_POSITION;
|
||
|
float4 color : COLOR;
|
||
|
};
|
||
|
|
||
|
struct a2v {
|
||
|
float4 vertex : POSITION;
|
||
|
float2 texcoord : TEXCOORD0;
|
||
|
float4 color : COLOR;
|
||
|
};
|
||
|
|
||
|
v2f vert(a2v v)
|
||
|
{
|
||
|
v2f o;
|
||
|
UNITY_INITIALIZE_OUTPUT(v2f, o);
|
||
|
o.pos = UnityObjectToClipPos(v.vertex);
|
||
|
o.uv = v.texcoord;
|
||
|
o.color = v.color;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
uniform sampler2D _MainTex;
|
||
|
uniform float4 _TintColor;
|
||
|
|
||
|
fixed4 frag(v2f i) : SV_Target
|
||
|
{
|
||
|
fixed4 res = tex2D(_MainTex, i.uv);
|
||
|
res *= _TintColor * i.color * 2.0;
|
||
|
return res;
|
||
|
}
|
||
|
ENDCG
|
||
|
|
||
|
Pass
|
||
|
{
|
||
|
Stencil
|
||
|
{
|
||
|
Ref 1
|
||
|
Comp Equal
|
||
|
}
|
||
|
CGPROGRAM
|
||
|
ENDCG
|
||
|
}
|
||
|
|
||
|
Pass
|
||
|
{
|
||
|
Stencil
|
||
|
{
|
||
|
Ref 1
|
||
|
Comp NotEqual
|
||
|
}
|
||
|
ZTest Always
|
||
|
CGPROGRAM
|
||
|
ENDCG
|
||
|
}
|
||
|
}
|
||
|
}
|