You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
110 lines
2.0 KiB
Plaintext
110 lines
2.0 KiB
Plaintext
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
|
|
|
Shader "Suimono2/particle_Alpha" {
|
|
Properties {
|
|
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
|
|
_MainTex ("Particle Texture", 2D) = "white" {}
|
|
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
|
|
}
|
|
|
|
Category {
|
|
Tags { "Queue"="Overlay+22" "IgnoreProjector"="True"}
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
|
Cull Off
|
|
Lighting Off
|
|
ZWrite Off
|
|
Fog{Mode Off}
|
|
|
|
|
|
BindChannels {
|
|
Bind "Color", color
|
|
Bind "Vertex", vertex
|
|
Bind "TexCoord", texcoord
|
|
}
|
|
|
|
SubShader {
|
|
Pass {
|
|
Tags{ "LightMode" = "ForwardBase" }
|
|
Lighting On
|
|
|
|
CGPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma fragmentoption ARB_precision_hint_fastest alpha
|
|
#pragma multi_compile_particles
|
|
|
|
#include "UnityCG.cginc"
|
|
#include "AutoLight.cginc"
|
|
|
|
sampler2D _MainTex;
|
|
float4 _TintColor;
|
|
uniform float4 _LightColor0;
|
|
|
|
struct appdata_t {
|
|
float4 vertex : POSITION;
|
|
float4 color : COLOR;
|
|
float2 texcoord : TEXCOORD0;
|
|
};
|
|
|
|
struct v2f {
|
|
float4 vertex : POSITION;
|
|
float4 color : COLOR;
|
|
float2 texcoord : TEXCOORD0;
|
|
LIGHTING_COORDS(3,4)
|
|
};
|
|
|
|
float4 _MainTex_ST;
|
|
|
|
v2f vert (appdata_t v)
|
|
{
|
|
v2f o;
|
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
|
o.color = v.color;
|
|
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
|
|
|
|
o.color = o.color * _LightColor0;
|
|
return o;
|
|
}
|
|
|
|
sampler2D _CameraDepthTexture;
|
|
float _InvFade;
|
|
|
|
half4 frag (v2f i) : COLOR
|
|
{
|
|
half la = LIGHT_ATTENUATION(i);
|
|
return 1.0f * _TintColor * i.color * tex2D(_MainTex, i.texcoord) * la;
|
|
}
|
|
ENDCG
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---- Dual texture cards
|
|
SubShader {
|
|
Pass {
|
|
SetTexture [_MainTex] {
|
|
constantColor [_TintColor]
|
|
combine constant * primary
|
|
}
|
|
SetTexture [_MainTex] {
|
|
combine texture * previous DOUBLE
|
|
}
|
|
}
|
|
}
|
|
|
|
// ---- Single texture cards (does not do color tint)
|
|
SubShader {
|
|
Pass {
|
|
SetTexture [_MainTex] {
|
|
combine texture * primary
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|