// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "FAE/Fog sheet" { Properties { _Depth("Depth", Range( 0.01 , 30)) = 5 _Color("Color", Color) = (1,1,1,0) _Alpha("Alpha", 2D) = "white" {} _Emission("Emission", Float) = 1 [HideInInspector] _texcoord( "", 2D ) = "white" {} [HideInInspector] __dirty( "", Int ) = 1 } SubShader { Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" } Cull Back CGPROGRAM #include "UnityCG.cginc" #include "UnityShaderVariables.cginc" #pragma target 3.0 #pragma surface surf Unlit alpha:fade keepalpha noshadow nolightmap nodynlightmap nodirlightmap struct Input { float2 uv_texcoord; float4 screenPos; float3 worldPos; }; uniform float4 _Color; uniform float _Emission; uniform sampler2D _Alpha; uniform float4 _Alpha_ST; uniform sampler2D _CameraDepthTexture; uniform float _Depth; inline fixed4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten ) { return fixed4 ( 0, 0, 0, s.Alpha ); } void surf( Input i , inout SurfaceOutput o ) { o.Emission = ( _Color * _Emission ).rgb; float2 uv_Alpha = i.uv_texcoord * _Alpha_ST.xy + _Alpha_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 screenDepth1 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture,UNITY_PROJ_COORD(ase_screenPos)))); float distanceDepth1 = abs( ( screenDepth1 - LinearEyeDepth( ase_screenPosNorm.z ) ) / ( _Depth ) ); float3 ase_worldPos = i.worldPos; float temp_output_15_0 = distance( _WorldSpaceCameraPos , ase_worldPos ); float4 clampResult50 = clamp( ( ( ( tex2D( _Alpha, uv_Alpha ) * distanceDepth1 ) * temp_output_15_0 ) * ( temp_output_15_0 * ( 0.01 * 0.01 ) ) ) , float4( 0,0,0,0 ) , float4( 1,0,0,0 ) ); o.Alpha = clampResult50.r; } ENDCG } } /*ASEBEGIN Version=15001 1927;29;1906;1004;2307.567;677.8931;2.2;True;False Node;AmplifyShaderEditor.RangedFloatNode;2;-1569.25,60.17492;Float;False;Property;_Depth;Depth;0;0;Create;True;0;0;False;0;5;0;0.01;30;0;1;FLOAT;0 Node;AmplifyShaderEditor.WorldSpaceCameraPos;13;-1649.741,302.1845;Float;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.WorldPosInputsNode;14;-1614.116,428.0595;Float;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.RangedFloatNode;16;-1416.717,538.2864;Float;False;Constant;_FadeDistance;FadeDistance;2;0;Create;True;0;0;False;0;0.01;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.DepthFade;1;-1231.425,10.65002;Float;False;True;1;0;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;68;-1417.767,-235.2937;Float;True;Property;_Alpha;Alpha;2;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;1;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.SimpleMultiplyOpNode;71;-893.5671,-40.79321;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.DistanceOpNode;15;-1336.242,371.0595;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;21;-1041.062,511.6472;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0.01;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;65;-710.3679,173.1078;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;17;-841.1978,389.3028;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0.01;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-143.7681,173.808;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ColorNode;10;73.3849,-358.8652;Float;False;Property;_Color;Color;1;0;Create;True;0;0;False;0;1,1,1,0;0,0,0,0;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;75;153.5329,-127.4931;Float;False;Property;_Emission;Emission;4;0;Create;True;0;0;False;0;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;72;409.1331,-265.4931;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ClampOpNode;50;247.3288,110.7065;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;1,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;66;-1013.568,285.8079;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;67;-1214.568,282.8079;Float;False;Property;_Factor;Factor;3;0;Create;True;0;0;False;0;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;631.15,-290.5;Float;False;True;2;Float;;0;0;Unlit;FAE/Fog sheet;False;False;False;False;False;False;True;True;True;False;False;False;False;False;True;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;0;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;0;4;10;25;False;0.5;False;2;SrcAlpha;OneMinusSrcAlpha;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;0;0;False;0;0;0;False;-1;-1;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;1;0;2;0 WireConnection;71;0;68;0 WireConnection;71;1;1;0 WireConnection;15;0;13;0 WireConnection;15;1;14;0 WireConnection;21;0;16;0 WireConnection;65;0;71;0 WireConnection;65;1;15;0 WireConnection;17;0;15;0 WireConnection;17;1;21;0 WireConnection;64;0;65;0 WireConnection;64;1;17;0 WireConnection;72;0;10;0 WireConnection;72;1;75;0 WireConnection;50;0;64;0 WireConnection;66;0;67;0 WireConnection;66;1;15;0 WireConnection;0;2;72;0 WireConnection;0;9;50;0 ASEEND*/ //CHKSM=3D097952327EDD9C51C1CD12F3EC612B296A2304