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

Enable high resolution UI artwork and remove DisableWindowsDPIScaling. #17581

Merged
merged 11 commits into from Jan 26, 2020

Conversation

@pchote
Copy link
Member

pchote commented Jan 12, 2020

This PR takes the groundwork laid by #17489, #17494, #17495, #17504, #17506, #17509, #17511 and gives us some rewarding features to justify the hard slog. The changes here should noticeably improve rendering quality on systems with more than 96 / 100% DPI. This also implements most of the remaining work towards #10382.

The first few commits fix issues that become obvious at fractional scales, and allows UI sprites (icons, color pickers) to be cleanly rendered (which should also help with #16709). The final two commits enable our new higher resolution UI artwork, and finally removes the DisableWindowsDPIScaling workaround that made everything blurry for many Windows players.

This can be tested on Windows by running the game with different system DPI scales. It can be tested on Linux by launching with fractional OPENRA_DISPLAY_SCALE values (e.g. 1.5). Testing on macOS can show that we correctly switch between different sheets when moving the window between standard and Retina Displays.

Followup PRs will enable higher resolution badge artwork (which needs to be coordinates with forum changes), add the UI Scale option to the settings, and enable automatic DPI detection on Linux.

@pchote pchote added this to the Next+1 milestone Jan 12, 2020
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Jan 12, 2020

These commits have already had a fair amount of testing on the rendertest builds that I have been sharing on IRC and Discord [1, 2, 3], so I am confident that there are no obvious issues on any specific OS.

@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Jan 18, 2020

21:38 <+pchote> btw i realized that i'm going to need to make a small but fundamental change to #17581 before its ready to review
21:41 <+pchote> with the legacy scaling mode the OS automatically scales the window sizes we ask for by the scaling factor, so what the game things is 1024x768 
                actually ends up giving a 1280x960 window in "real" pixels
21:41 <+pchote> which is good, because this is how things should work
21:42 <+pchote> but when we turn off the legacy scaling it turns that off, so when we ask for 1024x768 we get 1024x768, which has an effective resolution ingame of 
                only 819x614 - smaller than our minimum requirement
21:43 <+pchote> so need to change the window size code to build in the scaling factor on our side instead
@pchote pchote force-pushed the pchote:render-dpiscale branch from 3316e47 to 1c6baf7 Jan 19, 2020
@pchote pchote force-pushed the pchote:render-dpiscale branch from 1c6baf7 to 171e9d2 Jan 19, 2020
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Jan 19, 2020

Rebased and updated. This should now be ready to review.

@Mailaender

This comment has been minimized.

Copy link
Member

Mailaender commented Jan 21, 2020

Tested with custom fonts in a custom mod https://github.com/Mailaender/OpenHV and works fine. 👍

@pchote pchote force-pushed the pchote:render-dpiscale branch from 6497d1e to e394cab Jan 22, 2020
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Jan 22, 2020

Updated to fix a regression with the effective window size calculation.

@pchote pchote force-pushed the pchote:render-dpiscale branch from e394cab to af8e807 Jan 26, 2020
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Jan 26, 2020

Support power icons (both player and spectator) and annotation renderables (pips, repair glyph, etc) are all missing the antialiasing scale filter. I'm a bit disappointed that nobody noticed this issue with all the test builds I have put out 😢

@pchote pchote force-pushed the pchote:render-dpiscale branch from af8e807 to 0e091a0 Jan 26, 2020
@pchote pchote removed the PR: Rebase me! label Jan 26, 2020
@pchote pchote force-pushed the pchote:render-dpiscale branch from 0e091a0 to 9fbb244 Jan 26, 2020
pchote added 6 commits Jan 26, 2020
* 2x and 3x DPI artwork can be specified using
  Image2x and Image3x in chrome.yaml.
* Images are rendered using bilinear interpolation.
* For non-integer screen scales, prefer downscaling
  the next biggest resolution image over upscaling.
@pchote pchote force-pushed the pchote:render-dpiscale branch from 9fbb244 to 922f586 Jan 26, 2020
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Jan 26, 2020

Rebased and fixed. There were some non-trivial changes to the cursor handling thanks to #17592, and the antialiasing filter is now used for annotations and the two support power palettes.

@abcdefg30 abcdefg30 merged commit bf314fd into OpenRA:bleed Jan 26, 2020
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abcdefg30

This comment has been minimized.

Copy link
Member

abcdefg30 commented Jan 26, 2020

@pchote pchote deleted the pchote:render-dpiscale branch Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.