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
Sanitize and use increased precision when normalizing light directions #10477
Conversation
|
I've looked over the fifoci differences and they all seem correct. shadow-eyes still shows an issue, but the problem that that case is looking at is that the eyes have As one more clarifying note, the issue being targeted here is for Mesa's llvmpipe, which is rendering on the CPU. I don't think most end-users are affected by this problem, but it still is annoying to not have correct rendering on FifoCI, and thus worth working around like this. |
ec6a6ca
to
4669eaa
Compare
4669eaa
to
48bb8a2
Compare
48bb8a2
to
fa398a3
Compare
fa398a3
to
784c9cd
Compare
71dea3c
to
a8f8c15
Compare
a8f8c15
to
5108283
Compare
This normalization was added in 02ac5e9, and changed to use floats in 4bf031c. The conversion to floats means that sometimes there is insufficient precision for the normalization process, which results in values of NaN or infinity. Performing the whole process with doubles prevents that, but games also sometimes set the values to NaN or infinity directly (possibly accidentally due to the values not being initialized due to them not being used in the current configuration?). The version of Mesa currently in use on FifoCI (20.3.5) has issues with NaN. Although this bug has been fixed (https://gitlab.freedesktop.org/mesa/mesa/-/commit/b3f3287eac066eae16dce0e47aad3229dcff8257 in 21.2.0), FifoCI is stuck with the older version. This change may or may not be incorrect, but it should result in the same behavior as already present in Dolphin, while working around the Mesa bug.
5108283
to
8129874
Compare
|
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
This normalization was added in 02ac5e9, and changed to use floats in 4bf031c. The conversion to floats means that sometimes there is insufficient precision for the normalization process, which results in values of NaN or infinity. Performing the whole process with doubles prevents that, but games also sometimes set the values to NaN or infinity directly (possibly accidentally due to the values not being initialized due to them not being used in the current configuration?).
The version of Mesa currently in use on FifoCI (20.3.5) has issues with NaN. Although this bug has been fixed (https://gitlab.freedesktop.org/mesa/mesa/-/commit/b3f3287eac066eae16dce0e47aad3229dcff8257 in 21.2.0), FifoCI is stuck with the older version.
This change may or may not be incorrect, but it should result in the same behavior as already present in Dolphin, while working around the Mesa bug.
This PR is an alternative to #10475 that does not introduce regressions of things fixed by #394, but also does not cause
mp3-bloomto be hardware-accurate. It would make sense to merge this as a stopgap to work around the Mesa issue while I research this behavior further.