Open ghost opened 1 year ago
Curiously the game shows the character properly wiith upscaling on MelonDS (which is notorious for having many misaligned texture issues on other games).
In addition, this issue still happens on PPSSPP even with software renderer enabled:
Just to confirm, a PSP does render this frame dump properly:
Vulkan gets it right too, but only at 1x. I explain here why it's problematic to handle these cases at higher resolutions: https://forums.ppsspp.org/showthread.php?tid=13556 For this game, it might be better to just use an upscaling shader instead of a higher render resolution.
Anyway, in software it draws the face like this:
It's a triangle strip rectangle, in transform (3D) mode, and the coordinates are not very accurate: | X | Y | Z | U | V |
---|---|---|---|---|---|
300.687500 | 87.000000 | 10000.000000 | 151.978500 | 88.387581 | |
332.625000 | 87.000000 | 10000.000000 | 183.454727 | 88.387581 | |
300.687500 | 118.937500 | 10000.000000 | 151.978500 | 119.984131 | |
332.625000 | 118.937500 | 10000.000000 | 183.454727 | 119.984131 |
If I disable Rasterizer::DetectRectangleFromStrip()
, it draws correctly, so this must be some issue with the math specifically in DrawRectangle when S/T aren't even.
As I described in the posted link, this is a case of "bad math." Software is a bug, but hardware at 2x is just doubling all the coordinates. Snapping to pixels will make 3D graphics look worse at higher render resolutions.
Screen positions are 31.9375x31.9375 from a texture that's 31.476227x31.59655. That should end up close enough (it seems) at 1x, but the higher the resolution, the more those diverge.
-[Unknown]
Vulkan gets it right too, but only at 1x
On 1x there is a rectangle below her mouth for some reason... I tried to capture it but it's not that easy as well(you can notice it if you squint hard enough) , it only happens when her mouth flaps move though. This is on the latest PPSSPP I just recently updated.
To me, that just looks slightly off-color, I wonder if it's a slightly different bitdepth and dither/etc. solves it on actual hardware. Does that happen in the software renderer?
-[Unknown]
To me, that just looks slightly off-color, I wonder if it's a slightly different bitdepth and dither/etc. solves it on actual hardware. Does that happen in the software renderer?
-[Unknown]
No the coloring seems fine there.
Now I found another issue with one of the logos in the intro.
There is an additional black line you can notice at the right corner next to the logo.
Also uploaded a frame capture here as well: ULUS10495.zip
I believe #16241 fixes all the software renderer issues noted here.
Looking more closely at Vulkan, you're right that it's rendering this wrong - even with anisotropic set to off. It seems like it ends up sampling or drawing slightly outside where it should. This might still be tricky to fix due to the math concerns I mentioned, but I was hoping we wouldn't see issues of this at 1x...
-[Unknown]
Didn't tested this before, but currently it seems to render fine with x1 render res at least on vulkan and using the 2 dumps provided, it also works in software renderer, it can also be completely hidden by texture scaling, but this might depend on the resolution used, on my 4k TV only x6 texture scaling completely hidden it and we don't have that in official releases.
x1 render res vulkan
software renderer
x6 xBRZ texture scaling(probably less is enough for smaller res)
Texture replacement would probably be the best way to deal with(I mean for the end user, not a weird built-in workaround). At least assuming the actual game isn't running on some emulator and replacement is usable.
Loked at the actual game now and found some BS happening here:
some original textures of this character face have missmatched colors in PSP version, this is probably caused by using incorrect resizing software that messed up color palete while porting to PSP and this is what causes noticeable seams with some expressions in x1 render res.
an example of color difference on part of the cloth between different textures(taken from original unmodified textures of different face expressions)
The only way to "fix" it is to mod those textures correcting colors in them(Edit: althrough LCD persistence shader can minimize it to the point of not being seen, potentially why this was good enough for release).
To work around the seams above x1 render res the usual work:
Game or games this happens in
ULUS10495 Metal Slug XX v 1.01
What area of the game
When you are going to the Combat School option in the game you could see that when the character sprite mouth moves.
What happens
There is what some people call "misaligned texture" around the mouth area. You can see it here:![unknown](https://user-images.githubusercontent.com/33392696/181906755-97c7f033-2002-4077-b494-7ac386208626.png)
What should happen
There should be no issue with the graphics there. Note: You can still notice this happens even without upscaling its just less obvious. Also , this happens on both Vulkan and OpenGL.
GE frame capture
ULUS10495.zip
Platform
Linux / BSD
Mobile phone model or graphics card
AMD Radeon 530/Intel UHD 620
PPSSPP version affected
1.13.1
Last working version
No response
Graphics backend (3D API)
Vulkan
Checklist