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: Fragment decompiler improvements #10764

Merged
merged 4 commits into from
Aug 26, 2021
Merged

rsx: Fragment decompiler improvements #10764

merged 4 commits into from
Aug 26, 2021

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Aug 25, 2021

  • Do not alias shaders with different texcoord control masks.
  • Handle perspective correction bit. This is bit 31 in SRC2 block and multiplies TEX0-TEX9 by 1/w (from gl_FragCoord.w)
    This effect went unnoticed because if you use a w output of 1.0, there is no difference. Discovered when fuzzing unknown SRC2 bits.

This fixes a lot of games with strange texturing bugs. Add here to close with the ticket:

Fixes #5138
Fixes #6798
Fixes #7721
Fixes #7378
Fixes #6304
Fixes #5610

- Perspective correction flag multiplies VP output by HPOS.w.
  NOTE: Not the same as division by w when it comes to NaN/Inf problems!!
- Restructure indexed loads a bit to avoid re-initializing registers unnecessarily
@Xcedf
Copy link

Xcedf commented Aug 25, 2021

image
#7721 here

@Megamouse Megamouse added the RSX label Aug 25, 2021
@digitaldude555
Copy link

#7378

Fixed now.

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented Aug 25, 2021

Fixes these graphical issues in the following games:

Beyond: Two Souls - Broken graphics

image
image

Dead Island Riptide - Broken lighting

image
image

inFamous: Festival of Blood - Missing particles and flickering/missing textures

image
image

@Satan86
Copy link

Satan86 commented Aug 25, 2021

fixes #6304
master:
a

PR:
unknown

@AniLeo AniLeo added the Shaders label Aug 25, 2021
@Emulator-Team-2
Copy link

Emulator-Team-2 commented Aug 25, 2021

Fixes: #5610.

(Before/After Comparisons)

Before:
1
2
3


After:
1-PR
2-PR
3-PR

@Shoegzer
Copy link

Shoegzer commented Aug 25, 2021

Confirmed fixed:

The RSX rendering issues reported in #10494 seemed related too, specifically as it involves lighting, though it didn't change.

As I'm finding, this PR is bound to resolve lots of other long-standing rendering issues reported and otherwise - please all continue testing and reporting changes.

Amazing stuff @kd-11!

@AniLeo
Copy link
Member

AniLeo commented Aug 25, 2021

Can you post before/after for Birds of Steel

@Shoegzer
Copy link

Okay, apparently #8459 had already been resolved. In recent testing the water wasn't rendered properly, though it's fine in the current master so my last test wasn't recent enough - sorry for any confusion. The others reported above were checked against the most current master, commit 72f0637.

Regardless, #8459 can probably be closed and I've posted a screenshot from the latest master in that report.

@Jonathan44062
Copy link

This fix GOW 3 and GOW Ascension as well
GOW 3
Master:
GOW 3 01

PR:
GOW 3 02

GOW Ascension
Master:
GOW Ascension 01

PR:
GOW Ascension 02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment