shaoxiadiablo/Assets/Arts/VFX/Shader/VFX_NiuQu_UV.shader
2025-05-18 01:04:31 +08:00

124 lines
7.1 KiB
Plaintext

// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "VFX_NiuQu_UV"
{
Properties
{
_Texture("Texture", 2D) = "white" {}
_Float0("NiuQu", Float) = 0
_Texture_U("Texture_U", Float) = 0
_Texture_V("Texture_V", Float) = 0
_Mask("Mask", 2D) = "white" {}
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
Cull Back
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
GrabPass{ }
CGPROGRAM
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
#define ASE_DECLARE_SCREENSPACE_TEXTURE(tex) UNITY_DECLARE_SCREENSPACE_TEXTURE(tex);
#else
#define ASE_DECLARE_SCREENSPACE_TEXTURE(tex) UNITY_DECLARE_SCREENSPACE_TEXTURE(tex)
#endif
#pragma surface surf Unlit keepalpha noshadow exclude_path:deferred noambient novertexlights nolightmap nodynlightmap nodirlightmap nofog nometa noforwardadd
struct Input
{
float4 screenPos;
float2 uv_texcoord;
float4 vertexColor : COLOR;
};
ASE_DECLARE_SCREENSPACE_TEXTURE( _GrabTexture )
uniform sampler2D _Texture;
uniform float4 _Texture_ST;
uniform float _Texture_U;
uniform float _Texture_V;
uniform float _Float0;
uniform sampler2D _Mask;
uniform float4 _Mask_ST;
inline float4 ASE_ComputeGrabScreenPos( float4 pos )
{
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
float4 o = pos;
o.y = pos.w * 0.5f;
o.y = ( pos.y - o.y ) * _ProjectionParams.x * scale + o.y;
return o;
}
inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
{
return half4 ( 0, 0, 0, s.Alpha );
}
void surf( Input i , inout SurfaceOutput o )
{
float4 ase_screenPos = float4( i.screenPos.xyz , i.screenPos.w + 0.00000000001 );
float4 ase_grabScreenPos = ASE_ComputeGrabScreenPos( ase_screenPos );
float4 ase_grabScreenPosNorm = ase_grabScreenPos / ase_grabScreenPos.w;
float2 uv0_Texture = i.uv_texcoord * _Texture_ST.xy + _Texture_ST.zw;
float2 appendResult117 = (float2(( _Texture_U * _Time.y ) , ( _Time.y * _Texture_V )));
float2 uv_Mask = i.uv_texcoord * _Mask_ST.xy + _Mask_ST.zw;
float4 screenColor106 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_GrabTexture,( ase_grabScreenPosNorm + ( tex2D( _Texture, ( uv0_Texture + appendResult117 ) ).r * _Float0 * i.vertexColor.a * tex2D( _Mask, uv_Mask ).r ) ).xy);
o.Emission = screenColor106.rgb;
o.Alpha = 1;
}
ENDCG
}
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=17400
2567;1;2546;1370;2862.448;721.3309;1;True;True
Node;AmplifyShaderEditor.TimeNode;113;-2817.222,-115.8786;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;112;-2785.106,-275.3987;Float;False;Property;_Texture_U;Texture_U;3;0;Create;True;0;0;False;0;0;0.2;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;111;-2786.947,83.17102;Float;False;Property;_Texture_V;Texture_V;4;0;Create;True;0;0;False;0;0;0.5;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;114;-2492.932,-200.11;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;115;-2493.984,-8.484009;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.DynamicAppendNode;117;-2278.91,-124.1616;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.TextureCoordinatesNode;116;-2379.91,-376.1616;Inherit;False;0;104;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
Node;AmplifyShaderEditor.SimpleAddOpNode;118;-2080.569,-218.6238;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.RangedFloatNode;109;-1864.332,-25.72424;Float;False;Property;_Float0;NiuQu;2;0;Create;False;0;0;False;0;0;0.2;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.SamplerNode;104;-1869.399,-242.2442;Inherit;True;Property;_Texture;Texture;1;0;Create;True;0;0;False;0;-1;None;4b42be3b72ea3fa42a213046ddf58faa;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
Node;AmplifyShaderEditor.VertexColorNode;110;-1863.472,128.6553;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;119;-1976.448,303.6691;Inherit;True;Property;_Mask;Mask;5;0;Create;True;0;0;False;0;-1;None;588e6601200b1934f8e2fdbe138ffdf2;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
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;108;-1491.596,-47.71515;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.GrabScreenPosition;105;-1485.865,-264.0252;Inherit;False;0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleAddOpNode;107;-1194.265,-71.23907;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT4;0
Node;AmplifyShaderEditor.ScreenColorNode;106;-1061.464,-77.63906;Float;False;Global;_GrabScreen0;Grab Screen 0;2;0;Create;True;0;0;False;0;Object;-1;False;False;1;0;FLOAT2;0,0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;2;-737.6476,-118.661;Float;False;True;-1;2;ASEMaterialInspector;0;0;Unlit;VFX_NiuQu_UV;False;False;False;False;True;True;True;True;True;True;True;True;False;False;True;False;False;False;False;False;False;Back;2;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;True;Transparent;;Transparent;ForwardOnly;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;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0;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
WireConnection;114;0;112;0
WireConnection;114;1;113;2
WireConnection;115;0;113;2
WireConnection;115;1;111;0
WireConnection;117;0;114;0
WireConnection;117;1;115;0
WireConnection;118;0;116;0
WireConnection;118;1;117;0
WireConnection;104;1;118;0
WireConnection;108;0;104;1
WireConnection;108;1;109;0
WireConnection;108;2;110;4
WireConnection;108;3;119;1
WireConnection;107;0;105;0
WireConnection;107;1;108;0
WireConnection;106;0;107;0
WireConnection;2;2;106;0
ASEEND*/
//CHKSM=7523F3B77657306A4E87CE93B677F2B57E9A3D7D