This commit is contained in:
hyunbin14
2026-01-01 11:34:06 +09:00
parent 816fc76ae3
commit ea9717a6b4
8 changed files with 220 additions and 168 deletions
+15 -29
View File
@@ -121,7 +121,7 @@ HRESULT CPlayer::Initialize(void* pArg)
m_bAI = false;
XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
//XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
m_pModelCom->Set_Temp(true);
@@ -603,14 +603,11 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
#ifdef 기무리
#elif Bin
case PLAYER_MESH_ORDER::ROBE_CLOTH:
{//if (FAILED(m_pModelCom->Bind_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_pShaderCom, "g_BoneMatrices"))) {
// return E_FAIL;
//}
{
CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
_uint paletteCount = pMesh->Get_NumBone();
_uint MeshBoneCount = pMesh->Get_NumBone();
for (_uint i = 0; i < paletteCount; ++i)
for (_uint i = 0; i < MeshBoneCount; ++i)
{
XMStoreFloat4x4(&SkinMatrices[i] ,XMMatrixIdentity());
}
@@ -619,7 +616,7 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
vector<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
vector<_int> boneIndices = pMesh->Get_BoneIndices();
for (_uint i = 0; i < paletteCount; ++i)
for (_uint i = 0; i < MeshBoneCount; ++i)
{
_uint global = boneIndices[i];
if (global == 38)
@@ -630,30 +627,19 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
}
}
array<_int, 256> paletteMask{};
paletteMask.fill(0);
//array<_int, 256> paletteMask{};
//paletteMask.fill(0);
for (_uint i = 0; i < paletteCount; ++i)
{
if (i == 29)
continue;
_uint global = boneIndices[i];
paletteMask[i] = globalMask[global];
}
//for (_uint i = 0; i < paletteCount; ++i)
//{
// if (i == 29)
// continue;
// _uint global = boneIndices[i];
// paletteMask[i] = globalMask[global];
//}
m_pShaderCom->Bind_IntArray("g_RobeBoneMask", paletteMask.data(), 256);
//m_pShaderCom->Bind_IntArray("g_RobeBoneMask", paletteMask.data(), 256);
// Bind_Matrices("g_BoneMatrices", SkinMatrices.data(), 256);
/* if (FAILED(m_pShaderCom->Bind_RawValue(
"g_RobeBoneMask",
robeIdx.data(),
sizeof(_uint) *(_int)robeIdx.size()
)))
{
return E_FAIL;
}*/
GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {