용수정
용수정
This commit is contained in:
@@ -81,19 +81,25 @@ HRESULT CDummyObject::Render()
|
|||||||
{
|
{
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
#ifdef 기무리
|
|
||||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
|
||||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
{
|
||||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||||
|
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||||
}
|
}
|
||||||
#else
|
else {
|
||||||
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
|
||||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
return E_FAIL;
|
||||||
return E_FAIL;
|
}
|
||||||
|
|
||||||
|
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
||||||
|
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
||||||
}
|
}
|
||||||
#endif // 기무리
|
|
||||||
|
|
||||||
if (FAILED(m_pModelCom->Render(i))) {
|
if (FAILED(m_pModelCom->Render(i))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -118,18 +124,19 @@ HRESULT CDummyObject::Ready_Components()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef 기무리
|
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
|
||||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
|
{
|
||||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_NPC_PBR_ANIM,
|
||||||
return E_FAIL;
|
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||||
|
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||||
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
|
||||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
}
|
||||||
#endif // 기무리
|
|
||||||
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2393,10 +2393,14 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
|||||||
TEXT("Prototype_Component_Dragon_Model")
|
TEXT("Prototype_Component_Dragon_Model")
|
||||||
));
|
));
|
||||||
|
|
||||||
futures.emplace_back(Deferred_ModelLoad(
|
//futures.emplace_back(Deferred_ModelLoad(
|
||||||
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixIdentity(),
|
// MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixIdentity(),
|
||||||
TEXT("Prototype_Component_ConjuredDragon_Model")
|
// TEXT("Prototype_Component_ConjuredDragon_Model")
|
||||||
));
|
//));
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_ConjuredDragon_Model"),
|
||||||
|
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity()))))
|
||||||
|
return E_FAIL;
|
||||||
futures.emplace_back(Deferred_ModelLoad(
|
futures.emplace_back(Deferred_ModelLoad(
|
||||||
MODEL::ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon_Anim.bin", XMMatrixIdentity(),
|
MODEL::ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon_Anim.bin", XMMatrixIdentity(),
|
||||||
TEXT("Prototype_Component_ConjuredDragon_Anim_Model")
|
TEXT("Prototype_Component_ConjuredDragon_Anim_Model")
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ComputeAnimation(m_iCurrentAnimIndex, 0);
|
ComputeAnimation(m_iCurrentAnimIndex, m_iIndexAnimPlayableMesh);
|
||||||
|
|
||||||
if (m_bIsFinishedAnim)
|
if (m_bIsFinishedAnim)
|
||||||
{
|
{
|
||||||
@@ -2232,14 +2232,29 @@ HRESULT CModel::Initialize(void* pArg)
|
|||||||
Create_ParentSrv();
|
Create_ParentSrv();
|
||||||
Create_BoneLocalSrv();
|
Create_BoneLocalSrv();
|
||||||
|
|
||||||
if (FAILED(Create_ComputeShaderLocal()))
|
if (FAILED(Create_ComputeShaderLocal())){
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
if (FAILED(Create_ComputeShader()))
|
if (FAILED(Create_ComputeShader())){
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < m_Meshes.size(); i++)
|
||||||
|
{
|
||||||
|
if (1 < m_Meshes[i]->Get_NumBone()) {
|
||||||
|
m_iIndexAnimPlayableMesh = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-1 == m_iIndexAnimPlayableMesh) {
|
||||||
|
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ class ENGINE_DLL CModel final : public CComponent
|
|||||||
_float4x4 Get_PreTransformMatrix() const { return m_PreTransformMatrix; };
|
_float4x4 Get_PreTransformMatrix() const { return m_PreTransformMatrix; };
|
||||||
virtual HRESULT Render(_uint iMeshIndex);
|
virtual HRESULT Render(_uint iMeshIndex);
|
||||||
virtual HRESULT Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
|
virtual HRESULT Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
|
||||||
|
MODEL Get_Type() { return m_eType; }
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region Animation
|
#pragma region Animation
|
||||||
_bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌
|
_bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌
|
||||||
@@ -180,6 +181,7 @@ class ENGINE_DLL CModel final : public CComponent
|
|||||||
|
|
||||||
_float m_fRadius = { 0.f }; // 컬링용 Radius
|
_float m_fRadius = { 0.f }; // 컬링용 Radius
|
||||||
_int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
|
_int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
|
||||||
|
_int m_iIndexAnimPlayableMesh = { -1 };
|
||||||
_vector m_vector[3];
|
_vector m_vector[3];
|
||||||
|
|
||||||
vector<_uint> m_iBoneMask;
|
vector<_uint> m_iBoneMask;
|
||||||
|
|||||||
Reference in New Issue
Block a user