-
Notifications
You must be signed in to change notification settings - Fork 117
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
Scaling viewport appropriately #111
Conversation
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.
This works great! Thanks so much for this.
I actually think I have a decent solution for improving the GUI scaling but will make that a separate commit.
I'll be very curious to see the solution! If you can explain it I'd also be happy to have a shot at implementing it. |
I've included it in 003d035 It's not pixel perfect, noticeably reduces the aliasing that was present beforehand, making it a "good enough" option in my book. |
@Phazorknight It will actually change the viewport render resolution to be whatever you scaled the window to, and has the canvas items render layout reflect that to be similar to the requested resolution. To demonstrate what I mean, here's a fullscreen screenshot of me allegedly running at 320x180, with the window resized to my screen resolution at 2560x1440 with the So really, the game is rendering at 2560x1440, despite my requested resolution at '320x180'. And just for fun, here's the same situation, however it's running with the |
Darn it. 😖 I'll reopen the issue and will undo the project stretch mode setting. |
@Phazorknight Yeah, I really was disappointed as well. Would've been nice for Godot to just... support pure 2D scaling like that. 😭 |
When you change your resolution, this PR makes it actually change the Viewport's render resolution, for both 3D and UI.
This means when you choose 1920x1080, you will actually be rendering at 1920 x 1080 (unless you change your render scale, then your UI is rendering at 1080p, but your 3D is rendering at the specified scale :P)
This includes @grgp's changes at #90 for GUI scaling, which while I think less necessary now with the display resolution rendering scaling up the UI better, @grgp's GUI scale slider makes it so people can choose what size they're comfortable with.
Worth noting, the GUI scale slider will not change the rendering resolution of the UI, merely just scale up or down the pixels that are already there. Without doing a whole SubViewport thing, or greatly sacrificing 3D rendering, best I can tell this is not possible.
Addresses #81