Open illwieckz opened 3 years ago
I'm not sure if we can fix both this issue and #537 at the same time because to fix this issue we should do FXAA before SSAO but to fix #537 we may have to do SSAO before fog, so before FXAA.
If we can only fix one issue and have to make a choice, the issue to fix is #537:
Doing anti-aliasing before SSAO seems to me like it could produce artifacts, since SSAO uses the depth buffer, and the depth of fragments where the fragments were affected by FXAA might no longer match the original fragment's depth.
In order to investigate #533, I modified the FXAA GLSL code to mark as red the pixel selected by the GLSL shader for applying antialiasing. And I discovered that FXAA was trying to do antialiasing on the pixels drawn by the SSAO code:
You can see the red pixels near to the gun, they are pixels written by SSAO painted in red by the FXAA code with my modification.