From 6f572d3a006c6009eabd05047d3ccff4a105d431 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 19 Jul 2016 10:12:38 -1000 Subject: [PATCH] Normalize TCG fixes --- Editor/ViewManager.cpp | 1 + Runtime/Graphics/CModelBoo.cpp | 12 +++++------- hecl | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index f79ca7be0..4817373c4 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -86,6 +86,7 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ) CLight::BuildCustom({0.f, -20.f, 10.f}, {0.f, 1.f, 0.f}, {200.f, 200.f, 200.f}, 0.f, 0.f, 1.f, 1.f, 0.f, 0.f), CLight::BuildDirectional({0.f, 0.f, -1.f}, {0.3f, 0.3f, 0.3f})}; + //lights = {CLight::BuildLocalAmbient({}, {0.0f, 0.0f, 0.0f, 1.f})}; m_vm.m_modelTest->GetInstance().ActivateLights(lights); m_vm.m_modelTest->Draw(flags); } diff --git a/Runtime/Graphics/CModelBoo.cpp b/Runtime/Graphics/CModelBoo.cpp index f1a568824..144906703 100644 --- a/Runtime/Graphics/CModelBoo.cpp +++ b/Runtime/Graphics/CModelBoo.cpp @@ -329,21 +329,20 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati { case UVAnimation::Mode::MvInvNoTranslation: { - texMtxOut = (CGraphics::g_ViewMatrix * CGraphics::g_GXModelMatrix).inverse().toMatrix4f(); + texMtxOut = CGraphics::g_GXModelViewInvXpose.toMatrix4f(); texMtxOut.vec[3].zeroOut(); + texMtxOut.vec[3].w = 1.f; postMtxOut.vec[0].x = 0.5f; - postMtxOut.vec[1].y = 0.0f; - postMtxOut.vec[2].y = 0.5f; + postMtxOut.vec[1].y = 0.5f; postMtxOut.vec[3].x = 0.5f; postMtxOut.vec[3].y = 0.5f; break; } case UVAnimation::Mode::MvInv: { - texMtxOut = (CGraphics::g_ViewMatrix * CGraphics::g_GXModelMatrix).inverse().toMatrix4f(); + texMtxOut = CGraphics::g_GXModelViewInvXpose.toMatrix4f(); postMtxOut.vec[0].x = 0.5f; - postMtxOut.vec[1].y = 0.0f; - postMtxOut.vec[2].y = 0.5f; + postMtxOut.vec[1].y = 0.5f; postMtxOut.vec[3].x = 0.5f; postMtxOut.vec[3].y = 0.5f; break; @@ -385,7 +384,6 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati texMtxOut.vec[3].zeroOut(); postMtxOut.vec[0].x = 0.5f; - postMtxOut.vec[1].y = 0.0f; postMtxOut.vec[2].y = 0.5f; postMtxOut.vec[3].x = CGraphics::g_GXModelMatrix.origin.x * 0.5f; postMtxOut.vec[3].y = CGraphics::g_GXModelMatrix.origin.y * 0.5f; diff --git a/hecl b/hecl index c3ed4b5ac..239a73cba 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit c3ed4b5ac3a84cf554ecdeb4202299626af2e342 +Subproject commit 239a73cba2f780e0d8e3190806b0f98dae4be626