How to stretch a sprite at different width

Godot Version

4.3

Question

I’m trying to simulate an ocean wave foam with a single sprite. What I want is for the left side of the foam to squash and lose opacity first, not all the sprite at once.
Any tips on how I can achieve this? I’m guessing a shader is required but I have absolutely no idea where to start.

shader is the way, if you want to manipulate the image on runtime

1 Like