Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLAA postrocessing shader missing in GT6 and TLoU #11290

Open
Linear524 opened this issue Dec 24, 2021 · 16 comments
Open

MLAA postrocessing shader missing in GT6 and TLoU #11290

Linear524 opened this issue Dec 24, 2021 · 16 comments
Assignees

Comments

@Linear524
Copy link

Linear524 commented Dec 24, 2021

MLAA postprocess antialiasing shader currently missing on some titles but works well on others.
This issue about its missing implementation in Gran Turismo 6 and Last of Us.
The importance of this function is not only for properly clean and antialiased geometry (which is always nice) but also for other effects which working together in conjunction with MLAA - color tone adjustment, blur effects, bloom effects, film grain effects, and other tricks. When these titles can not use MLAA shader - other combined effects are missing too... So it would be very good to see fixed proper MLAA implementation. Image accuracy is very important for overall PS3 emulation.
Here is some screenshots with current RPCS3 condition: (watch in fullscreen fullsize screenshots in order to see jagged edges)
BCES01893_screenshot_2021_12_14_19_14_40
BCES01893_screenshot_2021_12_14_19_14_58
BCES01893_screenshot_2021_12_14_19_16_58
BCES01893_screenshot_2021_12_14_19_17_32
BCES01585_screenshot_2021_12_14_19_50_01

And here is screenshots from PS3 console:
1692
1693
1694
1695
1696
1697

P.S. - a little example for TLoU = if we activate MLAA disabling patch - it will cut off MLAA function and will also disable Color tone, Bloom layer on explosion fire, Film Grain effect, GodRays effect from sun and some light sources, and will break nice sound listening blurred image mode...

@Linear524
Copy link
Author

Also here is the list of titles with fully working MLAA shader on RPCS3:

  • God of War 3
  • God of War Ascension
  • Metal Gear 4
  • Metal Gear 3
  • Metal Gear 2
  • Killzone 3
  • Killzone 2
  • Persona 5
  • Shadow of the Colossus
  • ICO
  • Journey
  • Little Big Planet
  • a lot of other titles...

This proves that RPCS3 is really capable to reproduce image quality 1:1 like real PS3 renders in those titles.
(and even better if we use FSR upscaling with fully working antialiasing function)

@Tarek2013
Copy link

For TLOU, if I enable GPU light patch & MLAA patch and disable MLAA in GUI, the light reflection and shadows are broken. But if I enable MLAA again in GUI menu when I restart the game, the light reflection and shadows are back (you can disable MLAA in GUI again,the light is still there)
I don't know why we need this kind of manip to get enable some stable functions into this game coz normally, the MLAA is defined from the first start...

@Linear524
Copy link
Author

For TLOU, if I enable GPU light patch & MLAA patch and disable MLAA in GUI, the light reflection and shadows are broken. But if I enable MLAA again in GUI menu when I restart the game, the light reflection and shadows are back (you can disable MLAA in GUI again,the light is still there) I don't know why we need this kind of manip to get enable some stable functions into this game coz normally, the MLAA is defined from the first start...

All those disabling patches is just temporary hacky workaround. And they are breaking a lot of nice things. When all RSX, SPU and PPU functions will be implemented, RPCS3 will render PS3 image correctly without those patches.

@kd-11
Copy link
Contributor

kd-11 commented Dec 24, 2021

You need RCB+WCB to allow cell to read and write to your GPU.

@Tarek2013
Copy link

WCB on haven"t any effects (and is better to get it off coz, if on, I can't reproduce the L&S back)
My config is Ryzen 5950X + RTX 3080TI + 32 GB on Windows 10 lastest version (and all drivers updated)
I make a first clean launch of the game (without MLAA enabled into GUI and no caches)
Then, the second start of the game but I put MLAA auto.The shadows and light still broken
So,I closed RPCS3 and opened it again then launch TLOU without changing anything (MLAA is still auto)
Surprise ! light and shadows are back !
And if you disable MLAA after closing the game again, the L&S still there
RPCS3.log.gz

@Satan86
Copy link

Satan86 commented Dec 24, 2021

The Anti Aliasing setting in the GPU tab is for MSAA, MLAA is removed with patches

@Tarek2013
Copy link

It's Anti-Aliasing (I thought it was MLAA in GUI) but the result is same : so, it's MSAA conflict ?

@kd-11
Copy link
Contributor

kd-11 commented Dec 26, 2021

