Custom progress bar

So I made this custom progress bar sprite in Photoshop:


and the background and the separate bars are two different layers. But I don’t know how to make UE5 drain the bar my way. Do I have to make a custom sprite for every variation? I thought of making a material that masks it the way I want but I’m not sure how to accomplish this dynamic progress bar material. If anyone has any ideas or recommendations I appreciate your help. Thanks in advance.