Files
WhiteMan_Unity2D/Assets/Hovl Studio/HSFiles/Shaders/Blend_LinePath.shader

215 lines
10 KiB
Plaintext

Shader "Hovl/Particles/Blend_LinePath"
{
Properties
{
[Toggle] _Usedepth ("Use depth?", Float ) = 0
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
_MainTex("MainTex", 2D) = "white" {}
_Noise("Noise", 2D) = "white" {}
_Color("Color", Color) = (0.5,0.5,0.5,1)
_Emission("Emission", Float) = 2
_Lenght("Lenght", Range( 0 , 1)) = 0
_Path("Path", Range( 0 , 1)) = 0
[Toggle]_Movenoise("Move noise", Float) = 1
_Opacity("Opacity", Range( 0 , 3)) = 1
}
Category
{
SubShader
{
LOD 0
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Cull Off
Lighting Off
ZWrite Off
ZTest LEqual
Pass {
CGPROGRAM
#define ASE_VERSION 19801
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
#endif
#pragma vertex vert
#pragma fragment frag
#pragma target 3.5
#pragma multi_compile_instancing
#pragma multi_compile_particles
#pragma multi_compile_fog
#define ASE_NEEDS_FRAG_COLOR
#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 _InvFade;
uniform float _Path;
uniform float _Lenght;
uniform sampler2D _Noise;
uniform float _Movenoise;
uniform float4 _Noise_ST;
uniform float4 _Color;
uniform float _Emission;
uniform float _Opacity;
uniform fixed _Usedepth;
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
{
UNITY_SETUP_INSTANCE_ID( i );
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( i );
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) / _InvFade);
lp *= lerp(1, fade, _Usedepth);
i.color.a *= lp;
#endif
float4 texCoord69 = i.texcoord;
texCoord69.xy = i.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
float temp_output_155_0 = ( texCoord69.z + _Path );
float2 appendResult153 = (float2(( ( ( texCoord69.x - temp_output_155_0 ) / ( 1.0 - temp_output_155_0 ) ) / ( 1.0 - ( (1.0 + (texCoord69.w - 0.0) * (0.0 - 1.0) / (1.0 - 0.0)) + _Lenght ) ) ) , texCoord69.y));
float2 temp_output_154_0 = saturate( appendResult153 );
float4 tex2DNode23 = tex2D( _MainTex, temp_output_154_0 );
float2 uv_Noise = i.texcoord.xy * _Noise_ST.xy + _Noise_ST.zw;
float4 tex2DNode24 = tex2D( _Noise, (( _Movenoise )?( ( temp_output_154_0 * uv_Noise ) ):( uv_Noise )) );
float4 appendResult110 = (float4(( (( tex2DNode23 * tex2DNode24 * _Color * i.color )).rgb * _Emission ) , ( ( tex2DNode23.a * tex2DNode24.a * _Opacity ) * _Color.a * i.color.a )));
fixed4 col = appendResult110;
UNITY_APPLY_FOG(i.fogCoord, col);
return col;
}
ENDCG
}
}
}
}
/*ASEBEGIN
Version=19801
Node;AmplifyShaderEditor.TextureCoordinatesNode;69;-4112,-240;Inherit;False;0;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;150;-4192,-48;Float;False;Property;_Path;Path;5;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleAddOpNode;155;-3728,-80;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.TFHCRemapNode;158;-3760,128;Inherit;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.RangedFloatNode;120;-3856,336;Float;False;Property;_Lenght;Lenght;4;0;Create;True;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleSubtractOpNode;134;-3488,-96;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleSubtractOpNode;147;-3488,112;Inherit;True;2;0;FLOAT;1;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleAddOpNode;159;-3488,320;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleDivideOpNode;146;-3216,-96;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleSubtractOpNode;151;-3216,112;Inherit;True;2;0;FLOAT;1;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleDivideOpNode;149;-2944,-96;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.DynamicAppendNode;153;-2688,-208;Inherit;True;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.TextureCoordinatesNode;113;-2336.336,-42.11392;Inherit;False;0;24;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.SaturateNode;154;-2416,-208;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;114;-2082.962,-118.5871;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.ToggleSwitchNode;117;-1863.844,-45.40438;Float;False;Property;_Movenoise;Move noise;6;0;Create;True;0;0;0;False;0;False;1;True;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.VertexColorNode;22;-1501.337,308.0427;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;24;-1635.304,-58.79362;Inherit;True;Property;_Noise;Noise;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.ColorNode;25;-1559.337,138.0429;Float;False;Property;_Color;Color;2;0;Create;True;0;0;0;False;0;False;0.5,0.5,0.5,1;0.5,0.5,0.5,1;False;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.SamplerNode;23;-1633.917,-244.2309;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
Node;AmplifyShaderEditor.RangedFloatNode;115;-1545.108,488.2652;Float;False;Property;_Opacity;Opacity;7;0;Create;True;0;0;0;False;0;False;1;1;0;3;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;30;-968.3528,7.087863;Inherit;False;4;4;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;1;COLOR;0
Node;AmplifyShaderEditor.ComponentMaskNode;112;-697.4847,1.551311;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.RangedFloatNode;33;-412.6612,110.3443;Float;False;Property;_Emission;Emission;3;0;Create;True;0;0;0;False;0;False;2;2;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;26;-965.6019,185.7662;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;116;-638.7333,300.2067;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;21;-176.6617,14.34432;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.DynamicAppendNode;110;214.1178,87.42996;Inherit;False;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;111;422.4361,82.68047;Float;False;True;-1;2;;0;11;Hovl/Particles/Blend_LinePath2;0b6a9f8b4f707c74ca64c0be8e590de0;True;SubShader 0 Pass 0;0;0;SubShader 0 Pass 0;2;False;True;2;5;False;;10;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;True;True;True;True;False;0;False;;False;False;False;False;False;False;False;False;False;True;2;False;;True;3;False;;False;True;4;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;False;0;;0;0;Standard;0;0;1;True;False;;False;0
WireConnection;155;0;69;3
WireConnection;155;1;150;0
WireConnection;158;0;69;4
WireConnection;134;0;69;1
WireConnection;134;1;155;0
WireConnection;147;1;155;0
WireConnection;159;0;158;0
WireConnection;159;1;120;0
WireConnection;146;0;134;0
WireConnection;146;1;147;0
WireConnection;151;1;159;0
WireConnection;149;0;146;0
WireConnection;149;1;151;0
WireConnection;153;0;149;0
WireConnection;153;1;69;2
WireConnection;154;0;153;0
WireConnection;114;0;154;0
WireConnection;114;1;113;0
WireConnection;117;0;113;0
WireConnection;117;1;114;0
WireConnection;24;1;117;0
WireConnection;23;1;154;0
WireConnection;30;0;23;0
WireConnection;30;1;24;0
WireConnection;30;2;25;0
WireConnection;30;3;22;0
WireConnection;112;0;30;0
WireConnection;26;0;23;4
WireConnection;26;1;24;4
WireConnection;26;2;115;0
WireConnection;116;0;26;0
WireConnection;116;1;25;4
WireConnection;116;2;22;4
WireConnection;21;0;112;0
WireConnection;21;1;33;0
WireConnection;110;0;21;0
WireConnection;110;3;116;0
WireConnection;111;0;110;0
ASEEND*/
//CHKSM=36415D2A41695A165ADBE0C88022A8A241F8E45A