How do I change the scale over a time for a shader?

So, i have been working on a project since a week, and i got a big problem!

I have a simple line renderer and a repeating/tiling texture added. Heres a picture for visualisation:

The next thing i did was writing a little code to change the offset with the time. So the lines are going in one direction:

135134-ddd3.png

The problem is that it looks kind of weird, because the little repeating line textures are just disappearing at the end of the line (renderer). So i would like to change the shader so that it would change the size of the little textured repeating lines with time. That means the lines would get tinier and shrink/fade away. Not just continuosly stay big and just disappear.*The problem is, i dont know how to achieve that goal. I looked through many questions but i didnt find any helpfull answeres. Do i have to write a shader myself? And if yes, could you help me out? I never did that before. Also, i would prefer a c# solution :slight_smile: *

Thank you, NeoN!

well have you tried to change the animation curve?
this will give you an idea.

var lr = GetComponent<LineRenderer>();
AnimationCurve curve = new AnimationCurve();

curve.AddKey(0.0f, 0.0f);
curve.AddKey(1.0f, 1.0f);
// or reversed
curve.AddKey(1.0f, 1.0f);
curve.AddKey(0.0f, 0.0f);

lr.widthCurve = curve;