// 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: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:32794,y:32684,varname:node_3138,prsc:2|emission-3178-OUT,custl-7666-OUT,alpha-6644-OUT;n:type:ShaderForge.SFN_Tex2d,id:3755,x:30864,y:32999,ptovrint:False,ptlb:rongjie_wenli,ptin:_rongjie_wenli,varname:node_3755,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_If,id:5746,x:31505,y:32951,varname:node_5746,prsc:2|A-1423-OUT,B-3755-R,GT-6272-OUT,EQ-6272-OUT,LT-3073-OUT;n:type:ShaderForge.SFN_Vector1,id:6272,x:31244,y:33096,varname:node_6272,prsc:2,v1:1;n:type:ShaderForge.SFN_Vector1,id:3073,x:31244,y:33221,varname:node_3073,prsc:2,v1:0;n:type:ShaderForge.SFN_Tex2d,id:5620,x:31824,y:32487,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_node_3755_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False|UVIN-769-OUT;n:type:ShaderForge.SFN_Multiply,id:6731,x:32197,y:32904,varname:node_6731,prsc:2|A-5620-A,B-6450-OUT;n:type:ShaderForge.SFN_Color,id:7519,x:32055,y:32367,ptovrint:False,ptlb:Color&Alpha,ptin:_ColorAlpha,varname:node_7519,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:3808,x:32384,y:32437,varname:node_3808,prsc:2|A-7519-RGB,B-5620-RGB;n:type:ShaderForge.SFN_Multiply,id:6644,x:32467,y:32846,varname:node_6644,prsc:2|A-7519-A,B-6731-OUT;n:type:ShaderForge.SFN_ValueProperty,id:329,x:31009,y:32846,ptovrint:False,ptlb:N_mask,ptin:_N_mask,varname:node_329,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0.3;n:type:ShaderForge.SFN_If,id:5217,x:31525,y:33205,varname:node_5217,prsc:2|A-1423-OUT,B-2022-OUT,GT-6272-OUT,EQ-6272-OUT,LT-3073-OUT;n:type:ShaderForge.SFN_Add,id:2022,x:31106,y:33159,varname:node_2022,prsc:2|A-3755-R,B-5828-OUT;n:type:ShaderForge.SFN_ValueProperty,id:5828,x:30875,y:33257,ptovrint:False,ptlb:goubian,ptin:_goubian,varname:node_5828,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0.01;n:type:ShaderForge.SFN_Subtract,id:1274,x:31735,y:33102,varname:node_1274,prsc:2|A-5746-OUT,B-5217-OUT;n:type:ShaderForge.SFN_Color,id:9508,x:31735,y:33271,ptovrint:False,ptlb:goubian_color,ptin:_goubian_color,varname:node_9508,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:0,c3:0,c4:1;n:type:ShaderForge.SFN_Multiply,id:7346,x:31929,y:33178,varname:node_7346,prsc:2|A-1274-OUT,B-9508-RGB;n:type:ShaderForge.SFN_ValueProperty,id:8447,x:31735,y:33450,ptovrint:False,ptlb:goubian_qiangdu,ptin:_goubian_qiangdu,varname:node_8447,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:3;n:type:ShaderForge.SFN_Multiply,id:7666,x:32226,y:33231,varname:node_7666,prsc:2|A-7346-OUT,B-8447-OUT;n:type:ShaderForge.SFN_Add,id:6450,x:31967,y:33031,varname:node_6450,prsc:2|A-5746-OUT,B-1274-OUT;n:type:ShaderForge.SFN_VertexColor,id:3457,x:31064,y:32653,varname:node_3457,prsc:2;n:type:ShaderForge.SFN_Multiply,id:1423,x:31247,y:32802,varname:node_1423,prsc:2|A-3457-A,B-329-OUT;n:type:ShaderForge.SFN_Multiply,id:3178,x:32607,y:32614,varname:node_3178,prsc:2|A-3808-OUT,B-3457-RGB;n:type:ShaderForge.SFN_Tex2d,id:3831,x:31100,y:32338,ptovrint:False,ptlb:Noise,ptin:_Noise,varname:node_3831,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:1573,x:31380,y:32391,varname:node_1573,prsc:2|A-3831-R,B-2417-OUT;n:type:ShaderForge.SFN_ValueProperty,id:2417,x:31100,y:32530,ptovrint:False,ptlb:noise_qiangdu,ptin:_noise_qiangdu,varname:node_2417,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_Add,id:769,x:31633,y:32408,varname:node_769,prsc:2|A-1279-UVOUT,B-1573-OUT;n:type:ShaderForge.SFN_TexCoord,id:1279,x:31405,y:32186,varname:node_1279,prsc:2,uv:0,uaff:False;proporder:7519-5620-329-3755-9508-8447-5828-3831-2417;pass:END;sub:END;*/

