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 square fill mode to GradientTexture2D #76151

Merged
merged 1 commit into from
May 29, 2023

Conversation

MewPurPur
Copy link
Contributor

@MewPurPur MewPurPur commented Apr 17, 2023

Implements godotengine/godot-proposals#6712 (I moved the demonstrations and use cases there)

This is an example of what it does what it used to look like (see comments for a more recent version):

image

Feel free to discuss about better implementations, also if you think the feature isn't needed.

Production edit: Closes godotengine/godot-proposals#6712.

@Calinou
Copy link
Member

Calinou commented Apr 17, 2023

Heh, I was planning on implementing this at some point 🙂

I suggest opening a proposal to discuss use cases. I can think of a few:

@MewPurPur
Copy link
Contributor Author

MewPurPur commented Apr 17, 2023

Sure thing, I opened a proposal. godotengine/godot-proposals#6712

I don't think this can be used for checkerboards.

@Calinou
Copy link
Member

Calinou commented Apr 17, 2023

I don't think this can be used for checkerboards.

Indeed, this can only be used to draw grids. Still, this may come in handy for prototype textures when you don't want to reach out for https://godotengine.org/asset-library/asset/780.

@MewPurPur
Copy link
Contributor Author

Changed it up, the new implementation forces it to be a square, making it more alike radial textures (it can still be a rectangle if you resize the texture)

image

image

@MewPurPur MewPurPur marked this pull request as ready for review April 20, 2023 14:35
@MewPurPur MewPurPur requested a review from a team as a code owner April 20, 2023 14:35
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally (rebased against latest master 06ccbfe), it works.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.1 May 29, 2023
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems tiny, useful, and tested 👍

@YuriSizov YuriSizov merged commit c5e9892 into godotengine:master May 29, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@MewPurPur MewPurPur deleted the square-gradient2d branch May 29, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a square fill mode in GradientTexture2D
3 participants