mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-25 07:02:47 -04:00
Fix underwater effect + Fading to work at any aspect ratio
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user