projectEli/Assets/NeoFPS/Samples/Shared/Effects/Shaders/NeoFPS_FireballSheetCh3_Additive.shader
2022-11-06 20:28:33 -05:00

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 3)"
{
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 ).a , 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;-876.7318,-105.1383;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;-672.4592,-132.0294;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;-608.2896,74.97433;Inherit;False;0;0;_TintColor;Shader;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.VertexColorNode;24;-551.8217,261.5121;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;25;-306.7697,56.53692;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;-131.884,56.96423;Float;False;True;-1;2;ASEMaterialInspector;0;7;NeoFPS/Standard/FireballSheet Additive (Channel 3);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;4
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=6E82284B52A4812C118426BDA723A938890D6D8B