// Shader created with Shader Forge v1.38 
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:0,bdst:0,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:3138,x:32876,y:32705,varname:node_3138,prsc:2|emission-5285-OUT;n:type:ShaderForge.SFN_Tex2d,id:9513,x:31637,y:32836,ptovrint:False,ptlb:Main Tex,ptin:_MainTex,varname:node_9513,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False|UVIN-2079-UVOUT;n:type:ShaderForge.SFN_VertexColor,id:8182,x:31637,y:32991,varname:node_8182,prsc:2;n:type:ShaderForge.SFN_Color,id:8342,x:31637,y:32673,ptovrint:False,ptlb:Tint Color,ptin:_TintColor,varname:node_8342,prsc:2,glob:False,taghide:False,taghdr:True,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Multiply,id:4413,x:32185,y:32672,varname:node_4413,prsc:2|A-8342-RGB,B-3106-OUT,C-8182-RGB;n:type:ShaderForge.SFN_Multiply,id:1489,x:32185,y:32934,varname:node_1489,prsc:2|A-8342-A,B-8182-A;n:type:ShaderForge.SFN_ValueProperty,id:3106,x:31637,y:32599,ptovrint:False,ptlb:MainTex_liangdu,ptin:_MainTex_liangdu,varname:node_3106,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1;n:type:ShaderForge.SFN_Multiply,id:5336,x:32345,y:32838,varname:node_5336,prsc:2|A-9513-RGB,B-1489-OUT;n:type:ShaderForge.SFN_Multiply,id:5992,x:32521,y:32755,varname:node_5992,prsc:2|A-4413-OUT,B-5336-OUT,C-9513-A;n:type:ShaderForge.SFN_Sin,id:8130,x:31300,y:33394,varname:node_8130,prsc:2|IN-5158-OUT;n:type:ShaderForge.SFN_Multiply,id:5285,x:32622,y:33001,varname:node_5285,prsc:2|A-5992-OUT,B-3047-OUT;n:type:ShaderForge.SFN_Time,id:6843,x:30871,y:33318,varname:node_6843,prsc:2;n:type:ShaderForge.SFN_Multiply,id:5158,x:31119,y:33394,varname:node_5158,prsc:2|A-6843-T,B-2831-OUT;n:type:ShaderForge.SFN_ValueProperty,id:2831,x:30871,y:33481,ptovrint:False,ptlb:shansuo,ptin:_shansuo,varname:node_2831,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1;n:type:ShaderForge.SFN_Abs,id:3371,x:32234,y:33342,varname:node_3371,prsc:2|IN-7960-OUT;n:type:ShaderForge.SFN_Vector1,id:6105,x:32234,y:33175,varname:node_6105,prsc:2,v1:1;n:type:ShaderForge.SFN_SwitchProperty,id:3047,x:32433,y:33308,ptovrint:False,ptlb:shanshuo_on,ptin:_shanshuo_on,varname:node_3047,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,on:False|A-6105-OUT,B-3371-OUT;n:type:ShaderForge.SFN_Rotator,id:2079,x:31341,y:32830,varname:node_2079,prsc:2|UVIN-5783-UVOUT,ANG-5297-OUT;n:type:ShaderForge.SFN_ValueProperty,id:6132,x:30675,y:32893,ptovrint:False,ptlb:Rotator,ptin:_Rotator,varname:node_6132,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_Divide,id:8838,x:30915,y:32893,varname:node_8838,prsc:2|A-6132-OUT,B-6400-OUT;n:type:ShaderForge.SFN_Vector1,id:6400,x:30675,y:32990,varname:node_6400,prsc:2,v1:180;n:type:ShaderForge.SFN_Multiply,id:5297,x:31133,y:32914,varname:node_5297,prsc:2|A-8838-OUT,B-188-OUT;n:type:ShaderForge.SFN_Pi,id:188,x:30915,y:33077,varname:node_188,prsc:2;n:type:ShaderForge.SFN_TexCoord,id:5783,x:31133,y:32743,varname:node_5783,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_ValueProperty,id:4606,x:31300,y:33624,ptovrint:False,ptlb:sin_add,ptin:_sin_add,varname:node_4606,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_RemapRangeAdvanced,id:7960,x:31638,y:33476,varname:node_7960,prsc:2|IN-8130-OUT,IMIN-6609-OUT,IMAX-4268-OUT,OMIN-4606-OUT,OMAX-4268-OUT;n:type:ShaderForge.SFN_Vector1,id:6609,x:31300,y:33526,varname:node_6609,prsc:2,v1:-1;n:type:ShaderForge.SFN_Vector1,id:4268,x:31300,y:33735,varname:node_4268,prsc:2,v1:1;proporder:9513-8342-2831-3106-3047-6132-4606;pass:END;sub:END;*/

