I made a gradients using Godot Engine and it was horizontal, I want to make it vertical, how

Made a gradient how exactly? if it is a derivative of the UV coordinates then manipulating those input coordinates would be the way to go.

@Megalomaniak said: Made a gradient how exactly? if it is a derivative of the UV coordinates then manipulating those input coordinates would be the way to go.

but it doesn't really matter anymore because I just used Medibang and made image texture to use instead since i wanted to change the shape too

Godot doesn't support rotating GradientTexture or changing its height yet. There's a pull request that implements all that (and more), but it most likely won't be merged due to the added complexity and maintenance cost.

12 days later

I really hope this make it! I think it's a must-have.

6 months later

I was trying to do this as well for a top to bottom background gradient, here's a workaround I came up with.

  • Create an Area2D with a TextureRect as a child
  • Then rotate the Area2D 90 degrees and move it along the x axis the width of the screen.
  • On the TextureRect I added my gradient and set the transform > size x and y to the height(x) and width(y) of the screen.

I will probably also set these values in the _ready function of my background script in case I ever decide to change the screen dimensions.

If your gradient is a image file then you can 'rotate' it 90 degrees by simply swizzling the UV coordinates if you are dealing with a custom shader.

2 months later

The gradient rotation would have been very useful for me also. I upvote the PR ;)

Can't you just rotate whatever is using the gradient?

2 years later