Skip to content

Commit

Permalink
invert culling for collision viewer (#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez committed Jun 21, 2023
1 parent a5c2bac commit a05d813
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions soh/soh/Enhancements/debugger/colViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,23 @@ extern "C" void DrawColViewer() {

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());
gSPDisplayList(POLY_OPA_DISP++, opaDl.data());

xluDl.push_back(gsSPEndDisplayList());
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);
}

0 comments on commit a05d813

Please sign in to comment.