PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.51k stars 1.6k forks source link

[BUG]: Hardware mipmapping is not working properly in some games using it. #5347

Open ghost opened 2 years ago

ghost commented 2 years ago

Describe the Bug

When using the hardware render, some game which will makes use of mipmapping will not match the expected output.

Reproduction Steps

Load any of the games mentioned in this issue and see the problem with mipmapping being off.

Expected Behavior

The mipmapping handling should be accurate to what the software render or real console produces.

PCSX2 Revision

v1.7.2242-1-g8db0b5282

Operating System

Windows 11

If Linux - Specify Distro

No response

CPU

I9 9900K

GPU

RTX 3070

GS Settings

Basic or full mipmapping for the games that uses it.

Emulation Settings

No response

GS Window Screenshots

Logs & Dumps

GSdump of the various games affected by this: https://drive.google.com/file/d/17iLSSfB9uEoXDjhUHENZLTFKvudsYGgr/view?usp=sharing

refractionpcsx2 commented 2 years ago

I will just point out that SW mipmapping, especially in 64bit doesn't work properly either.

Ratchet & Clank and Jak are pretty much fine with mipmapping and they require it to look correct, otherwise the screen would be full of garbage. But when comparing HW to SW it's also better to compare native not upscaled, because you're improving the quality of the textures artficially. Also consider using Trilinear Filtering under the hacks section as that's kind of a component of Mipmapping also and could make a difference..

ghost commented 2 years ago

Yeah, I admit I kinda rushed those screenshots. But I tested with the 32bit PCSX2 and native resolution and it's the same, the main problem regarding Ratchet and Jak is that mipmapping on hw lacks that sort of "smooth" transition which is hard to show with a simple picture.

refractionpcsx2 commented 2 years ago

That's what the Trilinear filtering does.

ghost commented 2 years ago

I did put it on ultra and for some reasons, Ratchet Jak and Ghost recon all do not improve with that option regardless of the render as you can see.

https://user-images.githubusercontent.com/90222976/149662571-60a74120-d5f8-4186-b676-12d2ee97a13a.mp4

refractionpcsx2 commented 2 years ago

was that Mipmapping forced to Full and Trilinear on Ultra?

ghost commented 2 years ago

Actually I had to put the mipmapping on full, trilinear on Ultra "and" enabling preload frame data in order for the grass to properly work.

However there will still be issues with distant textures:

image

refractionpcsx2 commented 2 years ago

ah yes the GPU Palette Conversion made have an effect on it also as it toggles between automatic and manual mipmaps.

refractionpcsx2 commented 2 years ago

However if the Mipmapping is broken, GS Dumps would be appreciated.

ghost commented 2 years ago

I included the GSdump in the issue template. Actually I will do a round up of my games to check if any others have problems with mipmapping.

ghost commented 2 years ago

Okay, I revamped the issue to more closely match what happens, a few games definitely have issues with it, but a lot less than what I expected thanks to refraction's suggestion.

Those are the GSdumps of the games that for sure have a problem with hw mipmapping: https://drive.google.com/file/d/17iLSSfB9uEoXDjhUHENZLTFKvudsYGgr/view?usp=sharing

As a side note, why do we have basic mipmapping/trilinear filtering despite them not actually being faster in any cases? Also, the end user might easily miss that trilinear filtering option, why not enabling that together with the mipmapping directly in the GSDX code?

stenzek commented 2 years ago

As a side note, why do we have basic mipmapping/trilinear filtering despite them not actually being faster in any cases? Also, the end user might easily miss that trilinear filtering option, why not enabling that together with the mipmapping directly in the GSDX code?

It is faster. Basic generates mips on the GPU, full reads, expands and uploads them from GS memory.

ghost commented 2 years ago

Ahhh, so it is a sort of hardware or software implementation if I understood correctly?

ghost commented 2 years ago

Jak 2 can be included in that "meta":

gs_20220116160502

Jak 2 mipmapping issues hardware.zip

kazuya-555 commented 1 year ago

Vulkan API R&C euro platinum version

The mipmap levels seem obvious regardless of settings, except if I set mipmaps and trilinear to max, then there`s slightly higher blending.

I watched videos of the PS3 HD version, and the mipmap levels seem less obvious than that, unless they are improved from the PS2 version. Like with the sewer lights on Pokitaru that use a grid effect at a distance while with PCSX2, they`re drawn later.

Those other supposed issues I mentioned are also with the PS3 HD version, should of compared before typing something.

I also notice shimmering or highlighting of some 2d details when rotating the camera. I tried different settings and native resolution, here`s a example of it.

randc

The credits section also uses half pictures unless using software mode.

ratchet
TheTechnician27 commented 2 months ago

Scooby-Doo! Night of 100 Frights_SLUS-20349_20240623110121.zip Night of 100 Frights has a seemingly small SW mips issue here.