-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Update texture_atlas example with different padding and sampling #10073
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice stuff! Good docs, simple and clean code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two requests:
- I have to resize the window to view all of the images. Everything should fit into the default window size.
- It would be good to have a label for each of the piggy shopkeepers detailing the filtering and padding that has been applied to their sprite.
Otherwise an excellent first contribution, does exactly what we wanted.
Add labels to indicate the different settings Co-authored-by: davidasberg <[email protected]>
Added the requests mentioned above. The example should now fit in the default window size, and labels are added to display the different settings, see image below. Since it seems like text2d is broken on main I had to merge with #9708 to test the labels. I manage to get the text to show, but got some artifacts which shouldn't be present when text2d works properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not rereviewing earlier, the changes are exactly what I asked for. Looks great now.
Text2d
works again I think, so once you've merged with main this is ready to go.
Ignore my remaining comments if you like, they are only stylistic and not blocking at all.
CI is failing: fix that up and I'll merge this in for you <3 |
Objective
Solution
Updated the texture_atlas example by adding 4 different texture atlases:
Now renders one padded and one unpadded texture atlas, and the same upscaled sprite from each of the new texture atlases. See the screenshot below (taken on 1080p monitor).
From left->right: linear no padding, nearest no padding, linear padding, nearest padding.