Shader "URP/Effects/Particle/ADD" {
    Properties {
        _MainTex ("Main Tex", 2D) = "white" {}
        [HDR]_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,1)
        _shansuo ("shansuo", Float ) = 1
        _MainTex_liangdu ("MainTex_liangdu", Float ) = 1
        _Depth ("Depth", Float ) = 0.25
        [MaterialToggle] _shanshuo_on ("shanshuo_on", Float ) = 0
        _Rotator ("Rotator", Float ) = 0
        _sin_add ("sin_add", Float ) = 0
    }
    SubShader {
        Tags {
            "IgnoreProjector"="True"
            "Queue"="Transparent"
            "RenderType"="Transparent"
        }
        Pass {
            Name "FORWARD"
            Tags {
                //"LightMode"="ForwardBase"
            }
            Blend One One
            Cull Off
            ZWrite Off
            
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"
            #include "Include/FX_Depth.cginc"
            #pragma multi_compile_fwdbase
            uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
            uniform float4 _TintColor;
            uniform float _MainTex_liangdu;
            uniform float _shansuo;
            uniform half _shanshuo_on;
            uniform float _Rotator;
            uniform float _sin_add;
            struct VertexInput {
                float4 vertex : POSITION;
                float2 texcoord0 : TEXCOORD0;
                float4 vertexColor : COLOR;
            };
            struct VertexOutput {
                float4 pos : SV_POSITION;
                float2 uv0 : TEXCOORD0;
                float4 vertexColor : COLOR;
                float4 projPos : TEXCOORD1;
            };
            VertexOutput vert (VertexInput v) {
                VertexOutput o = (VertexOutput)0;
                o.uv0 = v.texcoord0;
                o.vertexColor = v.vertexColor;
                o.pos = UnityObjectToClipPos( v.vertex );
                o.projPos = ComputeScreenPos (o.pos);
                COMPUTE_EYEDEPTH(o.projPos.z);
                return o;
            }
            float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
                float isFrontFace = ( facing >= 0 ? 1 : 0 );
                float faceSign = ( facing >= 0 ? 1 : -1 );
////// Lighting:
////// Emissive:
                float node_2079_ang = ((_Rotator/180.0)*3.141592654);
                float node_2079_spd = 1.0;
                float node_2079_cos = cos(node_2079_spd*node_2079_ang);
                float node_2079_sin = sin(node_2079_spd*node_2079_ang);
                float2 node_2079_piv = float2(0.5,0.5);
                float2 node_2079 = (mul(i.uv0-node_2079_piv,float2x2( node_2079_cos, -node_2079_sin, node_2079_sin, node_2079_cos))+node_2079_piv);
                float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(node_2079, _MainTex));
                float4 node_6843 = _Time;
                float node_6609 = (-1.0);
                float node_4268 = 1.0;
                float3 emissive = (((_TintColor.rgb*_MainTex_liangdu*i.vertexColor.rgb*Depth(i.projPos))*(_MainTex_var.rgb*(_TintColor.a*i.vertexColor.a))*_MainTex_var.a)*lerp( 1.0, abs((_sin_add + ( (sin((node_6843.g*_shansuo)) - node_6609) * (node_4268 - _sin_add) ) / (node_4268 - node_6609))), _shanshuo_on ));
                float3 finalColor = emissive;
                return half4(finalColor, _TintColor.a * i.vertexColor.a * _MainTex_var.a);
            }
            ENDCG
        }
    }
    //FallBack "Diffuse"
}
