[fix]
This commit is contained in:
@@ -42,6 +42,9 @@ HRESULT CGoblin_Assassin::Initialize(void* pArg)
|
|||||||
|
|
||||||
Add_FSM();
|
Add_FSM();
|
||||||
|
|
||||||
|
//Load_AnimXML("../Bin/Resources/Data/AnimIndex/Goblin_Assassin.xml");
|
||||||
|
|
||||||
|
|
||||||
Set_Anim();
|
Set_Anim();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -944,6 +944,26 @@ void CGoblin_Assassin::Add_FSM()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
//void CGoblin_Assassin::Load_AnimXML(const string& path)
|
||||||
|
//{
|
||||||
|
// tinyxml2::XMLDocument doc;
|
||||||
|
// doc.LoadFile(path.c_str());
|
||||||
|
//
|
||||||
|
// tinyxml2::XMLElement* root = doc.FirstChildElement("Animations");
|
||||||
|
// for (tinyxml2::XMLElement* elem = root->FirstChildElement("Anim");
|
||||||
|
// elem; elem = elem->NextSiblingElement("Anim"))
|
||||||
|
// {
|
||||||
|
// const char* stateStr = elem->Attribute("state");
|
||||||
|
// _int index = elem->IntAttribute("index");
|
||||||
|
// _bool loop = elem->BoolAttribute("loop");
|
||||||
|
//
|
||||||
|
// STATEANIM::ESTATE state = StringToStateAnim(stateStr);
|
||||||
|
// m_Animation[state] = { index, loop };
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
void CGoblin_Assassin::Set_Anim()
|
void CGoblin_Assassin::Set_Anim()
|
||||||
{
|
{
|
||||||
m_Animation[STATEANIM::IDLE] = { 22,true };
|
m_Animation[STATEANIM::IDLE] = { 22,true };
|
||||||
@@ -1035,48 +1055,4 @@ void CGoblin_Assassin::Set_Anim()
|
|||||||
m_Animation[STATEANIM::DEAD_L2] = { 322, false };
|
m_Animation[STATEANIM::DEAD_L2] = { 322, false };
|
||||||
m_Animation[STATEANIM::DEAD_R] = { 323, false };
|
m_Animation[STATEANIM::DEAD_R] = { 323, false };
|
||||||
m_Animation[STATEANIM::DEAD_R2] = { 324, false };
|
m_Animation[STATEANIM::DEAD_R2] = { 324, false };
|
||||||
|
|
||||||
//Tp 426
|
|
||||||
// Tp Start 428
|
|
||||||
// 76 공격끝
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 걷기 시작 57
|
|
||||||
// 걷기 루프 50
|
|
||||||
// 뛰기 시작 157
|
|
||||||
// 뛰기 루프 45
|
|
||||||
// 나이프 던지기 85
|
|
||||||
// 도끼 공격 444
|
|
||||||
// 도끼 공격 후 76
|
|
||||||
// 도끼 찍기 439
|
|
||||||
//
|
|
||||||
|
|
||||||
// 텀블링 히트 380
|
|
||||||
// 디센도 찍기전 띄우기 371
|
|
||||||
// 디센도 찍기 372
|
|
||||||
|
|
||||||
// 레비오소 피격 381
|
|
||||||
// 착지 376
|
|
||||||
//
|
|
||||||
|
|
||||||
// Shuffle1 211
|
|
||||||
// Shuffle2 215
|
|
||||||
// Shuffle3 219
|
|
||||||
// Shuffle4 223
|
|
||||||
|
|
||||||
//Jog 112도 L 148
|
|
||||||
//Jog 112도 R 152
|
|
||||||
// Jog 90 L 151
|
|
||||||
// Jog 90 R 155
|
|
||||||
|
|
||||||
|
|
||||||
// L 394
|
|
||||||
// R 395
|
|
||||||
// fwd 396
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
|||||||
|
|
||||||
m_bAI = false;
|
m_bAI = false;
|
||||||
|
|
||||||
XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
//XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
||||||
|
|
||||||
m_pModelCom->Set_Temp(true);
|
m_pModelCom->Set_Temp(true);
|
||||||
|
|
||||||
@@ -603,14 +603,11 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
|||||||
#ifdef 기무리
|
#ifdef 기무리
|
||||||
#elif Bin
|
#elif Bin
|
||||||
case PLAYER_MESH_ORDER::ROBE_CLOTH:
|
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));
|
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());
|
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<_uint> globalMask = m_pModelCom->Get_BoneMask(ENUM_CLASS(BLEND_BONE::HIPS_CLOTH));
|
||||||
vector<_int> boneIndices = pMesh->Get_BoneIndices();
|
vector<_int> boneIndices = pMesh->Get_BoneIndices();
|
||||||
|
|
||||||
for (_uint i = 0; i < paletteCount; ++i)
|
for (_uint i = 0; i < MeshBoneCount; ++i)
|
||||||
{
|
{
|
||||||
_uint global = boneIndices[i];
|
_uint global = boneIndices[i];
|
||||||
if (global == 38)
|
if (global == 38)
|
||||||
@@ -630,30 +627,19 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
array<_int, 256> paletteMask{};
|
//array<_int, 256> paletteMask{};
|
||||||
paletteMask.fill(0);
|
//paletteMask.fill(0);
|
||||||
|
|
||||||
for (_uint i = 0; i < paletteCount; ++i)
|
//for (_uint i = 0; i < paletteCount; ++i)
|
||||||
{
|
//{
|
||||||
if (i == 29)
|
// if (i == 29)
|
||||||
continue;
|
// continue;
|
||||||
_uint global = boneIndices[i];
|
// _uint global = boneIndices[i];
|
||||||
paletteMask[i] = globalMask[global];
|
// 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);
|
GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
|
||||||
|
|
||||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class CGoblin_Assassin final : public CMonster
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void Add_FSM();
|
virtual void Add_FSM();
|
||||||
|
void Load_AnimXML(const string& path);
|
||||||
virtual void Set_Anim();
|
virtual void Set_Anim();
|
||||||
|
|
||||||
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = {};
|
_float m_fSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::END)] = {};
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ class CPlayer final : public CUnit
|
|||||||
_float m_fNoInputTime = 0.f;
|
_float m_fNoInputTime = 0.f;
|
||||||
_float m_fNeutralTime = 0.f;
|
_float m_fNeutralTime = 0.f;
|
||||||
array<_float4x4, 256> SkinMatrices;
|
array<_float4x4, 256> SkinMatrices;
|
||||||
_int Temp = {0};
|
|
||||||
|
|
||||||
/* 무적 불 변수*/
|
/* 무적 불 변수*/
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Animations owner="Goblin_Assassin">
|
||||||
|
|
||||||
|
<!-- IDLE -->
|
||||||
|
<Anim state="IDLE" index="22" loop="true"/>
|
||||||
|
<Anim state="IDLE_TURN_BWD" index="24" loop="false"/>
|
||||||
|
<Anim state="IDLE_TURN_L" index="26" loop="false"/>
|
||||||
|
<Anim state="IDLE_TURN_R" index="30" loop="false"/>
|
||||||
|
|
||||||
|
<Anim state="IDLE_BREAK1" index="137" loop="false"/>
|
||||||
|
<Anim state="IDLE_BREAK2" index="138" loop="false"/>
|
||||||
|
<Anim state="IDLE_BREAK3" index="139" loop="false"/>
|
||||||
|
<Anim state="IDLE_BREAK4" index="37" loop="false"/>
|
||||||
|
<Anim state="IDLE_BREAK5" index="38" loop="false"/>
|
||||||
|
<Anim state="IDLE_BREAK6" index="39" loop="false"/>
|
||||||
|
<Anim state="IDLE_BREAK7" index="41" loop="false"/>
|
||||||
|
|
||||||
|
<!-- WALK -->
|
||||||
|
<Anim state="WALK_FWD" index="45" loop="true"/>
|
||||||
|
<Anim state="WALK_START" index="57" loop="false"/>
|
||||||
|
<Anim state="WALK_STOP" index="58" loop="false"/>
|
||||||
|
<Anim state="WALK_BWD" index="252" loop="true"/>
|
||||||
|
|
||||||
|
<!-- JOG -->
|
||||||
|
<Anim state="JOG_FWD" index="147" loop="true"/>
|
||||||
|
<Anim state="JOG_START" index="157" loop="false"/>
|
||||||
|
<Anim state="JOG_BWD" index="146" loop="false"/>
|
||||||
|
<Anim state="JOG_112_L" index="148" loop="true"/>
|
||||||
|
<Anim state="JOG_112_R" index="152" loop="true"/>
|
||||||
|
<Anim state="JOG_90_L" index="151" loop="true"/>
|
||||||
|
<Anim state="JOG_90_R" index="155" loop="true"/>
|
||||||
|
|
||||||
|
<!-- SHUFFLE -->
|
||||||
|
<Anim state="SHUFFLE1" index="203" loop="false"/>
|
||||||
|
<Anim state="SHUFFLE2" index="204" loop="false"/>
|
||||||
|
<Anim state="SHUFFLE3" index="205" loop="false"/>
|
||||||
|
<Anim state="SHUFFLE4" index="206" loop="false"/>
|
||||||
|
|
||||||
|
<!-- MOVE / ACTION -->
|
||||||
|
<Anim state="DODGE_LEFT" index="125" loop="false"/>
|
||||||
|
<Anim state="DODGE_RIGHT" index="126" loop="false"/>
|
||||||
|
<Anim state="SPRINT" index="90" loop="true"/>
|
||||||
|
|
||||||
|
<Anim state="BLINK_START" index="428" loop="false"/>
|
||||||
|
<Anim state="BLINK" index="426" loop="false"/>
|
||||||
|
|
||||||
|
<Anim state="SLASH" index="72" loop="false"/>
|
||||||
|
<Anim state="DASH" index="73" loop="false"/>
|
||||||
|
<Anim state="ATTACK_END" index="76" loop="false"/>
|
||||||
|
|
||||||
|
<!-- HIT -->
|
||||||
|
<Anim state="HIT_FWD" index="353" loop="false"/>
|
||||||
|
<Anim state="HIT_BWD" index="352" loop="false"/>
|
||||||
|
<Anim state="HIT_BWD2" index="349" loop="false"/>
|
||||||
|
<Anim state="HIT_BWD3" index="350" loop="false"/>
|
||||||
|
<Anim state="HIT_BWD4" index="351" loop="false"/>
|
||||||
|
<Anim state="HIT_L" index="354" loop="false"/>
|
||||||
|
<Anim state="HIT_R" index="355" loop="false"/>
|
||||||
|
|
||||||
|
<!-- KNOCKDOWN -->
|
||||||
|
<Anim state="KNOCKDOWN_BWD" index="374" loop="false"/>
|
||||||
|
<Anim state="KNOCKDOWN_BWD_SPLT" index="375" loop="false"/>
|
||||||
|
<Anim state="KNOCKDOWN_BWD_SPLT_HOLD" index="370" loop="false"/>
|
||||||
|
<Anim state="KNOCKDOWN_FWD" index="371" loop="false"/>
|
||||||
|
<Anim state="KNOCKDOWN_FWD_SPLT" index="372" loop="false"/>
|
||||||
|
<Anim state="KNOCKDOWN_FWD_SPLT_HOLD" index="373" loop="false"/>
|
||||||
|
|
||||||
|
<!-- GETUP -->
|
||||||
|
<Anim state="GETUP_BWD" index="330" loop="false"/>
|
||||||
|
<Anim state="GETUP_FWD" index="332" loop="false"/>
|
||||||
|
<Anim state="GETUP_L" index="334" loop="false"/>
|
||||||
|
<Anim state="GETUP_L_FD" index="336" loop="false"/>
|
||||||
|
<Anim state="GETUP_L_FU" index="338" loop="false"/>
|
||||||
|
<Anim state="GETUP_R" index="340" loop="false"/>
|
||||||
|
<Anim state="GETUP_R_FD" index="342" loop="false"/>
|
||||||
|
<Anim state="GETUP_R_FU" index="344" loop="false"/>
|
||||||
|
<Anim state="GETUP_SLOUCH" index="346" loop="false"/>
|
||||||
|
|
||||||
|
<!-- ETC -->
|
||||||
|
<Anim state="KNOCKBACK" index="377" loop="true"/>
|
||||||
|
<Anim state="KNOCKBACK2" index="378" loop="true"/>
|
||||||
|
<Anim state="TUMBLE" index="379" loop="true"/>
|
||||||
|
<Anim state="TUMBLE2" index="380" loop="true"/>
|
||||||
|
<Anim state="TUMBLE_FWD" index="429" loop="true"/>
|
||||||
|
|
||||||
|
<Anim state="PETRIFICUSED_START" index="383" loop="false"/>
|
||||||
|
<Anim state="LAND" index="376" loop="false"/>
|
||||||
|
<Anim state="HIT_LEVIOSO" index="381" loop="false"/>
|
||||||
|
<Anim state="INCARCEROUS" index="382" loop="false"/>
|
||||||
|
|
||||||
|
<!-- STUMBLE -->
|
||||||
|
<Anim state="STUMBLE_BWD_L" index="394" loop="false"/>
|
||||||
|
<Anim state="STUMBLE_BWD_R" index="395" loop="false"/>
|
||||||
|
<Anim state="STUMBLE_FWD" index="396" loop="false"/>
|
||||||
|
|
||||||
|
<!-- DEAD -->
|
||||||
|
<Anim state="DEAD_BWD" index="317" loop="false"/>
|
||||||
|
<Anim state="DEAD_BWD2" index="318" loop="false"/>
|
||||||
|
<Anim state="DEAD_FWD" index="319" loop="false"/>
|
||||||
|
<Anim state="DEAD_FWD2" index="320" loop="false"/>
|
||||||
|
<Anim state="DEAD_L" index="321" loop="false"/>
|
||||||
|
<Anim state="DEAD_L2" index="322" loop="false"/>
|
||||||
|
<Anim state="DEAD_R" index="323" loop="false"/>
|
||||||
|
<Anim state="DEAD_R2" index="324" loop="false"/>
|
||||||
|
|
||||||
|
</Animations>
|
||||||
@@ -189,80 +189,6 @@ VS_OUT VS_MAIN(VS_IN In)
|
|||||||
|
|
||||||
VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
||||||
{
|
{
|
||||||
// VS_OUT Out = (VS_OUT)0;
|
|
||||||
|
|
||||||
// float4 w = In.vBlendWeight;
|
|
||||||
// float sumW = max(dot(w, 1.0f), 1e-6f);
|
|
||||||
// w /= sumW;
|
|
||||||
// matrix BoneMatrix = (matrix)0;
|
|
||||||
// matrix TempBoneMatrix = (matrix) 0;
|
|
||||||
|
|
||||||
// int iLeftHand = 29;
|
|
||||||
// int iRightHand = 41;
|
|
||||||
|
|
||||||
// if (In.vBlendIndex.x >= iLeftHand && In.vBlendIndex.x <= iRightHand)
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.x],
|
|
||||||
// mul(g_BoneMatrices[In.vBlendIndex.x], w.x));
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.x],
|
|
||||||
// mul(g_BoneBuffer[In.vBlendIndex.x].LocalCombined, w.x));
|
|
||||||
// }
|
|
||||||
// if (In.vBlendIndex.y >= iLeftHand && In.vBlendIndex.y <= iRightHand)
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.y],
|
|
||||||
// mul(g_BoneMatrices[In.vBlendIndex.y], w.y));
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.y],
|
|
||||||
// mul(g_BoneBuffer[In.vBlendIndex.y].LocalCombined, w.y));
|
|
||||||
// }
|
|
||||||
// if (In.vBlendIndex.z >= iLeftHand && In.vBlendIndex.z <= iRightHand)
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.z],
|
|
||||||
// mul(g_BoneMatrices[In.vBlendIndex.z], w.z));
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.z],
|
|
||||||
// mul(g_BoneBuffer[In.vBlendIndex.z].LocalCombined, w.z));
|
|
||||||
// }
|
|
||||||
// if (In.vBlendIndex.w >= iLeftHand && In.vBlendIndex.w <= iRightHand)
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.w],
|
|
||||||
// mul(g_BoneMatrices[In.vBlendIndex.w], w.w));
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.w],
|
|
||||||
// mul(g_BoneBuffer[In.vBlendIndex.w].LocalCombined, w.w));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// BoneMatrix = TempBoneMatrix;
|
|
||||||
//// BoneMatrix =
|
|
||||||
//// mul(g_OffsetMatrix[In.vBlendIndex.x],
|
|
||||||
//// mul(g_BoneBuffer[In.vBlendIndex.x].LocalCombined, w.x));
|
|
||||||
//// +mul(g_OffsetMatrix[In.vBlendIndex.y],
|
|
||||||
//// mul(g_BoneBuffer[In.vBlendIndex.y].LocalCombined, w.y))
|
|
||||||
//// + mul(g_OffsetMatrix[In.vBlendIndex.z],
|
|
||||||
//// mul(g_BoneBuffer[In.vBlendIndex.z].LocalCombined, w.z))
|
|
||||||
//// + mul(g_OffsetMatrix[In.vBlendIndex.w],
|
|
||||||
//// mul(g_BoneBuffer[In.vBlendIndex.w].LocalCombined, w.w));
|
|
||||||
|
|
||||||
////BoneMatrix =
|
|
||||||
//// mul(g_OffsetMatrix[In.vBlendIndex.x],
|
|
||||||
//// mul(g_BoneMatrices[In.vBlendIndex.x], w.x))
|
|
||||||
//// + mul(g_OffsetMatrix[In.vBlendIndex.y],
|
|
||||||
//// mul(g_BoneMatrices[In.vBlendIndex.y], w.y))
|
|
||||||
//// + mul(g_OffsetMatrix[In.vBlendIndex.z],
|
|
||||||
//// mul(g_BoneMatrices[In.vBlendIndex.z], w.z))
|
|
||||||
//// + mul(g_OffsetMatrix[In.vBlendIndex.w],
|
|
||||||
//// mul(g_BoneMatrices[In.vBlendIndex.w], w.w));
|
|
||||||
|
|
||||||
|
|
||||||
VS_OUT Out = (VS_OUT) 0;
|
VS_OUT Out = (VS_OUT) 0;
|
||||||
|
|
||||||
float4 w = In.vBlendWeight;
|
float4 w = In.vBlendWeight;
|
||||||
@@ -271,30 +197,85 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
|||||||
|
|
||||||
uint4 idx = In.vBlendIndex;
|
uint4 idx = In.vBlendIndex;
|
||||||
|
|
||||||
float robeWeight =
|
|
||||||
g_RobeBoneMask[idx.x] * w.x
|
|
||||||
+ g_RobeBoneMask[idx.y] * w.y
|
|
||||||
+ g_RobeBoneMask[idx.z] * w.z
|
|
||||||
+ g_RobeBoneMask[idx.w] * w.w;
|
|
||||||
|
|
||||||
bool isRobe = robeWeight > g_TempWeight;
|
|
||||||
|
|
||||||
matrix BoneMatrix = (matrix) 0;
|
matrix BoneMatrix = (matrix) 0;
|
||||||
|
matrix TempBoneMatrix = (matrix) 0;
|
||||||
|
|
||||||
if (isRobe)
|
int MinIdx = 30;
|
||||||
|
int MaxIdx = 41;
|
||||||
|
|
||||||
|
if (idx.x >= MinIdx && idx.x <= MaxIdx)
|
||||||
|
//g_RobeBoneMask[idx.x] == 1)
|
||||||
{
|
{
|
||||||
BoneMatrix += w.x * mul(g_OffsetMatrix[idx.x], g_BoneMatrices[idx.x]);
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.x],
|
||||||
BoneMatrix += w.y * mul(g_OffsetMatrix[idx.y], g_BoneMatrices[idx.y]);
|
mul(g_BoneMatrices[In.vBlendIndex.x], w.x));
|
||||||
BoneMatrix += w.z * mul(g_OffsetMatrix[idx.z], g_BoneMatrices[idx.z]);
|
|
||||||
BoneMatrix += w.w * mul(g_OffsetMatrix[idx.w], g_BoneMatrices[idx.w]);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BoneMatrix += w.x * mul(g_OffsetMatrix[idx.x], g_BoneBuffer[idx.x].LocalCombined);
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.x],
|
||||||
BoneMatrix += w.y * mul(g_OffsetMatrix[idx.y], g_BoneBuffer[idx.y].LocalCombined);
|
mul(g_BoneBuffer[In.vBlendIndex.x].LocalCombined, w.x));
|
||||||
BoneMatrix += w.z * mul(g_OffsetMatrix[idx.z], g_BoneBuffer[idx.z].LocalCombined);
|
|
||||||
BoneMatrix += w.w * mul(g_OffsetMatrix[idx.w], g_BoneBuffer[idx.w].LocalCombined);
|
|
||||||
}
|
}
|
||||||
|
if (idx.y >= MinIdx && idx.y <= MaxIdx)
|
||||||
|
//if (g_RobeBoneMask[idx.y] == 1)
|
||||||
|
{
|
||||||
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.y],
|
||||||
|
mul(g_BoneMatrices[In.vBlendIndex.y], w.y));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.y],
|
||||||
|
mul(g_BoneBuffer[In.vBlendIndex.y].LocalCombined, w.y));
|
||||||
|
}
|
||||||
|
if (idx.z >= MinIdx && idx.z <= MaxIdx)
|
||||||
|
//if (g_RobeBoneMask[idx.z] == 1)
|
||||||
|
{
|
||||||
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.z],
|
||||||
|
mul(g_BoneMatrices[In.vBlendIndex.z], w.z));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.z],
|
||||||
|
mul(g_BoneBuffer[In.vBlendIndex.z].LocalCombined, w.z));
|
||||||
|
}
|
||||||
|
if (idx.w >= MinIdx && idx.w <= MaxIdx)
|
||||||
|
//if (g_RobeBoneMask[idx.w] == 1)
|
||||||
|
{
|
||||||
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.w],
|
||||||
|
mul(g_BoneMatrices[In.vBlendIndex.w], w.w));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TempBoneMatrix += mul(g_OffsetMatrix[In.vBlendIndex.w],
|
||||||
|
mul(g_BoneBuffer[In.vBlendIndex.w].LocalCombined, w.w));
|
||||||
|
}
|
||||||
|
|
||||||
|
BoneMatrix = TempBoneMatrix;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//float robeWeight =
|
||||||
|
// g_RobeBoneMask[idx.x] * w.x
|
||||||
|
// + g_RobeBoneMask[idx.y] * w.y
|
||||||
|
// + g_RobeBoneMask[idx.z] * w.z
|
||||||
|
// + g_RobeBoneMask[idx.w] * w.w;
|
||||||
|
|
||||||
|
//bool isRobe = robeWeight > g_TempWeight;
|
||||||
|
|
||||||
|
//matrix BoneMatrix = (matrix) 0;
|
||||||
|
|
||||||
|
//if (isRobe)
|
||||||
|
//{
|
||||||
|
// BoneMatrix += w.x * mul(g_OffsetMatrix[idx.x], g_BoneMatrices[idx.x]);
|
||||||
|
// BoneMatrix += w.y * mul(g_OffsetMatrix[idx.y], g_BoneMatrices[idx.y]);
|
||||||
|
// BoneMatrix += w.z * mul(g_OffsetMatrix[idx.z], g_BoneMatrices[idx.z]);
|
||||||
|
// BoneMatrix += w.w * mul(g_OffsetMatrix[idx.w], g_BoneMatrices[idx.w]);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// BoneMatrix += w.x * mul(g_OffsetMatrix[idx.x], g_BoneBuffer[idx.x].LocalCombined);
|
||||||
|
// BoneMatrix += w.y * mul(g_OffsetMatrix[idx.y], g_BoneBuffer[idx.y].LocalCombined);
|
||||||
|
// BoneMatrix += w.z * mul(g_OffsetMatrix[idx.z], g_BoneBuffer[idx.z].LocalCombined);
|
||||||
|
// BoneMatrix += w.w * mul(g_OffsetMatrix[idx.w], g_BoneBuffer[idx.w].LocalCombined);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
matrix PrevBoneMatrix =
|
matrix PrevBoneMatrix =
|
||||||
|
|||||||
@@ -1506,7 +1506,7 @@ void CModel::Initialize_BoneMasks()
|
|||||||
{
|
{
|
||||||
if (m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)][i] == 1)
|
if (m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)][i] == 1)
|
||||||
{
|
{
|
||||||
if (i == 38)
|
if (i == m_iBoneIndex[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)])
|
||||||
continue;
|
continue;
|
||||||
m_iSkipBoneCount++;
|
m_iSkipBoneCount++;
|
||||||
m_SkipBoneindex.push_back(i);
|
m_SkipBoneindex.push_back(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user