DingDianPY.shader 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "GG/DingDianPY"
  4. {
  5. Properties
  6. {
  7. [HDR]_Maincolor("Maincolor", Color) = (1,1,1,1)
  8. _MianTex("MianTex", 2D) = "white" {}
  9. _MianUV("MianUV", Vector) = (0,0,0,0)
  10. _X("X", Float) = 1
  11. _Y("Y", Float) = 1
  12. _TimeScale("TimeScale", Float) = 1
  13. _OffsetScale("OffsetScale", Float) = 1
  14. }
  15. SubShader
  16. {
  17. Tags { "RenderType"="Transparent" "Queue"="Transparent" }
  18. LOD 100
  19. CGINCLUDE
  20. #pragma target 3.0
  21. ENDCG
  22. Blend SrcAlpha OneMinusSrcAlpha
  23. AlphaToMask Off
  24. Cull Off
  25. ColorMask RGBA
  26. ZWrite On
  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. #define ASE_NEEDS_VERT_POSITION
  44. #define ASE_NEEDS_VERT_COLOR
  45. struct appdata
  46. {
  47. float4 vertex : POSITION;
  48. float4 color : COLOR;
  49. float4 ase_texcoord : TEXCOORD0;
  50. UNITY_VERTEX_INPUT_INSTANCE_ID
  51. };
  52. struct v2f
  53. {
  54. float4 vertex : SV_POSITION;
  55. #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
  56. float3 worldPos : TEXCOORD0;
  57. #endif
  58. float4 ase_texcoord1 : TEXCOORD1;
  59. UNITY_VERTEX_INPUT_INSTANCE_ID
  60. UNITY_VERTEX_OUTPUT_STEREO
  61. };
  62. uniform float _X;
  63. uniform float _Y;
  64. uniform float _TimeScale;
  65. uniform float _OffsetScale;
  66. uniform float4 _Maincolor;
  67. uniform sampler2D _MianTex;
  68. uniform float2 _MianUV;
  69. uniform float4 _MianTex_ST;
  70. v2f vert ( appdata v )
  71. {
  72. v2f o;
  73. UNITY_SETUP_INSTANCE_ID(v);
  74. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  75. UNITY_TRANSFER_INSTANCE_ID(v, o);
  76. float mulTime15 = _Time.y * _TimeScale;
  77. float3 appendResult4 = (float3(0.0 , ( sin( ( ( _X * v.vertex.xyz.x ) + ( v.vertex.xyz.y * _Y ) + mulTime15 ) ) * v.color.a * _OffsetScale ) , 0.0));
  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 = appendResult4;
  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_MianTex = i.ase_texcoord1.xy * _MianTex_ST.xy + _MianTex_ST.zw;
  106. float2 panner29 = ( 1.0 * _Time.y * _MianUV + uv_MianTex);
  107. finalColor = ( _Maincolor * tex2D( _MianTex, panner29 ) );
  108. return finalColor;
  109. }
  110. ENDCG
  111. }
  112. }
  113. CustomEditor "ASEMaterialInspector"
  114. }
  115. /*ASEBEGIN
  116. Version=18500
  117. 1913;31;1920;450;1570.223;452.8971;1.3;True;False
  118. Node;AmplifyShaderEditor.RangedFloatNode;8;-1310.645,35.81059;Inherit;False;Property;_X;X;3;0;Create;True;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  119. Node;AmplifyShaderEditor.RangedFloatNode;16;-1309.998,430.9819;Inherit;False;Property;_TimeScale;TimeScale;5;0;Create;True;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  120. Node;AmplifyShaderEditor.RangedFloatNode;11;-1329.53,307.2205;Inherit;False;Property;_Y;Y;4;0;Create;True;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  121. Node;AmplifyShaderEditor.PosVertexDataNode;7;-1327.812,140.1923;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  122. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;10;-1056.476,264.8635;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  123. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;9;-1042.593,88.11151;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  124. Node;AmplifyShaderEditor.SimpleTimeNode;15;-1027.998,427.9819;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
  125. Node;AmplifyShaderEditor.Vector2Node;26;-1158.004,-153.2171;Inherit;False;Property;_MianUV;MianUV;2;0;Create;True;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  126. Node;AmplifyShaderEditor.SimpleAddOpNode;12;-827.4772,185.8635;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  127. Node;AmplifyShaderEditor.TextureCoordinatesNode;28;-1181.382,-305.9098;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
  128. Node;AmplifyShaderEditor.PannerNode;29;-910.2943,-140.3053;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  129. Node;AmplifyShaderEditor.SinOpNode;17;-602.408,209.697;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  130. Node;AmplifyShaderEditor.VertexColorNode;5;-768.3608,369.3139;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  131. Node;AmplifyShaderEditor.RangedFloatNode;18;-759.8979,564.2952;Inherit;False;Property;_OffsetScale;OffsetScale;6;0;Create;True;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  132. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-427.6865,365.5568;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  133. Node;AmplifyShaderEditor.SamplerNode;1;-593.5728,-136.4402;Inherit;True;Property;_MianTex;MianTex;1;0;Create;True;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
  134. Node;AmplifyShaderEditor.ColorNode;31;-580.6475,-372.7855;Inherit;False;Property;_Maincolor;Maincolor;0;1;[HDR];Create;True;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
  135. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;38;-209.1227,-252.6971;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  136. Node;AmplifyShaderEditor.DynamicAppendNode;4;-258.9178,212.2244;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
  137. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;25,-53;Float;False;True;-1;2;ASEMaterialInspector;100;1;GG/DingDianPY;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;2;5;False;-1;10;False;-1;0;1;False;-1;0;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;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;2;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
  138. WireConnection;10;0;7;2
  139. WireConnection;10;1;11;0
  140. WireConnection;9;0;8;0
  141. WireConnection;9;1;7;1
  142. WireConnection;15;0;16;0
  143. WireConnection;12;0;9;0
  144. WireConnection;12;1;10;0
  145. WireConnection;12;2;15;0
  146. WireConnection;29;0;28;0
  147. WireConnection;29;2;26;0
  148. WireConnection;17;0;12;0
  149. WireConnection;6;0;17;0
  150. WireConnection;6;1;5;4
  151. WireConnection;6;2;18;0
  152. WireConnection;1;1;29;0
  153. WireConnection;38;0;31;0
  154. WireConnection;38;1;1;0
  155. WireConnection;4;1;6;0
  156. WireConnection;0;0;38;0
  157. WireConnection;0;1;4;0
  158. ASEEND*/
  159. //CHKSM=EA36E7C54C75073BF46E046251C42716914C4E88