RPCS3 / rpcs3

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

GL/Vulkan: Grand Theft Auto V graphical issues #3959

Open MarioSonic2987 opened 6 years ago

MarioSonic2987 commented 6 years ago

Graphical issues:

Footage (June 25, 2019)

Log OpenGL Shaderlog OpenGL RenderDoc OpenGL (Loading screen and ingame)

Original comment With https://github.com/RPCS3/rpcs3/commit/a08e79f4267b5e9fab82949a5f011eb40aca76b0, GTA V renders its UI like this (look at the Rockstar's logo): ![image](https://user-images.githubusercontent.com/20027681/34226708-d1516c0e-e5ca-11e7-8f34-9cdd7b6dd24e.png) But with RenderDoc, I was able to modify the shaders. I went to the vertex one to investigate what was causing that bug. And I found these two lines of code: ![rd1](https://user-images.githubusercontent.com/20027681/34226797-23e35b4e-e5cb-11e7-8444-8b7f7ced9913.png) By changing bits 216 and 217, it fixed Rockstar's logo's orientation somehow, but the rest of UI is moved and rotated. ![rd2](https://user-images.githubusercontent.com/20027681/34226802-29bafb62-e5cb-11e7-8659-1e7e55bb0c12.png) In conclussion, this bug is caused, likely, by a vertex shader instruction badly implemented. [Log OpenGL](https://github.com/RPCS3/rpcs3/files/1576916/Log.GTA.V.20-12-17.GL.gz) [Shaderlog OpenGL](https://drive.google.com/open?id=1oLvU0iv8DFNTtUcKdsK7wrvoxOaOMt7T) - It's important the latest generated vertex shader. [RenderDoc OpenGL](https://drive.google.com/open?id=15jQKO-h5_8cyt_mcT5ym5D4L_mJWwUcm)
kd-11 commented 6 years ago

Actually that change just changes referenced data that is uploaded from the cpu. There is no ARL preceding it meaning the values are intentionally that way (also confirmed in that swapping them rotated everything). Might be a vertex register misalignment or something broken in cell side calculations.

MarioSonic2987 commented 6 years ago

With https://github.com/RPCS3/rpcs3/commit/345f92ab0a57a4f302f6fac651372bcf42005080:

This screenshot is taken with PPU interpreter fast and SPU interpreter precise, and there's no graphic difference.

RSX Capture Loading screen (Vulkan)

gta v-ppu spu prec

MarioSonic2987 commented 5 years ago

Ace Combat Infinity, like GTA V, has the same distorted UI bug. With these settings and with/without Force CPU blit, it doesn't improve.

Screenshot of the bug:

RSX Capture (ACI and GTA V)

MarioSonic2987 commented 5 years ago

I've attached the latest capture of the distorted UI glitch. image

RSX Capture (Pause menu)

MarioSonic2987 commented 5 years ago

This game needs Write Color Buffers to fix lighting outside.

