2018-11-20 07:49:14 +08:00
|
|
|
Shader "Hidden/SoftMask" {
|
|
|
|
|
|
|
|
SubShader {
|
|
|
|
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
|
|
|
|
LOD 100
|
|
|
|
|
2019-01-25 12:43:17 +08:00
|
|
|
Cull Off
|
2018-11-20 07:49:14 +08:00
|
|
|
ZWrite Off
|
2019-03-11 13:40:44 +08:00
|
|
|
Blend SrcAlpha One
|
2018-11-20 07:49:14 +08:00
|
|
|
ColorMask [_ColorMask]
|
|
|
|
|
|
|
|
Pass {
|
|
|
|
CGPROGRAM
|
|
|
|
#pragma vertex vert_img
|
|
|
|
#pragma fragment frag
|
|
|
|
#pragma target 2.0
|
|
|
|
|
|
|
|
#include "UnityCG.cginc"
|
|
|
|
|
|
|
|
sampler2D _MainTex;
|
|
|
|
float _Softness;
|
|
|
|
|
|
|
|
fixed4 frag (v2f_img i) : SV_Target
|
|
|
|
{
|
|
|
|
return saturate(tex2D(_MainTex, i.uv).a/_Softness);
|
|
|
|
}
|
|
|
|
ENDCG
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|