From 91e334155dcd45aea8adf1a7ff7c5366bb9c2b33 Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Tue, 6 Jan 2026 15:08:45 +0900 Subject: [PATCH] =?UTF-8?q?[Add]=20Human=20Duelist=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/Human_Duelist.cpp | 32 ++- .../Client/Private/Human_Duelist_States.cpp | 99 ++++++- .../Client/Private/Level_GamePlay.cpp | 12 +- Jusin154_Team3D/Client/Private/NomalJap.cpp | 7 +- .../Client/Private/Player_States.cpp | 4 + Jusin154_Team3D/Client/Public/Human_Duelist.h | 26 +- Jusin154_Team3D/Client/Public/Player.h | 2 +- Jusin154_Team3D/Client/Public/Ranrok.h | 2 +- .../Resources/Data/AnimList/Human_Duelist.xml | 149 +--------- .../Editor/Bin/Resources/Data/Stat/Stat.xml | 1 + .../Human/Npc/M_Student/M_Student_Rct.bin | 3 + .../Human/Npc/SatyavatiShah/SatyavatiShah.bin | 4 +- .../Human/Npc/SatyavatiShah/SatyavatiShah.xml | 2 +- .../ShaderFiles/Shader_Local_Compute.hlsl | 5 +- .../ShaderFiles/Shader_Mesh_Compute.hlsl | 2 +- .../Editor/Private/Loader_ObjectViewer.cpp | 266 ++++++++---------- .../ShaderFiles/Shader_Local_Compute.hlsl | 5 +- .../ShaderFiles/Shader_Mesh_Compute.hlsl | 2 +- Jusin154_Team3D/Engine/Private/Model.cpp | 41 ++- Jusin154_Team3D/Engine/Private/Unit.cpp | 3 + Jusin154_Team3D/Engine/Public/Model.h | 31 +- Jusin154_Team3D/Engine/Public/State.h | 2 +- 22 files changed, 335 insertions(+), 365 deletions(-) create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/M_Student/M_Student_Rct.bin diff --git a/Jusin154_Team3D/Client/Private/Human_Duelist.cpp b/Jusin154_Team3D/Client/Private/Human_Duelist.cpp index ee72f7596..995911400 100644 --- a/Jusin154_Team3D/Client/Private/Human_Duelist.cpp +++ b/Jusin154_Team3D/Client/Private/Human_Duelist.cpp @@ -12,13 +12,12 @@ #include "Mesh.h" CHuman_Duelist::CHuman_Duelist(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - : CUnit(pDevice, pContext) + : CMonster(pDevice, pContext) { } CHuman_Duelist::CHuman_Duelist(const CHuman_Duelist& Prototype) - : CUnit(Prototype), - m_pInfoInstance(CInfoInstance::GetInstance()) + : CMonster(Prototype) { } @@ -60,8 +59,7 @@ HRESULT CHuman_Duelist::Initialize(void* pArg) m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object(); SAFE_ADDREF(m_pEffectPool); - m_pInfoInstance->Regist_PlayerAlly(this); - m_pInfoInstance->Set_Damage(m_pStat->Get_Stat().fDamage); + m_pInfoInstance->Regist_ActiveMonster(this); { PLAYERDESC* pDesc = static_cast(pArg); _vector vPos = XMLoadFloat4(&pDesc->vPos); @@ -71,7 +69,7 @@ HRESULT CHuman_Duelist::Initialize(void* pArg) m_pTransformCom->Rotation(vRotQ); } - m_bAI = false; + m_bAI = true; m_pModelCom->Set_DisableRootMotionScale(true); @@ -106,6 +104,9 @@ void CHuman_Duelist::Update(_float fTimeDelta) m_pCallBack_HitReport->Set_CurrentSlop(); } + for (_uint i = 0; i < ENUM_CLASS(SKILL::END); i++) + m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta); + m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION)); } @@ -121,6 +122,10 @@ void CHuman_Duelist::Late_Update(_float fTimeDelta) Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())); __super::Late_Update(fTimeDelta); + + if (true == m_bLookAt) { + m_pTransformCom->LookAt_Horizontal_Lerp(XMLoadFloat4(&m_vTargetPos), fTimeDelta, 3.f); + } } @@ -224,8 +229,6 @@ HRESULT CHuman_Duelist::Render_Shadow(SHADOW eType) } void CHuman_Duelist::OnCollision(CGameObject* pOther, void* pDesc) { - _int iCurrAnim = m_pModelCom->Get_AnimIndex(); - ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); if (CollisionDesc) { Check_HitAngle(XMLoadFloat4(&CollisionDesc->vHitDir)); @@ -252,7 +255,11 @@ HRESULT CHuman_Duelist::Ready_Components() Desc.fRotationPerSec = XMConvertToRadians(180.0f); Desc.fRadius = 10.f; - if (FAILED(__super::Ready_Components(&Desc))) { + if (FAILED(Add_Component(g_iStaticLevel, &m_pTransformCom, &Desc))) { + return E_FAIL; + } + + if (FAILED(Add_Component(g_iStaticLevel, &m_pFSM))) { return E_FAIL; } @@ -280,9 +287,10 @@ HRESULT CHuman_Duelist::Ready_Components() return E_FAIL; } - m_pStat = m_pInfoInstance->Get_PlayerStatPtr(); - m_Components.push_back(m_pStat); - SAFE_ADDREF(m_pStat); + + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("STAT_M_STUDENT"), (CComponent**)&m_pStat))) { + return E_FAIL; + } { // CCT CCharacter_Controller::Character_Controller_DESC Desc{}; diff --git a/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp b/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp index 05c0debca..bc0454557 100644 --- a/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp +++ b/Jusin154_Team3D/Client/Private/Human_Duelist_States.cpp @@ -24,10 +24,21 @@ void CHuman_Duelist::Behavior_IdleEnter() { m_pFSM->Enable_State(FSMSTATE::IDLE); + pair<_uint, _bool> pairAnimInfo; + pairAnimInfo = m_Animation[STATEANIM::IDLE]; + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } HRESULT CHuman_Duelist::Behavior_IdleExitCheck(_float fTimeDelta) { + for (_uint i = 0; i < ENUM_CLASS(SKILL::END); i++) + { + if (m_fSkillCoolTime[i] == 0.f) { + m_pFSM->Change_State(FSMSTATE::COMBAT); + return E_FAIL; + } + } return S_OK; } @@ -43,6 +54,26 @@ void CHuman_Duelist::Behavior_CombatEnter() HRESULT CHuman_Duelist::Behavior_CombatExitCheck() { + if (m_fSkillCoolTime[ENUM_CLASS(SKILL::LEVIOSO)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::SPELL); + return E_FAIL; + } + else if (m_fSkillCoolTime[ENUM_CLASS(SKILL::PROTEGO)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::SHIELD); + return E_FAIL; + } + else if (m_fSkillCoolTime[ENUM_CLASS(SKILL::LIGHT_ATTACK)] <= 0.f) + { + m_pFSM->Change_State(FSMSTATE::LIGHT_ATTACK); + return E_FAIL; + } + else { + m_pFSM->Change_State(FSMSTATE::IDLE); + return E_FAIL; + } + return S_OK; } @@ -53,11 +84,44 @@ void CHuman_Duelist::Behavior_CombatExit() void CHuman_Duelist::Behavior_LightAttackEnter() { + pair<_uint, _bool> pairAnimInfo; m_pFSM->Enable_State(FSMSTATE::LIGHT_ATTACK); + _int iRand = m_pGameInstance->Real_Random_Int(0, 3); + switch (iRand) + { + case 0: + pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK]; + break; + case 1: + pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK2]; + break; + case 2: + pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK3]; + break; + case 3: + pairAnimInfo = m_Animation[STATEANIM::LIGHT_ATTACK4]; + break; + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + Add_Event(pairAnimInfo.first, + [this]() {_uint iIndex = 0; m_pEffectPool->Use_Skill(SKILL_TYPE::JAP, Get_PartObject(), &iIndex); }, + 0.2f); + + Add_Event(pairAnimInfo.first, + [this]() { m_pEffectPool->Use_Skill(SKILL_TYPE::JAP_SIDE, Get_PartObject()); }, + 0.0f); + + m_fSkillCoolTime[ENUM_CLASS(SKILL::LIGHT_ATTACK)] = m_fMaxSkillCoolTime[ENUM_CLASS(SKILL::LIGHT_ATTACK)]; } HRESULT CHuman_Duelist::Behavior_LightAttackExitCheck(_float fTimeDelta) { + if (m_pModelCom->IsFinishedAnim()) + { + m_pFSM->Change_State(FSMSTATE::COMBAT); + return E_FAIL; + } return S_OK; } @@ -69,10 +133,28 @@ void CHuman_Duelist::Behavior_LightAttackExit() void CHuman_Duelist::Behavior_SpellEnter() { m_pFSM->Enable_State(FSMSTATE::SPELL); + pair<_uint, _bool> pairAnimInfo; + pairAnimInfo = m_Animation[STATEANIM::SPELL]; + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO, this); }, + 0.2f); + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::LEVIOSO_SIDE, Get_PartObject()); }, + 0.f); + + m_fSkillCoolTime[ENUM_CLASS(SKILL::LEVIOSO)] = m_fMaxSkillCoolTime[ENUM_CLASS(SKILL::LEVIOSO)]; } HRESULT CHuman_Duelist::Behavior_SpellExitCheck() { + if (m_pModelCom->IsFinishedAnim()) + { + m_pFSM->Change_State(FSMSTATE::COMBAT); + return E_FAIL; + } return S_OK; } @@ -84,10 +166,26 @@ void CHuman_Duelist::Behavior_SpellExit() void CHuman_Duelist::Behavior_ShieldEnter() { m_pFSM->Enable_State(FSMSTATE::SHIELD); + + pair<_uint, _bool> pairAnimInfo; + pairAnimInfo = m_Animation[STATEANIM::SKILL]; + + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::PROTEGO, this); }, + 0.1f); + + m_fSkillCoolTime[ENUM_CLASS(SKILL::PROTEGO)] = m_fMaxSkillCoolTime[ENUM_CLASS(SKILL::PROTEGO)]; } HRESULT CHuman_Duelist::Behavior_ShieldExitCheck() { + if (m_pModelCom->IsFinishedAnim()) + { + m_pFSM->Change_State(FSMSTATE::COMBAT); + return E_FAIL; + } return S_OK; } @@ -111,7 +209,6 @@ void CHuman_Duelist::Behavior_HitExit() m_pFSM->Disable_State(FSMSTATE::HIT); } - void CHuman_Duelist::Add_FSM() { #pragma region Behavior_Movement_NotFocus diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index dfcf41450..99fd6b626 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -856,12 +856,12 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) } } - //CPlayer::PLAYERDESC playerDesc = {}; - //playerDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f); - //playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { - // return E_FAIL; - //} + CPlayer::PLAYERDESC playerDesc = {}; + playerDesc.vPos = _float4(-21.f, 0.f, -14.f, 1.f); + playerDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag,&playerDesc))) { + return E_FAIL; + } } diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp index c4f08c21d..582505a75 100644 --- a/Jusin154_Team3D/Client/Private/NomalJap.cpp +++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp @@ -303,7 +303,12 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc) Get_PartObject()->Set_Visible(false); Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f)); - dynamic_cast(m_pOwner->Get_Owner())->Start_CameraShake(0.2f, 1.f); + CPlayer* pPlayer = dynamic_cast(m_pOwner->Get_Owner()); + if (pPlayer != nullptr) + { + pPlayer->Start_CameraShake(0.2f, 1.f); + } + } void CNomalJap::Free() diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 153f5c8b5..cb02af8dc 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -222,6 +222,7 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta) } else if (m_pGameInstance->Key_Down(DIK_G)) { Get_PartObject()->Set_Visible(true); + m_pModelCom->IsSkip(true); //m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } else if (m_pGameInstance->Key_Down(DIK_B)) { @@ -346,6 +347,7 @@ void CPlayer::Behavior_IdleExit() { m_pFSM->Disable_State(FSMSTATE::IDLE | FSMSTATE::IDLE_TURN); Reset_Event(); + m_pModelCom->IsSkip(false); } void CPlayer::Behavior_MoveEnter() @@ -469,6 +471,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta) } else if (m_pGameInstance->Key_Down(DIK_G)) { Get_PartObject()->Set_Visible(true); + m_pModelCom->IsSkip(true); //m_pModelCom->Set_Second_AnimationIndex(ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L), m_Animation[STATEANIM::POTION].first, m_Animation[STATEANIM::POTION].second); } @@ -698,6 +701,7 @@ void CPlayer::Behavior_MoveExit() { m_pFSM->Disable_State(FSMSTATE::MOVE | FSMSTATE::SPRINT | FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::STOP); Reset_Event(); + m_pModelCom->IsSkip(false); } void CPlayer::Behavior_JumpEnter() diff --git a/Jusin154_Team3D/Client/Public/Human_Duelist.h b/Jusin154_Team3D/Client/Public/Human_Duelist.h index 87093a453..9cd1fa96f 100644 --- a/Jusin154_Team3D/Client/Public/Human_Duelist.h +++ b/Jusin154_Team3D/Client/Public/Human_Duelist.h @@ -1,18 +1,26 @@ #pragma once #include "Client_Define.h" -#include "Unit.h" +#include "Monster.h" #include "Player_ENUM.h" NS_BEGIN(Client) -class CHuman_Duelist final : public CUnit +class CHuman_Duelist final : public CMonster { public: typedef struct tagPlayerInitDesc { _float4 vPos; _float4 vRotQ; }PLAYERDESC; + + enum class SKILL + { + LEVIOSO, + PROTEGO, + LIGHT_ATTACK, + END + }; private: CHuman_Duelist(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CHuman_Duelist(const CHuman_Duelist& Prototype); @@ -30,17 +38,12 @@ class CHuman_Duelist final : public CUnit void Set_Shield(_bool bShield) { m_bShield = bShield; } _matrix Get_WandPos(); private: - CInfoInstance* m_pInfoInstance = { nullptr }; - CCharacter_Controller* m_pCharacter_Controller = { nullptr }; CRigidBody_Dynamic* m_pRigidBody = { nullptr }; class CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr }; class CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr }; CLight* m_pLightCom = { nullptr }; LIGHT_DESC LightDesc = {}; - - CStat* m_pStat = { nullptr }; - private: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; @@ -49,8 +52,6 @@ class CHuman_Duelist final : public CUnit HRESULT Bind_ShaderResources(); HRESULT Bind_ShaderParameters(_uint iMeshOrder); void SetGravity(); - void Add_SpellEvent(_uint AnimIndex, _float fRatio); - public: static CHuman_Duelist* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); @@ -67,11 +68,12 @@ class CHuman_Duelist final : public CUnit virtual void Add_FSM(); - _bool m_bLookAt = { false }; _bool m_bSpellHit = {}; _bool m_bShield = { false }; - _float m_fCross = 0.f; - _float m_fabsDir = 0.f; + + + _float m_fSkillCoolTime[ENUM_CLASS(SKILL::END)] = {}; + _float m_fMaxSkillCoolTime[ENUM_CLASS(SKILL::END)] = { 10.f,10.f,5.f }; void Behavior_IdleEnter(); HRESULT Behavior_IdleExitCheck(_float fTimeDelta); diff --git a/Jusin154_Team3D/Client/Public/Player.h b/Jusin154_Team3D/Client/Public/Player.h index 6924a9235..55cbe15ba 100644 --- a/Jusin154_Team3D/Client/Public/Player.h +++ b/Jusin154_Team3D/Client/Public/Player.h @@ -166,7 +166,7 @@ class CPlayer final : public CUnit _float m_fMoveTime = {}; _float m_fCross = 0.f; _float m_fabsDir = 0.f; - array<_float4x4, 256> SkinMatrices; + array<_float4x4, 256> SkinMatrices = {}; _bool m_bOpenDoor = { false }; /* 무적 불 변수*/ diff --git a/Jusin154_Team3D/Client/Public/Ranrok.h b/Jusin154_Team3D/Client/Public/Ranrok.h index 5b37358e3..7a4dbe679 100644 --- a/Jusin154_Team3D/Client/Public/Ranrok.h +++ b/Jusin154_Team3D/Client/Public/Ranrok.h @@ -65,7 +65,7 @@ class CRanrok final : public CMonster _float2 m_vStunTimer = { 0.f, 4.f }; _float2 m_vAuraTimer = { 0.f, 0.16f }; _float2 m_vEtherealTimer = { 0.f, 0.16f }; - _uint iIndex; + _uint iIndex = {}; DAMAGE_INFO m_DamageInfo; _bool m_bCollisionPlayer = { false }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Human_Duelist.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Human_Duelist.xml index 5559ad281..a420af59e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Human_Duelist.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Human_Duelist.xml @@ -2,105 +2,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -122,47 +34,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml index 9abcc8552..b465052bb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml @@ -5,4 +5,5 @@ + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/M_Student/M_Student_Rct.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/M_Student/M_Student_Rct.bin new file mode 100644 index 000000000..6a54663f5 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/M_Student/M_Student_Rct.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98bf980e8baa3dd8bfba43fed3b3ccc653dd8e38fc34222f99935eb7e1828453 +size 58079556 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin index 206e42fc9..4ee84e2bb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7269d0454e7ce722d99f31fe2a5403c854fd764f2215de4582671bddd8e6d273 -size 6854891 +oid sha256:8071bf7e7535294dd159e85c107ce3a5c604d184ca45f8b8593f969abea05401 +size 6854890 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.xml index a3f031e15..59f0e3547 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.xml @@ -64,7 +64,7 @@ - + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl index 3d233fe57..310cd83eb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl @@ -28,6 +28,7 @@ StructuredBuffer g_BoneRemap : register(t6); StructuredBuffer g_SkipBone : register(t7); + RWStructuredBuffer g_LocalMatrixOut : register(u0); cbuffer AnimCB : register(b0) @@ -48,7 +49,7 @@ cbuffer AnimCB : register(b0) float HeadAimWeight; int SkipCount; - int _pad0; + int IsSkip; int _pad1; int _pad2; @@ -366,7 +367,7 @@ void CS_LOCAL(uint3 DTid : SV_DispatchThreadID) if (bone >= BoneCount) return; - if (SkipCount != 0) + if (SkipCount != 0 && IsSkip) { for (int i = 0; i < SkipCount; i++) { diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl index 3cf999034..8f7f616b2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl @@ -29,7 +29,7 @@ cbuffer AnimCB : register(b0) float HeadAimWeight; int SkipCount; - int _pad0; + int IsSkip; int _pad1; int _pad2; diff --git a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp index e1c00d6bb..cc2193456 100644 --- a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp @@ -79,62 +79,46 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_SK_GOB_M_T4Melee_INST_A_Master_Model") ));*/ +#pragma region MONSTER + futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - TEXT("Prototype_Component_Playable_Model") + MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/SK_GOB_M_T4Melee_INST_A_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_SK_GOB_M_T4Melee_INST_A_Master_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_GoblinMage_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_SK_GOB_M_Assassin_Master_Model") + )); + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + return E_FAIL; + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), + TEXT("Prototype_Component_troll_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin", XMMatrixIdentity(), + TEXT("Prototype_Component_trsoll_Model") )); -#pragma region MONSTER - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/SK_GOB_M_T4Melee_INST_A_Master.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_SK_GOB_M_T4Melee_INST_A_Master_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_GoblinMage_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_SK_GOB_M_Assassin_Master_Model") - //)); - - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Model"), - // CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - // return E_FAIL; - - //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), - // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - // return E_FAIL; - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(), - // TEXT("Prototype_Component_troll_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_TrollIntro.bin", XMMatrixIdentity(), - // TEXT("Prototype_Component_trsoll_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll_Anim.bin", XMMatrixIdentity(), - // TEXT("Prototype_Component_trsoll_Model") - //)); - - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_ConjuredDragon_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Professor_EleazarFig_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_ConjuredDragon_Model") + )); #pragma endregion @@ -205,10 +189,6 @@ HRESULT CLoader::Loading_For_ObjectViewer() MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity(), TEXT("Desc_Box") )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixIdentity(), - // TEXT("Prototype_Component_GerboldOlivander_Model") - //)); @@ -241,122 +221,102 @@ HRESULT CLoader::Loading_For_ObjectViewer() // return E_FAIL; -#pragma region NPC - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Npc_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Professor_EleazarFig_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_GerboldOlivander_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_VictorRookWood_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Playable_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_TrollIntro.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Playable_Model") + )); #pragma region NPC - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Professor_EleazarFig_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(), + TEXT("Prototype_Component_Npc_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_MatildaWeasely_Model") - //)); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_SatyavatiShah_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f)* XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixRotationZ(XMConvertToRadians(180.f))* XMMatrixIdentity(), + TEXT("Prototype_Component_GerboldOlivander_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_PhineasBlack_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Professor_EleazarFig_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_ChiyoKogawa_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MatildaWeasely/MatildaWeasely.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_MatildaWeasely_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Ghost_Peeves_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/SatyavatiShah/SatyavatiShah.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_SatyavatiShah_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_M_Student_Model") - //)); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_F_Student_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/PhineasBlack/PhineasBlack.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_PhineasBlack_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Elf_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(), + TEXT("Prototype_Component_VictorRookWood_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/ChiyoKogawa/ChiyoKogawa.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_ChiyoKogawa_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Ghost_Peeves_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/M_Student/M_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_M_Student_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/F_Student/F_Student.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_F_Student_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Elf_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx", XMMatrixIdentity(), - // TEXT("Prototype_Component_Student_Cmbt_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Kitchen_Female_Model") + )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_BaiHowin_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_OpenDoor.fbx", XMMatrixIdentity(), - // TEXT("Prototype_Component_Student_Cmbt_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Elf.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Elf_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Elf/Kitchen_Female/Kitchen_Female.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Kitchen_Female_Model") - //)); - // - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/BaiHowin/BaiHowin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_BaiHowin_Model") - //)); - - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_GeorgeOsric_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GeorgeOsric/GeorgeOsric.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_GeorgeOsric_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_DinahHecat_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/DinahHecat/DinahHecat.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_DinahHecat_Model") + )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_MudiwaOnai_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/MudiwaOnai/MudiwaOnai.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_MudiwaOnai_Model") + )); //futures.emplace_back(Deferred_ModelLoad( diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl index 3d233fe57..310cd83eb 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl @@ -28,6 +28,7 @@ StructuredBuffer g_BoneRemap : register(t6); StructuredBuffer g_SkipBone : register(t7); + RWStructuredBuffer g_LocalMatrixOut : register(u0); cbuffer AnimCB : register(b0) @@ -48,7 +49,7 @@ cbuffer AnimCB : register(b0) float HeadAimWeight; int SkipCount; - int _pad0; + int IsSkip; int _pad1; int _pad2; @@ -366,7 +367,7 @@ void CS_LOCAL(uint3 DTid : SV_DispatchThreadID) if (bone >= BoneCount) return; - if (SkipCount != 0) + if (SkipCount != 0 && IsSkip) { for (int i = 0; i < SkipCount; i++) { diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl index 3cf999034..8f7f616b2 100644 --- a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Mesh_Compute.hlsl @@ -29,7 +29,7 @@ cbuffer AnimCB : register(b0) float HeadAimWeight; int SkipCount; - int _pad0; + int IsSkip; int _pad1; int _pad2; diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 9c630ec83..6fc6a4f13 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -1578,19 +1578,19 @@ void CModel::Initialize_BoneMasks() BuildMask(m_iBoneIndex[ENUM_CLASS(BLEND_BONE::NECK)], m_BoneMask[ENUM_CLASS(BLEND_BONE::NECK)]); BuildMask(m_iBoneIndex[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)], m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)]); - if (m_iBoneIndex[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)] != -1) - { - for (_uint i = 0; i < (_uint)m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)].size(); i++) - { - if (m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)][i] == 1) - { - if (i == m_iBoneIndex[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)]) - continue; - m_iSkipBoneCount++; - m_SkipBoneindex.push_back(i); - } - } - } + //if (m_iBoneIndex[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)] != -1) + //{ + // for (_uint i = 0; i < (_uint)m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)].size(); i++) + // { + // if (m_BoneMask[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)][i] == 1) + // { + // if (i == m_iBoneIndex[ENUM_CLASS(BLEND_BONE::HIPS_CLOTH)]) + // continue; + // m_iSkipBoneCount++; + // m_SkipBoneindex.push_back(i); + // } + // } + //} for (_uint i = 0; i < m_Bones.size(); i++) { @@ -1600,6 +1600,19 @@ void CModel::Initialize_BoneMasks() m_BoneMask[ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_R)][i] = m_BoneMask[ENUM_CLASS(BLEND_BONE::SHOULDER_R)][i] | m_BoneMask[ENUM_CLASS(BLEND_BONE::NECK)][i]; } + + + for (_uint i = 0; i < (_uint)m_BoneMask[ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)].size(); i++) + { + if (m_BoneMask[ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)][i] == 1) + { + //if (i == m_iBoneIndex[ENUM_CLASS(BLEND_BONE::SHOULDER_NECK_L)]) + // continue; + m_iSkipBoneCount++; + m_SkipBoneindex.push_back(i); + } + } + } HRESULT CModel::Create_ComputeShader() @@ -1997,7 +2010,7 @@ void CModel::ComputeLocal(_uint AnimIndex, _uint MeshIndex) pDesc->HeadAimWeight = m_fHeadAimWeight; pDesc->SkipCount = m_iSkipBoneCount; - pDesc->padding0 = 0; + pDesc->IsSkip = m_IsSkip; pDesc->padding1 = 0; pDesc->padding2 = 0; diff --git a/Jusin154_Team3D/Engine/Private/Unit.cpp b/Jusin154_Team3D/Engine/Private/Unit.cpp index 6f4e6e37a..f063eee5e 100644 --- a/Jusin154_Team3D/Engine/Private/Unit.cpp +++ b/Jusin154_Team3D/Engine/Private/Unit.cpp @@ -307,6 +307,9 @@ STATEANIM::ESTATE CUnit::StringToStateAnim(const string& s) // LIGHT ATTACK { "LIGHT_ATTACK", LIGHT_ATTACK }, + { "LIGHT_ATTACK2", LIGHT_ATTACK2 }, + { "LIGHT_ATTACK3", LIGHT_ATTACK3 }, + { "LIGHT_ATTACK4", LIGHT_ATTACK4 }, { "LIGHT_ATTACK_180_R", LIGHT_ATTACK_180_R }, { "LIGHT_ATTACK_90_L", LIGHT_ATTACK_90_L }, { "LIGHT_ATTACK_90_R1", LIGHT_ATTACK_90_R1 }, diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index d8987b119..315f51fed 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -25,7 +25,7 @@ class ENGINE_DLL CModel final : public CComponent _float HeadAimWeight; _int SkipCount; - _int padding0; + _int IsSkip; _int padding1; _int padding2; @@ -84,19 +84,20 @@ class ENGINE_DLL CModel final : public CComponent _float Get_CurrentTrackProgressRatio(); _float Get_TrackProgressRatio(_uint iIndex); - size_t Get_AnimSize() { return m_Animations.size(); } - void Set_PlayAnim(_bool bPlayAnim) { m_bPlayAnim = bPlayAnim; } - _bool Get_PlayAnim() const { return m_bPlayAnim; } - _int Get_AnimIndex() const { return m_iCurrentAnimIndex; } - _int Get_SecondAnimIndex() const { return m_iCurrSecondAnimIndex; } - _float Get_AnimSpeed(); - void Set_AnimSpeed(_float fSpeed); + size_t Get_AnimSize() { return m_Animations.size(); } + void Set_PlayAnim(_bool bPlayAnim) { m_bPlayAnim = bPlayAnim; } + _bool Get_PlayAnim() const { return m_bPlayAnim; } + _int Get_AnimIndex() const { return m_iCurrentAnimIndex; } + _int Get_SecondAnimIndex() const { return m_iCurrSecondAnimIndex; } + _float Get_AnimSpeed(); + void Set_AnimSpeed(_float fSpeed); - HRESULT Anim_Event(_float fRatio, _uint AnimIndex, function Event); + HRESULT Anim_Event(_float fRatio, _uint AnimIndex, function Event); - void Set_BlendDuration(_float Duration) { m_fBlendDuration = Duration; } + void Set_BlendDuration(_float Duration) { m_fBlendDuration = Duration; } + + _float4 Get_RootBoneMomentum() { return m_RootBoneMomentum; } - _float4 Get_RootBoneMomentum() { return m_RootBoneMomentum; } #pragma endregion #pragma region Mesh const _char* Get_MeshName(_uint iIndex); @@ -127,6 +128,7 @@ class ENGINE_DLL CModel final : public CComponent _uint Get_BoneAbsoluteCount(); HRESULT Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation); HRESULT Capture_BoneBuffer(class CMotion_Trail* pTrail, const _float4x4& CurrentWorldMatrix); + void IsSkip(_bool bSkip) { m_IsSkip = bSkip; } // HRESULT Set_BoneLocalTransformationMatrix(const _char* pBoneName, _fmatrix newTransformation); #pragma endregion @@ -224,9 +226,9 @@ class ENGINE_DLL CModel final : public CComponent _float m_fRadius = { 0.f }; // 컬링용 Radius _int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스 _uint m_iIndexAnimPlayableMesh = { 0 }; - _float4 m_OutScale; - _float4 m_OutRotation; - _float4 m_OutTranslation; + _float4 m_OutScale = {}; + _float4 m_OutRotation = {}; + _float4 m_OutTranslation = {}; vector<_uint> m_iBoneMask; @@ -249,6 +251,7 @@ class ENGINE_DLL CModel final : public CComponent _bool m_bQueuedLoop = false; _bool m_bQueuedAnim = { false }; _float4 m_RootBoneMomentum = {}; + _bool m_IsSkip = {false}; private: diff --git a/Jusin154_Team3D/Engine/Public/State.h b/Jusin154_Team3D/Engine/Public/State.h index 4a1ba0ce6..b9574cf16 100644 --- a/Jusin154_Team3D/Engine/Public/State.h +++ b/Jusin154_Team3D/Engine/Public/State.h @@ -15,7 +15,7 @@ enum ESTATE DODGE,DODGE_BLINK, DODGE_LEFT, DODGE_RIGHT,DODGE_ATTACK, COMBAT, SKILL, SKILL2, SPELL, SPELL_180_R, SPELL_90_R, SPELL_90_L, SPELL_90_L2, - LIGHT_ATTACK,LIGHT_ATTACK_180_R, LIGHT_ATTACK_90_L, LIGHT_ATTACK_90_R1, LIGHT_ATTACK_90_R2, LIGHT_ATTACK_90_R3, + LIGHT_ATTACK, LIGHT_ATTACK2, LIGHT_ATTACK3, LIGHT_ATTACK4,LIGHT_ATTACK_180_R, LIGHT_ATTACK_90_L, LIGHT_ATTACK_90_R1, LIGHT_ATTACK_90_R2, LIGHT_ATTACK_90_R3, ATTACK_END, SHUFFLE1, SHUFFLE2, SHUFFLE3, SHUFFLE4, MAPHELP,POTION,