Normalize TCG fixes

This commit is contained in:
Jack Andersen 2016-07-19 10:12:38 -10:00
parent c5cf4c9ce5
commit 6f572d3a00
3 changed files with 7 additions and 8 deletions

View File

@ -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}, 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), {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})}; 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->GetInstance().ActivateLights(lights);
m_vm.m_modelTest->Draw(flags); m_vm.m_modelTest->Draw(flags);
} }

View File

@ -329,21 +329,20 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati
{ {
case UVAnimation::Mode::MvInvNoTranslation: 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].zeroOut();
texMtxOut.vec[3].w = 1.f;
postMtxOut.vec[0].x = 0.5f; postMtxOut.vec[0].x = 0.5f;
postMtxOut.vec[1].y = 0.0f; postMtxOut.vec[1].y = 0.5f;
postMtxOut.vec[2].y = 0.5f;
postMtxOut.vec[3].x = 0.5f; postMtxOut.vec[3].x = 0.5f;
postMtxOut.vec[3].y = 0.5f; postMtxOut.vec[3].y = 0.5f;
break; break;
} }
case UVAnimation::Mode::MvInv: 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[0].x = 0.5f;
postMtxOut.vec[1].y = 0.0f; postMtxOut.vec[1].y = 0.5f;
postMtxOut.vec[2].y = 0.5f;
postMtxOut.vec[3].x = 0.5f; postMtxOut.vec[3].x = 0.5f;
postMtxOut.vec[3].y = 0.5f; postMtxOut.vec[3].y = 0.5f;
break; break;
@ -385,7 +384,6 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati
texMtxOut.vec[3].zeroOut(); texMtxOut.vec[3].zeroOut();
postMtxOut.vec[0].x = 0.5f; postMtxOut.vec[0].x = 0.5f;
postMtxOut.vec[1].y = 0.0f;
postMtxOut.vec[2].y = 0.5f; postMtxOut.vec[2].y = 0.5f;
postMtxOut.vec[3].x = CGraphics::g_GXModelMatrix.origin.x * 0.5f; postMtxOut.vec[3].x = CGraphics::g_GXModelMatrix.origin.x * 0.5f;
postMtxOut.vec[3].y = CGraphics::g_GXModelMatrix.origin.y * 0.5f; postMtxOut.vec[3].y = CGraphics::g_GXModelMatrix.origin.y * 0.5f;

2
hecl

@ -1 +1 @@
Subproject commit c3ed4b5ac3a84cf554ecdeb4202299626af2e342 Subproject commit 239a73cba2f780e0d8e3190806b0f98dae4be626