// Made with Amplify Shader Editor v1.9.1.5 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "Dong/fx_ui_common_uv" { Properties { [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} _Color ("Tint", Color) = (1,1,1,1) _StencilComp ("Stencil Comparison", Float) = 8 _Stencil ("Stencil ID", Float) = 0 _StencilOp ("Stencil Operation", Float) = 0 _StencilWriteMask ("Stencil Write Mask", Float) = 255 _StencilReadMask ("Stencil Read Mask", Float) = 255 _ColorMask ("Color Mask", Float) = 15 [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 _UV_Color("UV_Color", Color) = (1,1,1,1) _Uv_Tex("Uv_Tex", 2D) = "black" {} _UV_speed("UV_speed", Vector) = (0,0,0,0) _Turb_Tex("Turb_Tex", 2D) = "white" {} _Turb_speed("Turb_speed", Vector) = (0,0,0,0) _Turb_Scale("Turb_Scale", Float) = 0 _Mask("Mask", 2D) = "white" {} [HideInInspector] _texcoord( "", 2D ) = "white" {} } SubShader { LOD 0 Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" } Stencil { Ref [_Stencil] ReadMask [_StencilReadMask] WriteMask [_StencilWriteMask] Comp [_StencilComp] Pass [_StencilOp] } Cull Off Lighting Off ZWrite Off ZTest [unity_GUIZTestMode] Blend SrcAlpha OneMinusSrcAlpha ColorMask [_ColorMask] Pass { Name "Default" CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma target 3.0 #include "UnityCG.cginc" #include "UnityUI.cginc" #pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_ALPHACLIP #include "UnityShaderVariables.cginc" #define ASE_NEEDS_FRAG_COLOR struct appdata_t { float4 vertex : POSITION; float4 color : COLOR; float2 texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float4 vertex : SV_POSITION; fixed4 color : COLOR; half2 texcoord : TEXCOORD0; float4 worldPosition : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; uniform fixed4 _Color; uniform fixed4 _TextureSampleAdd; uniform float4 _ClipRect; uniform sampler2D _MainTex; uniform float4 _MainTex_ST; uniform sampler2D _Uv_Tex; uniform float2 _UV_speed; uniform float4 _Uv_Tex_ST; uniform sampler2D _Turb_Tex; uniform float2 _Turb_speed; uniform float4 _Turb_Tex_ST; uniform float _Turb_Scale; uniform float4 _UV_Color; uniform sampler2D _Mask; uniform float4 _Mask_ST; v2f vert( appdata_t IN ) { v2f OUT; UNITY_SETUP_INSTANCE_ID( IN ); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT); UNITY_TRANSFER_INSTANCE_ID(IN, OUT); OUT.worldPosition = IN.vertex; OUT.worldPosition.xyz += float3( 0, 0, 0 ) ; OUT.vertex = UnityObjectToClipPos(OUT.worldPosition); OUT.texcoord = IN.texcoord; OUT.color = IN.color * _Color; return OUT; } fixed4 frag(v2f IN ) : SV_Target { float2 uv_MainTex = IN.texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw; float4 tex2DNode160 = tex2D( _MainTex, uv_MainTex ); float2 uv_Uv_Tex = IN.texcoord.xy * _Uv_Tex_ST.xy + _Uv_Tex_ST.zw; float2 panner173 = ( 1.0 * _Time.y * _UV_speed + uv_Uv_Tex); float2 uv_Turb_Tex = IN.texcoord.xy * _Turb_Tex_ST.xy + _Turb_Tex_ST.zw; float2 panner167 = ( 1.0 * _Time.y * _Turb_speed + uv_Turb_Tex); float4 lerpResult170 = lerp( float4( panner173, 0.0 , 0.0 ) , tex2D( _Turb_Tex, panner167 ) , _Turb_Scale); float2 uv_Mask = IN.texcoord.xy * _Mask_ST.xy + _Mask_ST.zw; half4 color = ( ( tex2DNode160 + ( tex2D( _Uv_Tex, lerpResult170.rg ) * _UV_Color * tex2DNode160.a * tex2D( _Mask, uv_Mask ).a ) ) * IN.color ); #ifdef UNITY_UI_CLIP_RECT color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); #endif #ifdef UNITY_UI_ALPHACLIP clip (color.a - 0.001); #endif return color; } ENDCG } } CustomEditor "ASEMaterialInspector" Fallback Off } /*ASEBEGIN Version=19105 Node;AmplifyShaderEditor.PannerNode;167;658.0468,670.016;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.PannerNode;173;801.3088,478.9993;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;168;879.4519,638.1796;Inherit;True;Property;_Turb_Tex;Turb_Tex;3;0;Create;True;0;0;0;False;0;False;-1;None;None;True;1;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TextureCoordinatesNode;165;362.8394,628.0498;Inherit;False;0;168;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.Vector2Node;172;556.7503,505.047;Inherit;False;Property;_UV_speed;UV_speed;2;0;Create;True;0;0;0;False;0;False;0,0;0,-1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.TextureCoordinatesNode;171;497.4191,376.2556;Inherit;False;0;174;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.LerpOp;170;1269.056,567.4575;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;160;1432.794,282.2798;Inherit;True;Property;_TextureSample0;Texture Sample 0;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TemplateShaderPropertyNode;156;1115.533,282.9803;Inherit;False;0;0;_MainTex;Shader;True;0;5;SAMPLER2D;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;179;1891.404,482.0449;Inherit;True;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;174;1446.628,533.7538;Inherit;True;Property;_Uv_Tex;Uv_Tex;1;0;Create;True;0;0;0;False;0;False;-1;None;24d73a0978aa8264d8d2eafb48f370bb;True;1;False;black;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;169;972.0662,872.6088;Float;False;Property;_Turb_Scale;Turb_Scale;5;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.Vector2Node;176;365.7336,806.0428;Inherit;False;Property;_Turb_speed;Turb_speed;4;0;Create;True;0;0;0;False;0;False;0,0;1,1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.ColorNode;178;1518.902,760.8893;Inherit;False;Property;_UV_Color;UV_Color;0;0;Create;True;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;180;2149.261,412.0588;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;181;2409.778,412.4875;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;35;2683.189,408.5027;Float;False;True;-1;2;ASEMaterialInspector;0;3;Dong/fx_ui_common_uv;5056123faa0c79b47ab6ad7e8bf059a4;True;Default;0;0;Default;2;False;True;2;5;False;;10;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;True;True;True;True;True;0;True;_ColorMask;False;False;False;False;False;False;False;True;True;0;True;_Stencil;255;True;_StencilReadMask;255;True;_StencilWriteMask;0;True;_StencilComp;0;True;_StencilOp;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;0;True;unity_GUIZTestMode;False;True;5;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;CanUseSpriteAtlas=True;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;0;;0;0;Standard;0;0;1;True;False;;False;0 Node;AmplifyShaderEditor.VertexColorNode;159;2182.854,726.6341;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;182;1477.837,1100.203;Inherit;True;Property;_Mask;Mask;6;0;Create;True;0;0;0;False;0;False;-1;None;b2c1dcabded16bc4d8afd6d280cbfdce;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 WireConnection;167;0;165;0 WireConnection;167;2;176;0 WireConnection;173;0;171;0 WireConnection;173;2;172;0 WireConnection;168;1;167;0 WireConnection;170;0;173;0 WireConnection;170;1;168;0 WireConnection;170;2;169;0 WireConnection;160;0;156;0 WireConnection;179;0;174;0 WireConnection;179;1;178;0 WireConnection;179;2;160;4 WireConnection;179;3;182;4 WireConnection;174;1;170;0 WireConnection;180;0;160;0 WireConnection;180;1;179;0 WireConnection;181;0;180;0 WireConnection;181;1;159;0 WireConnection;35;0;181;0 ASEEND*/ //CHKSM=AFFAF5F0764D2D2192EACF578654D2BF05D96FED