PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
Other
10.56k stars 1.53k forks source link

GS/SW: Don't use fast reciprocal stq calculation, it's too inaccurate #11248

Closed refractionpcsx2 closed 1 month ago

refractionpcsx2 commented 1 month ago

Description of Changes

Replaces reciprocal Q with normal ST/Q division.

Rationale behind Changes

the original method is quite inaccurate, especially when you're dealing with interpolation and is just not adequate. Sten mentioned that it's likely that there would be a stall with the original multiplication anyway, so the performance difference is negligible. But this fixes a bunch of problems. Faster isn't better if it breaks things.

Suggested Testing Steps

Test games listed below in SW or any you know that have SW only issues. I've checked Armored Core's radar and GOW's controller screen, plus the lines problem in Mercenaries and Klonoa 2, Crash Twinsanity's weird pixels on curves.

Fixes #3295 Metal Gear Solid 2 Locker Fixes #4825 Spider-Man 3 texture issues Fixes #6156 Corrects Castlevania map in software mode (Hardware was already fixed) Corrects #9151 Bonus Demo 08 images in software.

Note: All fixes are for Software ONLY

Bonus Demo 08: Master: image PR: image

Capcom Vs SNK 2 (Colouring on the healthbars corrected): Master: image PR: image

Castlevania - Curse of Darkness: Master: image PR: image

Metal Gear Solid 2: Master: image PR: image

Spider-Man 3: Master: image PR: image

StillPlay2 commented 1 month ago

Awesomeness! All images on Bonus Demo 8 work properly on all tabs