
I'm trying to apply this texture to a line2d but the texture doesn't look how I had in mind.
I expected something like this, although I don't really need the corners if that helps simplifying the problem.

When using a gradient this displacement doesn't appear but the gradient interpolation modes are completely ignored I'm trying to use the constant mode and it works on a regular texturerect with the same gradient but on line2d it doesn't.

How can I solve this problem?