-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Improve grid lines visibility on higher resolutions #30117
base: master
Are you sure you want to change the base?
Conversation
/// <remarks> | ||
/// Unless resolution is high enough, in which case thickness will remain the same. | ||
/// </remarks> | ||
protected float GetLineWidth() => Math.Max(DrawWidth / ScreenSpaceDrawQuad.Width, 0.4f); |
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.
On the master screenshot, the lines are all the same size, on the PR, the lines have varying thickness which looks bad (at least when zooming the image to native resolution on 1080p screen).
Maybe having the lines always be an integer pixel size would fix this issue. 1px on 1080p, scaling up to 2px, 3px, etc. when necessary.
First check if 2px size looks good at 4K!
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.
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.
As proposed
Seems like my lower bound isn't low enough. In that case we can increase thickness only for 4k. |
Closes #30072
Currently grid line thickness remain the same across all resolutions by adjusting it's draw size so that it's screen-space size is always 1px. In this pr I've added a lower limit so with higher resolutions (2k-ish and higher) thickness will be 2px.
Comparison at around 4k: