// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

// Shader created with Shader Forge v1.35 
// 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.35;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,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,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:True,fnsp:True,fnfb:True;n:type:ShaderForge.SFN_Final,id:1168,x:33103,y:32809,varname:node_1168,prsc:2|emission-51-OUT,alpha-152-OUT;n:type:ShaderForge.SFN_Tex2d,id:9588,x:32319,y:32707,ptovrint:False,ptlb:Texture,ptin:_Texture,varname:node_9588,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:7e00af7069f7d814c9f8030051a2f8ce,ntxv:0,isnm:False|UVIN-8912-OUT;n:type:ShaderForge.SFN_TexCoord,id:7960,x:31920,y:32624,varname:node_7960,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Time,id:3610,x:31708,y:32695,varname:node_3610,prsc:2;n:type:ShaderForge.SFN_Multiply,id:3255,x:31961,y:32784,varname:node_3255,prsc:2|A-3610-T,B-6647-OUT;n:type:ShaderForge.SFN_Append,id:6647,x:31738,y:32856,varname:node_6647,prsc:2|A-3960-OUT,B-412-OUT;n:type:ShaderForge.SFN_ValueProperty,id:3960,x:31537,y:32856,ptovrint:False,ptlb:Speed_U1,ptin:_Speed_U1,varname:node_3960,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_ValueProperty,id:412,x:31537,y:32939,ptovrint:False,ptlb:Speed_V1,ptin:_Speed_V1,varname:node_412,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_Add,id:8912,x:32149,y:32652,varname:node_8912,prsc:2|A-7960-UVOUT,B-3255-OUT;n:type:ShaderForge.SFN_Color,id:9041,x:32351,y:33094,ptovrint:False,ptlb:color,ptin:_color,varname:node_9041,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Multiply,id:8496,x:32721,y:32849,varname:node_8496,prsc:2|A-6642-OUT,B-9041-RGB,C-4289-RGB;n:type:ShaderForge.SFN_Tex2d,id:4398,x:32280,y:32916,ptovrint:False,ptlb:Alpha Texture,ptin:_AlphaTexture,varname:node_4398,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False|UVIN-6122-OUT;n:type:ShaderForge.SFN_Multiply,id:51,x:32890,y:32938,varname:node_51,prsc:2|A-4412-OUT,B-8496-OUT;n:type:ShaderForge.SFN_Multiply,id:6642,x:32600,y:32725,varname:node_6642,prsc:2|A-9588-RGB,B-4398-RGB;n:type:ShaderForge.SFN_VertexColor,id:4289,x:32304,y:33284,varname:node_4289,prsc:2;n:type:ShaderForge.SFN_Add,id:6122,x:32133,y:33060,varname:node_6122,prsc:2|A-5312-UVOUT,B-3323-OUT;n:type:ShaderForge.SFN_TexCoord,id:5312,x:31911,y:32930,varname:node_5312,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Multiply,id:3323,x:31906,y:33154,varname:node_3323,prsc:2|A-7110-T,B-6323-OUT;n:type:ShaderForge.SFN_Time,id:7110,x:31650,y:32998,varname:node_7110,prsc:2;n:type:ShaderForge.SFN_Append,id:6323,x:31642,y:33221,varname:node_6323,prsc:2|A-3381-OUT,B-2450-OUT;n:type:ShaderForge.SFN_ValueProperty,id:3381,x:31459,y:33226,ptovrint:False,ptlb:Speed_u1,ptin:_Speed_u1,varname:node_3381,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_ValueProperty,id:2450,x:31432,y:33321,ptovrint:False,ptlb:Speed_v2,ptin:_Speed_v2,varname:node_2450,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_Slider,id:4412,x:32631,y:32654,ptovrint:False,ptlb:亮度,ptin:_,varname:node_4412,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:1,max:5;n:type:ShaderForge.SFN_Multiply,id:152,x:32911,y:33159,varname:node_152,prsc:2|A-4289-A,B-9041-A,C-8679-OUT;n:type:ShaderForge.SFN_Slider,id:4167,x:32349,y:33462,ptovrint:False,ptlb:alpha,ptin:_alpha,varname:node_4167,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:1,max:5;n:type:ShaderForge.SFN_Multiply,id:8679,x:32754,y:33297,varname:node_8679,prsc:2|A-9052-OUT,B-4167-OUT;n:type:ShaderForge.SFN_Multiply,id:9052,x:32634,y:33060,varname:node_9052,prsc:2|A-9588-A,B-4398-A;proporder:9041-9588-4412-3960-412-4398-3381-2450-4167;pass:END;sub:END;*/

Shader "Particles/UV Animation_alpha" {
    Properties {
        _color ("color", Color) = (0.5,0.5,0.5,1)
        _Texture ("Texture", 2D) = "white" {}
        _ ("亮度", Range(0, 5)) = 1
        _Speed_U1 ("Speed_U1", Float ) = 0
        _Speed_V1 ("Speed_V1", Float ) = 0
        _AlphaTexture ("Alpha Texture", 2D) = "white" {}
        _Speed_u1 ("Speed_u1", Float ) = 0
        _Speed_v2 ("Speed_v2", Float ) = 0
        _alpha ("alpha", Range(0, 5)) = 1
        [HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
    }
    SubShader {
        Tags {
            "IgnoreProjector"="True"
            "Queue"="Transparent"
            "RenderType"="Transparent"
        }
        LOD 100
        Pass {
            Name "FORWARD"
            Tags {
                "LightMode"="ForwardBase"
            }
            Blend SrcAlpha OneMinusSrcAlpha
            Cull Off
            ZWrite Off
            
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #define UNITY_PASS_FORWARDBASE
            #include "UnityCG.cginc"
            #pragma multi_compile_fwdbase
            #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x 
            #pragma target 2.0
            uniform float4 _TimeEditor;
            uniform sampler2D _Texture; uniform float4 _Texture_ST;
            uniform float _Speed_U1;
            uniform float _Speed_V1;
            uniform float4 _color;
            uniform sampler2D _AlphaTexture; uniform float4 _AlphaTexture_ST;
            uniform float _Speed_u1;
            uniform float _Speed_v2;
            uniform float _;
            uniform float _alpha;
            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 node_3610 = _Time + _TimeEditor;
                float2 node_8912 = (i.uv0+(node_3610.g*float2(_Speed_U1,_Speed_V1)));
                float4 _Texture_var = tex2D(_Texture,TRANSFORM_TEX(node_8912, _Texture));
                float4 node_7110 = _Time + _TimeEditor;
                float2 node_6122 = (i.uv0+(node_7110.g*float2(_Speed_u1,_Speed_v2)));
                float4 _AlphaTexture_var = tex2D(_AlphaTexture,TRANSFORM_TEX(node_6122, _AlphaTexture));
                float3 emissive = (_*((_Texture_var.rgb*_AlphaTexture_var.rgb)*_color.rgb*i.vertexColor.rgb));
                float3 finalColor = emissive;
                return fixed4(finalColor,(i.vertexColor.a*_color.a*((_Texture_var.a*_AlphaTexture_var.a)*_alpha)));
            }
            ENDCG
        }
    }
    CustomEditor "ShaderForgeMaterialInspector"
}
