Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a vertical property to GradientTexture1D #11626

Open
FireCatMagic opened this issue Jan 24, 2025 · 1 comment
Open

Add a vertical property to GradientTexture1D #11626

FireCatMagic opened this issue Jan 24, 2025 · 1 comment

Comments

@FireCatMagic
Copy link

Describe the project you are working on

GradientTexture1D has a 1 pixel gradient along the X axis, this bool would make it along the Y axis.

Describe the problem or limitation you are having in your project

Some UV configurations that use gradients have their UVs on the y axis, this makes it easier to use the texture directly without modifications

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It allows a vertical 1D gradient using the 1D gradient texture resource without having to use something more general purpose like a 2D gradient texture 1 pixel wide

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

New property, vertical or use_y, something along those lines, than changes the texture to be on the y axis

If this enhancement will not be used often, can it be worked around with a few lines of script?

Yes, a GradientTexture2D can be used and set to be 1 pixel wide

Is there a reason why this should be core and not an add-on in the asset library?

GradientTexture1D class is core

@arkology
Copy link

Some UV configurations that use gradients have their UVs on the y axis, this makes it easier to use the texture directly without modifications

Could you please provide example? Feels like it is possible just swap x/y usage inside shader.

@Calinou Calinou changed the title GradientTexture1D vertical bool Add a vertical property to GradientTexture1D Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants