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

fix: point-filter window for even DPI factors #45

Merged

Conversation

zao
Copy link
Contributor

@zao zao commented Mar 23, 2024

We emulate DPI scaling by drawing to a smaller render target and scale it up with bilinear filtering to the desired DPI scale factor configured in the OS.

Windows seems to do crisper point filtering (nearest neighbour) for scale factors that are multiples of 100%.

This commit alters our behaviour to select the filter mode based on the DPI scale factor, opting for point filtering for non-fractional scaling.

We emulate DPI scaling by drawing to a smaller render target and scale
it up with bilinear filtering to the desired DPI scale factor configured
in the OS.

Windows seems to do crisper point filtering (nearest neighbour) for
scale factors that are multiples of 100%.

This commit alters our behaviour to select the filter mode based on the
DPI scale factor, opting for point filtering for non-fractional scaling.
@LocalIdentity LocalIdentity merged commit 23a0c59 into PathOfBuildingCommunity:master Mar 23, 2024
@zao zao deleted the fix/integer-dpi-scaling branch March 28, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants