From ae6a97e91b619c3a6ade3b4199974e8f4e74dff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo?= Date: Fri, 19 Dec 2025 23:20:13 -0300 Subject: [PATCH] Only enable view matrix compensation for gameplay projection. (#11) --- patches/camera_transform_tagging.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/patches/camera_transform_tagging.c b/patches/camera_transform_tagging.c index 3ef5477..44c91d4 100644 --- a/patches/camera_transform_tagging.c +++ b/patches/camera_transform_tagging.c @@ -65,7 +65,13 @@ RECOMP_PATCH void viewport_setRenderPerspectiveMatrix(Gfx **gfx, Mtx **mtx, f32 // @recomp Create an isolated view matrix for the viewport translation and provide it as the view matrix to counteract the camera translation. MtxF* view = (MtxF*)*mtx; (*mtx)++; - guTranslateF(view->m, sViewportPosition[0], sViewportPosition[1], sViewportPosition[2]); + if (cur_perspective_projection_transform_id == PROJECTION_GAMEPLAY_TRANSFORM_ID) { + guTranslateF(view->m, sViewportPosition[0], sViewportPosition[1], sViewportPosition[2]); + } + else { + guMtxIdentF(view->m); + } + gEXSetViewMatrixFloat((*gfx)++, view->m); // @recomp If a perspective projection transform ID is set, apply it as the projection matrix group. Otherwise, use auto as the projection matrix group.