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

rsx: Implement accurate ZCULL stats #10823

Merged
merged 5 commits into from
Sep 6, 2021
Merged

rsx: Implement accurate ZCULL stats #10823

merged 5 commits into from
Sep 6, 2021

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Sep 5, 2021

Adds accurate ZCULL stat counting from the GPU to simulate what RSX would return to games in the same situation. This solves a lot of problems in many games that rely on accurate counters. This option does not cost much performance on mainstream GPUs (1-2fps on average) so it has been made the default. An easy ZCULL operation mode selection has been added to GPU settings tab to complement this.

Fixes #8574
Fixes #8122
Fixes #8966
Fixes #7429

Fixes other bugs without linked tickets such as sun flare in Demon's souls and Dark souls, Sega All-Stars racing, etc, etc

Copy link
Contributor

@Megamouse Megamouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a tad bit annoyed that this doesn't adhere to the usual logic, but I guess there's some weird logic seperating the 2 values internally?

rpcs3/rpcs3qt/settings_dialog.ui Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/settings_dialog.ui Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/settings_dialog.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/settings_dialog.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/settings_dialog.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/settings_dialog.cpp Show resolved Hide resolved
@Megamouse Megamouse added the RSX label Sep 5, 2021
@Emulator-Team-2
Copy link

Emulator-Team-2 commented Sep 5, 2021

Fixes: #7429.

(Before/After Comparisons)

Before - (RPCS3-0.0.18-12711):
1


After - (PR-ZCULL Accuracy:Precise):
2


Fixes flickering graphics in Brutal Legend.

(Before/After Comparisons)

Before - (RPCS3-0.0.18-12711):
3


After - (PR-ZCULL Accuracy:Precise):
4

@kd-11 kd-11 marked this pull request as draft September 5, 2021 18:01
@kd-11 kd-11 marked this pull request as ready for review September 5, 2021 20:10
@kd-11
Copy link
Contributor Author

kd-11 commented Sep 5, 2021

A quick note tangentially related: I know the layout on the GPU section is now a little weird. Initially I had the ZCULL group aligned left , under anisotropic filter with a spacer under MSAA option, but this only works on linux or when using YoRHa on windows. The default style on windows caused the text to be truncated due to the shrinking of the dialog so I gave up and just stretched it to fill the row. While it bothers me visually I was just drained at that point, but maybe someone else may have ideas how to solve that.

@Megamouse
Copy link
Contributor

lgtm on the gui side (avoiding any visual judgement)

@kd-11 kd-11 merged commit b3f002f into RPCS3:master Sep 6, 2021
@Nicholas-Steel
Copy link

kd-11 are you (or anyone else) able to explain how ZCULL was responsible for the excessive bloom for The Darkness and The Cave? I find stuff like your explanation of how God Mode and Golden Eye uses ZCULL interesting.

@Linear524
Copy link

@Nicholas-Steel
ZCULL is responsible for a lot of geometry rendering properties and optimizations for RSX workload...
It is needed not only for showing and hiding objects at proper distance, but for a lot of deep tracking things too. Some bloom and blur effects require proper area distance tracking in dynamic scenes for correct effects calculation and many game developers uses ZCULL data for that functions. A lot of current problems with RSX emulation comes from huge deep values ( Z ) which real PS3 uses and which is not so easy for PC GPU's to deal with. But more precise emulation of RSX Z-buffer stuff and ZCULL functions will fix the remaining geometry issues in RPCS3 and moves us a bit closer for correct image output that original PS3 hardware produces.
For example - this current pull 10823 fixes not only up-listed games, but also fixes some light flares in Killzone 2/3 (not all but some works better now). Thanks to KD-11 ! (^_^)

@Asinin3
Copy link
Contributor

Asinin3 commented Sep 18, 2021

Fixes most of the culling issues in Killzone3, but not completely. Performance hit is fairly large for this game, Killzone 3 is the game which benefits the most from Relaxed zcull, most games are the same performance with it (compared to approximate)
Relaxed
image
Approximate
image
Precise (from PR)
image

@kd-11 kd-11 deleted the precise_zcull branch September 19, 2021 17:49
@MsDarkLow MsDarkLow mentioned this pull request Nov 20, 2021
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants