Depth calculations are always done in the pixel shader now.
Due to the unpredictability of our zcomploc hacks this commit probably changes the behavior of some games which use zcomploc.
Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.
This reverts commit 0efd4e5c29766ba5f5d22204339637ade9ccec83.
This reverts commit b4ec836aca4392a86b864dc58b1030ca616fe0d5.
This reverts commit bb4c9e2205d4117f48fd4ca50774ee56c28c92e4.
This reverts commit 146b02615c07dd52dddaa18b7e23d09bc23b549e.
This reverts commit 402006a83a89bc0f790934096e915f0e8c23f808.
This reverts commit 48d8d71391fc2cc40d85732680eb6421164bf87c.
This reverts commit 450dcc9d2cd874f6ab40d4a339afc29f55751319.
please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev.
please as soon as yo find a bug let me know.
a little code cleaning to avoid duplicated execution of AlphaPreTest and a little correction to some comments from the previous commits.
this change must behave exactly like last revision, if something is broken please let me know
zcomploc is a feature of the BP which switch depth test from before the alpha
test to after the alpha test. This way, transparent fragments are written to
the depth buffer too.
The current implementation is quite hacky and does not cover all cases but is
enough to fix problems in a lot of game. A complete implementation would
require a multipass rendering method and is attempted in the
zcomploc-experimental branch.
According to testers feedback, fixes bugs in the following games:
- Baten Kaitos
- Baten Kaitos Origins
- 007: Everything or Nothing
- Ty the Tasmanian Tiger
- Tony Hawk's Pro Skater 3
And probably other games too.
Conflicts (because of new-shadercache-uids):
Source/Core/VideoCommon/Src/PixelShaderGen.cpp
- don't load shader cache from disk in d3d9/11 if shader debugging is enabled (we won't have any info about the source shader code otherwise, etc)
- dump shader source codes on safe UIDs mismatch
Thanks to LordMark and [SS] for reporting those to me ;)