So Ape Escape appears to test two tris with a shared edge for culling like this
Normally you would treat this as two tris wound the same way, eg ABC, DCB. Instead it's treating it as two tris wound the opposite direction ABC, DBC. I assume the reason is that it can reuse the BC edge for both cases (ie. it only has to load SXY1/SXY2 once). This means that the sign required by the cull test is opposite for the first and second tri. So when the ripper forces the sign to always be positive, every second tri is missing.
So I thought maybe I could add an optional hack that would flip the sign of an NCLIP if two of SXY0, SXY1, SXY2 are the same as the previous NCLIP. This would hopefully fix games where "Disable Culling" skips "half" of every quad.
Unfortunately it doesn't quite work.
Ape Escape Before/After, note missing tri on hand.
Evil Zone Before/After, note missing tris on face.
Does nothing for Omega Boost, which appears to have a completely different culling problem.
It appears to misfire on tris sometimes, so I didn't push it. If I can figure out how to fix it, maybe I'll add it as an option.
Code:
A----C load A into SXY0
| / | load B into SXY1
| / | load C into SXY2
B----D NCLIP, ie. test winding order of (SXY0, SXY1, SXY2)
load D into SXY0
NCLIP
Normally you would treat this as two tris wound the same way, eg ABC, DCB. Instead it's treating it as two tris wound the opposite direction ABC, DBC. I assume the reason is that it can reuse the BC edge for both cases (ie. it only has to load SXY1/SXY2 once). This means that the sign required by the cull test is opposite for the first and second tri. So when the ripper forces the sign to always be positive, every second tri is missing.
So I thought maybe I could add an optional hack that would flip the sign of an NCLIP if two of SXY0, SXY1, SXY2 are the same as the previous NCLIP. This would hopefully fix games where "Disable Culling" skips "half" of every quad.
Unfortunately it doesn't quite work.
Ape Escape Before/After, note missing tri on hand.
Evil Zone Before/After, note missing tris on face.
Does nothing for Omega Boost, which appears to have a completely different culling problem.
It appears to misfire on tris sometimes, so I didn't push it. If I can figure out how to fix it, maybe I'll add it as an option.