Fixed dolphin rendering.

This commit is contained in:
2026-07-10 20:15:26 -05:00
parent 28754ffbf2
commit fbaa54145e
5 changed files with 42 additions and 5 deletions
+7 -1
View File
@@ -78,6 +78,12 @@ errorret_t displayInitDolphin(void) {
GX_SetDispCopyGamma(GX_GM_1_0);
GX_SetColorUpdate(GX_TRUE);
// Without this, the EFB's Z-buffer format/compression is left at whatever
// GX_Init() defaulted to, so depth testing and the GX_MAX_Z24 clear value
// used every frame in frameBufferClearDolphin aren't guaranteed to line up
// with the actual EFB Z format.
GX_SetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR);
// Describe mesh vertex format.
GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_INDEX16);
@@ -101,7 +107,7 @@ errorret_t displaySetStateDolphin(displaystate_t state) {
}
if(state.flags & DISPLAY_STATE_FLAG_DEPTH_TEST) {
GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_FALSE);
} else {
GX_SetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
}