invert culling for collision viewer (#3021)

This commit is contained in:
Adam Bird 2023-06-20 22:05:52 -04:00 committed by GitHub
parent a5c2bacfe0
commit a05d8131ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -693,11 +693,23 @@ extern "C" void DrawColViewer() {
OPEN_DISPS(gPlayState->state.gfxCtx); OPEN_DISPS(gPlayState->state.gfxCtx);
uint8_t mirroredWorld = CVarGetInteger("gMirroredWorld", 0);
// Col viewer needs inverted culling in mirror mode for both OPA and XLU buffers
if (mirroredWorld) {
gSPSetExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);
gSPSetExtraGeometryMode(POLY_XLU_DISP++, G_EX_INVERT_CULLING);
}
opaDl.push_back(gsSPEndDisplayList()); opaDl.push_back(gsSPEndDisplayList());
gSPDisplayList(POLY_OPA_DISP++, opaDl.data()); gSPDisplayList(POLY_OPA_DISP++, opaDl.data());
xluDl.push_back(gsSPEndDisplayList()); xluDl.push_back(gsSPEndDisplayList());
gSPDisplayList(POLY_XLU_DISP++, xluDl.data()); gSPDisplayList(POLY_XLU_DISP++, xluDl.data());
if (mirroredWorld) {
gSPClearExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);
gSPClearExtraGeometryMode(POLY_XLU_DISP++, G_EX_INVERT_CULLING);
}
CLOSE_DISPS(gPlayState->state.gfxCtx); CLOSE_DISPS(gPlayState->state.gfxCtx);
} }