xemu
xemu copied to clipboard
nv2a: Make multiplication by 0 match HW behavior.
Fixes #1008 Fixes #1044
The nv2a returns 0 for anything multiplied by zero, including exceptional values such as Inf and NaN. Desktop GPUs do not enforce this, leading to conditions where NaNs wipe out calculations and lead to erroneous behavior.
@abaire Based on your comment in #55 about the broken floor texture in Halo 2 being related to depth buffer precision, I assumed this PR would not fix that issue. I did test it to be sure, to no avail, in case it matters at all.
@abaire Based on your comment in #55 about the broken floor texture in Halo 2 being related to depth buffer precision, I assumed this PR would not fix that issue. I did test it to be sure, to no avail, in case it matters at all.
Thanks for checking, I would've been very surprised if this fixed the issue in Halo 2, it should really only affect calculations that end up dealing with multiplication of exceptional values (Inf/NaN/etc..) which did not appear to be the case when I briefly looked at #55.
This fixes the menu issues in american chopper 1 and 2
American Chopper
Before
Black screen
After
American Chopper 2
Before
After
This pr fixes azurik - rise of perathia late game
Before
After
This also affects #1044 using this pr fixes the issue
this PR seems to fix quite a handful of graphical issues
Also seems to fix Breakdown lighting issues https://www.youtube.com/watch?v=LQ5y4sdaA5s
Maybe we should merge it
Maybe we should merge it
this is still incomplete yet since it works only at 1x resolution scale, and we don't know if there might be edge cases where graphics might change behavior like it happened before with a previous "version" of this PR. There's no need to rush if we have to grant stability.