rollback armature transform correction

This commit is contained in:
turanszkij
2017-03-31 20:51:11 +02:00
parent 570c14d472
commit 2ccca32b6b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -3150,7 +3150,7 @@ void Armature::UpdateTransform()
// calculate frame
for (Bone* root : rootbones)
{
RecursiveBoneTransform(this, root, XMMatrixIdentity());
RecursiveBoneTransform(this, root, getMatrix());
}
}
+2 -2
View File
@@ -3756,7 +3756,7 @@ void wiRenderer::RenderMeshes(const XMFLOAT3& eye, const CulledCollection& culle
if (!occlusionCulling || !instance->IsOccluded())
{
XMMATRIX temp;
if (mesh->softBody)
if (mesh->softBody || instance->isArmatureDeformed())
temp = XMMatrixIdentity();
else
temp = XMMatrixTranspose(XMLoadFloat4x4(&instance->world));
@@ -3764,7 +3764,7 @@ void wiRenderer::RenderMeshes(const XMFLOAT3& eye, const CulledCollection& culle
if (shaderType == SHADERTYPE_FORWARD || shaderType == SHADERTYPE_TILEDFORWARD || shaderType == SHADERTYPE_DEFERRED)
{
if (mesh->softBody)
if (mesh->softBody || instance->isArmatureDeformed())
temp = XMMatrixIdentity();
else
temp = XMMatrixTranspose(XMLoadFloat4x4(&instance->worldPrev));