WCB on haven"t any effects (and is better to get it off coz, if on, I can't reproduce the L&S back) My config is Ryzen 5950X + RTX 3080TI + 32 GB on Windows 10 lastest version (and all drivers updated) I make a first clean launch of the game (without MLAA enabled into GUI and no caches) Then, the second start of the game but I put MLAA auto.The shadows and light still broken So,I closed RPCS3 and opened it again then launch TLOU without changing anything (MLAA is still auto) Surprise ! light and shadows are back ! And if you disable MLAA after closing the game again, the L&S still there RPCS3.log.gz

You also need "Read Color Buffers" from the advanced tab enabled. MLAA is done on the CPU on PS3.

@Tarek2013
Copy link

@kd-11
Read Color Buffer is always enabled (missing light & color effects instead).Only WCB break the l&s back (that's why I disabled it).
I just try to understand why I need to disabled then enabled Anti-Anliasing into a same config to get back lights & shadows effects

@Linear524
Copy link
Author

Linear524 commented Dec 27, 2021

@Tarek2013
You have messed up something in your config. TLoU title don't have any lighting or shadowing issues anymore. Just set clean config, activate WCB+RCB+WDB+RDB, and Don't use any patches, except "GPU lighting path" and maybe "Disable Mesh trimming". That's it ! If you have weak hardware - disable MLAA.

P.S. - Antialiasing option (Auto or Disabled) in GPU tab and MLAA is a completely different things ! First is a hardware MSAA and it works on RSX. All games have no issues with this on RPCS3. MLAA is a postprocessing shader and it works on SPU's.

@Linear524
Copy link
Author

Hi KD-11 !
I always use WCB+RCB+WDB+RDB in all my titles, except GT6 (it have some weird hardware blitting issues, so currently CPU blitting required without WCB+RCB+WDB+RDB).
I've made some tests and some interesting things showed up:
Gran Turismo 6 - It looks like it tries to kick up working MLAA function (WCB+RCB) and first 1 or 2 seconds it smoothing geometry edges, but soon it will fail after ~2 seconds of correct sampling and pixelated garbage will trail on geometry border egdes... Something being overflown somewhere...
Last of Us - without any patches MLAA (with WCB+RCB+WDB+RDB) shows pixelated garbage on screen and don't work correctly with geometry. It looks like it trying to compute data from wrong depth layer or some other way. Some lens dirt and lens flare effects missing too due to missing depth layer.

@Tarek2013
Copy link

@Linear524
Thank for you reply
But, in any config I tried,I still met the same problem : when I start, the light and the shadows are off.But, if I restart the game with exactly the same config but I just change the anti-aliasing, the Light and the shadows are back.
My meaning is I can get the light and the shadows from if I don't use this 'trick', whatever the config I use.

@Linear524
Copy link
Author

@Tarek2013
Show me your config tabs and patch list window.
TLoU doesn't have light and shadows problems in current master branch of RPCS3. I'm pretty sure your problem in software configuration or environment.

@Tarek2013
Copy link

Tarek2013 commented Dec 30, 2021

@Linear524
Ok,here's my PC : AMD Ryzen 5950X, Nvidia RTX3080TI (with lastest drivers), 32 go RAM, Windows 10 21H1

Patches applied :
Bug Fixed Infected
Bug Fixed University
Disable Mesh Trimming
Enable GPU Lighting

My RPCS3 config : Core:
PPU Decoder: Recompiler (LLVM)
PPU Threads: 2
PPU Debug: false
PPU Calling History: false
Save LLVM logs: false
Use LLVM CPU: ""
Max LLVM Compile Threads: 0
PPU LLVM Greedy Mode: false
PPU LLVM Precompilation: true
Thread Scheduler Mode: Operating System
Set DAZ and FTZ: false
SPU Decoder: Recompiler (LLVM)
SPU GETLLAR polling detection: false
SPU Debug: false
MFC Debug: false
Preferred SPU Threads: 0
SPU delay penalty: 3
SPU loop detection: false
Max SPURS Threads: 6
SPU Block Size: Mega
Accurate GETLLAR: false
Accurate SPU DMA: false
Accurate Cache Line Stores: false
Accurate RSX reservation access: false
SPU Verification: true
SPU Cache: true
SPU Profiler: false
MFC Commands Shuffling Limit: 0
MFC Commands Timeout: 0
MFC Commands Shuffling In Steps: false
Enable TSX: Disabled
Accurate xfloat: false
Approximate xfloat: true
LLVM Accurate DFMA: true
PPU LLVM Java Mode Handling: false
Accurate PPU 128-byte Reservation Op Max Length: 0
PPU LLVM Accurate Vector NaN values: false
Stub PPU Traps: 0
Full Width AVX-512: false
Debug Console Mode: false
Hook static functions: false
Libraries Control:
[]
HLE lwmutex: false
SPU LLVM Lower Bound: 0
SPU LLVM Upper Bound: 18446744073709551615
TSX Transaction First Limit: 800
TSX Transaction Second Limit: 2000
Clocks scale: 100
Sleep Timers Accuracy: Usleep Only
Performance Report Threshold: 500
Enable Performance Report: false
VFS:
Enable /host_root/: false
Initialize Directories: true
Limit disk cache size: false
Disk cache maximum size (MB): 5120
Video:
Renderer: Vulkan
Resolution: 1280x720
Aspect ratio: 16:9
Frame limit: 60
MSAA: Auto
Shader Mode: Async Shader Recompiler
Write Color Buffers: true
Write Depth Buffer: true
Read Color Buffers: true
Read Depth Buffer: true
Log shader programs: false
VSync: false
Debug output: false
Debug overlay: false
Renderdoc Compatibility Mode: false
Use GPU texture scaling: false
Stretch To Display Area: false
Force High Precision Z buffer: false
Strict Rendering Mode: false
Disable ZCull Occlusion Queries: false
Disable Vertex Cache: false
Disable FIFO Reordering: false
Enable Frame Skip: false
Force CPU Blit: true
Disable On-Disk Shader Cache: false
Disable Vulkan Memory Allocator: false
Use full RGB output range: true
Strict Texture Flushing: false
Disable native float16 support: false
Multithreaded RSX: false
Relaxed ZCULL Sync: false
Enable 3D: false
Debug Program Analyser: false
Accurate ZCULL stats: true
Consecutive Frames To Draw: 1
Consecutive Frames To Skip: 1
Resolution Scale: 300
Anisotropic Filter Override: 16
Texture LOD Bias Addend: 0
Minimum Scalable Dimension: 160
Shader Compiler Threads: 0
Driver Recovery Timeout: 1000000
Driver Wake-Up Delay: 1
Vblank Rate: 60
Vblank NTSC Fixup: false
DECR memory layout: false
Vulkan:
Adapter: NVIDIA GeForce RTX 3080 Ti
Force FIFO present mode: false
Force primitive restart flag: false
Force Disable Exclusive Fullscreen Mode: false
Asynchronous Texture Streaming 2: false
Enable FidelityFX Super Resolution Upscaling: false
FidelityFX CAS Sharpening Intensity: 50
Asynchronous Queue Scheduler: Device
Performance Overlay:
Enabled: false
Enable Framerate Graph: false
Enable Frametime Graph: false
Framerate datapoints: 50
Frametime datapoints: 170
Detail level: Medium
Framerate graph detail level: All
Frametime graph detail level: All
Metrics update interval (ms): 350
Font size (px): 10
Position: Top Left
Font: n023055ms.ttf
Horizontal Margin (px): 50
Vertical Margin (px): 50
Center Horizontally: false
Center Vertically: false
Opacity (%): 70
Body Color (hex): "#FFE138FF"
Body Background (hex): "#002339FF"
Title Color (hex): "#F26C24FF"
Title Background (hex): "#00000000"
Shader Compilation Hint:
Position X (px): 20
Position Y (px): 690
Shader Loading Dialog:
Allow custom background: true
Darkening effect strength: 30
Blur effect strength: 0
Audio:
Renderer: XAudio2
Audio provider: CellAudio
Dump to file: false
Convert to 16 bit: false
Audio Channels: Downmix to Stereo
Master Volume: 100
Enable Buffering: true
Desired Audio Buffer Duration: 100
Enable Time Stretching: false
Time Stretching Threshold: 75
Microphone Type: "Null"
Microphone Devices: "@@@@@@@@@@@@"
Input/Output:
Keyboard: "Null"
Mouse: "Null"
Camera: "Null"
Camera type: Unknown
Camera flip: None
Camera ID: Default
Move: "Null"
Buzz emulated controller: "Null"
Turntable emulated controller: "Null"
GHLtar emulated controller: "Null"
System:
License Area: SCEE
Language: French
Keyboard Type: French keyboard
Enter button assignment: Enter with cross
Console time offset (s): 0
Net:
Internet enabled: Disconnected
IP address: 0.0.0.0
DNS address: 8.8.8.8
IP swap list: ""
PSN status: Disconnected
Miscellaneous:
Automatically start games after boot: true
Exit RPCS3 when process finishes: false
Start games in fullscreen mode: false
Prevent display sleep while running games: true
Show trophy popups: true
Show shader compilation hint: false
Use native user interface: true
GDB Server: 127.0.0.1:2345
Silence All Logs: false
Window Title Format: "FPS: %F | %R | %V | %T [%t]"
I got this :
IMG_8999
with this log :
RPCS3.log.gz

Now, I close emulator then open it again
Disable Anti-Aliasing in GPU config
Restart the game without touching anything else.
I got this :
IMG_9002

As you can see, the light & shadows are back just coz I changed the anti-aliasing option.

Here's the following log :

RPCS3.log.gz

To finish :
I close the emulator and reopen it again
Enable Anti-Aliasing (Auto) into the GPU config
I Launch the game and the light & shadows still there !!!!

RPCS3.log.gz

Some clears :
-If I don't change the anti-aliasing option at the first step, the light & shadows keep broken.
-I tried different options (cpu, patches, SPU, WCB,...) and only my 'anti-aliasing trick' works to get light and shadows back.

  • Sometimes (especially and the first launch), the game crashes (you can notice it into the log I think).I just restart it immediately after closed the game (not the emulator).

@Linear524
Copy link
Author

Linear524 commented Dec 31, 2021

Like I said - your problem is not in RPCS3 or Antialiasing option. Your config is a complete mess.
First - delete all caches (PPU,SPU, Shader cache) !
Then delete everything in Cache folder, and in dev_hdd1\caches folder
Then - Don't use ANY patches, except GPU lighting path and Disable mesh trimming !
Set WCB, RCB, WDB, RDB to ON ! (this title really needs this for a lot of effects)
Antialiasing option - Auto
ZCULL Accuracy option - Precise !
Anisotropic filtering - Auto or 16x.
Framelimit = Auto !
Driver wake up delay - 200 is pretty enough for TLoU.
Never use scaling ! Only native 720p mode !!! (if you are not using MLAA disabling patch).
Don't use Force CPU blit option with TLoU !
Don't use "enable SPU loop detection" !
Enable FidelityFX Super Resolution Upscaling.
FidelityFX CAS Sharpening Intensity: 0 or 25 (because MLAA is still broken currently)
Toggle Accurate RSX reservation access to ON ! (Because you have AMD and no Intel TSX support)
LLVM Accurate DFMA: ON !
PPU LLVM Java Mode Handling: ON !
All the rest options to DEFAULT.

The Last of Us don't have shadowing issues in current master branch of RPCS3. (Latest revisions are stable enough)

@Tarek2013
Copy link

@Linear524
Thank a lot for your quick reply 👍
Ok.Just some details I forgot to say :

  • I always delete cashes before making a test (cache folder and Hdd1 folder)
  • I put all other options to make a 'stable' compatibility with upscaling (like Accurate ZCULL or CPU blit ON : if I don't enable it, my screen keep green with MLAA patch). Only LLVM Accurate DFMA can't be enabled (the square is red)

Whatever, I tested with your config (I just put SPU cache as MEGA coz I did first with Safe mode and it's exactly same) and...I got the same effect (no light & shadows) !
The only differences I noticed is a completely stable game (no crashes at all) BUT, the light & shadows back only at the third step ! (after disabled then enabled anti-aliasing again).
First step (no light & shadows) :
RPCS3.log.gz

Second step (Anti-Aliasing OFF) : Light & shadows STILL OFF
RPCS3.log.gz

Third step (Anti-aliasing ON again) : light & shadows are back !!!
RPCS3.log.gz

I tried to understand what kind of emulator's instruction could produce this effect but it's over my competences...

Anyway ,thank for your help and wish Happy New Year to you and all RPCS3 team and users !

@kd-11 kd-11 added Unimplemented In Progress This issue is actively being investigated at the moment. labels Dec 31, 2021
@kd-11 kd-11 self-assigned this Dec 31, 2021
@kd-11 kd-11 removed the In Progress This issue is actively being investigated at the moment. label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants