Weird shader problem on mobile

Here’s the deal. Each “animated line” is a material with shader attached to ugui image component. For some reason, on android (haven’t tested on other devices) after few seconds it starts to be noticeable that line segments increases constantly.

Editor:

Android after a half a minute in and it gets worse:

A second look from someone would be awesome.

Shader "Custom/GlowLine"
{
    Properties
    {
        _Speed("Speed", float) = 5
        _Amplitude("Amplitude", float) = 0.025
        _Offset("Offset", float) = 0.0
        _Width("Width", float) = 100
        _Color("Color", color) = (1,1,1,1)
    }
   
    SubShader
    {
        Tags { "Queue" = "Transparent" }
       
        Pass
        {
            Blend SrcAlpha OneMinusSrcAlpha   
            Cull off
       
            CGPROGRAM
            #pragma target 2.0
            #pragma vertex Vert
            #pragma fragment Frag

            #include "UnityCG.cginc"
           
            float  _Speed;
            float  _Amplitude;
            float  _Offset;
            float  _Width;
            float4 _Color;
               
            struct VertexInput
            {
                float4 pos : POSITION;
                float2 uv  : TEXCOORD0;
            };
           
            struct FragmentInput
            {
                float4 pos : POSITION;
                float2 uv  : TEXCOORD0;
            };
           
            FragmentInput Vert(VertexInput Input)
            {
                FragmentInput Result;
               
                Result.pos = mul(UNITY_MATRIX_MVP, Input.pos);
                Result.uv  = Input.uv;
               
                return Result;
            }
           
            float4 Frag(FragmentInput Input) : COLOR
            {
                float y = -1 + Input.uv.y * 2;
                float t = _Time.y;
               
                y += sin(Input.uv.x + (_Offset + t) * _Speed) * _Amplitude;
               
                return float4(_Color.rgb, abs(1.0 / (_Width * y)) * _Color.a);
            }
           
            ENDCG
        }
    }
    FallBack "Unlit/Diffuse"
}

sin(Input.uv.x + (_Offset + t) * _Speed)
i would suggest you “clamp” or otherwise bring sin argument closer to [-pi…pi] yourself - otherwise you are bound to have precision issues. The easiest would be to move time calc into vprog as you have way more instructions to spare there