RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
14.91k stars 1.87k forks source link

[BCUS98281] Jak II HD Graphics Issues #8377

Closed JohnHolmesII closed 2 years ago

JohnHolmesII commented 4 years ago

Quick summary

Jak II is almost correctly rendered, however one of the remaining issues is the flashing of the sky.

Details

There is a hysterical amount of spam in the log about texture pitch. I tried all buffers, SRM, CPU blit, nothing has any affect. Not sure how important the details are, but this is something that seems to "decay". When you first get to the menu, you get a few seconds of correct sky. Then it starts flashing white. Then it turns into a disco show.

image

RPCS3.log RSX Capture Render docs

jeremybris commented 4 years ago

Jak 3 HD is the same. This issue reminds me of #7031 in its strobe effect.

kd-11 commented 3 years ago

Texture pitch issue was fixed some time ago when killzone HD videos got fixed. Retest and update.

JohnHolmesII commented 3 years ago

Same issue. Log spam is all the same too.

jeremybris commented 3 years ago

Here is an RSX capture and log of Jak 3 with the same bug.

jeremybris commented 3 years ago

This was almost fixed by v. 0.0.14-11619, PR #9613 ! Great job!

@kd-11 , since you have some regressions linked to this PR, I thought you may want to know about this, before you change anything back. Perhaps, this game can help in your understanding those regressions as well.

gamrXerus commented 3 years ago

Issue is still there. On Vulkan the flickering happens during the title sequence when I tested. However it doesn't seem to happen with OpenGL. The problem with OpenGL though, is that the ground is invisible or black. RPCS3 spams E {RSX [0x00c0fa0]} RSX: Invalid texture pitch setup, width=256, height=1, format=0xa5(0x85) OpenGL: Jak2 OpenGL Vulkan (sky flickering): Jak2 sky

RSX capture OpenGL: https://drive.google.com/file/d/1S-5_RhiRg8gdKtHSdLmT5j43TE0LEuia/view?usp=sharing RSX capture Vulkan: https://drive.google.com/file/d/1w_yR5HiRXfZbpOFJvIM6z_ZU2WCUsXkj/view?usp=sharing

chrisbrasington commented 3 years ago

This issue is active, but slightly different than first reported in June as the disco color strobe effect. Currently it is only a white flicker on the sky texture.

E RSX: Invalid texture pitch setup, width=256, height=1, format=0xa5(0x85) x1194

Did some digging and testing and regarding Jak2, this issue doesn't appear to be fixed by the fix for the killzone HD videos (assume you're talking #8568). I tested back at that version and latest.

Encountered the issue with Jak2 & vulkan at version:

0.0.11-10646, PR #8568 (color strobe effect) 0.0.14-11619, PR #9613 (white strobe effect) 0.0.15-12167, latest (white strobe effect)

BCUS98281_20210428220901_capture.rrc (at latest) log_0.0.15-12167-64a109d2 log_0.0.14-11619-22584fb2

rowedahelicon commented 3 years ago

Tested this with latest version 0.0.16-12331-046d029e Alpha, sky is still flickering and a number of smaller graphical issues occur as well. Running on Vulkan

gamrXerus commented 3 years ago

@kd-11 Did some regression testing today. It seems that the OpenGL backend displays correctly up to version 0.0.14-11605 but after PR #9613 the floor is black or transparent. 0.0.14-11605 screen01 PR#9613 screen02

kd-11 commented 3 years ago

@gamrXerus Please provide a capture of the issue.

gamrXerus commented 3 years ago

@kd-11 Here you go. RSX capture 0.0.14-11605 (floor ok) https://drive.google.com/file/d/1omO9yPXg_k6aR8LfqJqUpW4owzauXp3U/view?usp=sharing RSX capture PR #9613 (floor black) https://drive.google.com/file/d/1mp7JO5Cn5_rVqiSSkymC-uAxs0nX7VQL/view?usp=sharing

gamrXerus commented 3 years ago

@kd-11 Should I open a ticket for the regression, or tracking it here is fine?

kd-11 commented 3 years ago

Here is fine, the existing issue still needs investigation anyway and the resolution will be the same.

Gr33nLight commented 2 years ago

Hi, I am experiencing the same issue on Jack 3 as well. With OpenGL the sky flickering is gone but the floor is black in some parts. I am using version 0.0.17-12634-b928cb02 Alpha Do you guys have any updates on this? Or if its possible to have a rolled back version of the build made available to install.

gamrXerus commented 2 years ago

@Gr33nLight In the meantime, you can try the 0.0.14-11605 build while we wait for a fix. https://rpcs3.net/compatibility?b&p=23 23/01/2021 build date. You can download it there.

Gr33nLight commented 2 years ago

@Gr33nLight In the meantime, you can try the 0.0.14-11605 build while we wait for a fix. https://rpcs3.net/compatibility?b&p=23 23/01/2021 build date. You can download it there.

Thanks will do!

Zorklis commented 2 years ago

rpcs3_oIUYeoWSNu Sky flashing still not fixed. It's more consistently correct though (less random flashes) Also this issue isn't just for Jak 2 but also applies to Jak 3, not Jak and Daxter though

Decards commented 2 years ago

Hello :)

The sky is still disco, Still no fixes or workarounds ?

gamrXerus commented 2 years ago

PR #11062 fixes the black or transparent ground on OpenGL in my limited testing. Jak 2 should now be playable using OpenGL with no flickering sky or other issues :) . Thank you @kd-11. Before: 0.0.18-12947 jak2 After: PR #11062 Jak2 fixed

EmulationPundit commented 2 years ago

