NewAdd.shader 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "GG/NewAdd"
  4. {
  5. Properties
  6. {
  7. _MainColor("MainColor", Color) = (1,1,1,1)
  8. _MainTexture("MainTexture", 2D) = "black" {}
  9. _Turbulent("Turbulent", 2D) = "black" {}
  10. _Turbulent_intensity_Speed("Turbulent_intensity_Speed", Vector) = (0,0,0,0)
  11. _Mask("Mask", 2D) = "white" {}
  12. _MainAndMask_UVSpeed("MainAndMask_UVSpeed", Vector) = (0,0,0,0)
  13. [Toggle]_CustomSteam("CustomSteam", Float) = 0
  14. }
  15. SubShader
  16. {
  17. Tags { "RenderType"="Transparent" "Queue"="Transparent" }
  18. LOD 100
  19. CGINCLUDE
  20. #pragma target 2.0
  21. ENDCG
  22. Blend SrcAlpha One, SrcAlpha One
  23. AlphaToMask Off
  24. Cull Off
  25. ColorMask RGBA
  26. ZWrite Off
  27. ZTest LEqual
  28. Offset 0 , 0
  29. Pass
  30. {
  31. Name "Unlit"
  32. Tags { "LightMode"="ForwardBase" }
  33. CGPROGRAM
  34. #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
  35. //only defining to not throw compilation error over Unity 5.5
  36. #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
  37. #endif
  38. #pragma vertex vert
  39. #pragma fragment frag
  40. #pragma multi_compile_instancing
  41. #include "UnityCG.cginc"
  42. #include "UnityShaderVariables.cginc"
  43. struct appdata
  44. {
  45. float4 vertex : POSITION;
  46. float4 color : COLOR;
  47. float4 ase_texcoord : TEXCOORD0;
  48. float4 ase_texcoord1 : TEXCOORD1;
  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. float4 ase_texcoord2 : TEXCOORD2;
  59. float4 ase_color : COLOR;
  60. UNITY_VERTEX_INPUT_INSTANCE_ID
  61. UNITY_VERTEX_OUTPUT_STEREO
  62. };
  63. uniform sampler2D _MainTexture;
  64. uniform float4 _MainAndMask_UVSpeed;
  65. uniform float4 _MainTexture_ST;
  66. uniform float4 _Turbulent_intensity_Speed;
  67. uniform sampler2D _Turbulent;
  68. uniform float4 _Turbulent_ST;
  69. uniform float _CustomSteam;
  70. uniform float4 _MainColor;
  71. uniform sampler2D _Mask;
  72. uniform float4 _Mask_ST;
  73. v2f vert ( appdata v )
  74. {
  75. v2f o;
  76. UNITY_SETUP_INSTANCE_ID(v);
  77. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  78. UNITY_TRANSFER_INSTANCE_ID(v, o);
  79. o.ase_texcoord1 = v.ase_texcoord;
  80. o.ase_texcoord2 = v.ase_texcoord1;
  81. o.ase_color = v.color;
  82. float3 vertexValue = float3(0, 0, 0);
  83. #if ASE_ABSOLUTE_VERTEX_POS
  84. vertexValue = v.vertex.xyz;
  85. #endif
  86. vertexValue = vertexValue;
  87. #if ASE_ABSOLUTE_VERTEX_POS
  88. v.vertex.xyz = vertexValue;
  89. #else
  90. v.vertex.xyz += vertexValue;
  91. #endif
  92. o.vertex = UnityObjectToClipPos(v.vertex);
  93. #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
  94. o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
  95. #endif
  96. return o;
  97. }
  98. fixed4 frag (v2f i ) : SV_Target
  99. {
  100. UNITY_SETUP_INSTANCE_ID(i);
  101. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
  102. fixed4 finalColor;
  103. #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
  104. float3 WorldPosition = i.worldPos;
  105. #endif
  106. float2 appendResult28 = (float2(_MainAndMask_UVSpeed.x , _MainAndMask_UVSpeed.y));
  107. float2 uv_MainTexture = i.ase_texcoord1.xy * _MainTexture_ST.xy + _MainTexture_ST.zw;
  108. float2 appendResult23 = (float2(_Turbulent_intensity_Speed.z , _Turbulent_intensity_Speed.w));
  109. float2 uv_Turbulent = i.ase_texcoord1.xy * _Turbulent_ST.xy + _Turbulent_ST.zw;
  110. float2 panner22 = ( 1.0 * _Time.y * appendResult23 + uv_Turbulent);
  111. float4 texCoord39 = i.ase_texcoord2;
  112. texCoord39.xy = i.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  113. float2 appendResult41 = (float2(texCoord39.x , texCoord39.y));
  114. float CustomSteam33 = _CustomSteam;
  115. float2 lerpResult42 = lerp( panner22 , ( panner22 + appendResult41 ) , CustomSteam33);
  116. float4 tex2DNode14 = tex2D( _Turbulent, lerpResult42 );
  117. float2 appendResult25 = (float2(( uv_MainTexture.x + ( _Turbulent_intensity_Speed.x * tex2DNode14.r ) ) , ( uv_MainTexture.y + ( _Turbulent_intensity_Speed.y * tex2DNode14.r ) )));
  118. float2 panner27 = ( 1.0 * _Time.y * appendResult28 + appendResult25);
  119. float4 texCoord31 = i.ase_texcoord1;
  120. texCoord31.xy = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  121. float2 appendResult35 = (float2(texCoord31.z , texCoord31.w));
  122. float2 lerpResult37 = lerp( panner27 , ( appendResult35 + panner27 ) , CustomSteam33);
  123. float4 tex2DNode2 = tex2D( _MainTexture, lerpResult37 );
  124. float2 appendResult30 = (float2(_MainAndMask_UVSpeed.z , _MainAndMask_UVSpeed.w));
  125. float2 uv_Mask = i.ase_texcoord1.xy * _Mask_ST.xy + _Mask_ST.zw;
  126. float2 panner29 = ( 1.0 * _Time.y * appendResult30 + uv_Mask);
  127. float2 appendResult47 = (float2(texCoord39.z , texCoord39.w));
  128. float2 lerpResult46 = lerp( panner29 , ( panner29 + appendResult47 ) , CustomSteam33);
  129. float4 appendResult10 = (float4(( (tex2DNode2).rgb * (_MainColor).rgb ) , ( i.ase_color.a * tex2DNode2.a * _MainColor.a * tex2D( _Mask, lerpResult46 ).r )));
  130. finalColor = appendResult10;
  131. return finalColor;
  132. }
  133. ENDCG
  134. }
  135. }
  136. CustomEditor "ASEMaterialInspector"
  137. }
  138. /*ASEBEGIN
  139. Version=18800
  140. 1962;130;1906;999;1072.174;360.0687;1;True;True
  141. Node;AmplifyShaderEditor.Vector4Node;18;-2424,-397.5;Inherit;False;Property;_Turbulent_intensity_Speed;Turbulent_intensity_Speed;3;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  142. Node;AmplifyShaderEditor.DynamicAppendNode;23;-2074,-128.5;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  143. Node;AmplifyShaderEditor.RangedFloatNode;32;-1525.008,-902.3646;Inherit;False;Property;_CustomSteam;CustomSteam;6;1;[Toggle];Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  144. Node;AmplifyShaderEditor.TextureCoordinatesNode;39;-2331.876,288.7664;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  145. Node;AmplifyShaderEditor.TextureCoordinatesNode;21;-2423,-46.5;Inherit;False;0;14;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
  146. Node;AmplifyShaderEditor.PannerNode;22;-1999,8.5;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  147. Node;AmplifyShaderEditor.RegisterLocalVarNode;33;-1288.228,-877.3939;Inherit;False;CustomSteam;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  148. Node;AmplifyShaderEditor.DynamicAppendNode;41;-2055.876,193.7664;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  149. Node;AmplifyShaderEditor.GetLocalVarNode;43;-1772.876,422.7664;Inherit;False;33;CustomSteam;1;0;OBJECT;;False;1;FLOAT;0
  150. Node;AmplifyShaderEditor.SimpleAddOpNode;40;-1854.876,188.7664;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  151. Node;AmplifyShaderEditor.LerpOp;42;-1705.876,185.7664;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
  152. Node;AmplifyShaderEditor.SamplerNode;14;-1722,-39.5;Inherit;True;Property;_Turbulent;Turbulent;2;0;Create;True;0;0;0;False;0;False;-1;None;5fdbd6e17f3e47342a59c5873c99a040;True;0;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
  153. Node;AmplifyShaderEditor.TextureCoordinatesNode;11;-1589,-416.5;Inherit;False;0;2;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
  154. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;17;-1251,-15.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  155. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;20;-1261,-148.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  156. Node;AmplifyShaderEditor.SimpleAddOpNode;19;-1081,-219.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  157. Node;AmplifyShaderEditor.Vector4Node;26;-1337.457,-612.3857;Inherit;False;Property;_MainAndMask_UVSpeed;MainAndMask_UVSpeed;5;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  158. Node;AmplifyShaderEditor.SimpleAddOpNode;15;-1097,-325.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  159. Node;AmplifyShaderEditor.DynamicAppendNode;28;-1043,-622.5;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  160. Node;AmplifyShaderEditor.DynamicAppendNode;25;-882,-330.5;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  161. Node;AmplifyShaderEditor.TextureCoordinatesNode;31;-1859.644,-794.4716;Inherit;False;0;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  162. Node;AmplifyShaderEditor.DynamicAppendNode;35;-1546.326,-743.2936;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  163. Node;AmplifyShaderEditor.DynamicAppendNode;30;-1021.746,-539.2534;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  164. Node;AmplifyShaderEditor.TextureCoordinatesNode;13;-1205,407.5;Inherit;False;0;12;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
  165. Node;AmplifyShaderEditor.PannerNode;27;-833.6999,-547.0999;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  166. Node;AmplifyShaderEditor.SimpleAddOpNode;36;-598.9277,-648.1938;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  167. Node;AmplifyShaderEditor.GetLocalVarNode;38;-688,-256;Inherit;False;33;CustomSteam;1;0;OBJECT;;False;1;FLOAT;0
  168. Node;AmplifyShaderEditor.PannerNode;29;-864.2017,335.5751;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  169. Node;AmplifyShaderEditor.DynamicAppendNode;47;-1994.564,646.9069;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  170. Node;AmplifyShaderEditor.SimpleAddOpNode;44;-793.6675,602.3689;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  171. Node;AmplifyShaderEditor.GetLocalVarNode;45;-737.6675,827.3689;Inherit;False;33;CustomSteam;1;0;OBJECT;;False;1;FLOAT;0
  172. Node;AmplifyShaderEditor.LerpOp;37;-624,-446;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
  173. Node;AmplifyShaderEditor.LerpOp;46;-601.6675,597.3689;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
  174. Node;AmplifyShaderEditor.SamplerNode;2;-481.4,-376.1;Inherit;True;Property;_MainTexture;MainTexture;1;0;Create;True;0;0;0;False;0;False;-1;None;7c80b00cfd2e8d04ab335a85e2c1b0fa;True;0;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
  175. Node;AmplifyShaderEditor.ColorNode;4;-575,147.5;Inherit;False;Property;_MainColor;MainColor;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
  176. Node;AmplifyShaderEditor.ComponentMaskNode;8;-307,66.5;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
  177. Node;AmplifyShaderEditor.ComponentMaskNode;7;-288,-122.5;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
  178. Node;AmplifyShaderEditor.VertexColorNode;5;-261,-311.5;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  179. Node;AmplifyShaderEditor.SamplerNode;12;-456,459.5;Inherit;True;Property;_Mask;Mask;4;0;Create;True;0;0;0;False;0;False;-1;None;5da06e100617f964097099619ec46f21;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
  180. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-87,122.5;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0
  181. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;9;-10,-112.5;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  182. Node;AmplifyShaderEditor.DynamicAppendNode;10;253,13.5;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
  183. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;482,-78;Float;False;True;-1;2;ASEMaterialInspector;100;1;NewAdd;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;8;5;False;-1;1;False;-1;8;5;False;-1;1;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;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;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
  184. WireConnection;23;0;18;3
  185. WireConnection;23;1;18;4
  186. WireConnection;22;0;21;0
  187. WireConnection;22;2;23;0
  188. WireConnection;33;0;32;0
  189. WireConnection;41;0;39;1
  190. WireConnection;41;1;39;2
  191. WireConnection;40;0;22;0
  192. WireConnection;40;1;41;0
  193. WireConnection;42;0;22;0
  194. WireConnection;42;1;40;0
  195. WireConnection;42;2;43;0
  196. WireConnection;14;1;42;0
  197. WireConnection;17;0;18;1
  198. WireConnection;17;1;14;1
  199. WireConnection;20;0;18;2
  200. WireConnection;20;1;14;1
  201. WireConnection;19;0;11;2
  202. WireConnection;19;1;20;0
  203. WireConnection;15;0;11;1
  204. WireConnection;15;1;17;0
  205. WireConnection;28;0;26;1
  206. WireConnection;28;1;26;2
  207. WireConnection;25;0;15;0
  208. WireConnection;25;1;19;0
  209. WireConnection;35;0;31;3
  210. WireConnection;35;1;31;4
  211. WireConnection;30;0;26;3
  212. WireConnection;30;1;26;4
  213. WireConnection;27;0;25;0
  214. WireConnection;27;2;28;0
  215. WireConnection;36;0;35;0
  216. WireConnection;36;1;27;0
  217. WireConnection;29;0;13;0
  218. WireConnection;29;2;30;0
  219. WireConnection;47;0;39;3
  220. WireConnection;47;1;39;4
  221. WireConnection;44;0;29;0
  222. WireConnection;44;1;47;0
  223. WireConnection;37;0;27;0
  224. WireConnection;37;1;36;0
  225. WireConnection;37;2;38;0
  226. WireConnection;46;0;29;0
  227. WireConnection;46;1;44;0
  228. WireConnection;46;2;45;0
  229. WireConnection;2;1;37;0
  230. WireConnection;8;0;4;0
  231. WireConnection;7;0;2;0
  232. WireConnection;12;1;46;0
  233. WireConnection;6;0;5;4
  234. WireConnection;6;1;2;4
  235. WireConnection;6;2;4;4
  236. WireConnection;6;3;12;1
  237. WireConnection;9;0;7;0
  238. WireConnection;9;1;8;0
  239. WireConnection;10;0;9;0
  240. WireConnection;10;3;6;0
  241. WireConnection;1;0;10;0
  242. ASEEND*/
  243. //CHKSM=456269E0A79BCCBCCDC29F1075EC7F4059E8F9D7