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/vp: Fix Demon Souls missing graphics #12450

Merged
merged 1 commit into from
Aug 3, 2022
Merged

rsx/vp: Fix Demon Souls missing graphics #12450

merged 1 commit into from
Aug 3, 2022

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Aug 2, 2022

This is the correct decoding of the vertex value here, it affected Demon Souls because it passed an integer of 0 to the vertex shader and then raised it to the power of -1. RPCS3 previously believed that it results in a float of 0 but no it results in float(1)/65535. So when raising it to -1 instead of NaN being produced it now results in precisely 65535. If you want to benefit from this you need to clear the Shaders cache of this game.

Before:
image

After:
image

Fixes #4302

@kd-11
Copy link
Contributor

kd-11 commented Aug 2, 2022

This one is odd. I had already checked the behavior and it seemed to be Nan. I'll have to check where the hwtest got messed up.

@Linear524
Copy link

Great catch ! :)
Maybe this could fix missing geometry in other titles as well =D

@elad335
Copy link
Contributor Author

elad335 commented Aug 3, 2022

@kd-11 A test that raises the result to -1 itself for convenience:
Master:
sample finished, the result is infinity.
Ps3:
sample finished, the result is 65535.000000.
Pull Request:
sample finished, the result is 65535.000000.
mainrsxcrap.zip

@Nerboruto
Copy link

one word... fabulous !!!

@kd-11
Copy link
Contributor

kd-11 commented Aug 3, 2022

@kd-11 A test that raises the result to -1 itself for convenience: Master: sample finished, the result is infinity. Ps3: sample finished, the result is 65535.000000. Pull Request: sample finished, the result is 65535.000000. mainrsxcrap.zip

Thanks. Added to the validation suite.
I have hundreds of random tests all over, I checked the vertex one and it seems I did not test some instruction cases such as negative numbers.
That being said, I have some issues with the SNORM16 handling. I'll write some more test cases as well as testing known games using this layout.

@kd-11 kd-11 merged commit b3162bd into RPCS3:master Aug 3, 2022
@elad335 elad335 deleted the des branch August 3, 2022 16:09
@Asinin3
Copy link
Contributor

Asinin3 commented Jan 2, 2023

Make a new issue and link to this. Put renderdoc with it and log

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

Successfully merging this pull request may close these issues.

Demon's Souls Glitches
6 participants