Screenshot comparison **Without WCB**: ![image](https://user-images.githubusercontent.com/20027681/62364410-acd99680-b521-11e9-93f8-62e93ea8aa7f.png) **With WCB**: ![image](https://user-images.githubusercontent.com/20027681/62364416-af3bf080-b521-11e9-96da-6cc7087e6db2.png)
MarioSonic2987 commented 5 years ago

I've attached a RDC in Los Santos to show the graphical issues. image

RenderDoc VK

MarioSonic2987 commented 5 years ago

I've attached a OpenGL renderdoc trace for the dark shadows. Tested with 0.0.7-8700-32a4c224.

RenderDoc OpenGL

MarioSonic2987 commented 4 years ago

Raindrops are rendered by using WCB+WDB+RCB+RDB.

Missing raindrops ![image](https://user-images.githubusercontent.com/20027681/71645657-b8510980-2cdb-11ea-9a7b-ab8ac005147a.png) ![image](https://user-images.githubusercontent.com/20027681/71645658-bb4bfa00-2cdb-11ea-86f6-b43675ce0548.png)

Models no longer turn black in certain camera angles. But the red textures are still there: image image

The-SamminAter commented 4 years ago

I'm getting severely distorted/laggy audio, and for some reason characters are red. FPS_ 16 54 _ Vulkan _ 0 0 8-9349 _ Grand Theft Auto V  BLES01807  2020-01-15 5_10_52 PM

I'm also getting distorted graphics FPS_ 30 13 _ Vulkan _ 0 0 8-9349 _ Grand Theft Auto V  BLES01807  2020-01-15 5_15_35 PM

MarioSonic2987 commented 4 years ago

Reflections are broken, like in these puddles. image image

MarioSonic2987 commented 4 years ago

Sea isn't vertex-exploded if you disable WCB, as well the weird garbage glitch: image image

With WCB enabled: image image

xddxd commented 4 years ago

Ambient occlusion seems to be broken as well.

Prologue shots RPCS3 ![Screenshot_4](https://user-images.githubusercontent.com/1712979/84901601-6434b880-b0b4-11ea-9d8d-488661459c6e.png) RealHW shot from Youtube ![Screenshot_6](https://user-images.githubusercontent.com/1712979/84901626-6d258a00-b0b4-11ea-9fbf-d95044623f69.png) PC ![sspcprologue](https://user-images.githubusercontent.com/1712979/84901652-73b40180-b0b4-11ea-8a7a-e2f79d81b31a.png)
Franklin's house RPCS3 ![Screenshot_3](https://user-images.githubusercontent.com/1712979/84901697-83cbe100-b0b4-11ea-8578-0cabb07b90eb.png) PC ![sspc](https://user-images.githubusercontent.com/1712979/84901722-8cbcb280-b0b4-11ea-94ce-8681060b0060.png)

RPCS3.log.gz PC and RPCS3 renderdocs https://www.dropbox.com/s/7jj8lff29mc5yne/gtavrdc.7z?dl=0

kd-11 commented 4 years ago

For post-processing missing bugs, please make sure to test with all the buffer options enabled in case the game is using SPUs for some effects.

kd-11 commented 4 years ago

And also accurate xfloat just in case. There's a very large chance this effect is not done GPU-side given how weak the shader pipes are on RSX.

xddxd commented 4 years ago

In the image WCB+WDB+RCB+RDB and accurate xfloat are enabled, no change. image In addition to the settings mentioned above, I tried SRM and CPU blit as well, no change.

MarioSonic2987 commented 4 years ago

Broken ambient occlusion is now fixed.

image image

MarioSonic2987 commented 4 years ago

I attached two RSX Captures for the broken UI bug.

RSX Captures (Pause menu and brightness calibration screen)

Xcedf commented 4 years ago

Dudes don't turn red anymore during intro mission https://youtu.be/LE8C-12tIKw unfortunately game froze during capture, but still

MarioSonic2987 commented 4 years ago

@Xcedf I can confirm that the red texture bug is fixed, even if you get injured. image image

But it still happens with OpenGL. image

Cellphone screen has now correct colors. Previously, colors were inverted. image image

Although car reflections are missing in OpenGL. Vulkan shows them correctly. image image

Xcedf commented 4 years ago

@MarioSonic2987 can't get to Franklin mission in the car shop cause of freezing, maybe Setarian strange monkey face bug is also fixed. Besides do you know maybe game need some special settings to maintain stability?

MarioSonic2987 commented 4 years ago

@Xcedf You need to change Driver Wake-Up Delay to, at least, 400 μs.

The "monkey face" bug is still there, but it happens when a character is too close to the camera. It also happens in the prologue in the same manner (see Michael's jacket in my previous comment). image image

Xcedf commented 4 years ago

@MarioSonic2987 Freezes for me even on 5000μs.

Xcedf commented 3 years ago

Water in the ocean seems to be no longer vertex exploding recent master build, wawes are fine https://youtu.be/yW397eIr-_U for example some older build, feels like it's boiling https://youtu.be/xN0pUXDlx9o Reflections are still mess, but water in the pool no longer radioactive on Vulkan as well image

MarioSonic2987 commented 3 years ago

I can confirm water doesn't freak out in certain camera angles: image

But reflections are still borked. image

However, when you dive into the water, it looks fine. image

MarioSonic2987 commented 3 years ago

Broken reflections in vehicles and puddles in OpenGL is a regression caused by PR #8710.

jokoputera commented 3 years ago

How about in the KD11 latest release? https://github.com/RPCS3/rpcs3/pull/10764

MarioSonic2987 commented 3 years ago

Nothing changed with #10764.

Remaining issues:

aakh1361 commented 3 years ago

In Gta V Most of the time, loud noises are made when entering the tunnel

Xcedf commented 3 years ago

@MarioSonic2987 you're saying that rainbow artifacts is an old regression, so it worked on Vullkan at some point?

MarioSonic2987 commented 3 years ago

Rainbow blocky artifacts regression present in Vulkan are caused by PR #6359. Commit 91d711087f0d63e01c8e459815a6f7b37812f9a0. Discovered by Xcedf.

MarioSonic2987 commented 2 years ago

Characters no longer turn black in cutscenes: image

MarioSonic2987 commented 2 years ago

Not a graphical fix, but loud noises in most situations, like this cutscene, are no longer present. image

Darkhost1999 commented 2 years ago

Not a graphical fix, but loud noises in most situations are no longer present.

Indeed loud noises are still present at randomly occurring times but nowhere near the amount of frequency as before. Very rare for pops and bangs now.

Xcedf commented 2 years ago

@Darkhost1999 remove PPU Cache and try again, it was LLVM fix

Darkhost1999 commented 2 years ago

@Darkhost1999 remove PPU Cache and try again, it was LLVM fix

I have removed all of my caches and compiled them all again. The loud pops and bangs are rare not gone.

Xcedf commented 2 years ago

@Darkhost1999 can you run this palce in prologue this is how it sounded before(door sound) https://youtu.be/ESm0c1cHzlI?t=8 and this is after the fix https://youtu.be/jW1jHhpoTrY?t=6

Darkhost1999 commented 2 years ago

That would defeat the entire purpose of the error still exists but occurs less often. Because now you're asking me to pick and choose an area of the game that works now to record and prove my point that will not come to past because it'll only prove your point.

Darkhost1999 commented 2 years ago

In the end wrong issue ticket anyways.

Xcedf commented 2 years ago

Did you remember me asking to change or drop your point? I can't. I'm just asking to test this certain place in the game that's it, to make sure that at least this is working.

Darkhost1999 commented 2 years ago

Alright but that section of the game does work and is fixed. So if that's what you want to know. It is indeed working there Simone's was worse I'll record later then.

Darkhost1999 commented 2 years ago

In the event it has not been said water is a regression.

Build with regression https://github.com/RPCS3/rpcs3/pull/6359

Screenshot_20220803-002533.png

Zerox used illusions build as a base. Then just reverted things from there. https://discord.com/channels/272035812277878785/272035812277878785/934899723461066772 Although I still see no source code or anything to show what changes were made if you find this useful. Maybe the fix can be added to master soon

Lucas7yoshi commented 2 years ago

A regression occured, the game completely locks up at the "Get to the car" stage of prologue, FPS not changing

This has occured every time for 5 times.

0.0.24-14133 GTA 5 is updated with all updates to 1.27

Using all compatibility options described here https://wiki.rpcs3.net/index.php?title=Grand_Theft_Auto_V

Footage/log is from fresh cache Video: https://www.youtube.com/watch?v=J6wHd1I3ccI Log file: https://sx.l7y.ca/gta5_2022_09_08_lucas7yoshi_RPCS3_fH8nLmQz8.log.gz

Darkhost1999 commented 2 years ago

the game completely locks up at the "Get to the car" stage of prologue

Debugger wouldn't stop mentioning getllar so I enabled accurate RSX reservation access and it worked. I tested as far back as https://github.com/RPCS3/rpcs3/pull/12234 and gave up. Just enable accurate RSX reservation access then as soon as you're Franklin you don't "need" the setting anymore. But it also prevents freezing when swimming as anyone later in game.

MarioSonic2987 commented 2 years ago

Tested on 0.0.24-14195.

OpenGL issues It has broken ambient occlusion, missing car reflections and minor vertex explosions in the water: ![image](https://user-images.githubusercontent.com/20027681/192593479-2600bf39-44a8-4e88-b477-36fd4c49b0db.png) ![image](https://user-images.githubusercontent.com/20027681/192600708-60d613c0-41d8-4bb7-8148-e0bdf4323a41.png) Character's portrait in the pause menu is rendered black (correct in Vulkan): ![image](https://user-images.githubusercontent.com/20027681/192599725-bcfd698f-4ece-4208-a1c9-a85365239fbc.png) ![image](https://user-images.githubusercontent.com/20027681/192600302-b24ac4f8-f72b-491b-b8f1-1b3a2fa7d5e4.png) Red models in certain conditions (when someone gets injured, for example) are no longer present: ![image](https://user-images.githubusercontent.com/20027681/192595838-b99a225b-edea-4d61-82e8-958b32c687df.png)

Vulkan-exclusive glitches (rainbow garbage and broken reflections) are still present.

MarioSonic2987 commented 1 year ago

PR #12762 breaks graphics in Vulkan. OpenGL works fine. image

Edit: Fixed.

MSuih commented 1 year ago

Vulkan regression might be fixed by #12768

MarioSonic2987 commented 1 year ago

That PR fixes this regression. image

kd-11 commented 1 year ago

Check if water is fixed by https://github.com/RPCS3/rpcs3/pull/13070

MarioSonic2987 commented 1 year ago

Flickering rainbow glitches are now almost fixed in PR #13077: image

It's still there, but it's MUCH better than before. image

But the water still looks wrong. image image

Ordinary205 commented 1 year ago

Intermittent vertex explosions on vehicles still occurs even on the latest master.

https://github.com/RPCS3/rpcs3/assets/125112932/1db0b39f-4e36-4c3d-9554-b46b966a4bf0

RPCS3.log.gz