-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
A strange bar appears when using a viewport with pixel art #70962
Comments
Can you reproduce this after enabling Resizable in the project settings? This likely occurs because the window is 10 pixels shorter when Resizable is disabled, causing its aspect ratio to be different. As a result, to avoid distortion, the image will not be able to span the whole window. |
Oh, oops, haha, I guess that updates here, too. I have the same problem, and it isn't impacted by enabling resizable, either. I have clarifying information about this issue! From my own experiences with this issue, we are seeing a black bar at the top and bottom of the viewport, and the window itself gets a little larger, too. What it kind of looks like, to me, is that enabling borderless mode results in the window attempting to resize itself to approximate what the "whole window size" was, before. So like, rather than resize itself to be the viewport size, it tries to resize itself to be (near) the size of the window, including the borders and window title bar. This resizing seems to increase the window size by about Vector2i( 6, 29 ), and the fix that I implemented that works for my project is confirmed to work consistently across multiple machines. This seems to be true of the game in the screenshot by @lorenzo-arena - 586x650 seems to be the correct viewport size. So at least in Windows 10, borderless mode adds a specific amount to the window size. |
Godot version
4.0-beta10.mono
System information
Windows 11, Ryzen 3700U Vega 10 iGPU
Issue description
When using a viewport container for pixel art, a strange black band appears at the bottom of the game if borderless mode is used.
Steps to reproduce
Minimal reproduction project
flappy-bird.zip
The text was updated successfully, but these errors were encountered: