RO_Effect_RNQ_01.shader 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "RO/RO_Effect_RNQ_01"
  4. {
  5. Properties
  6. {
  7. _MaskTex("MaskTex", 2D) = "white" {}
  8. _NormalTex("NormalTex", 2D) = "bump" {}
  9. _NormalStr("NormalStr", Range( 0 , 1)) = 0
  10. [KeywordEnum(R,G,B,A)] _Keyword0("Keyword 0", Float) = 0
  11. _UVSpeed("UVSpeed", Vector) = (0,0,0,0)
  12. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  13. [HideInInspector] __dirty( "", Int ) = 1
  14. }
  15. SubShader
  16. {
  17. Tags{ "RenderType" = "Custom" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
  18. Cull Back
  19. ZWrite Off
  20. ZTest LEqual
  21. Blend SrcAlpha OneMinusSrcAlpha
  22. GrabPass{ }
  23. CGPROGRAM
  24. #include "UnityStandardUtils.cginc"
  25. #include "UnityShaderVariables.cginc"
  26. #pragma target 3.0
  27. #pragma shader_feature _KEYWORD0_R _KEYWORD0_G _KEYWORD0_B _KEYWORD0_A
  28. #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
  29. #define ASE_DECLARE_SCREENSPACE_TEXTURE(tex) UNITY_DECLARE_SCREENSPACE_TEXTURE(tex);
  30. #else
  31. #define ASE_DECLARE_SCREENSPACE_TEXTURE(tex) UNITY_DECLARE_SCREENSPACE_TEXTURE(tex)
  32. #endif
  33. #pragma surface surf Unlit keepalpha noshadow
  34. struct Input
  35. {
  36. float4 screenPos;
  37. float4 vertexColor : COLOR;
  38. float2 uv_texcoord;
  39. };
  40. ASE_DECLARE_SCREENSPACE_TEXTURE( _GrabTexture )
  41. uniform float _NormalStr;
  42. uniform sampler2D _NormalTex;
  43. uniform float4 _UVSpeed;
  44. uniform float4 _NormalTex_ST;
  45. uniform sampler2D _MaskTex;
  46. uniform float4 _MaskTex_ST;
  47. inline float4 ASE_ComputeGrabScreenPos( float4 pos )
  48. {
  49. #if UNITY_UV_STARTS_AT_TOP
  50. float scale = -1.0;
  51. #else
  52. float scale = 1.0;
  53. #endif
  54. float4 o = pos;
  55. o.y = pos.w * 0.5f;
  56. o.y = ( pos.y - o.y ) * _ProjectionParams.x * scale + o.y;
  57. return o;
  58. }
  59. inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
  60. {
  61. return half4 ( 0, 0, 0, s.Alpha );
  62. }
  63. void surf( Input i , inout SurfaceOutput o )
  64. {
  65. float4 ase_screenPos = float4( i.screenPos.xyz , i.screenPos.w + 0.00000000001 );
  66. float4 ase_grabScreenPos = ASE_ComputeGrabScreenPos( ase_screenPos );
  67. float4 ase_grabScreenPosNorm = ase_grabScreenPos / ase_grabScreenPos.w;
  68. float2 appendResult14 = (float2(_UVSpeed.x , _UVSpeed.y));
  69. float2 uv0_NormalTex = i.uv_texcoord * _NormalTex_ST.xy + _NormalTex_ST.zw;
  70. float2 panner12 = ( 1.0 * _Time.y * appendResult14 + uv0_NormalTex);
  71. float4 screenColor2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_GrabTexture,( ase_grabScreenPosNorm + float4( UnpackScaleNormal( tex2D( _NormalTex, panner12 ), ( i.vertexColor.a * _NormalStr ) ) , 0.0 ) ).xy);
  72. o.Emission = screenColor2.rgb;
  73. float2 appendResult15 = (float2(_UVSpeed.z , _UVSpeed.w));
  74. float2 uv0_MaskTex = i.uv_texcoord * _MaskTex_ST.xy + _MaskTex_ST.zw;
  75. float2 panner13 = ( 1.0 * _Time.y * appendResult15 + uv0_MaskTex);
  76. float4 tex2DNode1 = tex2D( _MaskTex, panner13 );
  77. #if defined(_KEYWORD0_R)
  78. float staticSwitch9 = tex2DNode1.r;
  79. #elif defined(_KEYWORD0_G)
  80. float staticSwitch9 = tex2DNode1.g;
  81. #elif defined(_KEYWORD0_B)
  82. float staticSwitch9 = tex2DNode1.b;
  83. #elif defined(_KEYWORD0_A)
  84. float staticSwitch9 = tex2DNode1.a;
  85. #else
  86. float staticSwitch9 = tex2DNode1.r;
  87. #endif
  88. o.Alpha = staticSwitch9;
  89. }
  90. ENDCG
  91. }
  92. CustomEditor "ASEMaterialInspector"
  93. }
  94. /*ASEBEGIN
  95. Version=18100
  96. 1949;1;1650;1010;2749.302;68.43031;1.272278;True;False
  97. Node;AmplifyShaderEditor.Vector4Node;10;-2326.314,663.6209;Inherit;False;Property;_UVSpeed;UVSpeed;5;0;Create;True;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
  98. Node;AmplifyShaderEditor.RangedFloatNode;6;-2231.789,267.2413;Inherit;False;Property;_NormalStr;NormalStr;3;0;Create;True;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  99. Node;AmplifyShaderEditor.VertexColorNode;8;-2158.789,48.24127;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  100. Node;AmplifyShaderEditor.DynamicAppendNode;14;-2017.348,469.5659;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  101. Node;AmplifyShaderEditor.TextureCoordinatesNode;11;-2347.305,333.7235;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
  102. Node;AmplifyShaderEditor.TextureCoordinatesNode;16;-2368.893,534.6296;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
  103. Node;AmplifyShaderEditor.PannerNode;12;-1895.034,333.2565;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  104. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;7;-1879.789,194.2413;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  105. Node;AmplifyShaderEditor.DynamicAppendNode;15;-2010.348,606.5659;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  106. Node;AmplifyShaderEditor.GrabScreenPosition;3;-1677.243,-97.26111;Inherit;False;0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  107. Node;AmplifyShaderEditor.SamplerNode;4;-1724.796,96.76733;Inherit;True;Property;_NormalTex;NormalTex;1;0;Create;True;0;0;False;0;False;-1;None;None;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;6;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;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  108. Node;AmplifyShaderEditor.PannerNode;13;-1869.348,573.5659;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  109. Node;AmplifyShaderEditor.SamplerNode;1;-1171.19,164.5634;Inherit;True;Property;_MaskTex;MaskTex;0;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;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;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  110. Node;AmplifyShaderEditor.SimpleAddOpNode;5;-1184.789,7.241272;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT4;0
  111. Node;AmplifyShaderEditor.ScreenColorNode;2;-975.262,-54.83277;Inherit;False;Global;_GrabScreen0;Grab Screen 0;2;0;Create;True;0;0;False;0;False;Object;-1;False;False;1;0;FLOAT2;0,0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  112. Node;AmplifyShaderEditor.StaticSwitch;9;-785.0631,180.0271;Inherit;False;Property;_Keyword0;Keyword 0;4;0;Create;True;0;0;False;0;False;0;0;0;True;;KeywordEnum;4;R;G;B;A;Create;False;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
  113. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;-393.5822,-99.41101;Float;False;True;-1;2;ASEMaterialInspector;0;0;Unlit;RO/RO_Effect_RNQ_01;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;False;False;False;False;Back;2;False;-1;3;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;True;Custom;;Transparent;All;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;2;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;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
  114. WireConnection;14;0;10;1
  115. WireConnection;14;1;10;2
  116. WireConnection;12;0;11;0
  117. WireConnection;12;2;14;0
  118. WireConnection;7;0;8;4
  119. WireConnection;7;1;6;0
  120. WireConnection;15;0;10;3
  121. WireConnection;15;1;10;4
  122. WireConnection;4;1;12;0
  123. WireConnection;4;5;7;0
  124. WireConnection;13;0;16;0
  125. WireConnection;13;2;15;0
  126. WireConnection;1;1;13;0
  127. WireConnection;5;0;3;0
  128. WireConnection;5;1;4;0
  129. WireConnection;2;0;5;0
  130. WireConnection;9;1;1;1
  131. WireConnection;9;0;1;2
  132. WireConnection;9;2;1;3
  133. WireConnection;9;3;1;4
  134. WireConnection;0;2;2;0
  135. WireConnection;0;9;9;0
  136. ASEEND*/
  137. //CHKSM=4114F91DAA4A2F81D6BE9010C6A7C2619710CE61