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

Textures missing detail. (Mipmap?) #17891

Closed
5 tasks done
Saramagrean opened this issue Aug 11, 2023 · 13 comments
Closed
5 tasks done

Textures missing detail. (Mipmap?) #17891

Saramagrean opened this issue Aug 11, 2023 · 13 comments
Labels
GE emulation Backend-independent GPU issues Texture replacement
Milestone

Comments

@Saramagrean
Copy link
Contributor

Saramagrean commented Aug 11, 2023

Game or games this happens in

Toukiden Kiwami.

What area of the game

In-game.

What happens

Textures is missing detail with ktx2 format. It happen on Vulkan and D3D9/11 backend only, OpenGL is look fine.

NPJH50878_00017

What should happen

Should rendering texture detail correct with ktx2 format like OpenGL backend.

NPJH50878_00016

GE frame capture

I tried but seem like can't capture textures missing detail issue.

DUMP.zip

Platform

Windows

Mobile phone model or graphics card

Intel HD Graphic 520.

PPSSPP version affected

v1.14.4-941-g37c1e17dc

Last working version

v1.14.4-938-ge6ceaa541

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try changing graphics settings to determine if one causes the glitch (especially speed hacks or enhancements/replacements.)
  • Include logs or screenshots of issue.
@hrydgard
Copy link
Owner

Turn up anisotropic filtering to max, and it should look better. Mipmapped textures need that to look sharp at angles like that.

@Saramagrean
Copy link
Contributor Author

Saramagrean commented Aug 11, 2023

I use default settings, anisotropic filtering is already set to 16x but textures still missing detail.

btw I convert png to ktx2 format without mipmap for save more space. 😅

for %%f in (*.png) do (
basisu "%%f" -ktx2
)

@hrydgard
Copy link
Owner

Well on the screenshot it does look like mipmapping without anisotropic filtering is happening(and possibly with a wrong detail bias)! Very odd...

@bslenul
Copy link
Contributor

bslenul commented Aug 18, 2023

Tested out of curiosity using https://github.com/Saramagrean/TKD_KWM-HD-Texture-Pack

Unlike OP I'm getting the same results with any renderer, including GL 🤔

Without custom textures:

image

Textures in .ktx2 format:

image

Textures in .png format:

image

So looks like it's an issue with .ktx2 format?

The aniso setting doesn't seem to change anything for me, no difference between off and 16x (with or without custom textures), idk if I'm doing anything wrong or if it depends on the games but it's been a while: https://forums.ppsspp.org/showthread.php?tid=27860

@hrydgard
Copy link
Owner

In the png case it's clear that it gets a bit grainy in the distance, so presumably there are no mipmaps being used there, leading to the sharpness:

image

While the KTX2 case sure look mipmapped (without aniso, for whatever reason) to me, despite @Saramagrean saying they're not used...

@bslenul
Copy link
Contributor

bslenul commented Aug 18, 2023

Ah yeah indeed, when I type basisu -info room35.ktx2 for example I get this:

Mipmap Levels: 10

😅

Also just noticed but there's ignoreMipmap = true inside textures.ini, is this not working or does it have another purpose than the name suggests?

@hrydgard
Copy link
Owner

hrydgard commented Aug 18, 2023

ignoreMipmap there is only for the purpose of saving images (whether to save mipmaps in separate little files)

@hrydgard
Copy link
Owner

I have found a bug though, we fail to enable aniso in the case of replacement textures with mipmaps. I'll fix that.

@bslenul
Copy link
Contributor

bslenul commented Aug 18, 2023

ignoreMipmap there is only for the purpose of saving images (whether to save mipmaps in separate little files)

Ah I see! Thanks for the explanation.

I have found a bug though, we fail to enable aniso in the case of replacement textures with mipmaps. I'll fix that.

Nice, at least I didn't waste your time for nothing with my questions :p

@hrydgard
Copy link
Owner

#17930 should take care of it.

Thanks for asking the questions - when something looks wrong, there often is something wrong :)

@hrydgard hrydgard added this to the v1.16.0 milestone Aug 18, 2023
@hrydgard hrydgard added GE emulation Backend-independent GPU issues Texture replacement labels Aug 18, 2023
@hrydgard
Copy link
Owner

Please test build 1074 or later once they appear on the buildbot.

@bslenul
Copy link
Contributor

bslenul commented Aug 18, 2023

Looking good here 👍

image

@hrydgard
Copy link
Owner

Great, thank you for testing!

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 Texture replacement
Projects
None yet
Development

No branches or pull requests

3 participants