daniel-schuermann / mesa

Mesa 3D graphics library (mirror; no pull requests here please)
http://mesa3d.org
135 stars 3 forks source link

Shadows glitches in the Witcher 3 #158

Closed shmerl closed 4 years ago

shmerl commented 4 years ago

When testing recent updates in aco-navi that finally started working better for The Witcher 3 due to various hazards mitigations, I noticed some graphical problems with shadows:

llvm:

shadows_llvm

aco:

shadows_aco

Save at that place: tw3_save_shadows_bug.zip

Note shadows disappearing in the distance when using aco.

GPU: Sapphire Pulse RX 5700 XT Mesa 19.3.0-devel (git-4424784357) (LLVM 10.0.0) (aco-navi branch).

Not sure if it's Navi specific, so if anyone can please confirm that it doesn't or does happen with older cards, it would be useful.

aufkrawall commented 4 years ago

Seems to look correct on Polaris: Screenshot_20191022_113228

Venemo commented 4 years ago

I tested this on aco-navi just now and could not reproduce the problem with the attached save game.

aufkrawall commented 4 years ago

Noticed something weird: Somehow the lighting looks different with amdvlk-pro, like if amdvlk-open and radv-aco would have no indirect sun lighting: Screenshot_20191022_181926 Screenshot_20191022_182134

Since only amdvlk-pro is the "odd" one: Another case of hidden fixing in proprietary compilers? Could of course also just be a bug of amdvlk-pro.

Venemo commented 4 years ago

@aufkrawall This issue is about shadows on aco-navi. Can you please open a different issue about this lighting problem?

aufkrawall commented 4 years ago

Sorry @Venemo for putting myself in between. My last comment about this: I checked with Windows native D3D11, and it looks like ACO/amdvlk-open. So it's apparently just a bug of amdvlk-pro.

Venemo commented 4 years ago

@aufkrawall Can you tell us which screenshot is "right" and "wrong"? Ie. which one did you make with which driver, and how does radv look?

aufkrawall commented 4 years ago

@Venemo I'll retest tomorrow in a proper, detailed ticket.

shmerl commented 4 years ago

I tested this on aco-navi just now and could not reproduce the problem with the attached save game.

Try to move forward in the direction of the character where that save is pointing first using aco, and then form the same save using llvm. You'll see anomalies in the distance in case of aco. Or shadows looked OK to you?

Let me try rebuilding latest master, to double check.

shmerl commented 4 years ago

Just rebuilt latest mesa-aco-navi, and that glitch is gone! So I'll close it for now.

aufkrawall commented 4 years ago

@Venemo Seems like I tested too many things yesterday.

Windows Polaris D3D11: witcher3_2019_10_23_10_17_23_462

RADV-ACO: Screenshot_20191023_101051

Looking identical and I guess that's all we want to know.

Well, except that the Windows driver for whatever reason fails in forcing 16x anisotropic filtering, whereas DXVK gets it done.