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

Round AtlasTexture size #101342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jan 9, 2025

Fixes #101341

The image size uses integer vector, so the region needed some special handling. There are various solutions, I went with adding a second Rect2 with rounded size. Keeping the original float value makes the property editing more intuitive (because Rect2 size is edited as float vector) and works better with region editor.

@KoBeWi KoBeWi added this to the 4.4 milestone Jan 9, 2025
@KoBeWi KoBeWi requested a review from a team as a code owner January 9, 2025 13:14
@arkology
Copy link
Contributor

arkology commented Jan 9, 2025

#101341 :)

I think margin size should also be rounded. not necessary.

@arkology
Copy link
Contributor

arkology commented Jan 9, 2025

Interesting, is it possible to do the same without adding new variable?

@KoBeWi
Copy link
Member Author

KoBeWi commented Jan 9, 2025

Yes, but it involves rounding the size every time you want to use it. I think it's better to do it once.

I think margin size should also be rounded up.

It doesn't print any errors and has no conditional behavior. Seems fine as is.

@akien-mga akien-mga changed the title Round Atlastexture size Round AtlasTexture size Jan 9, 2025
@KoBeWi KoBeWi force-pushed the roundabout_solution branch from a1fdc43 to 4c5a495 Compare January 10, 2025 14:33
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.

Round region and margin size of AtlasTexture to integer
2 participants