You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
239 lines
13 KiB
239 lines
13 KiB
Shader "Hovl/Particles/Add_CenterGlow" |
|
{ |
|
Properties |
|
{ |
|
_MainTex("MainTex", 2D) = "white" {} |
|
_Noise("Noise", 2D) = "white" {} |
|
_Flow("Flow", 2D) = "white" {} |
|
_Mask("Mask", 2D) = "white" {} |
|
_SpeedMainTexUVNoiseZW("Speed MainTex U/V + Noise Z/W", Vector) = (0,0,0,0) |
|
_DistortionSpeedXYPowerZ("Distortion Speed XY Power Z", Vector) = (0,0,0,0) |
|
_Emission("Emission", Float) = 2 |
|
_Color("Color", Color) = (0.5,0.5,0.5,1) |
|
[Toggle]_Usecenterglow("Use center glow?", Float) = 0 |
|
[MaterialToggle] _Usedepth ("Use depth?", Float ) = 0 |
|
_Depthpower ("Depth power", Float ) = 1 |
|
[Enum(Cull Off,0, Cull Front,1, Cull Back,2)] _CullMode("Culling", Float) = 0 |
|
[Enum(One,1,OneMinuSrcAlpha,6)] _Blend2 ("Blend mode subset", Float) = 1 |
|
[HideInInspector] _texcoord( "", 2D ) = "white" {} |
|
} |
|
|
|
Category |
|
{ |
|
SubShader |
|
{ |
|
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" } |
|
Blend One[_Blend2] |
|
ColorMask RGB |
|
Cull[_CullMode] |
|
Lighting Off |
|
ZWrite Off |
|
ZTest LEqual |
|
|
|
Pass { |
|
CGPROGRAM |
|
#pragma vertex vert |
|
#pragma fragment frag |
|
#pragma target 2.0 |
|
#pragma multi_compile_particles |
|
#pragma multi_compile_fog |
|
#include "UnityShaderVariables.cginc" |
|
#include "UnityCG.cginc" |
|
|
|
struct appdata_t |
|
{ |
|
float4 vertex : POSITION; |
|
fixed4 color : COLOR; |
|
float4 texcoord : TEXCOORD0; |
|
UNITY_VERTEX_INPUT_INSTANCE_ID |
|
|
|
}; |
|
|
|
struct v2f |
|
{ |
|
float4 vertex : SV_POSITION; |
|
fixed4 color : COLOR; |
|
float4 texcoord : TEXCOORD0; |
|
UNITY_FOG_COORDS(1) |
|
#ifdef SOFTPARTICLES_ON |
|
float4 projPos : TEXCOORD2; |
|
#endif |
|
UNITY_VERTEX_INPUT_INSTANCE_ID |
|
UNITY_VERTEX_OUTPUT_STEREO |
|
}; |
|
|
|
#if UNITY_VERSION >= 560 |
|
UNITY_DECLARE_DEPTH_TEXTURE( _CameraDepthTexture ); |
|
#else |
|
uniform sampler2D_float _CameraDepthTexture; |
|
#endif |
|
|
|
//Don't delete this comment |
|
// uniform sampler2D_float _CameraDepthTexture; |
|
|
|
uniform sampler2D _MainTex; |
|
uniform float4 _MainTex_ST; |
|
uniform float _Usecenterglow; |
|
uniform float4 _SpeedMainTexUVNoiseZW; |
|
uniform sampler2D _Flow; |
|
uniform float4 _DistortionSpeedXYPowerZ; |
|
uniform float4 _Flow_ST; |
|
uniform sampler2D _Mask; |
|
uniform float4 _Mask_ST; |
|
uniform sampler2D _Noise; |
|
uniform float4 _Noise_ST; |
|
uniform float4 _Color; |
|
uniform float _Emission; |
|
uniform fixed _Usedepth; |
|
uniform float _Depthpower; |
|
|
|
v2f vert ( appdata_t v ) |
|
{ |
|
v2f o; |
|
UNITY_SETUP_INSTANCE_ID(v); |
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); |
|
UNITY_TRANSFER_INSTANCE_ID(v, o); |
|
|
|
v.vertex.xyz += float3( 0, 0, 0 ) ; |
|
o.vertex = UnityObjectToClipPos(v.vertex); |
|
#ifdef SOFTPARTICLES_ON |
|
o.projPos = ComputeScreenPos (o.vertex); |
|
COMPUTE_EYEDEPTH(o.projPos.z); |
|
#endif |
|
o.color = v.color; |
|
o.texcoord = v.texcoord; |
|
UNITY_TRANSFER_FOG(o,o.vertex); |
|
return o; |
|
} |
|
|
|
fixed4 frag ( v2f i ) : SV_Target |
|
{ |
|
float lp = 1; |
|
#ifdef SOFTPARTICLES_ON |
|
float sceneZ = LinearEyeDepth (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))); |
|
float partZ = i.projPos.z; |
|
float fade = saturate ((sceneZ-partZ) / _Depthpower); |
|
lp *= lerp(1, fade, _Usedepth); |
|
i.color.a *= lp; |
|
#endif |
|
|
|
float2 appendResult21 = (float2(_SpeedMainTexUVNoiseZW.x , _SpeedMainTexUVNoiseZW.y)); |
|
float2 uv0_MainTex = i.texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw; |
|
float2 panner107 = ( 1.0 * _Time.y * appendResult21 + uv0_MainTex); |
|
float2 appendResult100 = (float2(_DistortionSpeedXYPowerZ.x , _DistortionSpeedXYPowerZ.y)); |
|
float3 uv0_Flow = i.texcoord.xyz; |
|
uv0_Flow.xy = i.texcoord.xy * _Flow_ST.xy + _Flow_ST.zw; |
|
float2 panner110 = ( 1.0 * _Time.y * appendResult100 + (uv0_Flow).xy); |
|
float2 uv_Mask = i.texcoord.xy * _Mask_ST.xy + _Mask_ST.zw; |
|
float4 tex2DNode33 = tex2D( _Mask, uv_Mask ); |
|
float Flowpower102 = _DistortionSpeedXYPowerZ.z; |
|
float4 tex2DNode13 = tex2D( _MainTex, ( panner107 - ( (( tex2D( _Flow, panner110 ) * tex2DNode33 )).rg * Flowpower102 ) ) ); |
|
float2 appendResult22 = (float2(_SpeedMainTexUVNoiseZW.z , _SpeedMainTexUVNoiseZW.w)); |
|
float2 uv0_Noise = i.texcoord.xy * _Noise_ST.xy + _Noise_ST.zw; |
|
float2 panner108 = ( 1.0 * _Time.y * appendResult22 + uv0_Noise); |
|
float4 tex2DNode14 = tex2D( _Noise, panner108 ); |
|
float4 temp_output_30_0 = ( tex2DNode13 * tex2DNode14 * _Color * i.color * tex2DNode13.a * tex2DNode14.a * _Color.a * i.color.a ); |
|
float4 temp_cast_0 = ((1.0 + (uv0_Flow.z - 0.0) * (0.0 - 1.0) / (1.0 - 0.0))).xxxx; |
|
float4 clampResult38 = clamp( ( tex2DNode33 - temp_cast_0 ) , float4( 0,0,0,0 ) , float4( 1,1,1,1 ) ); |
|
float4 clampResult40 = clamp( ( tex2DNode33 * clampResult38 ) , float4( 0,0,0,0 ) , float4( 1,1,1,1 ) ); |
|
|
|
|
|
fixed4 col = ( lerp(temp_output_30_0,( temp_output_30_0 * clampResult40 ),_Usecenterglow) * _Emission ); |
|
UNITY_APPLY_FOG_COLOR(i.fogCoord, col, fixed4(0,0,0,1)); |
|
return col; |
|
} |
|
ENDCG |
|
} |
|
} |
|
} |
|
} |
|
/*ASEBEGIN |
|
Version=16700 |
|
696;164;1906;1004;2971.996;633.0641;2.191415;True;False |
|
Node;AmplifyShaderEditor.CommentaryNode;104;-4130.993,490.5418;Float;False;1910.996;537.6462;Texture distortion;12;91;33;100;102;99;94;95;103;92;59;98;110;;1,1,1,1;0;0 |
|
Node;AmplifyShaderEditor.Vector4Node;99;-3968.293,619.481;Float;False;Property;_DistortionSpeedXYPowerZ;Distortion Speed XY Power Z;5;0;Create;True;0;0;False;0;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;98;-3920.299,848.9976;Float;False;0;91;3;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.DynamicAppendNode;100;-3535.482,654.5021;Float;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.ComponentMaskNode;59;-3583.603,566.496;Float;False;True;True;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.PannerNode;110;-3339.196,596.5295;Float;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.SamplerNode;33;-3146.373,763.0061;Float;True;Property;_Mask;Mask;3;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.SamplerNode;91;-3152.937,567.9764;Float;True;Property;_Flow;Flow;2;0;Create;True;0;0;False;0;None;61c0b9c0523734e0e91bc6043c72a490;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.CommentaryNode;109;-3401.27,-330.4436;Float;False;1037.896;533.6285;Textures movement;7;107;108;29;21;89;22;15;;1,1,1,1;0;0 |
|
Node;AmplifyShaderEditor.Vector4Node;15;-3351.27,-101.4007;Float;False;Property;_SpeedMainTexUVNoiseZW;Speed MainTex U/V + Noise Z/W;4;0;Create;True;0;0;False;0;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;102;-3556.945,748.0421;Float;False;Flowpower;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 |
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;92;-2762.212,550.0183;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.ComponentMaskNode;94;-2609.926,543.6367;Float;False;True;True;False;False;1;0;COLOR;0,0,0,0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;29;-2856.788,-280.4436;Float;False;0;13;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.DynamicAppendNode;21;-2778.501,-153.1786;Float;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.TFHCRemapNode;36;-2530.289,1355.094;Float;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;1;False;4;FLOAT;0;False;1;FLOAT;0 |
|
Node;AmplifyShaderEditor.GetLocalVarNode;103;-2605.07,630.9626;Float;False;102;Flowpower;1;0;OBJECT;0;False;1;FLOAT;0 |
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;95;-2388.997,542.6455;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.SimpleSubtractOpNode;37;-2289.906,1280.763;Float;False;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.DynamicAppendNode;22;-2766.722,70.18491;Float;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.PannerNode;107;-2570.374,-239.5098;Float;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;89;-2861.858,-55.04038;Float;False;0;14;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.ClampOpNode;38;-2130.64,1280.587;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;1,1,1,1;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.PannerNode;108;-2577.237,-21.63752;Float;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.SimpleSubtractOpNode;96;-1989.684,-41.77601;Float;False;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 |
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;39;-1937.593,1156.593;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.SamplerNode;14;-1804.579,119.2214;Float;True;Property;_Noise;Noise;1;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.SamplerNode;13;-1803.192,-66.2159;Float;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.ColorNode;31;-1728.612,316.0578;Float;False;Property;_Color;Color;7;0;Create;True;0;0;False;0;0.5,0.5,0.5,1;0.5,0.5,0.5,1;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.VertexColorNode;32;-1670.612,486.0577;Float;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 |
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;30;-1187.357,127.2037;Float;False;8;8;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.ClampOpNode;40;-1764.275,1143.857;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;1,1,1,1;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;41;-896.1669,248.9071;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.RangedFloatNode;52;-621.877,229.5624;Float;False;Property;_Emission;Emission;6;0;Create;True;0;0;False;0;2;2;0;0;0;1;FLOAT;0 |
|
Node;AmplifyShaderEditor.ToggleSwitchNode;90;-697.314,128.5203;Float;False;Property;_Usecenterglow;Use center glow?;8;0;Create;True;0;0;False;0;0;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;51;-461.6268,132.2673;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 |
|
Node;AmplifyShaderEditor.ComponentMaskNode;72;-1580.242,1135.946;Float;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 |
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;68;-322.6836,135.062;Float;False;True;2;Float;;0;7;Hovl/Particles/Add_CenterGlow;0b6a9f8b4f707c74ca64c0be8e590de0;True;SubShader 0 Pass 0;0;0;SubShader 0 Pass 0;2;True;4;1;False;-1;1;False;-1;0;1;False;-1;0;False;-1;False;False;True;2;False;-1;True;True;True;True;False;0;False;-1;False;True;2;False;-1;True;3;False;-1;False;True;4;Queue=AlphaTest=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;False;0;False;False;False;False;False;False;False;False;False;False;True;0;0;;0;0;Standard;0;0;1;True;False;2;0;FLOAT4;0,0,0,0;False;1;FLOAT3;0,0,0;False;0 |
|
WireConnection;100;0;99;1 |
|
WireConnection;100;1;99;2 |
|
WireConnection;59;0;98;0 |
|
WireConnection;110;0;59;0 |
|
WireConnection;110;2;100;0 |
|
WireConnection;91;1;110;0 |
|
WireConnection;102;0;99;3 |
|
WireConnection;92;0;91;0 |
|
WireConnection;92;1;33;0 |
|
WireConnection;94;0;92;0 |
|
WireConnection;21;0;15;1 |
|
WireConnection;21;1;15;2 |
|
WireConnection;36;0;98;3 |
|
WireConnection;95;0;94;0 |
|
WireConnection;95;1;103;0 |
|
WireConnection;37;0;33;0 |
|
WireConnection;37;1;36;0 |
|
WireConnection;22;0;15;3 |
|
WireConnection;22;1;15;4 |
|
WireConnection;107;0;29;0 |
|
WireConnection;107;2;21;0 |
|
WireConnection;38;0;37;0 |
|
WireConnection;108;0;89;0 |
|
WireConnection;108;2;22;0 |
|
WireConnection;96;0;107;0 |
|
WireConnection;96;1;95;0 |
|
WireConnection;39;0;33;0 |
|
WireConnection;39;1;38;0 |
|
WireConnection;14;1;108;0 |
|
WireConnection;13;1;96;0 |
|
WireConnection;30;0;13;0 |
|
WireConnection;30;1;14;0 |
|
WireConnection;30;2;31;0 |
|
WireConnection;30;3;32;0 |
|
WireConnection;30;4;13;4 |
|
WireConnection;30;5;14;4 |
|
WireConnection;30;6;31;4 |
|
WireConnection;30;7;32;4 |
|
WireConnection;40;0;39;0 |
|
WireConnection;41;0;30;0 |
|
WireConnection;41;1;40;0 |
|
WireConnection;90;0;30;0 |
|
WireConnection;90;1;41;0 |
|
WireConnection;51;0;90;0 |
|
WireConnection;51;1;52;0 |
|
WireConnection;72;0;40;0 |
|
WireConnection;68;0;51;0 |
|
ASEEND*/ |
|
//CHKSM=D5A44C7BD3081F4777C455821BF73DF59F0BC63F |