RadialUVDistortion.shader 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "RadialUVDistortion"
  4. {
  5. Properties
  6. {
  7. _NoiseMap("Noise Map", 2D) = "white" {}
  8. _NoiseMapStrength("NoiseMapStrength", Range( 0 , 1)) = 0
  9. _RingPannerSpeed("RingPannerSpeed", Vector) = (0,0,0,0)
  10. _NoiseMapSize("NoiseMapSize", Vector) = (512,512,0,0)
  11. _NoiseMapPannerSpeed("NoiseMapPannerSpeed", Vector) = (0,0,0,0)
  12. _BaseTexture("Base Texture", 2D) = "white" {}
  13. _Tint("Tint", Color) = (0,0,0,0)
  14. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  15. [HideInInspector] __dirty( "", Int ) = 1
  16. }
  17. SubShader
  18. {
  19. Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
  20. Cull Back
  21. CGPROGRAM
  22. #include "UnityShaderVariables.cginc"
  23. #pragma target 4.6
  24. #pragma surface surf Standard alpha:fade keepalpha addshadow fullforwardshadows noforwardadd
  25. struct Input
  26. {
  27. float2 uv_texcoord;
  28. };
  29. uniform float4 _Tint;
  30. uniform sampler2D _BaseTexture;
  31. uniform sampler2D _NoiseMap;
  32. uniform float2 _NoiseMapSize;
  33. uniform float2 _NoiseMapPannerSpeed;
  34. uniform float _NoiseMapStrength;
  35. uniform float2 _RingPannerSpeed;
  36. void surf( Input i , inout SurfaceOutputStandard o )
  37. {
  38. float2 temp_output_1_0_g33 = _NoiseMapSize;
  39. float2 uv_TexCoord80_g33 = i.uv_texcoord * float2( 1,1 ) + float2( 0,0 );
  40. float2 appendResult10_g33 = (float2(( (temp_output_1_0_g33).x * uv_TexCoord80_g33.x ) , ( uv_TexCoord80_g33.y * (temp_output_1_0_g33).y )));
  41. float2 temp_output_11_0_g33 = _NoiseMapPannerSpeed;
  42. float2 uv_TexCoord81_g33 = i.uv_texcoord * float2( 1,1 ) + float2( 0,0 );
  43. float2 panner18_g33 = ( uv_TexCoord81_g33 + ( (temp_output_11_0_g33).x * _Time.y ) * float2( 1,0 ));
  44. float2 panner19_g33 = ( uv_TexCoord81_g33 + ( _Time.y * (temp_output_11_0_g33).y ) * float2( 0,1 ));
  45. float2 appendResult24_g33 = (float2((panner18_g33).x , (panner19_g33).y));
  46. float2 temp_output_47_0_g33 = _RingPannerSpeed;
  47. float2 uv_TexCoord78_g33 = i.uv_texcoord * float2( 2,2 ) + float2( 0,0 );
  48. float2 temp_output_31_0_g33 = ( uv_TexCoord78_g33 - float2( 1,1 ) );
  49. float2 appendResult39_g33 = (float2(frac( ( atan2( (temp_output_31_0_g33).x , (temp_output_31_0_g33).y ) / 6.28318548202515 ) ) , length( temp_output_31_0_g33 )));
  50. float2 panner54_g33 = ( appendResult39_g33 + ( (temp_output_47_0_g33).x * _Time.y ) * float2( 1,0 ));
  51. float2 panner55_g33 = ( appendResult39_g33 + ( _Time.y * (temp_output_47_0_g33).y ) * float2( 0,1 ));
  52. float2 appendResult58_g33 = (float2((panner54_g33).x , (panner55_g33).y));
  53. o.Emission = ( _Tint * tex2D( _BaseTexture, ( ( (tex2D( _NoiseMap, ( appendResult10_g33 + appendResult24_g33 ) )).rg * _NoiseMapStrength ) + ( float2( 1,1 ) * appendResult58_g33 ) ) ) ).rgb;
  54. o.Alpha = 1;
  55. }
  56. ENDCG
  57. }
  58. Fallback "Diffuse"
  59. CustomEditor "ASEMaterialInspector"
  60. }
  61. /*ASEBEGIN
  62. Version=14304
  63. 127;183;1066;697;1244.719;872.2646;1.927418;True;False
  64. Node;AmplifyShaderEditor.RangedFloatNode;234;-388.6922,186.1725;Float;False;Property;_NoiseMapStrength;NoiseMapStrength;1;0;Create;True;0;0.112;0;1;0;1;FLOAT;0
  65. Node;AmplifyShaderEditor.Vector2Node;241;-399.0201,64.6485;Float;False;Property;_NoiseMapPannerSpeed;NoiseMapPannerSpeed;4;0;Create;True;0,0;1.61,-0.43;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  66. Node;AmplifyShaderEditor.Vector2Node;240;-375.4798,451.084;Float;False;Property;_RingPannerSpeed;RingPannerSpeed;2;0;Create;True;0,0;0.1,-1.27;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  67. Node;AmplifyShaderEditor.Vector2Node;279;-346.5933,297.4621;Float;False;Constant;_Vector0;Vector 0;7;0;Create;True;1,1;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  68. Node;AmplifyShaderEditor.TexturePropertyNode;233;-368.8911,-258.1053;Float;True;Property;_NoiseMap;Noise Map;0;0;Create;True;None;61c0b9c0523734e0e91bc6043c72a490;False;white;Auto;0;1;SAMPLER2D;0
  69. Node;AmplifyShaderEditor.Vector2Node;239;-357.6543,-64.65796;Float;False;Property;_NoiseMapSize;NoiseMapSize;3;0;Create;True;512,512;1,1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  70. Node;AmplifyShaderEditor.FunctionNode;316;97.76781,66.88756;Float;False;RadialUVDistortion;-1;;33;051d65e7699b41a4c800363fd0e822b2;0;7;60;SAMPLER2D;;False;1;FLOAT2;0,0;False;11;FLOAT2;0,0;False;65;FLOAT;0.0;False;68;FLOAT2;0,0;False;47;FLOAT2;0,0;False;29;FLOAT2;0,0;False;1;FLOAT2;0
  71. Node;AmplifyShaderEditor.SamplerNode;276;591.1954,69.80499;Float;True;Property;_BaseTexture;Base Texture;5;0;Create;True;None;5a5b20f962bdb22428da08e032649287;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  72. Node;AmplifyShaderEditor.ColorNode;317;564.5071,-182.9351;Float;False;Property;_Tint;Tint;6;0;Create;True;0,0,0,0;1,0.682353,0,0;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  73. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;318;1063.514,-27.07267;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  74. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;230;1656.835,-174.857;Float;False;True;6;Float;ASEMaterialInspector;0;0;Standard;RadialUVDistortion;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;Back;0;0;False;0;0;False;0;Transparent;0.5;True;True;0;False;Transparent;Transparent;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;False;0;255;255;0;0;0;0;0;0;0;0;False;1;11.4;10;25;True;0.5;True;2;SrcAlpha;OneMinusSrcAlpha;0;One;One;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;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;5;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;FLOAT;0.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
  75. WireConnection;316;60;233;0
  76. WireConnection;316;1;239;0
  77. WireConnection;316;11;241;0
  78. WireConnection;316;65;234;0
  79. WireConnection;316;68;279;0
  80. WireConnection;316;47;240;0
  81. WireConnection;276;1;316;0
  82. WireConnection;318;0;317;0
  83. WireConnection;318;1;276;0
  84. WireConnection;230;2;318;0
  85. ASEEND*/
  86. //CHKSM=70536D4009A1DFBD7FD783A5577874E3D1D68962