// 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:0,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:True,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:3,bdst:7,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:32719,y:32712,varname:node_3138,prsc:2|custl-7990-OUT,alpha-9266-OUT;n:type:ShaderForge.SFN_Color,id:7241,x:31655,y:32688,ptovrint:False,ptlb:Tint Color,ptin:_TintColor,varname:node_7241,prsc:2,glob:False,taghide:False,taghdr:True,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Tex2d,id:9507,x:31655,y:32857,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:node_9507,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False|UVIN-9150-UVOUT;n:type:ShaderForge.SFN_Multiply,id:3693,x:32123,y:32672,varname:node_3693,prsc:2|A-7241-RGB,B-852-RGB;n:type:ShaderForge.SFN_SwitchProperty,id:8716,x:31922,y:32899,ptovrint:False,ptlb:Texture_R/rgb,ptin:_Texture_Rrgb,varname:node_8716,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,on:False|A-9507-R,B-9507-A;n:type:ShaderForge.SFN_ValueProperty,id:8633,x:32123,y:32618,ptovrint:False,ptlb:tex_Color_liangdu,ptin:_tex_Color_liangdu,varname:node_8633,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1;n:type:ShaderForge.SFN_VertexColor,id:852,x:31655,y:33027,varname:node_852,prsc:2;n:type:ShaderForge.SFN_Multiply,id:1883,x:32240,y:33061,varname:node_1883,prsc:2|A-8716-OUT,B-852-A,C-7241-A;n:type:ShaderForge.SFN_Clamp01,id:9266,x:32421,y:33061,varname:node_9266,prsc:2|IN-1883-OUT;n:type:ShaderForge.SFN_Multiply,id:7990,x:32341,y:32652,varname:node_7990,prsc:2|A-8633-OUT,B-3693-OUT,C-9507-RGB;n:type:ShaderForge.SFN_Rotator,id:9150,x:31405,y:32857,varname:node_9150,prsc:2|UVIN-3458-UVOUT,ANG-8281-OUT;n:type:ShaderForge.SFN_TexCoord,id:3458,x:31076,y:32798,varname:node_3458,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_ValueProperty,id:2621,x:30616,y:32922,ptovrint:False,ptlb:Rotator,ptin:_Rotator,varname:node_2621,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_Divide,id:2868,x:30839,y:33010,varname:node_2868,prsc:2|A-2621-OUT,B-3398-OUT;n:type:ShaderForge.SFN_Vector1,id:3398,x:30655,y:33120,varname:node_3398,prsc:2,v1:180;n:type:ShaderForge.SFN_Multiply,id:8281,x:31093,y:32983,varname:node_8281,prsc:2|A-2868-OUT,B-9637-OUT;n:type:ShaderForge.SFN_Pi,id:9637,x:30839,y:33167,varname:node_9637,prsc:2;proporder:7241-8633-9507-8716-2621;pass:END;sub:END;*/

Shader "URP/Effects/Particle/Blend" {
    Properties {
        [HDR]_TintColor ("Tint Color", Color) = (1,1,1,1)
        _tex_Color_liangdu ("tex_Color_liangdu", Float ) = 1
        _Depth ("Depth", Float ) = 0.25
        _MainTex ("MainTex", 2D) = "white" {}
        [MaterialToggle] _Texture_Rrgb ("Texture_R/rgb", Float ) = 0
        _Rotator ("Rotator", Float ) = 0
        [HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
    }
    SubShader {
        Tags {
            "IgnoreProjector"="True"
            "Queue"="Transparent"
            "RenderType"="Transparent"
        }
        Pass {
            Name "FORWARD"
            Tags {
                //"LightMode"="ForwardBase"
            }
            Blend SrcAlpha OneMinusSrcAlpha
            Cull Off
            ZWrite Off
            
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"
            #include "Include/FX_Depth.cginc"
            #pragma multi_compile_fwdbase
            uniform float4 _TintColor;
            uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
            uniform fixed _Texture_Rrgb;
            uniform float _tex_Color_liangdu;
            uniform float _Rotator;
            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:
                float node_9150_ang = ((_Rotator/180.0)*3.141592654);
                float node_9150_spd = 1.0;
                float node_9150_cos = cos(node_9150_spd*node_9150_ang);
                float node_9150_sin = sin(node_9150_spd*node_9150_ang);
                float2 node_9150_piv = float2(0.5,0.5);
                float2 node_9150 = (mul(i.uv0-node_9150_piv,float2x2( node_9150_cos, -node_9150_sin, node_9150_sin, node_9150_cos))+node_9150_piv);
                float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(node_9150, _MainTex));
                float3 finalColor = (_tex_Color_liangdu*(_TintColor.rgb*i.vertexColor.rgb)*_MainTex_var.rgb);
                return fixed4(finalColor,saturate((lerp( _MainTex_var.r, _MainTex_var.a, _Texture_Rrgb )*i.vertexColor.a*_TintColor.a*Depth(i.projPos))));
            }
            ENDCG
        }
    }
    //FallBack "Diffuse"
    //CustomEditor "ShaderForgeMaterialInspector"
}
