mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-24 03:12:35 +01:00
- [EMU] GTE PGXP NCLIP improvement
This commit is contained in:
parent
cfe66fa34a
commit
f8b9c3443c
@ -592,7 +592,29 @@ int docop2(int op) {
|
||||
GTELOG("%08x NCLIP", op);
|
||||
#endif
|
||||
|
||||
MAC0 = int(F((long long)(SX0 * SY1) + (SX1 * SY2) + (SX2 * SY0) - (SX0 * SY2) - (SX1 * SY0) - (SX2 * SY1)));
|
||||
#ifdef PGXP
|
||||
{
|
||||
float fSX0 = g_FP_SXYZ0.x;
|
||||
float fSY0 = g_FP_SXYZ0.y;
|
||||
|
||||
float fSX1 = g_FP_SXYZ1.x;
|
||||
float fSY1 = g_FP_SXYZ1.y;
|
||||
|
||||
float fSX2 = g_FP_SXYZ2.x;
|
||||
float fSY2 = g_FP_SXYZ2.y;
|
||||
|
||||
float nclip = (fSX0 * fSY1) + (fSX1 * fSY2) + (fSX2 * fSY0) - (fSX0 * fSY2) - (fSX1 * fSY0) - (fSX2 * fSY1);
|
||||
|
||||
float absNclip = fabs(nclip);
|
||||
|
||||
if ((0.1f < absNclip) && (absNclip < 1.0f))
|
||||
nclip += (nclip < 0.0f) ? -1.0f : 1.0f;
|
||||
|
||||
MAC0 = nclip;
|
||||
}
|
||||
#else
|
||||
MAC0 = int(F((long long)(SX0 * SY1) + (SX1 * SY2) + (SX2 * SY0) - (SX0 * SY2) - (SX1 * SY0) - (SX2 * SY1)));
|
||||
#endif
|
||||
return 1;
|
||||
|
||||
case 0x0c:
|
||||
|
Loading…
Reference in New Issue
Block a user