Combination of multiple passes in shader in Unity

I am very new to shaders but can not find an answer to my problem.
To put it simply, I've created a flag that allows you to apply texture, animate and react to light. The problem is now that the shader does not work with a texture and a light reaction at the same time. He can animate and react to light.

I've created two passes, one for color, texture and animation, and another in response to a directional light.

I've tried different mixing options, but nothing seems right.

// Upgrade NOTE: mul replaced (UNITY_MATRIX_MVP,) & # 39; with
& # 39; UnityObjectToClipPos (
) & # 39;

Shader "Custom / FlagShader1" {// path of the Shader file in the inspector
Properties {// Properties with which we will work

        _Color ("Main Color", Color) = (1,1,1,1) // Modification property

color _MainTex ("Main texture", 2D) = "white" {} // The tecture
will handle _Frequency ("Frequency", Float) = 1 // Frequency
of the flag, which is the number of waves
_Amplitude ("Amplitude", Float) = 1 // the amplitude of the flag,
which is the depth of the waves _Speed ​​("Speed", Float) = 1 // Speed
property, used to control the speed of the flag.

} Subshader {Tags {"Queue" = "Transparent" "IgnoreProjector" =
"True" "RenderType" = "Transparent" "LightMode" = "ForwardBase"} //
"Queue" Determines the rendering order.//"IgnoreProjector "set to
true, means that this object will not be affected by the projectors.
// "RenderType" Categorizes shaders into several predefined groups

                                        Pass {// The number of passes. We only have one pass. Name "Animation"

CGPROGRAM // We're moving from shaderLab to CG

// use the "green" function as vertex shader #pragma vertex green //
pre-compiler directive. that is, it tells the compiler what to do or how
to behave. // use the function "frag" as a pixel (fragment) shader
#pragma fragment frag // pre-compiler directive. it is to say that he is telling
compiler what to do or how to behave. // Global variables
uniform4 _Color;
Uniform Sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float _Frequency;
uniform float _Amplitude;
uniform float _Speed;

                                        // vertex inputs shader struct vertexInput {top of float4: POSITION; // semantic signifiers float4 texcoord: TEXCOORD0;

// semantic signifiers. Used to indicate arbitrary high precision data
such as texture coordinates and positions. }; // vertex shader
outputs – these go to the vertexOutput fragment shader structure {

        float4 pos: SV_POSITION; // semantic signifiers. Take out the final

clip the position of a vertex, so that the GPU knows where is the
screen to rasterize it, and at what depth. This exit must have
the semantics SV_POSITION and be of type float4. float4 texcoord
: TEXCOORD0; // semantic signifiers. Used to indicate a high arbitrary level
Precision data such as texture coordinates and positions.
}; // vertex shader- c is where the flag is animated float4 vertexFlagAnim (float4 vertPos, float2 uv) {

        greenPos.y = greenPos.y + sin ((uv.x - (_Time.y * _Speed)) * * _ Frequency)

* (_Amplitude * uv.x); // the axis that we are going to animate (x) and that is moved with time.y return vertPos; } // vertex shader. Works on each
top of the 3D model. vertexOutput green (vertexInput v) {

        vertexOutput o; v.vertex = vertexFlagAnim (v.vertex, v.texcoord);

// The animation o.pos = UnityObjectToClipPos (v.vertex);
// Transform a point from the object space into a clip space of the camera into
homogeneous coordinates. o.texcoord.xy = (v.texcoord.xy *
_MainTex_ST.xy + _MainTex_ST.zw); // Modify the mosaic dataset and offset.
return o;

}

half4 frag (vertexOutput i): COLOR {// Works at every pixel
this object occupies on the screen // half4 is a four-component vector,
using semi-precise floating point coordinates

        float4 col = tex2D (_MainTex, i.texcoord) * _Color; // texture sample

and return it
// float4 col = saturate (dot (normalize (i.normal), _WorldSpaceLightPos0)) + tex2D (_MainTex, i.texcoord) * _Color;

        back collar; }

ENDCG}
Pass {Name "Light" Blend Off
CGPROGRAM // We're moving from shaderLab to CG

// use the "green" function as vertex shader #pragma vertex green //
pre-compiler directive. that is, it tells the compiler what to do or how
to behave. // use the function "frag" as a pixel (fragment) shader
#pragma fragment frag // pre-compiler directive. it is to say that he is telling
compiler what to do or how to behave. #include "UnityCG.cginc"
// Global variables

                                        // vertex inputs shader struct vertexInput {top of float4: POSITION; // semantic signifiers float3 normal: NORMAL; }; //

vertex shader output – these go to fragment shader structure
vertexOutput {

        top float4: SV_POSITION; // pos float3 normal: NORMAL; };  

// vertex shader. S 'executes on each vertex of the 3D model. vertexOutput
green (vertexInput v) {

        vertexOutput o; o.vertex = UnityObjectToClipPos (v.vertex);
o.normal = UnityObjectToWorldNormal (v.normal); return o;

}

fixed4 frag (vertexOutput i): SV_Target {return
saturate (dot (normalize (i.normal), _WorldSpaceLightPos0)); }

ENDCG}}}