I tried playing on the older version like the others stated here in the comments, I even tried v0.0.14-11603 but on both version I still have the glitches on OpenGL.

I don't get how years has passed and the sky glitch + the transparency glitch hasn't been fixed yet. Seems like a small job to do but it's just a guess. If these two bugs would just get fixed then the Jak trilogy would be perfectly playable other than the small fps dips,

Zorklis commented 2 years ago

If these two bugs would just get fixed then the Jak trilogy would be perfectly playable other than the small fps dips.

The save/load problem would still be present

gamrXerus commented 2 years ago

@EmulationPundit That's strange. I played Jak 2 yesterday on Linux for 2 hours and had no major problems. I used the latest build of rpcs3 and chose OpenGL as my renderer. I tested it on Windows 10 too and the sky and floor are fine. I have an AMD RX6800. Try the latest build and use OpenGL and see if it works. Hope its not an NVIDIA problem. And just like Zorklis said the save/load problem is still there but it is minor. jak2okwindows

Zorklis commented 2 years ago

Hope its not an NVIDIA problem.

Tested on the latest Nvidia driver 496.49 (Windows 10) and have the same experience as @gamrXerus (No sky glitches).

Tested on GTX 1060 6GB in Jak 2/II, performance is noticeably slower on OpenGL(15-20fps) than Vulkan (30fps) but that's to be expected on i7-3770. I would also suggest still checking if you @EmulationPundit have it updated to the latest build

kd-11 commented 2 years ago

Test with https://github.com/RPCS3/rpcs3/pull/11080

gamrXerus commented 2 years ago

@kd-11 I just tested #11080 It doesn't fix the problem unfortunately. On Vulkan, the sky is now rainbow horizontal lines and on OpenGL the sky is now orange. Vulkan: vulkan OpenGL: opengl

gamrXerus commented 2 years ago

@kd-11 Interesting... I just tested on Windows 10 and PR #11080 seems to fix this issue. Maybe there is an issue with Mesa on Linux. I'm running Lubuntu 21.10 Mesa 22.0.0-devel (oibaf ppa).

kd-11 commented 2 years ago

Interesting that there is a difference with drivers. I'll have to investigate that first.

JohnHolmesII commented 2 years ago

Issue is fixed for me on windows finally, which is great. Will test laneeks.

Update: Tested laneeks I can confirm the bizarre horizontal stripes, tho for me they appear on both Vulkan and OpenGL. I'll note just for the record I have a new GPU since opening this issue. Details:

AMD Radeon RX 6700 XT (NAVY_FLOUNDER, DRM 3.42.0, 5.14.0-pf7, LLVM 12.0.1) 
mesa 21.2.4

I believe it is a clear driver bug. The lines are fixed in screenspace, and are at a zdepth just in front of the skybox. I should also note that the skybox behind the lines appears to now be correct AFAICT. I think the rogue colors before were simply these lines being laid over the skybox, rather than the whole skybox being broken. I also doubt I am saying anythin kd does not understand already :p

kd-11 commented 2 years ago

I fixed the problem with linux, it turned out to be my fault not properly initializing the memory that is consumed by the image. It seems windows driver architecture forces the memory to be zeroed which hides the problem.

Zorklis commented 2 years ago

Tested the latest commit and the problem still occurs, now with it's the stripes! Here's how it looks during the intro https://youtu.be/cIeD-9mz4vc . Also there's some strange lines in the middle

JohnHolmesII commented 2 years ago

The issue is completely fixed for me on latest master. Are you sure you updated?

Zorklis commented 2 years ago

The issue is completely fixed for me on latest master. Are you sure you updated?

Yes I updated to the current one 0.0.18-12970-e31173e3 (Current Merge by elad335). Previously I didn't have the stripes and only flashing sky and the problem is still not fixed

Decards commented 2 years ago

I confirm that is not fixed. It is still ocurring for me too but it took a little while before the sky started flashing again.

gamrXerus commented 2 years ago

I can also confirm that Vulkan is not fixed for me on Windows or Linux. OpenGL works fine. This bug has proven to be tricky.

EmulationPundit commented 2 years ago

Just tried on the latest build on Windows and with OpenGL, sky flickering is fixed but as could be seen even before this fix, between the flickering the sky is pixelated for some reason. Even tho the flickering is fixed on OpenGL, the framerate is completely unplayable for me personally so I'm really looking forward to a fix for Vulkan.

SlyCooperReloadCoded commented 2 years ago

Okay, so it's not just me, thank goodness. The new flashing is mostly just white flashing, but very quickly, so quickly that OBS can't properly record it for reports, not to mention it's probably seizure-inducing. I noticed that the skybox's intended textures look garbled as well.

JimScript commented 2 years ago

I think this is a vendor problem, like #10955, as both kd and JohnHolmesII use AMD hardware and don't experience any issue. I have NVIDIA hardware and I have the problem, but I don't know if this is consistent with everyone else here.

kd-11 commented 2 years ago

I'll check what's up with it, different drivers and hardware have wildly different results. Even when it was broken I had different results on AMD with the 3 available drivers (windows, AMDVLK and RADV) with all of them having different results. I'll check with a pascal card and see if I can reproduce this.

garouvulps commented 2 years ago

I have an RX 550 AMD card and is also still broken with flashing sky and lines appearing at random.

kd-11 commented 2 years ago

Try https://github.com/RPCS3/rpcs3/pull/11104 I have an idea why the previous patch worked for me when testing on linux. It is a coincidence. The game will render correctly on some drivers if we just upload a black texture. The sky is night so it just happens to work if you have a driver that is zero-initializing the buffers and crap if it is not.

Yahfz commented 2 years ago

image Fixed