PCSX2 / pcsx2

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

Spider-Man 2 (U) Texture miscoloring-flickering GSdx HW renderers #775

Closed bositman closed 2 years ago

bositman commented 9 years ago

Continuing from https://github.com/PCSX2/pcsx2/issues/649

PCSX2 version: 1.3.1 GIT https://github.com/PCSX2/pcsx2/commit/70990002d871bae8b2c2fdc48661453a54237638

-PCSX2 options: Defaults

-Plugins used: GSdx, SPU2-X, Lilypad, Linuz ISO/Gigaherz CDVD,rest null plugins

-Plugin settings: Defaults, tested with native, scaling, opengl depth, all accurate options, accurate date, nothing affected the issue.

-Description: When using GSdx OpenGL/D3D11 Hardware backend textures of everything rendered look garbled and flicker with different colors (distant buildings, ground you walk on, character model etc). D3D11 is a bit worse but looks like the exact same issue. Also missing the map

OpenGL and D3D11 Software renderers both work fine (if you see stuff pop-in and out of view, it's the wide screen patch)

-How to replicate: Enter ingame and move the camera a bit

-Last known version to work: -

-PC specifications: CPU: Intel Core i5 2500K @ 4.3Ghz GPU: Gigabyte Geforce GTX660 Windforce OC 2 GB OS: Windows 7 SP1

Software renderers: pcsx2 2015-08-20 01-37-44-74

Hardware renderers (although the issue is much better visible when moving the camera): pcsx2 2015-08-20 01-37-41-37

GS dump: http://bositman.pcsx2.net/dumps/spiderman2-texture-issue.rar

refractionpcsx2 commented 9 years ago

That looks like Mipmapping issues, do they solve themselves as you get closer?

as for the map/compass, not sure what causes that.

bositman commented 9 years ago

That was my initial thought as well. Some do get better (probably even perfect) when you get very close, but some others that have lots of garbage, like the one at the right on the screenshot don't. Edit: Yeah after disabling mipmapping in SW mode I get the same effect as in HW mode in some buildings, so this is definitively one of the issues seen here. Edit2: Well mipmapping is the least of the issues it seems.

Screenshots:

SW mipmapping on: pcsx2 2015-08-20 02-28-33-14

SW mipmapping off: pcsx2 2015-08-20 02-28-34-88

HW: pcsx2 2015-08-20 02-28-19-44

As you can see, only some minor stuff are fixed by mipmapping on

refractionpcsx2 commented 9 years ago

I thought the ones on the right looked the worst to be honest, maybe it's just lucky bad textures which seem to fit :p

gregory38 commented 9 years ago

I did look at a gsdump but I don't remember the outcome :( Is it better if you disable filtering?

bositman commented 9 years ago

Nope, no difference.

NikolaTT commented 8 years ago

Really sad to see this issue persisting for so long. Is it possible to help fixing it somehow (dumps etc)?

escape209 commented 8 years ago

@NikolaTT I wouldn't think it would be an easy issue to fix. There would have to be a complete rewrite of GSdx, something which I'm gonna guess @gabest11 would understandably not feel like doing anytime soon.

refractionpcsx2 commented 8 years ago

As far as I know this is mipmapping, support for which in hardware mode will be extremely difficult to pull off and there are higher priority problems to fix at the moment, before we even consider implementing it.

FlatOutPS2 commented 8 years ago

Nope. Mipmapping off(even in SW) is actually good in this game because it makes the objects in the distance look much nicer. There are many issues in this game, including some depth issues, mipmapping isn't part of the major issues.

refractionpcsx2 commented 8 years ago

hmm right, I always thought it was mipmapping, it looks very like it.

I presume DX11 and OGL look the same, regardless of settings?

FlatOutPS2 commented 8 years ago

I presume DX11 and OGL look the same, regardless of settings?

Yeah. No OGL fixes for this one. I believe changing VU round mode does influence it a little. Setting it to negative definitely makes the sun issues worse.

You can see the map at the bottom right hidden behind the building in HW in the GS Dump image in the first post here. The streets on the map are missing in DX11, but that was fixed with hardware depth of OGL.

MrCK1 commented 8 years ago

Maybe this is similar to the corrupted squares in Guitar Hero 3; which are also not affected by mipmapping?

gsdx_20160621002409

ramapcsx2 commented 8 years ago

I'd still say Spiderman is some form of mipmap problem. That it doesn't look bad in software when mipmapping is off doesn't exclude this. It looks like in hardware it's pulling totally wrong textures while in software it's just always pulling the high resolution version.

NikolaTT commented 8 years ago

Is it possible to force the game to use the high res versions in hardware mode?

refractionpcsx2 commented 8 years ago

The GH3 problem is a texture mapping issue I believe. I don't think that uses mipmapping.

gregory38 commented 8 years ago

I think both issue is that a texture got wrong data. It is more or less to the texture cache. I will an hidden option in a couple of minutes to clear an input texture to some values, so it would be easier to spot those issues.

gregory38 commented 8 years ago

Edit: I'm not sure the option will be useful. For GH3, the game renders data into a GPU framebuffer and then read back it with an offset. Unfortunately a new texture is uploaded from the GS memory whereas the real data is inside the framebuffer.

refractionpcsx2 commented 8 years ago

I wonder if spiderman does the same

gregory38 commented 8 years ago

I don't remember but I think it is something close. But it could be any of the thousand texture memory trick not emulated.

NikolaTT commented 8 years ago

Is there a way for us to help pinpoint the problem and potentially have it fixed?

gregory38 commented 8 years ago

Well, there are severals issues. And it is partially related to mipmapping. So it is quite hard to debug.

And main issue could be related to this kind of read back.

T:Oth   ID:1804 S:Info  => TC: Lookup Target(Color) 1280x1024, miss (0x2d60, F:0x0)
T:Oth   ID:1804 S:Info  => TC: src miss (0x2d68, F:0x13)
T:Oth   ID:1807 S:Info  => TC: Lookup Target(Color) 1280x1024, hit: 241 (0x2d60, F:0x0)
T:Oth   ID:1807 S:Info  => TC: dst Color hit (full): 241 (0x2d60, F:0x13)
T:Error ID:1807 S:Mid   => Reading RT as a packed-indexed 8 bits format
T:Error ID:1810 S:Mid   => ERROR: Source and Target are the same!
T:Oth   ID:1810 S:Info  => TC: Remove Src Texture: 243 (0x2d60)

Here an example of texture before those draw calls (texture size is 32x32) spiderman

It is already a miracle that you have a kind of image for the game.

Temflakes403 commented 6 years ago

Well, I was trying to run it and see what was happening, so I used PCSX2 1.5.0(v1.5.0-dev-2561-g8acc319a4), Direct3D 11 and a GeForce GTX 1050ti to test it. It would not show any image on 3x, but the audio told me it would just really slo down, might have the GPU to blame here. On both 2x and 4x it would show image, but the textures would still look very fucked up whether Mipmapping was turned on or not, the problem was really with HW mode since SW worked perfectly, and it also slowed down, so again, might be the GPU on that front. The anisotroic filtering was always at 16x.

crizzy0213 commented 4 years ago

if i run it in software mode the graphics are better but the performance is slowed down, so i set it to 4 rendering threads, configured the shader settings - scanline filter, Disabled FXAA, Shade Boost disabled, and everything is running fine, just saying how it worked for me

RedDevilus commented 4 years ago

Tested on 1.6.0 and 1.7.0 dev 18 with default settings and with native + other upscaling methods.In HW mode u cant set the upscaling too high and the issue is still there. Buildings and other 3D models flickering like crazy, textures broken. SW mode runs great and looks good too HW image

SW image