How to implement scaling without scaling the texture.

Good day! So the question is how to implement the next behavior: I have game object in 2D project that scales over time to one side (actually scales in both sides but also moves towards the scale direction) you can see it on gif below.


159623-peek-2020-05-16-11-54.gif


If i attach texture (sprite?) it will scale with object as well - this is not what i’m attempting to do. One solution is to set Clamp or Repeat parameter in the texture inspector. But it’s also not acceptable for me. I don’t know how exactly to explain what i want to do… but lets imagine that i have the final texture invisible and during the scaling of object new parts of that texture becomes visible. You can see that behavior on next gif.


159624-peek-2020-05-16-12-11.gif


I guess i need some kind of shader that implements it so please provide me with that script ( i’m totally new to shaders coding, only know the basics). Take on account that I’m going to animate the texture that will be attached to scaling object, maybe it also will affect the shader script. Cheers.

I"m also looking for this exact same behavior.