158 lines
5.8 KiB
Plaintext
158 lines
5.8 KiB
Plaintext
// Made with Amplify Shader Editor
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
|
Shader "NeoFPS/Standard/FireballSheet Additive (Channel 2)"
|
|
{
|
|
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
|
|
_FireRamp("Fire Ramp", 2D) = "black" {}
|
|
|
|
}
|
|
|
|
|
|
Category
|
|
{
|
|
SubShader
|
|
{
|
|
LOD 0
|
|
|
|
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
|
|
Blend One One
|
|
ColorMask RGB
|
|
Cull Off
|
|
Lighting Off
|
|
ZWrite Off
|
|
ZTest LEqual
|
|
|
|
Pass {
|
|
|
|
CGPROGRAM
|
|
|
|
#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 2.0
|
|
#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 fixed4 _TintColor;
|
|
uniform float4 _MainTex_ST;
|
|
uniform float _InvFade;
|
|
uniform sampler2D _FireRamp;
|
|
|
|
|
|
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 );
|
|
|
|
#ifdef SOFTPARTICLES_ON
|
|
float sceneZ = LinearEyeDepth (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)));
|
|
float partZ = i.projPos.z;
|
|
float fade = saturate (_InvFade * (sceneZ-partZ));
|
|
i.color.a *= fade;
|
|
#endif
|
|
|
|
float2 uv0_MainTex = i.texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
|
float2 appendResult23 = (float2(tex2D( _MainTex, uv0_MainTex ).b , 0.5));
|
|
|
|
|
|
fixed4 col = ( tex2D( _FireRamp, appendResult23 ) * _TintColor * i.color );
|
|
UNITY_APPLY_FOG(i.fogCoord, col);
|
|
return col;
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
}
|
|
//CustomEditor "ASEMaterialInspector"
|
|
|
|
|
|
}
|
|
/*ASEBEGIN
|
|
Version=18200
|
|
0;3;1920;1015;2768.373;1024.972;1.840686;True;True
|
|
Node;AmplifyShaderEditor.TemplateShaderPropertyNode;3;-1799.374,-198.6827;Inherit;False;0;0;_MainTex;Shader;0;5;SAMPLER2D;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;6;-1500.187,-114.4652;Inherit;False;0;-1;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.SamplerNode;4;-1231.407,-201.2726;Inherit;True;Property;_TextureSample0;Texture Sample 0;1;0;Create;True;0;0;False;0;False;-1;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.DynamicAppendNode;23;-874.8911,-129.0672;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0.5;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.SamplerNode;7;-670.6185,-155.9583;Inherit;True;Property;_FireRamp;Fire Ramp;0;0;Create;True;0;0;True;0;False;-1;None;38b47325704c0bf4aaa42915f812545e;True;0;False;black;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.TemplateShaderPropertyNode;26;-606.4488,51.04543;Inherit;False;0;0;_TintColor;Shader;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.VertexColorNode;24;-549.9809,237.5832;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;25;-304.9289,32.608;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;-130.0433,33.03531;Float;False;True;-1;2;ASEMaterialInspector;0;7;NeoFPS/Standard/FireballSheet Additive (Channel 2);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;False;False;False;False;False;False;True;2;False;-1;True;True;True;True;False;0;False;-1;False;False;False;False;True;2;False;-1;True;3;False;-1;False;True;4;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;0;0;;0;0;Standard;0;0;1;True;False;;0
|
|
WireConnection;6;2;3;0
|
|
WireConnection;4;0;3;0
|
|
WireConnection;4;1;6;0
|
|
WireConnection;23;0;4;3
|
|
WireConnection;7;1;23;0
|
|
WireConnection;25;0;7;0
|
|
WireConnection;25;1;26;0
|
|
WireConnection;25;2;24;0
|
|
WireConnection;0;0;25;0
|
|
ASEEND*/
|
|
//CHKSM=1A88EBD6FBF64235669DFC9DB9C87958BF1186C1 |