Blending 2 sprites with slider

Shader “ProcGen/mixedTexture”
{
Properties
{
[PerRendererData] _MainTex(“Sprite Texture”, 2D) = “white” {}
_SecTex(“Effect Texture”, 2D) = “”{}
_MixRange(“Mixing Power”, Range(0.0, 1.0)) = 0.5
}

	SubShader
	{
        Tags
		{
            "Queue" = "Transparent"		
			"IgnoreProjector" = "True"	
			"RenderType" = "Transparent"
			"PreviewType" = "Plane"		
			"CanUseSpriteAtlas" = "True"
		}

		Cull Off	
		Lighting Off
		ZWrite Off
		Blend One OneMinusSrcAlpha	//Premultiplied transparency
		//Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency

		Pass
		{
            CGPROGRAM
			#pragma vertex vert
			#pragma fragment frag

			struct VertexInput
			{
                float4 vertex   : POSITION;
                float4 color    : COLOR;
                float2 texcoordMain : TEXCOORD0;
				float2 texcoordSec : TEXCOORD1;
            };

            struct VertexOutput
			{
                float4 vertex   : SV_POSITION;
                fixed4 color : COLOR;
                float2 texcoordMain  : TEXCOORD0;
				float2 texcoordSec : TEXCOORD1;
            };

            //fixed4 _Color;  //i will use only default color(from spriteRenderer)
			fixed _MixRange;

			VertexOutput vert(VertexInput IN)
			{
                VertexOutput OUT;
                OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
                OUT.texcoordMain = IN.texcoordMain;
				OUT.texcoordSec = IN.texcoordSec;
                OUT.color = IN.color /* * _Color*/;
                return OUT;
            }

			sampler2D _SecTex;
			sampler2D _MainTex;
            fixed4 SampleSpriteTexture(sampler2D tex, float2 uv)
			{
                fixed4 color = tex2D(tex, uv);
                return color;
            }

			fixed4 frag(VertexOutput IN) : SV_Target
			{
                fixed4 t1 = SampleSpriteTexture(_MainTex, IN.texcoordMain) * IN.color;	
                t1.rgb *= t1.a;	//w/o this the texture will have transparency with white background
				fixed4 t2 = SampleSpriteTexture(_SecTex, IN.texcoordSec)* IN.color;
				t2.rgb *= t2.a;
				fixed4 res = lerp(t1, t2, _MixRange);
                return res;
            }
			ENDCG
		}
	}
}

I’m neewb at shaders but it seems like shader code should work as it intended, but it doesnt :frowning:
So i want to blend two sprites together, but i encountered a problem. Second texture blends only “partly”. What i mean:
I have a floor sprite(_MainTex) and a flame sprite(effect texture, _SecTex). So when i blend it seems that only small part of my flame sprite appears, like it picks only small plane inside my sprite and applies it when blending.
Both sprites are 32x32 and Pixels per Unit is 32. Changing tiling and offset doesn’t affect anything.
Can’t understand where is my mistake.


I hope screenshots will help a bit. And sorry for my english.

Ok, figured it out. I have and offset and different size on second sprite coz first one is multisprite. So i need to cut the sprite out to use it with my shader