12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- // Made with Amplify Shader Editor
- // Available at the Unity Asset Store - http://u3d.as/y3X
- Shader "FORGE3D/Additive"
- {
- Properties
- {
- _MainTex("MainTex", 2D) = "white" {}
- _TintColor("TintColor", Color) = (1,1,1,1)
- _InvFade("InvFade", Float) = 0
- _Boost("Boost", Float) = 1
- [HideInInspector] _texcoord( "", 2D ) = "white" {}
- [HideInInspector] __dirty( "", Int ) = 1
- }
- SubShader
- {
- Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "ForceNoShadowCasting" = "True" "IsEmissive" = "true" }
- Cull Off
- ZWrite Off
- Blend One One
-
- CGPROGRAM
- #include "UnityCG.cginc"
- #pragma target 2.0
- #pragma multi_compile_instancing
- #pragma surface surf Unlit keepalpha noshadow novertexlights nolightmap nodynlightmap nodirlightmap nofog
- struct Input
- {
- half2 uv_texcoord;
- float4 vertexColor : COLOR;
- float4 screenPos;
- };
- uniform sampler2D _MainTex;
- uniform float4 _MainTex_ST;
- uniform half4 _TintColor;
- uniform half _Boost;
- uniform sampler2D _CameraDepthTexture;
- uniform half _InvFade;
- inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
- {
- return half4 ( 0, 0, 0, s.Alpha );
- }
- void surf( Input i , inout SurfaceOutput o )
- {
- float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
- float4 ase_screenPos = float4( i.screenPos.xyz , i.screenPos.w + 0.00000000001 );
- float4 ase_screenPosNorm = ase_screenPos / ase_screenPos.w;
- ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
- float screenDepth7 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture,UNITY_PROJ_COORD( ase_screenPos ))));
- float distanceDepth7 = abs( ( screenDepth7 - LinearEyeDepth( ase_screenPosNorm.z ) ) / ( _InvFade ) );
- o.Emission = ( ( tex2D( _MainTex, uv_MainTex ) * _TintColor * i.vertexColor * i.vertexColor.a * _Boost ) * saturate( distanceDepth7 ) ).rgb;
- o.Alpha = 1;
- }
- ENDCG
- }
- }
- /*ASEBEGIN
- Version=15600
- 1927;29;1906;1124;1054;376;1;True;False
- Node;AmplifyShaderEditor.RangedFloatNode;9;-692,437;Float;False;Property;_InvFade;InvFade;3;0;Create;True;0;0;False;0;0;0;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.DepthFade;7;-434,442;Float;False;True;1;0;FLOAT;1;False;1;FLOAT;0
- Node;AmplifyShaderEditor.VertexColorNode;12;-442,185;Float;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
- Node;AmplifyShaderEditor.SamplerNode;5;-474,-188;Float;True;Property;_MainTex;MainTex;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.ColorNode;6;-472,13;Float;False;Property;_TintColor;TintColor;2;0;Create;True;0;0;False;0;1,1,1,1;0,0,0,0;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
- Node;AmplifyShaderEditor.RangedFloatNode;13;-417,351;Float;False;Property;_Boost;Boost;4;0;Create;True;0;0;False;0;1;1;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;10;-130,-93;Float;False;5;5;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;COLOR;0
- Node;AmplifyShaderEditor.SaturateNode;8;-189,443;Float;False;1;0;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;36,318;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
- Node;AmplifyShaderEditor.StandardSurfaceOutputNode;4;222,271;Half;False;True;0;Half;;0;0;Unlit;FORGE3D/Additive;False;False;False;False;False;True;True;True;True;True;False;False;False;False;True;True;True;False;False;False;Off;2;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;True;Transparent;;Transparent;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;4;1;False;-1;1;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
- WireConnection;7;0;9;0
- WireConnection;10;0;5;0
- WireConnection;10;1;6;0
- WireConnection;10;2;12;0
- WireConnection;10;3;12;4
- WireConnection;10;4;13;0
- WireConnection;8;0;7;0
- WireConnection;11;0;10;0
- WireConnection;11;1;8;0
- WireConnection;4;2;11;0
- ASEEND*/
- //CHKSM=F13889D9F1D2D3444A1CDEDAF2C4BBD12B74BB91
|