Fix underwater effect + Fading to work at any aspect ratio

This commit is contained in:
MelonSpeedruns
2026-04-01 20:20:09 -04:00
parent 769eba2e21
commit fe02fb8e61
3 changed files with 18 additions and 0 deletions
+6
View File
@@ -51,8 +51,14 @@ void dOvlpFd2_dlst_c::draw() {
GXEnd();
Mtx44 m;
#if TARGET_PC
C_MTXPerspective(m, 60.0f, 1.3571428f, 100.0f, 100000.0f);
#else
C_MTXPerspective(m, 60.0f, mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getHeightF(), 100.0f,
100000.0f);
#endif
GXSetProjection(m, GX_PERSPECTIVE);
#ifdef TARGET_PC
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
+6
View File
@@ -64,8 +64,14 @@ void dOvlpFd3_dlst_c::draw() {
GXEnd();
Mtx44 m;
#if TARGET_PC
C_MTXPerspective(m, 60.0f, 1.3571428f, 100.0f, 100000.0f);
#else
C_MTXPerspective(m, 60.0f, mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getHeightF(), 100.0f,
100000.0f);
#endif
GXSetProjection(m, GX_PERSPECTIVE);
#ifdef TARGET_PC
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
+6
View File
@@ -2051,7 +2051,13 @@ int mDoGph_Painter() {
Mtx m2;
Mtx44 m;
#if TARGET_PC
C_MTXPerspective(m, AREG_F(8) + 60.0f, 1.3571428f, 1.0f, 100000.0f);
#else
C_MTXPerspective(m, AREG_F(8) + 60.0f, mDoGph_gInf_c::getAspect(), 1.0f, 100000.0f);
#endif
GXSetProjection(m, GX_PERSPECTIVE);
cXyz sp38c(0.0f, 0.0f, AREG_F(7) + -2.0f);
cXyz sp398(0.0f, 1.0f, 0.0f);