63 lines
2.1 KiB
Plaintext
63 lines
2.1 KiB
Plaintext
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
|
|
|
Shader "EffectCore/alphaBlend_glow" {
|
|
Properties {
|
|
_MainTex ("MainTex", 2D) = "white" {}
|
|
_Glow ("Glow", Float ) = 2
|
|
[HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
|
}
|
|
SubShader {
|
|
Tags {
|
|
"IgnoreProjector"="True"
|
|
"Queue"="Transparent"
|
|
"RenderType"="Transparent"
|
|
}
|
|
Pass {
|
|
Name "FORWARD"
|
|
Tags {
|
|
"LightMode"="ForwardBase"
|
|
}
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
|
ZWrite Off
|
|
|
|
CGPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#define UNITY_PASS_FORWARDBASE
|
|
#include "UnityCG.cginc"
|
|
#pragma multi_compile_fwdbase
|
|
#pragma exclude_renderers d3d11_9x xbox360 xboxone ps3 ps4 psp2
|
|
#pragma target 3.0
|
|
uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
|
|
uniform float _Glow;
|
|
struct VertexInput {
|
|
float4 vertex : POSITION;
|
|
float2 texcoord0 : TEXCOORD0;
|
|
float4 vertexColor : COLOR;
|
|
};
|
|
struct VertexOutput {
|
|
float4 pos : SV_POSITION;
|
|
float2 uv0 : TEXCOORD0;
|
|
float4 vertexColor : COLOR;
|
|
};
|
|
VertexOutput vert (VertexInput v) {
|
|
VertexOutput o = (VertexOutput)0;
|
|
o.uv0 = v.texcoord0;
|
|
o.vertexColor = v.vertexColor;
|
|
o.pos = UnityObjectToClipPos(v.vertex );
|
|
return o;
|
|
}
|
|
float4 frag(VertexOutput i) : COLOR {
|
|
////// Lighting:
|
|
////// Emissive:
|
|
float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(i.uv0, _MainTex));
|
|
float3 emissive = (_MainTex_var.rgb*i.vertexColor.rgb*_Glow);
|
|
float3 finalColor = emissive;
|
|
return fixed4(finalColor,(_MainTex_var.a*i.vertexColor.a));
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
FallBack "Mobile/Particles/Additive"
|
|
}
|