mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Merge pull request #21783 from hrydgard/clipping-compat-flag
Avoid soft-transform-and-clip if the near plane matches the final clip plane, and a new compat flag isn't set
This commit is contained in:
@@ -161,6 +161,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
||||
CheckSetting(iniFile, gameID, "PersistentFramebuffers", &flags_.PersistentFramebuffers);
|
||||
CheckSetting(iniFile, gameID, "FileCreatedTimeHack", &flags_.FileCreatedTimeHack);
|
||||
CheckSetting(iniFile, gameID, "FastEmulatedGPU", &flags_.FastEmulatedGPU);
|
||||
CheckSetting(iniFile, gameID, "CorrectCullAfterClip", &flags_.CorrectCullAfterClip);
|
||||
}
|
||||
|
||||
void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {
|
||||
|
||||
@@ -120,6 +120,7 @@ struct CompatFlags {
|
||||
bool PersistentFramebuffers;
|
||||
bool FileCreatedTimeHack;
|
||||
bool FastEmulatedGPU;
|
||||
bool CorrectCullAfterClip;
|
||||
};
|
||||
|
||||
struct VRCompat {
|
||||
|
||||
@@ -454,7 +454,7 @@ static bool TestBoundingBoxFast(const float *cullMatrix, const void *vdata, cons
|
||||
}
|
||||
}
|
||||
|
||||
if (AnyCompareBitsSet(anyOutsideMaskZ)) {
|
||||
if (AnyCompareBitsSet(anyOutsideMaskZ) && (!gstate_c.viewportNearPlaneMatchesOutput || PSP_CoreParameter().compat.flags().CorrectCullAfterClip)) {
|
||||
// Some vertices were outside the Z clipping planes. Clip againt Z=-W in software (and do culling, too).
|
||||
// TODO: With a compat flag for Flatout/Sengoku, we'll be able to avoid this in many cases, unless
|
||||
// GPU_USE_CULL_DISTANCE is missing, in which case we need it for culling.
|
||||
|
||||
@@ -2071,3 +2071,15 @@ NPJH50148 = true
|
||||
ULES00262 = true
|
||||
ULUS10064 = true
|
||||
ULKS46087 = true
|
||||
|
||||
[CorrectCullAfterClip]
|
||||
# Only two known games need culling to happen accurately *after* clipping: Sengoku Cannon and Flatout.
|
||||
|
||||
# Sengoku Cannon
|
||||
UCAS40019 = true
|
||||
ULJM05021 = true
|
||||
|
||||
# Flatout
|
||||
ULUS10328 = true
|
||||
ULES00968 = true
|
||||
ULES00969 = true
|
||||
|
||||
Reference in New Issue
Block a user