[Fix] 플레이어 망토 수정
This commit is contained in:
@@ -607,69 +607,38 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
/*for (_int i = 0; i < 256; ++i)
|
||||
XMStoreFloat4x4(&SkinMatrices[i], XMMatrixIdentity());
|
||||
|
||||
vector<_uint> robeIdx = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
|
||||
Temp = 0;
|
||||
for (_int i = 0; i < robeIdx.size(); ++i)
|
||||
{
|
||||
if (i == 38)
|
||||
continue;
|
||||
if (robeIdx[i] == 1)
|
||||
{
|
||||
SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(Temp);
|
||||
Temp++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
auto globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
|
||||
|
||||
array<_uint, 256> paletteMask{};
|
||||
paletteMask.fill(0);
|
||||
|
||||
for (_int palette = 0; palette < m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH))->Get_NumBone(); ++palette)
|
||||
{
|
||||
_uint global = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH))->Get_BoneIndices()[palette];
|
||||
paletteMask[palette] = globalMask[global];
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
auto pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
|
||||
CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
|
||||
_uint paletteCount = pMesh->Get_NumBone();
|
||||
|
||||
for (_uint p = 0; p < paletteCount; ++p)
|
||||
for (_uint i = 0; i < paletteCount; ++i)
|
||||
{
|
||||
XMStoreFloat4x4(& SkinMatrices[p] ,XMMatrixIdentity());
|
||||
XMStoreFloat4x4(&SkinMatrices[i] ,XMMatrixIdentity());
|
||||
}
|
||||
|
||||
_uint temp = 0;
|
||||
auto globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
|
||||
vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
|
||||
vector<_int> boneIndices = pMesh->Get_BoneIndices();
|
||||
|
||||
for (_uint p = 0; p < paletteCount; ++p)
|
||||
for (_uint i = 0; i < paletteCount; ++i)
|
||||
{
|
||||
_uint global = boneIndices[p];
|
||||
//if (global == 38)
|
||||
// continue;
|
||||
_uint global = boneIndices[i];
|
||||
if (global == 38)
|
||||
continue;
|
||||
if (globalMask[global] == 1)
|
||||
{
|
||||
SkinMatrices[p] =
|
||||
m_pRobePart->Get_RobeJointAnchorMatrix(temp++);
|
||||
SkinMatrices[i] = m_pRobePart->Get_RobeJointAnchorMatrix(temp++);
|
||||
}
|
||||
}
|
||||
|
||||
array<_int, 256> paletteMask{};
|
||||
paletteMask.fill(0);
|
||||
|
||||
for (_uint p = 0; p < paletteCount; ++p)
|
||||
for (_uint i = 0; i < paletteCount; ++i)
|
||||
{
|
||||
_uint global = boneIndices[p];
|
||||
paletteMask[p] = globalMask[global];
|
||||
if (i == 29)
|
||||
continue;
|
||||
_uint global = boneIndices[i];
|
||||
paletteMask[i] = globalMask[global];
|
||||
}
|
||||
|
||||
m_pShaderCom->Bind_IntArray("g_RobeBoneMask", paletteMask.data(), 256);
|
||||
@@ -685,6 +654,11 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
{
|
||||
return E_FAIL;
|
||||
}*/
|
||||
GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
|
||||
Reference in New Issue
Block a user