Shader "URP/Effects/Particle/P2_Dissolution_Blend" {
    Properties {
        _ColorAlpha ("Color&Alpha", Color) = (1,1,1,1)
        _MainTex ("MainTex", 2D) = "white" {}
        _N_mask ("N_mask", Float ) = 0.3
        _rongjie_wenli ("rongjie_wenli", 2D) = "white" {}
        _goubian_color ("goubian_color", Color) = (1,0,0,1)
        _goubian_qiangdu ("goubian_qiangdu", Float ) = 3
        _goubian ("goubian", Float ) = 0.01
        _Noise ("Noise", 2D) = "white" {}
        _noise_qiangdu ("noise_qiangdu", 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"
            #pragma multi_compile_fwdbase
            uniform sampler2D _rongjie_wenli; uniform float4 _rongjie_wenli_ST;
            uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
            uniform float4 _ColorAlpha;
            uniform float _N_mask;
            uniform float _goubian;
            uniform float4 _goubian_color;
            uniform float _goubian_qiangdu;
            uniform sampler2D _Noise; uniform float4 _Noise_ST;
            uniform float _noise_qiangdu;
            struct VertexInput {
                float4 vertex : POSITION;
                float2 texcoord0 : TEXCOORD0;
                float4 vertexColor : COLOR;
            };
            struct VertexOutput {
                float4 pos : SV_POSITION;
                float2 uv0 : TEXCOORD0;
                float4 vertexColor : COLOR;
            };
            VertexOutput vert (VertexInput v) {
                VertexOutput o = (VertexOutput)0;
                o.uv0 = v.texcoord0;
                o.vertexColor = v.vertexColor;
                o.pos = UnityObjectToClipPos( v.vertex );
                return o;
            }
            float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
                float isFrontFace = ( facing >= 0 ? 1 : 0 );
                float faceSign = ( facing >= 0 ? 1 : -1 );
////// Lighting:
////// Emissive:
                float4 _Noise_var = tex2D(_Noise,TRANSFORM_TEX(i.uv0, _Noise));
                float2 node_769 = (i.uv0+(_Noise_var.r*_noise_qiangdu));
                float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(node_769, _MainTex));
                float3 emissive = ((_ColorAlpha.rgb*_MainTex_var.rgb)*i.vertexColor.rgb);
                float node_1423 = (i.vertexColor.a*_N_mask);
                float4 _rongjie_wenli_var = tex2D(_rongjie_wenli,TRANSFORM_TEX(i.uv0, _rongjie_wenli));
                float node_5746_if_leA = step(node_1423,_rongjie_wenli_var.r);
                float node_5746_if_leB = step(_rongjie_wenli_var.r,node_1423);
                float node_3073 = 0.0;
                float node_6272 = 1.0;
                float node_5746 = lerp((node_5746_if_leA*node_3073)+(node_5746_if_leB*node_6272),node_6272,node_5746_if_leA*node_5746_if_leB);
                float node_5217_if_leA = step(node_1423,(_rongjie_wenli_var.r+_goubian));
                float node_5217_if_leB = step((_rongjie_wenli_var.r+_goubian),node_1423);
                float node_1274 = (node_5746-lerp((node_5217_if_leA*node_3073)+(node_5217_if_leB*node_6272),node_6272,node_5217_if_leA*node_5217_if_leB));
                float3 finalColor = emissive + ((node_1274*_goubian_color.rgb)*_goubian_qiangdu);
                return fixed4(finalColor,(_ColorAlpha.a*(_MainTex_var.a*(node_5746+node_1274))));
            }
            ENDCG
        }
    }
    //FallBack "Diffuse"
    //CustomEditor "ShaderForgeMaterialInspector"
}
