-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Tony Hawk mipmapping problems on Android, leading to blurry textures. #9772
Comments
Soap? Nightgown? Automatic translation? :) Yes these games have problems, but mostly they just crash after a while, didn't know there were texture issues too. Screenshots? |
I guess by soap he ment "washed out", some problem with mipmaps starting from #9678 causes that game to use very tiny textures(I mean they're still same size, but game uses tiny mipmaps for things that are close). |
Is that at 1x? I guess we could bias mipmaps by something, not sure if it'd need it. -[Unknown] |
Rendering resolution doesn't really affect it ~ texture scaling does since the mipmaps get generated from higher res texture, both of those screenshots were made without it through / using same settings. |
@unknownbrackets if it was resolution related, you'd expect the mipmaps to be wrong the other way around (too sharp relative to the real thing). So this is probably some unhandled case or bug in the mipmap bias/const code. |
Yeah, I realized it was the opposite problem right after and edited. D'oh. What are the mipmap settings it's using to render the shrubs? If it's using something like AUTO+4, then previously we were not using the bias, and now we correctly are... does it also look the same in the software renderer? If it looks fine in software, it's probably another generated mipmap issue... -[Unknown] |
SoftGPU looks same ~ buggy, here's a texture tab from one of the affected textures:
The game also uses "auto + bias: -0.500000", but on characters textures and those look correct. |
Okay, so there's definitely more to slope (as in #8481.) We could disable it for now, but I'd like to better understand what it's calculating based on. It's good there are samples now. Maybe we can test using the GE recorder when it's in... -[Unknown] |
Yeah, it would be awesome to be able to play back the GE recorder traces on an actual PSP as well... |
Should be doable - that's why I'm allocating everything into PSP RAM. I thought about doing it as an ELF, but the trouble is, then it's a pain to replay a recording in PPSSPP. Anyway, it should be doable the same way. -[Unknown] |
|
I have also this problem |
You guys with black stuff problems, what Android devices do you have? |
xiaomi mi5s plus, I noticed that under the adreno emulator is less optimized |
My android device is Samsung Galaxy NOTE_3 |
But in old versions that have a mipmap option working fine |
Thanks for the info. Black textures is usually OpenGL's way to warn about an incomplete texture (like, not all specified mip levels uploaded). We did make some changes to the mipmap code so there might be some new edge cases? |
I've added more questions to #9733 - should discuss textures showing as black since the mipmap changes there instead. This issue is (potentially) separate. -[Unknown] |
This is actually same on all platforms. I was testing it above on PC. The only workaround currently is to enable texture scaling since that's the last way available without modifying PPSSPP to disable mipmapping. Maybe a good solution would be to restore mipmap setting as a compat.ini and force disable it for this game? Edit: Oh, there was one change I missed - Vulkan shows high res textures without anything. Different mipmap code? |
Actually I think I'm gonna go for a different approach - I'm gonna disable the LOD bias in "slope mode" which this game uses for mipmaps. Using the direct slope as a bias is wrong anyway. |
From further testing, the slope calculation is close to this: detail = TexLog2(2.0f * w * gstate.getTextureLodSlope()); Note: if w is 1, this is effectively identical to the previous formula (with some minor mantissa difference possibilities), but 2.0f was simply moved inside with the other multiply. Where w is the projected w. Initially interpolating a flat w (just using the projection matrix to map z into w was the simple way to control it pretty easily) produces values that are close, but still wrong. For example, with a slope of 23.0f and a w of 0.1f, you get But there's more to it: using my w adjusted (but entirely flat) triangle, AUTO is also producing invalid values. In my case, AUTO + 0x70 should produce 0x63, but instead produces 0x61, though 0x62 with the correction below. In this case, it's That said, I'm thinking AUTO should be Anyway, using this not-quite-accurate formula with a hacked together w interpolate produces this: Which has about the right arcade sign, so I do think it's close. -[Unknown] |
Two games Tony Hawk undeground 2 and project 8 on version 1.4.2 started with soap instead of textures experienced on several nightgown.
version 1.3.0.1 everything is fine with the texture but not so smartly all on a fresh version
The text was updated successfully, but these errors were encountered: