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

Add new texture filtering mode "Auto Max Quality" #14789

Merged
merged 2 commits into from
Sep 6, 2021

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Sep 2, 2021

When enabled, tweaks texture filtering for best quality (in a huge majority of games, at least).

It does this by enforcing mipmapping and minification filtering, enforces anisotropic filtering for all mip selection modes (if that's separately enabled) and (if the backend supports it, currently Vulkan) autogenerates mipmaps.

This looks nice and flicker free in most games without any additional tweaking, including GTA and Burnout which have long been painfully flickery in the distance due to undersampling.

Needs a bit more testing before merge, and will add mip gen to more APIs.

Also, maybe this should have a different name, though "Auto Max Quality" is at least pretty descriptive.

Fixes #13888

…ering for best quality.

It does this by enforcing mipmapping and minification filters, and
always autogenerates mipmaps and enforces anisotropic filtering for all
modes (if that's separately enabled).

This looks nice and flicker free in most games without any additional
tweaking, including GTA and Burnout which have long been painfully
flickery in the distance due to undersampling.

Needs a bit more testing before merge, maybe.

Fixes #13888
@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Sep 2, 2021
@hrydgard hrydgard added this to the v1.12.0 milestone Sep 2, 2021
Comment on lines 757 to 759
if (maxPossibleMipmaps != maxLevelToGenerate) {
maxLevelToGenerate = maxPossibleMipmaps;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the check is not needed :)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, I only had it so I could set a breakpoint there, while debugging it.

@ghost
Copy link

ghost commented Sep 3, 2021

Texture MAX Size is also a good name?

@Narugakuruga
Copy link
Contributor

Test result are very impressive.
some UI stuff are unimplemented. If change the texture filter in Windows menu, it give an error.

Copy link
Collaborator

@unknownbrackets unknownbrackets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I think the only case where we wouldn't want to do this is when the mip levels are the same size, which is a different problem anyway.

Should we change the default? A lot of games don't use mipmaps, but likely only for space reasons. I haven't tried this yet, but I'd expect it to be a universal improvement.

-[Unknown]

Windows/MainWindowMenu.cpp Show resolved Hide resolved
@LunaMoo
Copy link
Collaborator

LunaMoo commented Sep 4, 2021

Didn't had time to try it yet, but how special cases like #6357 are handled?

@unknownbrackets
Copy link
Collaborator

No worse than now. Ultimately, because those cases (Tactics Ogre was another) don't have mip sizes of decreasing size, we detect that they're invalid for use as mip levels. In those cases, I think we'll force mipmaps off. So it won't be changed by this pull.

-[Unknown]

@hrydgard hrydgard marked this pull request as ready for review September 6, 2021 22:58
@hrydgard
Copy link
Owner Author

hrydgard commented Sep 6, 2021

It's got positive effects even without the extra mip generation on the non-vulkan backends, so I'm gonna merge as is and add the mip generation later.

@hrydgard hrydgard merged commit b5e8e22 into master Sep 6, 2021
@hrydgard hrydgard deleted the auto-max-quality-texfilter branch September 6, 2021 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a setting for mipmapping
5 participants