NewAmplifyShader.shader 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "GG/New Amplify Shader"
  4. {
  5. Properties
  6. {
  7. _MainText("MainText", 2D) = "white" {}
  8. _NoiseText("NoiseText", 2D) = "white" {}
  9. _Mask_Noise("Mask_Noise", 2D) = "white" {}
  10. _Uspeed("Uspeed", Float) = 0
  11. _Vspeed("Vspeed", Float) = 0
  12. _UPow("UPow", Float) = 1
  13. _VPow("VPow", Float) = 1
  14. _Color0("Color 0", Color) = (1,1,1,1)
  15. }
  16. SubShader
  17. {
  18. Tags { "RenderType"="Opaque" }
  19. LOD 100
  20. CGINCLUDE
  21. #pragma target 2.0
  22. ENDCG
  23. Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha
  24. AlphaToMask Off
  25. Cull Off
  26. ColorMask RGBA
  27. ZWrite Off
  28. ZTest LEqual
  29. Offset 0 , 0
  30. Pass
  31. {
  32. Name "Unlit"
  33. Tags { "LightMode"="ForwardBase" }
  34. CGPROGRAM
  35. #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
  36. //only defining to not throw compilation error over Unity 5.5
  37. #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
  38. #endif
  39. #pragma vertex vert
  40. #pragma fragment frag
  41. #pragma multi_compile_instancing
  42. #include "UnityCG.cginc"
  43. #include "UnityShaderVariables.cginc"
  44. struct appdata
  45. {
  46. float4 vertex : POSITION;
  47. float4 color : COLOR;
  48. float4 ase_texcoord : TEXCOORD0;
  49. UNITY_VERTEX_INPUT_INSTANCE_ID
  50. };
  51. struct v2f
  52. {
  53. float4 vertex : SV_POSITION;
  54. #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
  55. float3 worldPos : TEXCOORD0;
  56. #endif
  57. float4 ase_texcoord1 : TEXCOORD1;
  58. UNITY_VERTEX_INPUT_INSTANCE_ID
  59. UNITY_VERTEX_OUTPUT_STEREO
  60. };
  61. uniform float4 _Color0;
  62. uniform sampler2D _MainText;
  63. uniform float4 _MainText_ST;
  64. uniform float _UPow;
  65. uniform sampler2D _NoiseText;
  66. uniform float _Uspeed;
  67. uniform float _Vspeed;
  68. uniform float4 _NoiseText_ST;
  69. uniform sampler2D _Mask_Noise;
  70. uniform float4 _Mask_Noise_ST;
  71. uniform float _VPow;
  72. v2f vert ( appdata v )
  73. {
  74. v2f o;
  75. UNITY_SETUP_INSTANCE_ID(v);
  76. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  77. UNITY_TRANSFER_INSTANCE_ID(v, o);
  78. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  79. //setting value to unused interpolator channels and avoid initialization warnings
  80. o.ase_texcoord1.zw = 0;
  81. float3 vertexValue = float3(0, 0, 0);
  82. #if ASE_ABSOLUTE_VERTEX_POS
  83. vertexValue = v.vertex.xyz;
  84. #endif
  85. vertexValue = vertexValue;
  86. #if ASE_ABSOLUTE_VERTEX_POS
  87. v.vertex.xyz = vertexValue;
  88. #else
  89. v.vertex.xyz += vertexValue;
  90. #endif
  91. o.vertex = UnityObjectToClipPos(v.vertex);
  92. #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
  93. o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
  94. #endif
  95. return o;
  96. }
  97. fixed4 frag (v2f i ) : SV_Target
  98. {
  99. UNITY_SETUP_INSTANCE_ID(i);
  100. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
  101. fixed4 finalColor;
  102. #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
  103. float3 WorldPosition = i.worldPos;
  104. #endif
  105. float2 uv_MainText = i.ase_texcoord1.xy * _MainText_ST.xy + _MainText_ST.zw;
  106. float2 appendResult18 = (float2(_Uspeed , _Vspeed));
  107. float2 uv_NoiseText = i.ase_texcoord1.xy * _NoiseText_ST.xy + _NoiseText_ST.zw;
  108. float2 panner14 = ( 1.0 * _Time.y * appendResult18 + uv_NoiseText);
  109. float2 uv_Mask_Noise = i.ase_texcoord1.xy * _Mask_Noise_ST.xy + _Mask_Noise_ST.zw;
  110. float temp_output_6_0 = ( tex2D( _NoiseText, panner14 ).r * tex2D( _Mask_Noise, uv_Mask_Noise ).r );
  111. float4 appendResult21 = (float4(( uv_MainText.x + ( _UPow * temp_output_6_0 ) ) , ( uv_MainText.y + ( _VPow * temp_output_6_0 ) ) , 0.0 , 0.0));
  112. float4 tex2DNode1 = tex2D( _MainText, appendResult21.xy );
  113. float4 appendResult28 = (float4(( (_Color0).rgb * (tex2DNode1).rgb ) , ( _Color0.a * tex2DNode1.a )));
  114. finalColor = appendResult28;
  115. return finalColor;
  116. }
  117. ENDCG
  118. }
  119. }
  120. }
  121. /*ASEBEGIN
  122. Version=18800
  123. 1927;53;1906;996;1424.491;528.5895;1;True;True
  124. Node;AmplifyShaderEditor.RangedFloatNode;10;-2464.687,320.5712;Inherit;False;Property;_Vspeed;Vspeed;4;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  125. Node;AmplifyShaderEditor.RangedFloatNode;9;-2467.156,234.2867;Inherit;False;Property;_Uspeed;Uspeed;3;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  126. Node;AmplifyShaderEditor.TextureCoordinatesNode;15;-2570.156,17.28674;Inherit;False;0;4;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
  127. Node;AmplifyShaderEditor.DynamicAppendNode;18;-2260.812,292.2258;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  128. Node;AmplifyShaderEditor.TextureCoordinatesNode;17;-2149.156,469.2867;Inherit;False;0;7;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
  129. Node;AmplifyShaderEditor.PannerNode;14;-2056.661,205.8707;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  130. Node;AmplifyShaderEditor.SamplerNode;7;-1761.156,436.2867;Inherit;True;Property;_Mask_Noise;Mask_Noise;2;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
  131. Node;AmplifyShaderEditor.SamplerNode;4;-1763.275,175.7249;Inherit;True;Property;_NoiseText;NoiseText;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
  132. Node;AmplifyShaderEditor.RangedFloatNode;12;-1662.656,68.28674;Inherit;False;Property;_VPow;VPow;6;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  133. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-1351.156,318.2867;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  134. Node;AmplifyShaderEditor.RangedFloatNode;11;-1775.656,-14.71326;Inherit;False;Property;_UPow;UPow;5;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  135. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-1350.156,-13.71326;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  136. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;20;-1140.882,140.1128;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  137. Node;AmplifyShaderEditor.TextureCoordinatesNode;3;-1746.275,-180.9644;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
  138. Node;AmplifyShaderEditor.SimpleAddOpNode;2;-1191.276,-155.2751;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  139. Node;AmplifyShaderEditor.SimpleAddOpNode;19;-1145.882,-17.88724;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  140. Node;AmplifyShaderEditor.DynamicAppendNode;21;-974.8818,-94.88724;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  141. Node;AmplifyShaderEditor.ColorNode;24;-858.4915,-436.5895;Inherit;False;Property;_Color0;Color 0;7;0;Create;True;0;0;0;False;0;False;1,1,1,1;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  142. Node;AmplifyShaderEditor.SamplerNode;1;-807.2755,-142.2751;Inherit;True;Property;_MainText;MainText;0;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
  143. Node;AmplifyShaderEditor.ComponentMaskNode;25;-616.4915,-399.5895;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
  144. Node;AmplifyShaderEditor.ComponentMaskNode;27;-445.4915,-120.5895;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
  145. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;26;-427.4915,-10.58948;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  146. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;22;-245.9651,-292.356;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  147. Node;AmplifyShaderEditor.DynamicAppendNode;28;-118.4915,-103.5895;Inherit;False;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  148. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;67,-9;Float;False;True;-1;2;ASEMaterialInspector;100;1;New Amplify Shader;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;2;5;False;-1;10;False;-1;2;5;False;-1;10;False;-1;True;0;False;-1;0;False;-1;False;False;False;False;False;False;True;0;False;-1;True;2;False;-1;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;2;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;RenderType=Opaque=RenderType;True;0;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=ForwardBase;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;1;True;False;;False;0
  149. WireConnection;18;0;9;0
  150. WireConnection;18;1;10;0
  151. WireConnection;14;0;15;0
  152. WireConnection;14;2;18;0
  153. WireConnection;7;1;17;0
  154. WireConnection;4;1;14;0
  155. WireConnection;6;0;4;1
  156. WireConnection;6;1;7;1
  157. WireConnection;13;0;11;0
  158. WireConnection;13;1;6;0
  159. WireConnection;20;0;12;0
  160. WireConnection;20;1;6;0
  161. WireConnection;2;0;3;1
  162. WireConnection;2;1;13;0
  163. WireConnection;19;0;3;2
  164. WireConnection;19;1;20;0
  165. WireConnection;21;0;2;0
  166. WireConnection;21;1;19;0
  167. WireConnection;1;1;21;0
  168. WireConnection;25;0;24;0
  169. WireConnection;27;0;1;0
  170. WireConnection;26;0;24;4
  171. WireConnection;26;1;1;4
  172. WireConnection;22;0;25;0
  173. WireConnection;22;1;27;0
  174. WireConnection;28;0;22;0
  175. WireConnection;28;3;26;0
  176. WireConnection;0;0;28;0
  177. ASEEND*/
  178. //CHKSM=708D482562EFB3DA782E10DB944F229139B8DB78