From 1ceb396b3d65c2b5ac86d33dfc2d2df1bd3e8c8e Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 25 Dec 2025 22:00:12 -0600 Subject: [PATCH] feat(gx): implement CShaderEffect::SetTexMtx --- src/gx/shader/CShaderEffect.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gx/shader/CShaderEffect.cpp b/src/gx/shader/CShaderEffect.cpp index 81abd89..8900bb4 100644 --- a/src/gx/shader/CShaderEffect.cpp +++ b/src/gx/shader/CShaderEffect.cpp @@ -190,8 +190,19 @@ void CShaderEffect::SetTexMtx_Identity(uint32_t a1) { } } -void CShaderEffect::SetTexMtx(const C44Matrix& matrix, uint32_t a2) { - // TODO +void CShaderEffect::SetTexMtx(const C44Matrix& matrix, uint32_t tcIndex) { + if (CShaderEffect::s_enableShaders) { + float constants[] = { + matrix.a0, matrix.b0, matrix.c0, matrix.d0, + matrix.a1, matrix.b1, matrix.c1, matrix.d1 + }; + + GxShaderConstantsSet(GxSh_Vertex, 2 * tcIndex + 6, constants, 2); + + return; + } + + // TODO non-shader path } void CShaderEffect::SetTexMtx_SphereMap(uint32_t a1) {