// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "FORGE3D/Alpha Blended" { Properties { _MainTex("MainTex", 2D) = "white" {} _Tint("Tint", Color) = (1,1,1,1) _InvFade("InvFade", Float) = 0 [HideInInspector] _texcoord( "", 2D ) = "white" {} [HideInInspector] __dirty( "", Int ) = 1 } SubShader { Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "ForceNoShadowCasting" = "True" "IsEmissive" = "true" } Cull Off CGPROGRAM #include "UnityCG.cginc" #pragma target 2.0 #pragma multi_compile_instancing #pragma surface surf Unlit alpha:fade keepalpha noshadow novertexlights nolightmap nodynlightmap nodirlightmap nofog noforwardadd struct Input { half2 uv_texcoord; float4 vertexColor : COLOR; float4 screenPos; }; uniform sampler2D _MainTex; uniform float4 _MainTex_ST; uniform half4 _Tint; 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; half4 tex2DNode5 = tex2D( _MainTex, uv_MainTex ); o.Emission = ( tex2DNode5 * _Tint * i.vertexColor ).rgb; 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 screenDepth6 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture,UNITY_PROJ_COORD(ase_screenPos)))); float distanceDepth6 = abs( ( screenDepth6 - LinearEyeDepth( ase_screenPosNorm.z ) ) / ( _InvFade ) ); o.Alpha = ( tex2DNode5.a * _Tint.a * saturate( distanceDepth6 ) * i.vertexColor.a ); } ENDCG } } /*ASEBEGIN Version=15401 1927;29;1906;1124;1192;803;1;True;False Node;AmplifyShaderEditor.RangedFloatNode;3;-903,1.285706;Float;False;Property;_InvFade;InvFade;2;0;Create;True;0;0;False;0;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.DepthFade;6;-645,6.285706;Float;False;True;1;0;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;8;-400,7.285706;Float;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;5;-644,-578.7143;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.VertexColorNode;10;-608,-198;Float;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ColorNode;4;-642,-377.7143;Float;False;Property;_Tint;Tint;1;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.SimpleMultiplyOpNode;9;-135,-184.7143;Float;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;7;-287,-574.7143;Float;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.StandardSurfaceOutputNode;2;121,-341;Half;False;True;0;Half;;0;0;Unlit;FORGE3D/Alpha Blended;False;False;False;False;False;True;True;True;True;True;False;True;False;False;True;True;True;False;False;False;Off;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Transparent;0.5;True;False;0;False;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;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;-1;False;-1;-1;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;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;6;0;3;0 WireConnection;8;0;6;0 WireConnection;9;0;5;4 WireConnection;9;1;4;4 WireConnection;9;2;8;0 WireConnection;9;3;10;4 WireConnection;7;0;5;0 WireConnection;7;1;4;0 WireConnection;7;2;10;0 WireConnection;2;2;7;0 WireConnection;2;9;9;0 ASEEND*/ //CHKSM=69126B8B5ACA4BD258A859F2261767A32A5C28CE