Merge branch 'Develope' into Effect
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
#include "pch.h"
|
||||
#include "CDamageFont.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CDamageFont::CDamageFont(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDamageFont::CDamageFont(const CDamageFont& rhs)
|
||||
:CGameObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDamageFont::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDamageFont::Initialize(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDamageFont::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDamageFont::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!m_DamageInfos.empty())
|
||||
{
|
||||
for (auto iter = m_DamageInfos.begin(); iter != m_DamageInfos.end();)
|
||||
{
|
||||
if (iter->fTime <= 0.f)
|
||||
iter = m_DamageInfos.erase(iter);
|
||||
else
|
||||
{
|
||||
iter->fTime -= fTimeDelta;
|
||||
iter->fAlpha -= fTimeDelta;
|
||||
|
||||
iter->vColor = XMVectorSet(
|
||||
iter->vColor.m128_f32[0] * iter->fAlpha,
|
||||
iter->vColor.m128_f32[1] * iter->fAlpha,
|
||||
iter->vColor.m128_f32[2] * iter->fAlpha,
|
||||
iter->fAlpha);
|
||||
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CDamageFont::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDamageFont::Render()
|
||||
{
|
||||
if (!m_DamageInfos.empty())
|
||||
{
|
||||
for (auto iter = m_DamageInfos.begin(); iter != m_DamageInfos.end();)
|
||||
{
|
||||
m_pGameInstance->Perspective_Render_Text(
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
TEXT("UI_size13"),
|
||||
iter->pDamage.c_str(),
|
||||
iter->vTarget_Pos,
|
||||
iter->vColor
|
||||
);
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CDamageFont::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CDamageFont::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDamageFont::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDamageFont::Add_Damage(DAMAGE_INFO pInfo)
|
||||
{
|
||||
DAMAGE_FONT_INFO Desc;
|
||||
|
||||
Desc.vTarget_Pos = pInfo.vTarget_Pos;
|
||||
Desc.pDamage = to_wstring(pInfo.fDamage);
|
||||
if (pInfo.eType == DAMAGE_TYPE::NOMAL)
|
||||
{
|
||||
Desc.vColor = XMVectorSet(1.f ,1.f,1.f,1.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Desc.vColor = XMVectorSet((215.f / 255.f), (185.f / 255.f), (95.f / 255.f), 1.f);
|
||||
}
|
||||
|
||||
m_DamageInfos.push_back(Desc);
|
||||
}
|
||||
|
||||
CDamageFont* CDamageFont::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDamageFont* pInstance = new CDamageFont(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDamageFont");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDamageFont::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDamageFont* pInstance = new CDamageFont(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDamageFont");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDamageFont::Free()
|
||||
{
|
||||
__super::Free();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDamageFont::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDamageFont final : public CGameObject
|
||||
{
|
||||
typedef struct tagDamageFontInfo
|
||||
{
|
||||
_vector vTarget_Pos{};
|
||||
_wstring pDamage;
|
||||
_float fTime = 1.f;
|
||||
_float fAlpha = 1.f;
|
||||
_vector vColor{};
|
||||
}DAMAGE_FONT_INFO;
|
||||
private:
|
||||
CDamageFont(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDamageFont(const CDamageFont& rhs);
|
||||
virtual ~CDamageFont() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Add_Damage(DAMAGE_INFO pInfo);
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
vector<DAMAGE_FONT_INFO> m_DamageInfos;
|
||||
|
||||
public:
|
||||
static CDamageFont* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END;
|
||||
@@ -312,6 +312,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\public\UI_Manager.h" />
|
||||
<ClInclude Include="..\public\Unified.h" />
|
||||
<ClInclude Include="..\Public\Wand.h" />
|
||||
<ClInclude Include="CDamageFont.h" />
|
||||
<ClInclude Include="Client.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
@@ -476,6 +477,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\private\UI_Manager.cpp" />
|
||||
<ClCompile Include="..\private\Unified.cpp" />
|
||||
<ClCompile Include="..\Private\Wand.cpp" />
|
||||
<ClCompile Include="CDamageFont.cpp" />
|
||||
<ClCompile Include="Client.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -490,6 +490,12 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Attack.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Goblin_Attack</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CDamageFont.h">
|
||||
<Filter>04.Mechanic\Damage</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_BattleAxe.h">
|
||||
<Filter>02.GameObjects\Item\Goblin_Axe</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -1034,6 +1040,9 @@
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Goblin_Attack">
|
||||
<UniqueIdentifier>{967d1741-2780-40b7-b55e-9fd58e931ef7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="04.Mechanic\Damage">
|
||||
<UniqueIdentifier>{36962dce-8c99-4c54-9189-2a49785a211e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -1472,6 +1481,9 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Attack.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Goblin_Attack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CDamageFont.cpp">
|
||||
<Filter>04.Mechanic\Damage</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -54,12 +54,17 @@ HRESULT CAction_Panel::Initialize(void* pArg)
|
||||
|
||||
|
||||
Magic_Meter_UV();
|
||||
Magic_Meter_Visible(1, true);
|
||||
Magic_Meter_Visible(5, true);
|
||||
Visible(true);
|
||||
ElementAllVisible(true);
|
||||
Magic_Meter_Visible(1, true);
|
||||
Magic_Meter_Visible(2, false);
|
||||
Magic_Meter_Visible(3, false);
|
||||
Magic_Meter_Visible(4, false);
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Visible(true);
|
||||
m_pInfoInstance->Add_Event(TEXT("Spell"), [this](void* p) {this->Use_Spell(*reinterpret_cast<_int*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("GetSpell"), [this](void* p) {this->Spell_Setting(p); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Magic_Meter_Update"), [this](void* p) {this->Magic_Meter_Update(); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Ancient_Magic_Throw"), [this](void* p) {this->Ancient_Magic_Throw(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -79,7 +84,7 @@ void CAction_Panel::Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
|
||||
Matic_Meter_Move();
|
||||
Magic_Meter_Move();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
@@ -110,33 +115,57 @@ _vector CAction_Panel::Get_WorldPostion()
|
||||
|
||||
void CAction_Panel::Magic_Meter_Visible(_uint iIndex, _bool bVisible)
|
||||
{
|
||||
if (bVisible == false)
|
||||
return;
|
||||
|
||||
switch (iIndex)
|
||||
{
|
||||
case 1:
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter1)->Visible(bVisible);
|
||||
if (m_iMagic_Meter_Count == 0)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter1)->Visible(bVisible);
|
||||
m_Magic_Meters.push_back(m_pMagic_Meter1);
|
||||
m_iMagic_Meter_Count++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Visible(bVisible);
|
||||
if (m_iMagic_Meter_Count == 1)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Visible(bVisible);
|
||||
m_Magic_Meters.push_back(m_pMagic_Meter2);
|
||||
m_iMagic_Meter_Count++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter3)->Visible(bVisible);
|
||||
if (m_iMagic_Meter_Count == 2)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter3)->Visible(bVisible);
|
||||
m_Magic_Meters.push_back(m_pMagic_Meter3);
|
||||
m_iMagic_Meter_Count++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter4)->Visible(bVisible);
|
||||
if (m_iMagic_Meter_Count == 3)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter4)->Visible(bVisible);
|
||||
m_Magic_Meters.push_back(m_pMagic_Meter4);
|
||||
m_iMagic_Meter_Count++;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter5)->Visible(bVisible);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (bVisible){
|
||||
m_iMagic_Meter_Count++;
|
||||
}
|
||||
else{
|
||||
m_iMagic_Meter_Count--;
|
||||
}
|
||||
|
||||
void CAction_Panel::Magic_Meter_Update()
|
||||
{
|
||||
for (_int i = 0; i < m_iMagic_Meter_Count; ++i)
|
||||
{
|
||||
if (static_cast<CMagic_Meter*>(m_Magic_Meters[i])->Charge_Meter() == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Charge_Meter();
|
||||
}
|
||||
|
||||
void CAction_Panel::Magic_Meter_UV()
|
||||
@@ -145,7 +174,7 @@ void CAction_Panel::Magic_Meter_UV()
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Meter_Index(1);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter3)->Meter_Index(1);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter4)->Meter_Index(1);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter5)->Meter_Index(0);
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Meter_Index(0);
|
||||
|
||||
for (_uint i = 0; i < 5; ++i)
|
||||
{
|
||||
@@ -154,32 +183,46 @@ void CAction_Panel::Magic_Meter_UV()
|
||||
}
|
||||
}
|
||||
|
||||
void CAction_Panel::Matic_Meter_Move()
|
||||
void CAction_Panel::Magic_Meter_Move()
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter1)->Move(m_vMagic_MeterUV[0].x, m_vMagic_MeterUV[0].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter5)->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[0])->Move(m_vMagic_MeterUV[0].x, m_vMagic_MeterUV[0].y);
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
|
||||
if (static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Get_Active() == true)
|
||||
if (m_iMagic_Meter_Count == 2)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter5)->Move(m_vMagic_MeterUV[2].x, m_vMagic_MeterUV[2].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[1])->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Move(m_vMagic_MeterUV[2].x, m_vMagic_MeterUV[2].y);
|
||||
}
|
||||
if (static_cast<CMagic_Meter*>(m_pMagic_Meter3)->Get_Active() == true)
|
||||
if (m_iMagic_Meter_Count == 3)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter3)->Move(m_vMagic_MeterUV[2].x, m_vMagic_MeterUV[2].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter5)->Move(m_vMagic_MeterUV[3].x, m_vMagic_MeterUV[3].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[1])->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[2])->Move(m_vMagic_MeterUV[2].x, m_vMagic_MeterUV[2].y);
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Move(m_vMagic_MeterUV[3].x, m_vMagic_MeterUV[3].y);
|
||||
}
|
||||
if (static_cast<CMagic_Meter*>(m_pMagic_Meter4)->Get_Active() == true)
|
||||
if (m_iMagic_Meter_Count == 4)
|
||||
{
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter2)->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter3)->Move(m_vMagic_MeterUV[2].x, m_vMagic_MeterUV[2].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter4)->Move(m_vMagic_MeterUV[3].x, m_vMagic_MeterUV[3].y);
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter5)->Move(m_vMagic_MeterUV[4].x, m_vMagic_MeterUV[4].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[1])->Move(m_vMagic_MeterUV[1].x, m_vMagic_MeterUV[1].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[2])->Move(m_vMagic_MeterUV[2].x, m_vMagic_MeterUV[2].y);
|
||||
static_cast<CMagic_Meter*>(m_Magic_Meters[3])->Move(m_vMagic_MeterUV[3].x, m_vMagic_MeterUV[3].y);
|
||||
static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Move(m_vMagic_MeterUV[4].x, m_vMagic_MeterUV[4].y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CAction_Panel::Ancient_Magic_Throw()
|
||||
{
|
||||
if (static_cast<CMagic_Meter*>(m_Magic_Meters[0])->Get_Meter() != 15.f)
|
||||
return;
|
||||
|
||||
_float MaxGauge = 15;
|
||||
MaxGauge = static_cast<CMagic_Meter*>(m_pLastMagic_Meter)->Use_Meter(MaxGauge);
|
||||
|
||||
for (_int i = m_iMagic_Meter_Count - 1; static_cast<_int>(MaxGauge) > 0; --i)
|
||||
{
|
||||
MaxGauge = static_cast<CMagic_Meter*>(m_Magic_Meters[i])->Use_Meter(MaxGauge);
|
||||
}
|
||||
}
|
||||
|
||||
void CAction_Panel::Use_Spell(_int Index)
|
||||
{
|
||||
switch (Index)
|
||||
@@ -274,31 +317,28 @@ HRESULT CAction_Panel::Ready_Element(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("HpBarBG"), m_pHpBarBG);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter1))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Meter1"), m_pMagic_Meter1);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Meter2"), m_pMagic_Meter2);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter3))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Meter3"), m_pMagic_Meter3);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Meter4"), m_pMagic_Meter4);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pMagic_Meter5))))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Meter>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Meter**>(&m_pLastMagic_Meter))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Meter5"), m_pMagic_Meter5);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMagic_Icon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMagic_Icon**>(&m_pMagic_Icon))))
|
||||
{
|
||||
return E_FAIL;
|
||||
|
||||
@@ -130,6 +130,7 @@ void CBroom::Behavior_MoveEnter()
|
||||
{
|
||||
if (!m_bRide)
|
||||
return;
|
||||
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
m_pFSM->Enable_State(FSMSTATE::MOVE);
|
||||
if (m_pFSM->IsEnable_Previous(FSMSTATE::IDLE)) {
|
||||
@@ -157,8 +158,7 @@ void CBroom::Behavior_MoveEnter()
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_UP_B];
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_LSHIFT))
|
||||
else if (m_pGameInstance->Key_Down(DIK_LSHIFT))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
@@ -172,6 +172,7 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
if (!m_bRide)
|
||||
return E_FAIL;
|
||||
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
_uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
_bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
@@ -203,6 +204,7 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
else if (bRht)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_RIGHT_B];
|
||||
|
||||
}
|
||||
else if (bDown)
|
||||
{
|
||||
@@ -225,7 +227,6 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
else{
|
||||
|
||||
m_fTargetSpeed = m_fFlyMaxSpeed;
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fAccel;
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
@@ -250,20 +251,16 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
|
||||
if (bUp)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
|
||||
m_pTransformCom->Go_LerpUp(m_fTurnSpeed, fTimeDelta);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
m_fVerticalSpeed = +m_fTurnSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
m_pTransformCom->Go_LerpDown(m_fTurnSpeed, fTimeDelta);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
|
||||
m_fVerticalSpeed = -m_fTurnSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (vInput.x < 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.1f);
|
||||
@@ -285,30 +282,54 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
else if (az >= ax)
|
||||
else if (ax >= az)
|
||||
{
|
||||
if (vInput.z > 0)
|
||||
if (ay >= ax)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
Camera_InterpTurn(fTimeDelta);
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
}
|
||||
else {
|
||||
if (vInput.x < 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
|
||||
else if (vInput.x > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
else {
|
||||
Camera_InterpTurn(fTimeDelta);
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vInput.x < 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_LEFT_B];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_RIGHT_B];
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_UP_B];
|
||||
else if (vInput.y < 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_DOWN_B];
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
m_fVerticalSpeed += (0.f - m_fVerticalSpeed) * fTimeDelta * m_fDecel;
|
||||
|
||||
if (fabs(m_fVerticalSpeed) > 0.001f)
|
||||
{
|
||||
if (m_fVerticalSpeed > 0.f)
|
||||
m_pTransformCom->Go_LerpUp(m_fVerticalSpeed, fTimeDelta);
|
||||
else
|
||||
m_pTransformCom->Go_LerpDown(-m_fVerticalSpeed, fTimeDelta);
|
||||
}
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FLY_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_bHoverToggle && !SUCCEEDED(InputMove()) && !SUCCEEDED(InputAction()))
|
||||
@@ -318,7 +339,7 @@ HRESULT CBroom::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_fSpeed += (m_fTargetSpeed - m_fSpeed) * fTimeDelta * m_fDecel;
|
||||
|
||||
m_pTransformCom->Go_LerpStraight(m_fSpeed, fTimeDelta);
|
||||
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_HOVER_STOP_B];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::BROOM_HOVER_STOP_B].first)
|
||||
@@ -383,11 +404,11 @@ void CBroom::Camera_InterpTurn(_float fTimeDelta)
|
||||
|
||||
if (angleDiff > Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta*0.3f);
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta*0.1f);
|
||||
}
|
||||
else if (angleDiff < -Offset)
|
||||
{
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.3f);
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,18 +424,24 @@ void CBroom::Add_FSM()
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_MoveEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_MoveExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.02f);
|
||||
}
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc));
|
||||
}
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,8 @@ void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||
if (m_pOcclusionQueryCom->isDraw())
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
else{
|
||||
else
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this);
|
||||
|
||||
@@ -50,6 +49,9 @@ void CBuildingContainer::Late_Update(_float fTimeDelta)
|
||||
pCollisiton->Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
else
|
||||
m_pOcclusionQueryCom->Set_PreFrameDraw();
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBuildingContainer::Render()
|
||||
|
||||
@@ -71,7 +71,7 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
|
||||
PSX::PxVec3 vCompressedDir = vDir;
|
||||
vCompressedDir.y += -vDir.y * 2.f + 1.f;
|
||||
vCompressedDir.normalize();
|
||||
pDynamic->addForce(vCompressedDir * fLength* 100.f, PSX::PxForceMode::eFORCE);
|
||||
pDynamic->addForce(vCompressedDir * fLength* 10.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -43,7 +43,6 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
class CUnit* pOwner = (CUnit*)m_pController->Get_Owner();
|
||||
_vector vLook = pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
_float fDot = XMVectorGetX(XMVector3Dot(XMLoadFloat3((_float3*)&vDir), vLook));
|
||||
GUI::Text("DOTDOTResult %f", fDot);
|
||||
if (fDot > cosf(XM_PIDIV4)) {
|
||||
CModel* pModel = pOwner->Get_Component<CModel>();
|
||||
_uint iAnimIndex = pModel->Get_AnimIndex();
|
||||
|
||||
@@ -35,7 +35,7 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
|
||||
m_fShoulderDistance = pDesc->fShoulderDistance;
|
||||
m_vAccDegreeXY = { 0.f, 0.f };
|
||||
m_fCameraFocalLength = pDesc->fCameraFocalLength;
|
||||
m_fBackFrontRatio = pDesc->fBackFrontRatio;
|
||||
m_vBackFrontRatio.x = m_vBackFrontRatio.y = m_vBackFrontRatio.z = pDesc->fBackFrontRatio;
|
||||
|
||||
m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio = pDesc->vInitialLook;
|
||||
m_vShoulderStartRatio.x *= -1.f;
|
||||
@@ -47,12 +47,13 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vCameraLook);
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_vBackFrontRatio.z));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_vBackFrontRatio.z)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -66,6 +67,7 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_PGDN))
|
||||
{
|
||||
Start_LerpShoulderPos();
|
||||
m_bLerp = !m_bLerp;
|
||||
}
|
||||
if (true == m_bMovable) {
|
||||
@@ -86,12 +88,15 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
_vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq));
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vCameraLook);
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||
_float fCamPosRatio = Calc_CamPosRatio();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * fCamPosRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - fCamPosRatio)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -104,12 +109,15 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vCameraLook);
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||
_float fCamPosRatio = Calc_CamPosRatio();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * fCamPosRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - fCamPosRatio)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -210,8 +218,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
CameraDesc.bEnableFollowLerp = false;
|
||||
CameraDesc.bEnableLookLerp = false;
|
||||
CameraDesc.vTransitionTime = { 0.f, 1.f };
|
||||
CameraDesc.vFollowLerpTime = { 0.f, 0.16f };
|
||||
CameraDesc.vLookLerpTime = { 0.f, 0.16f };
|
||||
CameraDesc.vFollowLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
CameraDesc.vLookLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCamera_Gaze>(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera)))
|
||||
{
|
||||
@@ -232,6 +240,50 @@ void CCamPosition_Shoulder::Start_LerpShoulderPos()
|
||||
|
||||
XMStoreFloat4(&m_DestPos, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
}
|
||||
_float CCamPosition_Shoulder::Calc_CamPosRatio()
|
||||
{
|
||||
_vector vPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
|
||||
m_BufferHit = {};
|
||||
_bool bHit = { false };
|
||||
_float fBestCamDistance = m_fCameraFocalLength * (1 - m_vBackFrontRatio.z);
|
||||
_float fBestCamRatio = m_vBackFrontRatio.z;
|
||||
bHit = m_pGameInstance->SphereCast(0.35f, vPos, -vLook, fBestCamDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eSTATIC | PSX::PxQueryFlag::eDYNAMIC, m_BufferHit);
|
||||
if (true == bHit) {
|
||||
vector<PSX::PxSweepHit> vecHits = {};
|
||||
_uint iHitCount = {};
|
||||
{ // HitSort
|
||||
vecHits.reserve(m_BufferHit.getNbTouches() + (m_BufferHit.hasBlock) ? 1 : 0);
|
||||
iHitCount = m_BufferHit.getNbTouches();
|
||||
auto* pTouch = m_BufferHit.getTouches();
|
||||
for (_uint i = 0; i < iHitCount; ++i) {
|
||||
vecHits.emplace_back(pTouch[i]);
|
||||
}
|
||||
if (true == m_BufferHit.hasBlock) {
|
||||
vecHits.emplace_back(m_BufferHit.block);
|
||||
iHitCount += 1;
|
||||
}
|
||||
CMyTools::SortHitsByDistance(vecHits);
|
||||
}
|
||||
for (_uint i = 0; i < iHitCount; ++i) { // TODO: 럴프 할 수 있을까
|
||||
if (vecHits[i].distance < fBestCamDistance) {
|
||||
fBestCamDistance = vecHits[i].distance;
|
||||
fBestCamRatio = (1 - (1 - m_vBackFrontRatio.z) * (fBestCamDistance / m_fCameraFocalLength));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fBestCamRatio;
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Get_ShoulderLocalPos()
|
||||
{
|
||||
_vector vLook = XMVector3Normalize(3.f * (XMVectorSetZ(XMLoadFloat3(&m_vShoulderPosRatio), 0.f)));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
return vLook * m_fShoulderDistance;
|
||||
}
|
||||
CCamPosition_Shoulder* CCamPosition_Shoulder::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(pDevice, pContext);
|
||||
@@ -272,7 +324,7 @@ void CCamPosition_Shoulder::Describe_Entity()
|
||||
|
||||
GUI::Text("fMouseSensor : %.1f", m_fMouseSensor);
|
||||
GUI::SliderFloat("ShoulderDistance", &m_fShoulderDistance, 0.f, 10.f, "%.1f");
|
||||
GUI::SliderFloat("BackFrontRatio", &m_fBackFrontRatio, 0.01f, 0.99f, "%.2f");
|
||||
GUI::Text("BackFrontRatio %.1f, %.1f, %.1f", &m_vBackFrontRatio.x, &m_vBackFrontRatio.y, &m_vBackFrontRatio.z);
|
||||
GUI::Text("Pitch Yaw : %f %f", m_vAccDegreeXY.x, m_vAccDegreeXY.y);
|
||||
GUI::SliderFloat3("ShoulderPosRatio", (_float*)&m_vShoulderPosRatio, -2.f, 2.f, "%.1f");
|
||||
GUI::End();
|
||||
|
||||
@@ -110,7 +110,6 @@ void CGoblin::Update(_float fTimeDelta)
|
||||
m_fSkillCoolTime[i] = max(0.f, m_fSkillCoolTime[i] - fTimeDelta);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CGoblin::Late_Update(_float fTimeDelta)
|
||||
@@ -134,6 +133,7 @@ HRESULT CGoblin::Render()
|
||||
{
|
||||
if (!m_bVisible)
|
||||
return S_OK;
|
||||
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -241,6 +241,7 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
return;
|
||||
}
|
||||
m_pGoblinSpector->Set_Visible(false);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Magic_Meter_Update"));
|
||||
ON_COLLISION_INFO* CollisionDesc = static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_uint iSkillType = dynamic_cast<CEffect_Container*>(pOther)->Get_SkillType();
|
||||
|
||||
@@ -58,8 +58,15 @@ void CGoblin_BattleAxe::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CGoblin_BattleAxe::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
|
||||
if (m_bDisolve) {
|
||||
m_fDisolveTime += fTimeDelta;
|
||||
if (m_fDisolveTime >= 1.f)
|
||||
{
|
||||
m_fDisolveTime = 0.f;
|
||||
m_bDisolve = false;
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CGoblin_BattleAxe::Late_Update(_float fTimeDelta)
|
||||
@@ -81,13 +88,18 @@ HRESULT CGoblin_BattleAxe::Render()
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
if (FAILED(Render_Disolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SPECTOR_WEAPON)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -96,6 +108,43 @@ HRESULT CGoblin_BattleAxe::Render()
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
_bool bDisolve = false;
|
||||
_float zero = 0.f;
|
||||
m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool));
|
||||
m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_BattleAxe::Render_Disolve()
|
||||
{
|
||||
if (FLT_EPSILON3 * 10 < m_fDisolveTime)
|
||||
{
|
||||
_bool bDisolve = true;
|
||||
_float fDisolveAmount = 0.1f;
|
||||
_float fDisolveEdgeWidth = 0.1f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &m_fDisolveTime, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveAmount", &fDisolveAmount, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveEdgeWidth", &fDisolveEdgeWidth, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_GlobalSRV(m_pShaderCom, TEXT("GLOBAL_DISOLVE_NOISE_05"), "g_DeadDisolveTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_GlobalSRV(m_pShaderCom, TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "g_DisolveTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,9 @@ HRESULT CGoblin_Mage::Render()
|
||||
if (true == m_bDrawOutLine) {
|
||||
iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::OUTLINE_WRITE);
|
||||
}
|
||||
if (FAILED(Render_DeadDisolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
@@ -340,6 +343,7 @@ HRESULT CGoblin_Mage::Ready_Parts()
|
||||
}
|
||||
|
||||
m_pGoblin_Orb->Load("../Bin/Resources/Data/Effect/GoblinMage/Orb_P", static_cast<LEVEL>(NEXT_LEVEL));
|
||||
|
||||
m_pGoblin_Orb->FollowParents(m_pModelCom->Get_BoneMatrixPtr("RightHand"));
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -50,7 +50,7 @@ void CGoblin_Mage::Behavior_IdleBreakEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_bLookAt = true;
|
||||
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 2);
|
||||
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 6);
|
||||
switch (RandIndex)
|
||||
{
|
||||
case 0:
|
||||
@@ -62,6 +62,18 @@ void CGoblin_Mage::Behavior_IdleBreakEnter()
|
||||
case 2:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK3];
|
||||
break;
|
||||
case 3:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4];
|
||||
break;
|
||||
case 4:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK5];
|
||||
break;
|
||||
case 5:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK6];
|
||||
break;
|
||||
case 6:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK7];
|
||||
break;
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
@@ -450,8 +462,6 @@ void CGoblin_Mage::Behavior_DeadExit()
|
||||
m_bDead = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CGoblin_Mage::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
@@ -589,6 +599,10 @@ void CGoblin_Mage::Set_Anim()
|
||||
m_Animation[STATEANIM::IDLE_BREAK1] = { 137, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK2] = { 138, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK3] = { 139, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK4] = { 37, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK5] = { 38, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK6] = { 39, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK7] = { 41, false };
|
||||
|
||||
m_Animation[STATEANIM::WALK_FWD] = { 45,true };
|
||||
m_Animation[STATEANIM::WALK_START] = { 57,false };
|
||||
|
||||
@@ -43,10 +43,13 @@ HRESULT CGoblin_Spector::Initialize(void* pArg)
|
||||
|
||||
m_vOriginScale = m_pTransformCom->Get_Scale();
|
||||
|
||||
|
||||
m_pLeftHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
m_pRightHand_BoneMat = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(5);
|
||||
m_pModelCom->Play_Animation(0, m_pTransformCom);
|
||||
|
||||
|
||||
m_bVisible = false;
|
||||
|
||||
return S_OK;
|
||||
@@ -89,6 +92,17 @@ void CGoblin_Spector::Update(_float fTimeDelta)
|
||||
m_pModelCom->Set_AnimationIndex(5);
|
||||
}
|
||||
|
||||
if (m_bDisolve) {
|
||||
Get_PartObject<CGoblin_BattleAxe>()->Set_Disolve(true);
|
||||
m_fDisolveTime += fTimeDelta;
|
||||
if (m_fDisolveTime >= 1.f)
|
||||
{
|
||||
m_fDisolveTime = 0.f;
|
||||
m_bDisolve = false;
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
@@ -137,6 +151,11 @@ HRESULT CGoblin_Spector::Render()
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
_uint iShaderPass = ENUM_CLASS(SHADER_PASS_ANIM::SPECTOR);
|
||||
|
||||
if (FAILED(Render_Disolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
@@ -156,6 +175,13 @@ HRESULT CGoblin_Spector::Render()
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
_bool bDisolve = false;
|
||||
_float zero = 0.f;
|
||||
m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool));
|
||||
m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &zero, sizeof(_float));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -255,6 +281,36 @@ HRESULT CGoblin_Spector::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Spector::Render_Disolve()
|
||||
{
|
||||
if (FLT_EPSILON3 * 10 < m_fDisolveTime)
|
||||
{
|
||||
_bool bDisolve = true;
|
||||
_float fDisolveAmount = 0.1f;
|
||||
_float fDisolveEdgeWidth = 0.1f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &m_fDisolveTime, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveAmount", &fDisolveAmount, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveEdgeWidth", &fDisolveEdgeWidth, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_GlobalSRV(m_pShaderCom, TEXT("GLOBAL_DISOLVE_NOISE_05"), "g_DeadDisolveTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_GlobalSRV(m_pShaderCom, TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "g_DeadDisolveBurnTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CGoblin_Spector* CGoblin_Spector::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CGoblin_Spector* pInstance = new CGoblin_Spector(pDevice, pContext);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_IdleBreak.h"
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
@@ -47,6 +48,53 @@ void CGoblin::Behavior_IdleExit()
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLE);
|
||||
}
|
||||
|
||||
void CGoblin::Behavior_IdleBreakEnter()
|
||||
{
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLEBREAK);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
m_bLookAt = true;
|
||||
_int RandIndex = m_pGameInstance->Real_Random_Int(0, 6);
|
||||
switch (RandIndex)
|
||||
{
|
||||
case 0:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK1];
|
||||
break;
|
||||
case 1:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK2];
|
||||
break;
|
||||
case 2:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK3];
|
||||
break;
|
||||
case 3:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK4];
|
||||
break;
|
||||
case 4:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK5];
|
||||
break;
|
||||
case 5:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK6];
|
||||
break;
|
||||
case 6:
|
||||
pairAnimInfo = m_Animation[STATEANIM::IDLE_BREAK7];
|
||||
break;
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CGoblin::Behavior_IdleBreakExitCheck()
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CGoblin::Behavior_IdleBreakExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::IDLEBREAK);
|
||||
}
|
||||
|
||||
void CGoblin::Behavior_MoveEnter()
|
||||
{
|
||||
pair<_uint, _bool> pairAnimInfo = {};
|
||||
@@ -194,11 +242,17 @@ void CGoblin::Behavior_SwingEnter()
|
||||
},
|
||||
0.05f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGoblinSpector->Set_Disolve(true); },
|
||||
0.28f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[&]() { m_bLookAt = true;
|
||||
m_bStep = true;
|
||||
m_pGoblinSpector->Set_Visible(false);
|
||||
m_pGoblinSpector->Spector_Trail_Visible(false);
|
||||
|
||||
m_pFSM->Change_State(FSMSTATE::SHUFFLE); },
|
||||
0.45f);
|
||||
}
|
||||
@@ -526,6 +580,18 @@ void CGoblin::Add_FSM()
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLE, CState_Idle::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_IdleBreak::STATE_IDLEBREAK_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_IdleBreakEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_IdleBreakExitCheck(); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_IdleBreakExit(); };
|
||||
Desc.funcPriorityUpdate = nullptr;
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
m_States.emplace(FSMSTATE::IDLEBREAK, CState_IdleBreak::Create(&Desc));
|
||||
}
|
||||
|
||||
{
|
||||
CState_Move::STATE_MOVE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
@@ -633,6 +699,14 @@ void CGoblin::Set_Anim()
|
||||
m_Animation[STATEANIM::IDLE_TURN_L] = { 26, false };
|
||||
m_Animation[STATEANIM::IDLE_TURN_R] = { 30, false };
|
||||
|
||||
m_Animation[STATEANIM::IDLE_BREAK1] = { 137, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK2] = { 138, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK3] = { 139, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK4] = { 37, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK5] = { 38, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK6] = { 39, false };
|
||||
m_Animation[STATEANIM::IDLE_BREAK7] = { 41, false };
|
||||
|
||||
m_Animation[STATEANIM::WALK_FWD] = { 45,true };
|
||||
m_Animation[STATEANIM::WALK_START] = { 57,false };
|
||||
m_Animation[STATEANIM::WALK_STOP] = { 58,false };
|
||||
|
||||
@@ -155,6 +155,9 @@ void CInfoInstance::Key_Input(_uint Input)
|
||||
Event_CallBack(TEXT("Canvas_Change"), &m_eUI_State);
|
||||
}
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_X):
|
||||
Event_CallBack(TEXT("Ancient_Magic_Throw"));
|
||||
break;
|
||||
case ENUM_CLASS(KEYINPUT::INPUT_G):
|
||||
|
||||
break;
|
||||
|
||||
@@ -22,6 +22,9 @@ void CInstancedProp::Update(_float fTimeDelta)
|
||||
|
||||
void CInstancedProp::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_isShake)
|
||||
m_pVIBufferInstanceCom->Shake(fTimeDelta);
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
@@ -86,6 +89,7 @@ HRESULT CInstancedProp::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_iNumMesh = m_pVIBufferInstanceCom->Get_NumMesh();
|
||||
|
||||
return S_OK;
|
||||
@@ -107,6 +111,10 @@ HRESULT CInstancedProp::Ready_Components(void* pArg)
|
||||
if(FAILED(Load_InstancedProp(pDesc->strInstanceDataPath.c_str())))
|
||||
return E_FAIL;
|
||||
|
||||
m_isShake = pDesc->isShake;
|
||||
if (m_isShake)
|
||||
m_pVIBufferInstanceCom->Set_Shake_Value(pDesc->vRadius, pDesc->vSpeed);
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
|
||||
@@ -222,7 +222,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CUnified>(g_iStaticLevel, NEXT_LEVEL, LAYER_UNIFIED)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
|
||||
CMapElement_Lake::MAPOBJECT_LAKE_DESC Lake_Desc = {};
|
||||
@@ -244,10 +244,10 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
_bool isReady_Background = { false };
|
||||
|
||||
#ifdef gimch
|
||||
isReady_Background = false;
|
||||
isReady_Background = true;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isReady_Background = true;
|
||||
isReady_Background = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isReady_Background = false;
|
||||
@@ -256,7 +256,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Background = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = false;
|
||||
isReady_Background = true;
|
||||
#endif //
|
||||
|
||||
|
||||
@@ -281,87 +281,119 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable");
|
||||
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair");
|
||||
|
||||
CInstancedProp::INSTANCE_PROP_DESC Desc = {};
|
||||
|
||||
/* InstanceProp Oak_Tree*/
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) {
|
||||
if (FAILED(Ready_IntstanceProp()))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* BearBerry */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* SM_HM_OwlPost_Window_A */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* WA_Rectangle_Double_A */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* WC_Retangle_Double_A */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* WA_Square_Double_C */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Quid_Window_A */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Ollivanders_Box_Window */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* WC_L_DoubleS_A */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* WC_Round_Double_A */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* SM_HM_Door1a */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* SM_HM_Door1a */
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
{
|
||||
CInstancedProp::INSTANCE_PROP_DESC Desc = {};
|
||||
|
||||
/* InstanceProp Oak_Tree*/
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* BearBerry */
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.6f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* SM_HM_OwlPost_Window_A */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* WA_Rectangle_Double_A */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* WC_Retangle_Double_A */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* WA_Square_Double_C */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Quid_Window_A */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Ollivanders_Box_Window */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* WC_L_DoubleS_A */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* WC_Round_Double_A */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* SM_HM_Door1a */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* SM_HM_Door2b */
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* OakTree_TallA */
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.f, 0.01f);
|
||||
Desc.vSpeed = _float2(0.01f, 0.1f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_TallA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
CInfoInstance::GetInstance()->Load_SpellInfo("../Bin/Resources/Data/UI/Spell/SpellInfo.xml");
|
||||
|
||||
@@ -295,10 +295,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
_bool isLoad_Background = { false };
|
||||
|
||||
#ifdef gimch
|
||||
isLoad_Background = false;
|
||||
isLoad_Background = true;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isLoad_Background = true;
|
||||
isLoad_Background = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isLoad_Background = false;
|
||||
@@ -307,7 +307,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Background = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = false;
|
||||
isLoad_Background = true;
|
||||
#endif //
|
||||
|
||||
#pragma region MAP_MODELS
|
||||
@@ -1895,6 +1895,12 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
|
||||
/* For.Prototype_Component_South_Hogwart_Land_LOD1 */
|
||||
|
||||
@@ -41,8 +41,8 @@ HRESULT CMagic_Meter::Initialize(void* pArg)
|
||||
m_fAlpha = 1.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fMaxGauge = 20.f;
|
||||
m_fCurrentGauge = 10.f;
|
||||
m_fMaxGauge = 15.f;
|
||||
m_fCurrentGauge = 15.f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -85,8 +85,9 @@ void CMagic_Meter::Update(_float fTimeDelta)
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
if (m_fCurrentGauge< 0.f)
|
||||
if (m_fCurrentGauge < 0.f)
|
||||
m_fCurrentGauge = 0.f;
|
||||
|
||||
//if (m_fDamage <= 0.f)
|
||||
// m_fDamage = 0.f;
|
||||
//m_fTargetHp = m_fMaxHp - m_fDamage;
|
||||
@@ -144,6 +145,40 @@ void CMagic_Meter::Meter_Index(_uint Number)
|
||||
m_iImageCount = Number;
|
||||
}
|
||||
|
||||
_float CMagic_Meter::Charge_Meter()
|
||||
{
|
||||
_float NewCurrentGauge{};
|
||||
m_fCurrentGauge++;
|
||||
|
||||
if (m_fMaxGauge < m_fCurrentGauge)
|
||||
{
|
||||
NewCurrentGauge = m_fCurrentGauge - m_fMaxGauge;
|
||||
m_fCurrentGauge = m_fMaxGauge;
|
||||
}
|
||||
|
||||
return NewCurrentGauge;
|
||||
}
|
||||
|
||||
_float CMagic_Meter::Get_Meter()
|
||||
{
|
||||
return m_fCurrentGauge;
|
||||
}
|
||||
|
||||
_float CMagic_Meter::Use_Meter(_float Meter)
|
||||
{
|
||||
if (Meter >= m_fCurrentGauge)
|
||||
{
|
||||
Meter -= m_fCurrentGauge;
|
||||
m_fCurrentGauge = 0.f;
|
||||
return Meter;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fCurrentGauge -= Meter;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMagic_Meter::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
|
||||
@@ -115,6 +115,12 @@ HRESULT CMapElement_Interactable::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Interactable::GrapToPlayer(_fvector vPos, _float fRatio)
|
||||
{
|
||||
_vector vCurrentPosition = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorLerp(vCurrentPosition, vPos, fRatio));
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
@@ -227,6 +233,11 @@ HRESULT CMapElement_Interactable::Render_OutLine()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Interactable::Set_KinematicFlag(_bool bFlag)
|
||||
{
|
||||
m_pRigidBody->Set_Kinematic(bFlag);
|
||||
}
|
||||
|
||||
CMapElement_Interactable* CMapElement_Interactable::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Interactable* pInstance = new CMapElement_Interactable(pDevice, pContext);
|
||||
|
||||
@@ -108,7 +108,7 @@ HRESULT CMapObject_Render::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < m_iNumMeshe; i++)
|
||||
for (_uint i = 0; i < m_iNumMeshe; ++i)
|
||||
{
|
||||
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -159,6 +159,11 @@ CStat* CMonster::Get_Stat()
|
||||
return m_pStat;
|
||||
}
|
||||
|
||||
_matrix CMonster::Get_HeadMatrix()
|
||||
{
|
||||
return m_pModelCom->Get_BoneMatrix("Head");
|
||||
}
|
||||
|
||||
HRESULT CMonster::Ready_Components(void*pArg)
|
||||
{
|
||||
__super::Ready_Components(pArg);
|
||||
|
||||
@@ -121,6 +121,7 @@ void CPlayer::Priority_Update(_float fTimeDelta)
|
||||
void CPlayer::Update(_float fTimeDelta)
|
||||
{
|
||||
Update_CameraCoordinateSystem();
|
||||
UpdateGrapInteractive(fTimeDelta);
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
@@ -138,15 +139,25 @@ __super::Update(fTimeDelta);
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON))
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)){
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN));
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||
{
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP));
|
||||
m_bAim = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CPlayer::UpdateGrapInteractive(Engine::_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
m_vGrapInteratableLerp.x += fTimeDelta;
|
||||
m_pGrapInteractive->GrapToPlayer(m_pTransformCom->Get_State(STATE::POSITION) + m_pCamPosition_ShoulderPart->Get_ShoulderLocalPos(), m_vGrapInteratableLerp.x);
|
||||
if (m_vGrapInteratableLerp.x > m_vGrapInteratableLerp.y) {
|
||||
m_vGrapInteratableLerp.x -= m_vGrapInteratableLerp.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
@@ -362,12 +373,12 @@ HRESULT CPlayer::Ready_Components()
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::PLAYER);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.3f;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { true };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 1.0f;
|
||||
Desc.fHeight = 0.6f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_Playable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
@@ -512,6 +523,7 @@ void CPlayer::Free()
|
||||
__super::Free();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pGrapInteractive);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "CamPosition_Arm.h"
|
||||
#include "Wand.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CamPosition_Shoulder.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
@@ -56,6 +57,7 @@ HRESULT CPlayer::InputAction()
|
||||
|| m_pGameInstance->Key_Down(DIK_LSHIFT)
|
||||
|| m_pGameInstance->Key_Down(DIK_C)
|
||||
|| m_pGameInstance->Key_Down(DIK_V)
|
||||
|| m_pGameInstance->Key_Down(DIK_X)
|
||||
|| m_pGameInstance->Key_Down(DIK_Z)
|
||||
|| m_pGameInstance->Key_Down(DIK_G)
|
||||
|| m_pGameInstance->Key_Down(DIK_B)
|
||||
@@ -65,7 +67,7 @@ HRESULT CPlayer::InputAction()
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_T)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_T));
|
||||
if (m_pGameInstance->Key_Down(DIK_TAB)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_TAB));
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_X)) m_pInfoInstance->Key_Input(ENUM_CLASS(KEYINPUT::INPUT_X));
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
@@ -143,6 +145,17 @@ HRESULT CPlayer::InputAim()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CPlayer::InputBroom()
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)
|
||||
|| m_pGameInstance->Key_Pressing(DIK_SPACE))
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CPlayer::Behavior_IdleEnter() {
|
||||
m_pFSM->Enable_State(FSMSTATE::IDLE);
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
@@ -204,6 +217,9 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
else if (m_pGameInstance->Key_Down(DIK_T)) {
|
||||
m_pInfoInstance->Change_Canvas();
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -323,6 +339,7 @@ void CPlayer::Behavior_MoveEnter()
|
||||
m_bSprintToggle = false;
|
||||
m_bWalkToggle = false;
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
m_bRatio = false;
|
||||
}
|
||||
}
|
||||
else { // While Moving
|
||||
@@ -500,7 +517,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_LEFT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
/*else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
{
|
||||
if (degree > 35.f && degree < 55.f)
|
||||
{
|
||||
@@ -525,12 +542,12 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_fAnimSpeed = 1.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
|
||||
m_fAmount = 0.3f;
|
||||
m_fAmount = 1.f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
else {
|
||||
@@ -538,7 +555,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_RIGHT];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
/*else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
{
|
||||
if (degree < -35.f && degree > -55.f)
|
||||
{
|
||||
@@ -563,12 +580,12 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_fAnimSpeed = 1.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
|
||||
m_fAmount = 0.3f;
|
||||
m_fAmount = 1.f;
|
||||
m_bRatio = true;
|
||||
}
|
||||
}
|
||||
@@ -577,7 +594,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_AIM_BWD];
|
||||
}
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
/*else if (m_pFSM->IsEnable(FSMSTATE::JOG) && !m_pFSM->IsEnable(FSMSTATE::SPRINT))
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim() && iCurrentAnimIndex == m_Animation[STATEANIM::JOG_BWD].first)
|
||||
{
|
||||
@@ -593,7 +610,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
else if (m_pFSM->IsEnable(FSMSTATE::WALK))
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::WALK_BWD];
|
||||
}
|
||||
*/
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::JOG_FWD];
|
||||
}
|
||||
@@ -602,7 +619,7 @@ HRESULT CPlayer::Behavior_MoveExitCheck(_float fTimeDelta)
|
||||
m_bRatio = true;
|
||||
}
|
||||
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, m_bRatio, m_fAnimSpeed);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, m_fAmount, true, m_fAnimSpeed);
|
||||
m_fAmount = 1.f;
|
||||
m_fAnimSpeed = 1.f;
|
||||
}
|
||||
@@ -747,8 +764,7 @@ HRESULT CPlayer::Behavior_DodgeExitCheck(_float fTimeDelta)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
|
||||
m_pTransformCom->AccumulateMomentum(m_pTransformCom->Get_State(STATE::LOOK)*fTimeDelta);
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.32f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -795,8 +811,17 @@ void CPlayer::Behavior_CombatEnter()
|
||||
pairAnimInfo = m_Animation[STATEANIM::MAPHELP];
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
}
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
SAFE_ADDREF(m_pGrapInteractive);
|
||||
m_pGrapInteractive->Set_KinematicFlag(true);
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::POTION);
|
||||
@@ -879,6 +904,18 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
{
|
||||
if (SUCCEEDED(InputMove()) && IsCurrentKeyFrame("Throw")) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
_vector vDir = {};
|
||||
_float vDistance = 45.f;
|
||||
CRigidBody_Dynamic* pBody = m_pGrapInteractive->Get_Component<CRigidBody_Dynamic>();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
vDir = XMVector3Normalize(m_LockOnInfo.pUnit->Get_LockOnPos() - m_pGrapInteractive->Get_LockOnPos());
|
||||
}
|
||||
else {
|
||||
vDir = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
}
|
||||
m_pGrapInteractive->Set_KinematicFlag(false);
|
||||
pBody->Add_Force(vDir * vDistance, PSX::PxForceMode::eIMPULSE);
|
||||
SAFE_RELEASE(m_pGrapInteractive);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -958,6 +995,9 @@ HRESULT CPlayer::Behavior_LightAttackExitCheck()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(InputMove()) && fRatio >= 0.3f) {
|
||||
m_pFSM->Change_State(FSMSTATE::MOVE);
|
||||
@@ -1157,6 +1197,9 @@ HRESULT CPlayer::Behavior_SpellExitCheck()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
|
||||
if (m_pFSM->IsEnable(FSMSTATE::SPELL) && fRatio >= 0.3f)
|
||||
{
|
||||
@@ -1251,10 +1294,17 @@ void CPlayer::Behavior_Broom_RideEnter()
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Behavior_Broom_RideExitCheck()
|
||||
HRESULT CPlayer::Behavior_Broom_RideExitCheck(_float fTimeDelta)
|
||||
{
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
pair<_uint, _bool> pairAnimInfo;
|
||||
|
||||
_bool bFwd = m_pGameInstance->Key_Pressing(DIK_W);
|
||||
_bool bLft = m_pGameInstance->Key_Pressing(DIK_A);
|
||||
_bool bRht = m_pGameInstance->Key_Pressing(DIK_D);
|
||||
_bool bDown = m_pGameInstance->Key_Pressing(DIK_LCONTROL);
|
||||
_bool bUp = m_pGameInstance->Key_Pressing(DIK_SPACE);
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_MOUNT].first)
|
||||
{
|
||||
if (m_pModelCom->IsFinishedAnim()) {
|
||||
@@ -1291,41 +1341,92 @@ HRESULT CPlayer::Behavior_Broom_RideExitCheck()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
if (SUCCEEDED(InputBroom()) || SUCCEEDED(InputMove()))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD);
|
||||
_float3 vInput = { 0.f, 0.f, 0.f };
|
||||
|
||||
if (bFwd) vInput.z += 1.f;
|
||||
if (bLft) vInput.x -= 1.f;
|
||||
if (bRht) vInput.x += 1.f;
|
||||
if (bUp) vInput.y += 1.f;
|
||||
if (bDown) vInput.y -= 1.f;
|
||||
|
||||
_bool bHasInput = !(vInput.x == 0 && vInput.y == 0 && vInput.z == 0);
|
||||
_vector vDir = XMVector3Normalize(XMLoadFloat3(&vInput));
|
||||
|
||||
if (bUp || bDown)
|
||||
{
|
||||
if (bUp)
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
}
|
||||
|
||||
_float ax = fabsf(vInput.x);
|
||||
_float ay = fabsf(vInput.y);
|
||||
_float az = fabsf(vInput.z);
|
||||
|
||||
if (ay > ax && ay > az)
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
else if (ax >= az)
|
||||
{
|
||||
if (ay >= ax)
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
}
|
||||
else {
|
||||
if (vInput.x < 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_LEFT];
|
||||
else if (vInput.x > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_RIGHT];
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vInput.y > 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_UP];
|
||||
else if (vInput.y < 0)
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_DOWN];
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_LEFT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_RIGHT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_LCONTROL))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DOWN);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Pressing(DIK_SPACE))
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_UP);
|
||||
}
|
||||
else
|
||||
{
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_FWD);
|
||||
else {
|
||||
pairAnimInfo = m_Animation[STATEANIM::BROOM_FWD];
|
||||
}
|
||||
}
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_N)) {
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
|
||||
m_pFSM->Enable_State(FSMSTATE::DISMOUNT);
|
||||
m_pBroom->Set_Ride(false);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
if (m_pGameInstance->Key_Pressing(DIK_N)) {
|
||||
auto flags = m_pCharacter_Controller->Get_CollisionFlags();
|
||||
if (flags & PSX::PxControllerCollisionFlag::eCOLLISION_DOWN)
|
||||
{
|
||||
m_bOnce = false;
|
||||
pairAnimInfo = Get_AnimInfo(STATEANIM::BROOM_DISMOUNT);
|
||||
m_pFSM->Enable_State(FSMSTATE::DISMOUNT);
|
||||
m_pBroom->Set_Ride(false);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else {
|
||||
m_pBroomTransform->Go_Down(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
if (iCurrAnimIndex == m_Animation[STATEANIM::BROOM_DISMOUNT].first)
|
||||
@@ -1433,7 +1534,6 @@ void CPlayer::Add_FSM()
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.03f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1486,37 +1586,39 @@ void CPlayer::Add_FSM()
|
||||
Desc.funcExitCheck = [this](_float fTimeDelta) { return Behavior_DodgeExitCheck(fTimeDelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_DodgeExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
|
||||
_vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
|
||||
_vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInputDir += xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
xmvInputDir -= xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInputDir -= xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInputDir += xmvCamRight;
|
||||
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float absDir = fabsf(vDir);
|
||||
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
|
||||
if (cross > 0.f)
|
||||
if (SUCCEEDED(InputMove()))
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
|
||||
_vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
|
||||
_vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInputDir += xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
xmvInputDir -= xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInputDir -= xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInputDir += xmvCamRight;
|
||||
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float absDir = fabsf(vDir);
|
||||
_float cross = vCurLook.x * vInputDir.y - vCurLook.y * vInputDir.x;
|
||||
if (cross > 0.f)
|
||||
{
|
||||
m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
else {
|
||||
m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta);
|
||||
}
|
||||
}
|
||||
};
|
||||
Desc.funcLateUpdate = nullptr;
|
||||
@@ -1577,22 +1679,22 @@ void CPlayer::Add_FSM()
|
||||
|
||||
#pragma region Behavior_Broom_Ride
|
||||
{
|
||||
|
||||
CState_Broom_Ride::STATE_BROOM_RIDE_DESC Desc{};
|
||||
Desc.pOwner = this;
|
||||
Desc.funcEnterEvent = [this]() { Behavior_Broom_RideEnter(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(); };
|
||||
Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_Broom_RideExitCheck(fTimedelta); };
|
||||
Desc.funcExitEvent = [this]() { Behavior_Broom_RideExit(); };
|
||||
Desc.funcPriorityUpdate = [this](_float fTimeDelta) {
|
||||
_uint iCurrAnimIndex = m_pModelCom->Get_AnimIndex();
|
||||
if (m_pFSM->IsEnable(FSMSTATE::DISMOUNT))
|
||||
return;
|
||||
|
||||
if (m_bHoverToggle)
|
||||
{
|
||||
_float3 fMove = m_pGameInstance->Get_MouseMove();
|
||||
m_pBroomTransform->Turn(m_pBroomTransform->Get_State(STATE::UP), fTimeDelta * fMove.x * 0.02f);
|
||||
_vector OffsetY = XMVectorSet(0.f, 1.f, 0.f, 0.f);
|
||||
if (!m_bOnce) {
|
||||
m_pBroomTransform->Set_State(STATE::POSITION, Get_WorldPostion()+ OffsetY);
|
||||
m_bOnce = true;
|
||||
}
|
||||
|
||||
_matrix BroomWorld = XMLoadFloat4x4(m_pBroomTransform->Get_WorldMatrixPtr());
|
||||
_matrix BoneLocal = XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ HRESULT CTroll::Ready_Components()
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fRadius = 1.2f;
|
||||
Desc.fHeight = 1.5f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Troll_HitReport::Create();
|
||||
|
||||
@@ -31,8 +31,10 @@ class CAction_Panel final : public CPanelObject
|
||||
|
||||
private:
|
||||
void Magic_Meter_Visible(_uint iIndex, _bool bVisible);
|
||||
void Magic_Meter_Update();
|
||||
void Magic_Meter_UV();
|
||||
void Matic_Meter_Move();
|
||||
void Magic_Meter_Move();
|
||||
void Ancient_Magic_Throw();
|
||||
|
||||
void Use_Spell(_int Index);
|
||||
void Spell_Setting(void* pArg);
|
||||
@@ -51,7 +53,7 @@ class CAction_Panel final : public CPanelObject
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float2 m_vMagic_MeterUV[5] = {};
|
||||
_uint m_iMagic_Meter_Count{};
|
||||
_int m_iMagic_Meter_Count{};
|
||||
|
||||
CGameObject* m_pSpell_Slot = { nullptr };
|
||||
CGameObject* m_pSpell_Overlay1 = { nullptr };
|
||||
@@ -64,12 +66,14 @@ class CAction_Panel final : public CPanelObject
|
||||
CGameObject* m_pMagic_Meter2 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter3 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter4 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter5 = { nullptr };
|
||||
CGameObject* m_pLastMagic_Meter = { nullptr };
|
||||
CGameObject* m_pMagic_Icon = { nullptr };
|
||||
CGameObject* m_pSpell_UI = { nullptr };
|
||||
CGameObject* m_pPotion = { nullptr };
|
||||
CGameObject* m_pMagic_Item = { nullptr };
|
||||
|
||||
vector<CGameObject*> m_Magic_Meters;
|
||||
|
||||
public:
|
||||
static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -39,6 +39,11 @@ class CBroom final : public CUnit
|
||||
_float m_fDecel = 1.f;
|
||||
_float m_fTurnDecel = 0.3f;
|
||||
|
||||
|
||||
_float m_fVerticalSpeed = 0.f;
|
||||
|
||||
|
||||
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
private:
|
||||
|
||||
@@ -27,7 +27,8 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
_vector Get_ShoulderLocalPos();
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
@@ -35,12 +36,13 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Ready_SubParts();
|
||||
void Start_LerpShoulderPos();
|
||||
_float Calc_CamPosRatio();
|
||||
|
||||
_bool m_bMovable = { true };
|
||||
_float m_fMouseSensor = { 0.5f };
|
||||
_float m_fShoulderDistance = { 2.f };
|
||||
_float m_fCameraFocalLength = { 10.f };
|
||||
_float m_fBackFrontRatio = { 0.9f };
|
||||
_float3 m_vBackFrontRatio = { 0.9f, 0.9f, 0.9f }; // 시작위치, 대상위치, 원래위치
|
||||
_float2 m_vAccDegreeXY = {};
|
||||
_float3 m_vShoulderPosRatio = { 1.f, 2.f, -1.f };
|
||||
|
||||
@@ -50,9 +52,10 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
_bool m_bShoulderLerp = { false };
|
||||
_float2 m_vShoulderLerpTimer = { 0.f, 1.f };
|
||||
|
||||
_float2 m_vPosLerpTimer = { 0.f, 0.16f };
|
||||
_float2 m_vPosLerpTimer = { 0.f, BASIC_LERP_TIMER };
|
||||
_float4 m_StartPos = { };
|
||||
_float4 m_DestPos = { };
|
||||
PSX::PxSweepBuffer m_BufferHit = {};
|
||||
|
||||
_bool m_bZoomIn = { false };
|
||||
_bool m_bLerp = {};
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Client
|
||||
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ,SPECTOR, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, WATER, LAND, NONMRO, END };
|
||||
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, WATER, LAND, NONMRO,SPECTOR_WEAPON, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
@@ -38,10 +38,12 @@ namespace Client
|
||||
|
||||
enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END };
|
||||
|
||||
enum class DAMAGE_TYPE { NOMAL, CRITICLA };
|
||||
|
||||
enum class KEYINPUT
|
||||
{
|
||||
INPUT_1 = 1, INPUT_2, INPUT_3, INPUT_4,
|
||||
INPUT_T, INPUT_G,
|
||||
INPUT_T, INPUT_G, INPUT_X,
|
||||
INPUT_TAB,
|
||||
DIM_RBUTTON_UP, DIM_RBUTTON_DOWN,
|
||||
END
|
||||
|
||||
@@ -58,4 +58,11 @@ namespace Client
|
||||
_float fMaxExprience{};
|
||||
_int iGold{};
|
||||
}UNITINFO;
|
||||
|
||||
typedef struct tagDamageInfo
|
||||
{
|
||||
_vector vTarget_Pos{};
|
||||
_float fDamage{};
|
||||
DAMAGE_TYPE eType;
|
||||
}DAMAGE_INFO;
|
||||
};
|
||||
|
||||
@@ -80,6 +80,10 @@ class CGoblin final : public CMonster
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
void Behavior_IdleExit();
|
||||
|
||||
void Behavior_IdleBreakEnter();
|
||||
HRESULT Behavior_IdleBreakExitCheck();
|
||||
void Behavior_IdleBreakExit();
|
||||
|
||||
void Behavior_MoveEnter();
|
||||
HRESULT Behavior_MoveExitCheck(_float fTimeDelta);
|
||||
void Behavior_MoveExit();
|
||||
|
||||
@@ -24,12 +24,17 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Render_Disolve();
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
public:
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDisolveTime = { 0.f };
|
||||
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
@@ -30,8 +30,11 @@ class CGoblin_Spector final : public CMonster
|
||||
virtual HRESULT Render() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr)override;
|
||||
|
||||
public:
|
||||
void Spector_Trail_Visible(_bool isTrailVisible);
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
|
||||
|
||||
private:
|
||||
class CGoblin* m_pGoblin = { nullptr };
|
||||
@@ -40,6 +43,8 @@ class CGoblin_Spector final : public CMonster
|
||||
_float3 m_Offset = {};
|
||||
_float3 m_vOriginScale = {};
|
||||
_float3 m_vScale = { 1.f, 1.f, 1.f };
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDisolveTime = {0.f};
|
||||
|
||||
|
||||
class CTrailObject* m_pLeft_Trail = { nullptr };
|
||||
@@ -54,6 +59,7 @@ class CGoblin_Spector final : public CMonster
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
virtual HRESULT Render_Disolve();
|
||||
|
||||
public:
|
||||
static CGoblin_Spector* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -16,8 +16,11 @@ class CInstancedProp final : public CGameObject
|
||||
public:
|
||||
typedef struct tagInstancedPropDesc
|
||||
{
|
||||
_wstring strPrototypeTag;
|
||||
_string strInstanceDataPath;
|
||||
_bool isShake;
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
_wstring strPrototypeTag;
|
||||
_string strInstanceDataPath;
|
||||
}INSTANCE_PROP_DESC;
|
||||
private:
|
||||
CInstancedProp(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -32,7 +35,9 @@ class CInstancedProp final : public CGameObject
|
||||
virtual HRESULT Render_Shadow()override;
|
||||
|
||||
private:
|
||||
_bool m_isShake = {};
|
||||
_uint m_iNumMesh = {};
|
||||
|
||||
CVIBuffer_Model_Instance* m_pVIBufferInstanceCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class CLevel_GamePlay final : public CLevel
|
||||
HRESULT Initialize(void* pArg);
|
||||
HRESULT Ready_Lights();
|
||||
HRESULT Ready_Background();
|
||||
HRESULT Ready_IntstanceProp();
|
||||
HRESULT Ready_Markers();
|
||||
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Camera();
|
||||
|
||||
@@ -27,7 +27,9 @@ class CMagic_Meter final : public CElementObject
|
||||
|
||||
public:
|
||||
void Meter_Index(_uint Number);
|
||||
//void Set_
|
||||
_float Charge_Meter();
|
||||
_float Get_Meter();
|
||||
_float Use_Meter(_float Meter);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
@@ -26,9 +26,11 @@ class CMapElement_Interactable final : public CMapElement
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual void GrapToPlayer(_fvector vPos, _float fRatio);
|
||||
_vector Get_LockOnPos();
|
||||
virtual void Set_DrawOutLine();
|
||||
virtual HRESULT Render_OutLine() override;
|
||||
void Set_KinematicFlag(_bool bFlag);
|
||||
|
||||
private:
|
||||
ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END };
|
||||
|
||||
@@ -23,6 +23,7 @@ class CMonster abstract : public CUnit
|
||||
virtual _bool Get_Damage(_float fDamage);
|
||||
virtual _float2 Get_Hp();
|
||||
virtual CStat* Get_Stat();
|
||||
_matrix Get_HeadMatrix();
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CUnit* m_pTarget = { nullptr };
|
||||
|
||||
@@ -26,9 +26,11 @@ class CPlayer final : public CUnit
|
||||
#endif // _DEBUG
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
_matrix Get_WandPos();
|
||||
void UpdateGrapInteractive(Engine::_float fTimeDelta);
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
LOCKON_INFO m_LockOnInfo = {};
|
||||
class CMapElement_Interactable* m_pGrapInteractive = { nullptr };
|
||||
_float m_fDirectionRadian = 0.f;
|
||||
|
||||
_bool m_bSprintToggle = { false };
|
||||
@@ -37,6 +39,7 @@ class CPlayer final : public CUnit
|
||||
|
||||
_float3 m_vCameraLookDir = { 0.f, 0.f, 1.f, };
|
||||
_float3 m_vCameraRightDir = { 1.f, 0.f, 0.f };
|
||||
_float2 m_vGrapInteratableLerp = { 0.f, BASIC_LERP_TIMER };
|
||||
|
||||
class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr };
|
||||
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
|
||||
@@ -106,12 +109,14 @@ class CPlayer final : public CUnit
|
||||
_bool m_bRatio = { false };
|
||||
_bool m_bAim = { false };
|
||||
_float m_fAnimSpeed = {};
|
||||
_bool m_bOnce = { };
|
||||
|
||||
HRESULT InputAction();
|
||||
HRESULT InputMove();
|
||||
HRESULT InputKeyUpMove();
|
||||
HRESULT InputSpell();
|
||||
HRESULT InputAim();
|
||||
HRESULT InputBroom();
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck(_float fTimeDelta);
|
||||
@@ -150,7 +155,7 @@ class CPlayer final : public CUnit
|
||||
void Behavior_HitExit();
|
||||
|
||||
void Behavior_Broom_RideEnter();
|
||||
HRESULT Behavior_Broom_RideExitCheck();
|
||||
HRESULT Behavior_Broom_RideExitCheck(_float fTimeDelta);
|
||||
void Behavior_Broom_RideExit();
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -136,4 +136,18 @@
|
||||
<Surface>MRO</Surface>
|
||||
</Mesh>
|
||||
</SM_HM_Door2b>
|
||||
<SM_OakTree_TallA mesh="2">
|
||||
<Mesh>
|
||||
<Material>T_Oak_Leaves02_D</Material>
|
||||
<Material>T_Oak_Leaves02_N</Material>
|
||||
<Material>T_Oak_Leaves02_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
<Mesh>
|
||||
<Material>T_BogTree_Oak_BarkA_D</Material>
|
||||
<Material>T_BogTree_Oak_BarkA_N</Material>
|
||||
<Material>T_BogTree_Oak_BarkA_SROH</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_OakTree_TallA>
|
||||
</Instance>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -17,11 +17,11 @@
|
||||
<aiTextureType_EMISSION_COLOR Index="14" Filename="" Extension=""/>
|
||||
<aiTextureType_METALNESS Index="15" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE_ROUGHNESS Index="16" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="T_Troll_ArmoredTroll_Body_Corruption_A" Extension=".dds"/>
|
||||
<aiTextureType_UNKNOWN Index="18" Filename="" Extension=""/>
|
||||
<aiTextureType_SHEEN Index="19" Filename="" Extension=""/>
|
||||
<aiTextureType_CLEARCOAT Index="20" Filename="" Extension=""/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="T_Troll_ArmoredTroll_Body_Corruption_A" Extension=".dds"/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_BASE Index="22" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR Index="23" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR_COLOR Index="24" Filename="" Extension=""/>
|
||||
@@ -33,7 +33,7 @@
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_Troll_Mountain01_Eye_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT Index="3" Filename="" Extension=""/>
|
||||
<aiTextureType_EMISSIVE Index="4" Filename="" Extension=""/>
|
||||
<aiTextureType_EMISSIVE Index="4" Filename="T_Eye_IrisTint_MSK" Extension=".dds"/>
|
||||
<aiTextureType_HEIGHT Index="5" Filename="" Extension=""/>
|
||||
<aiTextureType_NORMALS Index="6" Filename="BaseFlattenNormalMap" Extension=".png"/>
|
||||
<aiTextureType_SHININESS Index="7" Filename="" Extension=""/>
|
||||
@@ -104,11 +104,11 @@
|
||||
<aiTextureType_EMISSION_COLOR Index="14" Filename="" Extension=""/>
|
||||
<aiTextureType_METALNESS Index="15" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE_ROUGHNESS Index="16" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="T_Troll_ArmoredTroll_Head_Corruption_A" Extension=".dds"/>
|
||||
<aiTextureType_UNKNOWN Index="18" Filename="" Extension=""/>
|
||||
<aiTextureType_SHEEN Index="19" Filename="" Extension=""/>
|
||||
<aiTextureType_CLEARCOAT Index="20" Filename="" Extension=""/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="T_Troll_ArmoredTroll_Head_Corruption_A" Extension=".dds"/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_BASE Index="22" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR Index="23" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR_COLOR Index="24" Filename="" Extension=""/>
|
||||
@@ -162,11 +162,11 @@
|
||||
<aiTextureType_EMISSION_COLOR Index="14" Filename="" Extension=""/>
|
||||
<aiTextureType_METALNESS Index="15" Filename="T_Troll_ArmoredTroll_Leather_MRO" Extension=".dds"/>
|
||||
<aiTextureType_DIFFUSE_ROUGHNESS Index="16" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="T_Troll_ArmoredTroll_Leather_Corruption_A" Extension=".dds"/>
|
||||
<aiTextureType_UNKNOWN Index="18" Filename="" Extension=""/>
|
||||
<aiTextureType_SHEEN Index="19" Filename="" Extension=""/>
|
||||
<aiTextureType_CLEARCOAT Index="20" Filename="" Extension=""/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="T_Troll_ArmoredTroll_Leather_Corruption_A" Extension=".dds"/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_BASE Index="22" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR Index="23" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR_COLOR Index="24" Filename="" Extension=""/>
|
||||
@@ -191,11 +191,11 @@
|
||||
<aiTextureType_EMISSION_COLOR Index="14" Filename="" Extension=""/>
|
||||
<aiTextureType_METALNESS Index="15" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE_ROUGHNESS Index="16" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="" Extension=""/>
|
||||
<aiTextureType_AMBIENT_OCCLUSION Index="17" Filename="VFX_T_SkinBurn_Alpha_D" Extension=".dds"/>
|
||||
<aiTextureType_UNKNOWN Index="18" Filename="" Extension=""/>
|
||||
<aiTextureType_SHEEN Index="19" Filename="" Extension=""/>
|
||||
<aiTextureType_CLEARCOAT Index="20" Filename="" Extension=""/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="VFX_T_SkinBurn_Alpha_D" Extension=".dds"/>
|
||||
<aiTextureType_TRANSMISSION Index="21" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_BASE Index="22" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR Index="23" Filename="" Extension=""/>
|
||||
<aiTextureType_MAYA_SPECULAR_COLOR Index="24" Filename="" Extension=""/>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,36 +12,35 @@ static const float FLT_EPSILON7 = 1.192092896e-07;
|
||||
static const float FLT_EPSILON5 = 1.192092896e-05;
|
||||
static const float FLT_EPSILON3 = 1.192092896e-03;
|
||||
|
||||
|
||||
static const float AI_TEXTURE_TYPE_NONE = 0.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_DIFFUSE = 1.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_SPECULAR = 2.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_AMBIENT = 3.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_EMISSIVE = 4.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_HEIGHT = 5.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_NORMALS = 6.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_SHININESS = 7.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_OPACITY = 8.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_DISPLACEMENT = 9.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_LIGHTMAP = 10.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_REFLECTION = 11.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_BASE_COLOR = 12.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_NORMAL_CAMERA = 13.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_EMISSION_COLOR = 14.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_METALNESS = 15.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_DIFFUSE_ROUGHNESS = 16.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_AMBIENT_OCCLUSION = 17.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_UNKNOWN = 18.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_SHEEN = 19.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_CLEARCOAT = 20.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_TRANSMISSION = 21.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_BASE = 22.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_SPECULAR = 23.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_SPECULAR_COLOR = 24.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_SPECULAR_ROUGHNESS = 25.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_ANISOTROPY = 26.f / 27.f;
|
||||
static const uint AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS = 1;
|
||||
static const uint AI_TEXTURE_TYPE_MAX = AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS;
|
||||
static const int AI_TEXTURE_TYPE_NONE = 0 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_DIFFUSE = 1 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_SPECULAR = 2 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_AMBIENT = 3 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_EMISSIVE = 4 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_HEIGHT = 5 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_NORMALS = 6 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_SHININESS = 7 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_OPACITY = 8 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_DISPLACEMENT = 9 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_LIGHTMAP = 10/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_REFLECTION = 11/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_BASE_COLOR = 12/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_NORMAL_CAMERA = 13/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_EMISSION_COLOR = 14/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_METALNESS = 15 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_DIFFUSE_ROUGHNESS = 16/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_AMBIENT_OCCLUSION = 17/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_UNKNOWN = 18/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_SHEEN = 19/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_CLEARCOAT = 20/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_TRANSMISSION = 21 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_BASE = 22/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_SPECULAR = 23/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_SPECULAR_COLOR = 24/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_SPECULAR_ROUGHNESS = 25/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_ANISOTROPY = 26 /* / 27*/;
|
||||
static const uint AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS = 27;
|
||||
static const uint AI_TEXTURE_TYPE_MAX = AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS;
|
||||
|
||||
|
||||
#endif // ENGINE_SHADER_CONSTANTS_HLSLI
|
||||
|
||||
@@ -228,7 +228,8 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
float3 vToLight = normalize(-g_vLightDir.xyz); // 픽셀에서 라이트로
|
||||
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
{
|
||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||
fMetallic = vMRO.r;
|
||||
@@ -237,7 +238,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
|
||||
vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic);
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -246,7 +247,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
fRoughness = vSRO.g;
|
||||
fOcclusion = vSRO.b;
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -340,7 +341,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
{
|
||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||
fMetallic = vMRO.r;
|
||||
@@ -349,7 +350,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
|
||||
vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic);
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -358,6 +359,15 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
fRoughness = vSRO.g;
|
||||
fOcclusion = vSRO.b;
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
float4 vSRXO = g_SurfaceTexture.Sample(DefaultSampler, uv);
|
||||
vF0 = vSRXO.rrr;
|
||||
fRoughness = vSRXO.g;
|
||||
fOcclusion = vSRXO.a;
|
||||
}
|
||||
else // basic Lighting(phong blinn) // if you were here, you miss some assets.
|
||||
{
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vToLight * -1.f, vNormal), 0.f) + (fAmbientOcclusion * g_vLightAmbient * g_vMtrlAmbient)));
|
||||
@@ -459,7 +469,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
fSpotAttenenuation *= fSpotAttenenuation;
|
||||
fAttenuation *= fSpotAttenenuation;
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
{
|
||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||
fMetallic = vMRO.r;
|
||||
@@ -468,7 +478,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
|
||||
vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic);
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -477,6 +487,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
fRoughness = vSRO.g;
|
||||
fOcclusion = vSRO.b;
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
float4 vSRXO = g_SurfaceTexture.Sample(DefaultSampler, uv);
|
||||
vF0 = vSRXO.rrr;
|
||||
fRoughness = vSRXO.g;
|
||||
fOcclusion = vSRXO.a;
|
||||
}
|
||||
else // basic Lighting(phong blinn) // if you were here, you miss some assets.
|
||||
{
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vToLight * -1.f, vNormal), 0.f) + (fAmbientOcclusion * g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
#include "Engine_Shader_Functions.hlsli"
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
struct Instance
|
||||
{
|
||||
float4 vRight;
|
||||
float4 vUp;
|
||||
float4 vLook;
|
||||
float4 vTranslation;
|
||||
};
|
||||
|
||||
struct InstanceValue
|
||||
{
|
||||
float fSpeed;
|
||||
float fMaxRadian;
|
||||
};
|
||||
|
||||
|
||||
StructuredBuffer<Instance> g_InstanceBufferInput : register(t0);
|
||||
StructuredBuffer<InstanceValue> g_InstanceValueBufferInput : register(t1);
|
||||
|
||||
RWStructuredBuffer<Instance> g_InstanceOutput : register(u0);
|
||||
|
||||
cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
|
||||
{
|
||||
float fTimeDelta;
|
||||
float fPading1;
|
||||
float fPading2;
|
||||
float fPading3;
|
||||
}
|
||||
|
||||
//내가 몇개의 스레드를 사용할 것인지 지정하는데
|
||||
//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다.
|
||||
[numthreads(256, 1, 1)]
|
||||
void CS_MAIN(
|
||||
uint3 DispatchThreadID : SV_DispatchThreadID)
|
||||
{
|
||||
int iIndex = DispatchThreadID.x; // 배열 인덱스
|
||||
|
||||
Instance particle = g_InstanceBufferInput[iIndex];
|
||||
InstanceValue particleValue = g_InstanceValueBufferInput[iIndex];
|
||||
|
||||
float fRadian = sin(particleValue.fSpeed * fTimeDelta) * particleValue.fMaxRadian;
|
||||
|
||||
// 3. 임의의 축 회전 행렬 생성
|
||||
|
||||
// 4. 최종 월드 행렬 (CurMat) 생성
|
||||
|
||||
float4x4 CurMatrix =
|
||||
{
|
||||
particle.vRight,
|
||||
particle.vUp,
|
||||
particle.vLook,
|
||||
particle.vTranslation
|
||||
};
|
||||
|
||||
CurMatrix = mul(RotateAxis(particle.vLook, fRadian), CurMatrix);
|
||||
|
||||
particle.vRight = CurMatrix[0].xyzw;
|
||||
particle.vUp = CurMatrix[1].xyzw;
|
||||
particle.vLook = CurMatrix[2].xyzw;
|
||||
particle.vTranslation = CurMatrix[3].xyzw;
|
||||
|
||||
//아웃풋 대입
|
||||
g_InstanceOutput[iIndex] = particle;
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
bool g_bRimLight;
|
||||
bool g_bUseNormalMap;
|
||||
bool g_bDisolve;
|
||||
int g_bRimLight;
|
||||
int g_bUseNormalMap;
|
||||
int g_bDisolve;
|
||||
|
||||
float g_fFar;
|
||||
float g_LifeRatio;
|
||||
@@ -21,8 +21,8 @@ float g_fDisolveRatio;
|
||||
float g_fDisolveAmount;
|
||||
float g_fDisolveEdgeWidth;
|
||||
|
||||
vector g_vDisolveEdgeColor;
|
||||
vector g_vCamPosition;
|
||||
float4 g_vDisolveEdgeColor;
|
||||
float4 g_vCamPosition;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
@@ -38,7 +38,7 @@ Texture2D g_DeadDisolveTexture;
|
||||
Texture2D g_DeadDisolveBurnTexture;
|
||||
|
||||
|
||||
bool g_bBinded_Texture[AI_TEXTURE_TYPE_MAX * 27];
|
||||
int g_iBinded_Texture[27];
|
||||
|
||||
float3 g_RootColor;
|
||||
float3 g_TipColor;
|
||||
@@ -271,16 +271,16 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vMtrlDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vMtrlDiffuse, In.vTexcoord);
|
||||
}
|
||||
//if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION], true))
|
||||
//{
|
||||
// float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
// vMtrlDiffuse *= vTransmission;
|
||||
//}
|
||||
//if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE], true))
|
||||
//{
|
||||
// float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
// vMtrlDiffuse += vEmissive;
|
||||
//}
|
||||
if (g_iBinded_Texture[21] != 0)
|
||||
{
|
||||
float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vMtrlDiffuse.a *= vTransmission.r;
|
||||
}
|
||||
if (g_iBinded_Texture[4] != 0)
|
||||
{
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vMtrlDiffuse += vEmissive;
|
||||
}
|
||||
if (vMtrlDiffuse.a < 0.2f) { discard; }
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
@@ -367,7 +367,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
AI_TEXTURE_TYPE_METALNESS, // 서페이스 파라미터
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
1.f);
|
||||
|
||||
return Out;
|
||||
@@ -486,6 +486,11 @@ PS_OUT PS_SPECTOR_MAIN(PS_IN In)
|
||||
|
||||
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vMtrlDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vMtrlDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vMtrlDiffuse.a < 0.2f)
|
||||
{
|
||||
discard;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
bool g_bUVTargetDiffuse;
|
||||
bool g_bAdditiveDisolve;
|
||||
bool g_bDisolve;
|
||||
int g_bUVTargetDiffuse;
|
||||
int g_bAdditiveDisolve;
|
||||
int g_bDisolve;
|
||||
|
||||
float g_LifeRatio;
|
||||
float g_fFar;
|
||||
@@ -26,6 +26,9 @@ float g_fUsingSurfaceParams;
|
||||
float2 g_vClipBoxSize;
|
||||
float2 g_vClipBoxLTPos;
|
||||
|
||||
float g_fDisolveAmount;
|
||||
float g_fDisolveEdgeWidth;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_DAOTexture;
|
||||
@@ -38,7 +41,7 @@ Texture2D g_AmbientOcclusionTexture;
|
||||
Texture2D g_UnknownTexture;
|
||||
Texture2D g_NoiseTexture;
|
||||
|
||||
bool g_bBinded_Texture[AI_TEXTURE_TYPE_MAX * 27];
|
||||
int g_iBinded_Texture[AI_TEXTURE_TYPE_MAX];
|
||||
|
||||
Texture2D g_MaskingTexture;
|
||||
Texture2D g_ClippingTexture;
|
||||
@@ -258,16 +261,16 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
//if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION], true))
|
||||
//{
|
||||
// float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
// vMtrlDiffuse *= vTransmission;
|
||||
//}
|
||||
//if (AlmostEqual7(g_bBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE], true))
|
||||
//{
|
||||
// float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
// vMtrlDiffuse += vEmissive;
|
||||
//}
|
||||
if (g_iBinded_Texture[AI_TEXTURE_TYPE_TRANSMISSION] != 0)
|
||||
{
|
||||
float4 vTransmission = g_TransmissionTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vMtrlDiffuse *= vTransmission;
|
||||
}
|
||||
if (g_iBinded_Texture[AI_TEXTURE_TYPE_EMISSIVE] != 0)
|
||||
{
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vMtrlDiffuse += vEmissive;
|
||||
}
|
||||
if (vMtrlDiffuse.a < 0.2f)
|
||||
{
|
||||
discard;
|
||||
@@ -621,6 +624,47 @@ PS_OUT PS_NONMRO(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DisolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vMtrlDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vMtrlDiffuse, In.vTexcoord);
|
||||
}
|
||||
|
||||
if (vMtrlDiffuse.a < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
float fSurfaceParam = g_fUsingSurfaceParams;
|
||||
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
|
||||
{
|
||||
fSurfaceParam = 0;
|
||||
}
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
fSurfaceParam, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 MeshTechnique11
|
||||
{
|
||||
pass MeshPass // 0
|
||||
@@ -808,4 +852,14 @@ technique11 MeshTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NONMRO();
|
||||
}
|
||||
|
||||
pass SpectorWeaponPass // 19
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_SPECTOR_WEAPON_MAIN();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||
1.f);
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
@@ -175,9 +175,9 @@ PS_OUT PS_MAIN_TERRAIN_ANISO(PS_IN In)
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||
(1.f / 255.f)); // 지형은 1
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||
(1.f / 255.f)); // 지형은 1
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (vMtrlDiffuse.a < 0.1f)
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
discard;
|
||||
|
||||
vector vMtrlNormal = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -101,7 +101,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
Out.vNormal = float4(vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, g_fUsingSurfaceParams, 0.0f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
Out.vSurface = float4(g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord).xy, 1.f, 1.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void CAction_Panel::Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
|
||||
Matic_Meter_Move();
|
||||
Magic_Meter_Move();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
@@ -149,7 +149,7 @@ void CAction_Panel::Magic_Meter_UV()
|
||||
}
|
||||
}
|
||||
|
||||
void CAction_Panel::Matic_Meter_Move()
|
||||
void CAction_Panel::Magic_Meter_Move()
|
||||
{
|
||||
|
||||
static_cast<CMagic_Meter*>(m_pMagic_Meter1)->Move(m_vMagic_MeterUV[0].x, m_vMagic_MeterUV[0].y);
|
||||
|
||||
@@ -170,8 +170,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
CameraDesc.bEnableFollowLerp = true;
|
||||
CameraDesc.bEnableLookLerp = true;
|
||||
CameraDesc.vTransitionTime = { 0.f, 1.f };
|
||||
CameraDesc.vFollowLerpTime = { 0.f, 0.16f };
|
||||
CameraDesc.vLookLerpTime = { 0.f, 0.16f };
|
||||
CameraDesc.vFollowLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
CameraDesc.vLookLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCamera_Gaze>(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &m_pBinded_Camera)))
|
||||
{
|
||||
|
||||
@@ -29,9 +29,18 @@ void CCamera_Debug::Update(_float fTimeDelta)
|
||||
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||
m_bMovable = !m_bMovable;
|
||||
}
|
||||
#ifdef 진우
|
||||
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
#endif
|
||||
#ifndef 진우
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
#endif // gimch
|
||||
|
||||
|
||||
if (m_bMovable) {
|
||||
#pragma region Position
|
||||
_float fSpeed = 5.f;
|
||||
|
||||
@@ -247,6 +247,7 @@ void CGoblin::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
m_eHitSpell = STATEANIM::HIT_LEVIOSO;
|
||||
_float fSkillRatio = m_pInfoInstance->Get_Spell_Info(ENUM_CLASS(SKILL_TYPE::JAP)).fSpell_Damage;
|
||||
|
||||
if (true == Get_Damage(fSkillRatio )) {
|
||||
m_pFSM->Change_State(FSMSTATE::DEAD);
|
||||
return;
|
||||
|
||||
@@ -14,6 +14,7 @@ CInstancedProp::CInstancedProp(const CInstancedProp& rhs)
|
||||
|
||||
void CInstancedProp::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CInstancedProp::Update(_float fTimeDelta)
|
||||
@@ -28,7 +29,9 @@ void CInstancedProp::Update(_float fTimeDelta)
|
||||
|
||||
m_pVIBufferInstanceCom->Add_Instance(m_pTransformCom->Get_XMWorldMatrix());
|
||||
m_pVIBufferInstanceCom->Update_Instance();
|
||||
//m_vRotation.y = m_pGameInstance->Random_Float(0.f, 360.f);
|
||||
|
||||
m_vRotation.y = m_pGameInstance->Random_Float(0.f, 360.f);
|
||||
m_vScale.y = m_pGameInstance->Random_Float(0.8f, 1.2f);
|
||||
|
||||
_float3 vPosition = {};
|
||||
if (m_pGameInstance->isPicking(&vPosition))
|
||||
@@ -45,6 +48,11 @@ void CInstancedProp::Update(_float fTimeDelta)
|
||||
|
||||
void CInstancedProp::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if(true == m_isShake)
|
||||
{
|
||||
m_pVIBufferInstanceCom->Shake(fTimeDelta);
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
@@ -82,15 +90,20 @@ HRESULT CInstancedProp::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
|
||||
m_bEditMode = pDesc->bEditMode;
|
||||
m_isShake = pDesc->isShake;
|
||||
m_strPrototypeTag = pDesc->strPrototypeTag;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if(m_isShake)
|
||||
m_pVIBufferInstanceCom->Set_Shake_Value(pDesc->vRadius, pDesc->vSpeed);
|
||||
|
||||
m_vPosition = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
m_vRotation = _float3(0.f, 0.f, 0.f);
|
||||
m_vScale = _float3(1.f, 1.f, 1.f);
|
||||
|
||||
|
||||
XMStoreFloat4x4(&m_WorldMatrixIdentity, XMMatrixIdentity());
|
||||
|
||||
if(!m_bEditMode)
|
||||
@@ -114,6 +127,8 @@ HRESULT CInstancedProp::Ready_Components(void* pArg)
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferInstanceCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
@@ -354,7 +369,7 @@ void CInstancedProp::Describe_Entity()
|
||||
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
//m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_vPosition));
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
//m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
m_pVIBufferInstanceCom->Fix_Instance(m_pTransformCom->Get_XMWorldMatrix());
|
||||
if (GUI::Button("Delete", ImVec2(150.f, 30.f)))
|
||||
|
||||
@@ -52,13 +52,13 @@ HRESULT CLevel_MapViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/*if (FAILED(Ready_Layer_InstanceProp(TEXT("Layer_InstanceProp")))) {
|
||||
if (FAILED(Ready_Layer_InstanceProp(TEXT("Layer_InstanceProp")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_BuildingContainer(TEXT("Layer_Building")))) {
|
||||
return E_FAIL;
|
||||
}*/
|
||||
//if (FAILED(Ready_Layer_BuildingContainer(TEXT("Layer_Building")))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
if (FAILED(Ready_Layer_Unified(TEXT("Layer_Unified")))) {
|
||||
return E_FAIL;
|
||||
@@ -120,16 +120,16 @@ HRESULT CLevel_MapViewer::Ready_Layer_Terrain(const _wstring& strLayerTag)
|
||||
CTerrain::TERRAIN_DESC Desc = {};
|
||||
|
||||
/* Hogsmeade */
|
||||
//Desc.isEdit = false;
|
||||
//Desc.iAlphaSizeX = 2048;
|
||||
//Desc.iAlphaSizeY = 2048;
|
||||
//Desc.vPosition = _float3(-194, 18.5f, -153.f);
|
||||
//Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade");
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
// return E_FAIL;
|
||||
Desc.isEdit = false;
|
||||
Desc.iAlphaSizeX = 2048;
|
||||
Desc.iAlphaSizeY = 2048;
|
||||
Desc.vPosition = _float3(-194, 18.5f, -153.f);
|
||||
Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade");
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Hogwart */
|
||||
Desc.isEdit = true;
|
||||
Desc.isEdit = false;
|
||||
Desc.iAlphaSizeX = 2048;
|
||||
Desc.iAlphaSizeY = 2560;
|
||||
Desc.vPosition = _float3(-451.f, 18.5f, -791.f);
|
||||
@@ -227,16 +227,22 @@ HRESULT CLevel_MapViewer::Ready_Layer_Land(const _wstring& strLayerTag)
|
||||
HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
{
|
||||
CInstancedProp::INSTANCE_PROP_DESC Desc = {};
|
||||
Desc.bEditMode = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
|
||||
/* Oak_Tree */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* BearBerry */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.6f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -244,6 +250,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* SM_HM_OwlPost_Window_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -251,6 +258,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
///* WA_Rectangle_Double_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -258,6 +266,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
///* WC_Retangle_Double_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -265,6 +274,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
///* WA_Square_Double_C */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -272,6 +282,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* Quid_Window_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -279,6 +290,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* Ollivanders_Box_Window */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -286,6 +298,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* WC_L_DoubleS_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -293,6 +306,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* WC_Round_Double_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -300,6 +314,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* SM_HM_Door1a */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
@@ -307,11 +322,22 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* SM_HM_Door1a */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* OakTree_TallA */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.f, 0.01f);
|
||||
Desc.vSpeed = _float2(0.01f, 0.1f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_TallA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2097,15 +2097,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
}
|
||||
vector<future<pair<_wstring, CModel*>*>> futures = {};
|
||||
|
||||
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_Anim.fbx", XMMatrixIdentity(),
|
||||
// TEXT("Prototype_Component_troll_Model")
|
||||
//));
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_troll_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma region BODY
|
||||
|
||||
@@ -2718,43 +2713,43 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
|
||||
///* Light */
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\LightPosts",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* Light */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\LightPosts",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
///* Doors */
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* Doors */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
///* Step */
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\GroundSurfaces",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\GroundSurfaces",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* Step */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\GroundSurfaces",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\GroundSurfaces",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
///* Barrel */
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Meshes",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* Barrel */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Meshes",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
///* Box */
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\MiscProps",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* Box */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\MiscProps",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
///* TeaShop Table */
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Tables",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* TeaShop Table */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Tables",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
///* TeaShop Chair*/
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Chairs",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
/* TeaShop Chair*/
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Chairs",
|
||||
".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Hogwart LOD */
|
||||
if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogwarts\\HogwartsLOD",
|
||||
@@ -2769,292 +2764,296 @@ vector<future<void>> jobFutures;
|
||||
|
||||
_uint iLoadCount = 46;
|
||||
vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
//
|
||||
//{
|
||||
// { /* Terrain */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//
|
||||
// { /* Ollivanders*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//
|
||||
// { /* Gatehouse*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//
|
||||
// { /* TScrolls */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* 3BroomStick*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// { /* BLDG_QuidditchShop */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_HogsheadInn */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Honeydukes */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_OwlPost */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_TeaShop */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Zonkos */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_DB_GR */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Potions */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Salon */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Hengist_Tree */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN A*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN B*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN C*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN E*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN F*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN G*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN H*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN J*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//}
|
||||
//
|
||||
/*for (auto& jobFuture : jobFutures)
|
||||
|
||||
_bool isLoad_Map = { true };
|
||||
if(isLoad_Map)
|
||||
{
|
||||
{ /* Terrain */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
|
||||
{ /* Ollivanders*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
|
||||
{ /* Gatehouse*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
|
||||
{ /* TScrolls */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* 3BroomStick*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
{ /* BLDG_QuidditchShop */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_HogsheadInn */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Honeydukes */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_OwlPost */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_TeaShop */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Zonkos */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_DB_GR */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Potions */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Salon */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Hengist_Tree */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN A*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN B*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN C*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN E*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN F*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN G*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN H*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN J*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if(isLoad_Map)
|
||||
{
|
||||
for (auto& jobFuture : jobFutures)
|
||||
{
|
||||
jobFuture.get();
|
||||
}
|
||||
@@ -3078,7 +3077,8 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다.");
|
||||
|
||||
@@ -3165,7 +3165,7 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
#pragma region INSTANCE_MODEL
|
||||
CVIBuffer_Model_Instance::INSTANCE_DESC InstanceDesc = {};
|
||||
|
||||
InstanceDesc.iNum = 20;
|
||||
InstanceDesc.iNum = 100;
|
||||
|
||||
///* For.Prototype_Component_VIBuffer_Model_Instancel */
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel"),
|
||||
@@ -3244,6 +3244,12 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,&InstanceDesc,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.fbx", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
#pragma endregion // INSTANCE_MODEL
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Box */
|
||||
@@ -3317,12 +3323,15 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
//for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
// for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
// Safe_Delete((*Contents[i])[j]);
|
||||
// }
|
||||
// Safe_Delete(Contents[i]);
|
||||
//}
|
||||
if(isLoad_Map)
|
||||
{
|
||||
for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
Safe_Delete((*Contents[i])[j]);
|
||||
}
|
||||
Safe_Delete(Contents[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -66,16 +66,12 @@ void CMapElement_Lake::Priority_Update(_float fTimeDelta)
|
||||
void CMapElement_Lake::Update(_float fTimeDelta)
|
||||
{
|
||||
m_fTimeAcc += fTimeDelta * m_fUVValue;
|
||||
Describe_Entity();
|
||||
//Describe_Entity();
|
||||
}
|
||||
|
||||
void CMapElement_Lake::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
#endif
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
@@ -58,27 +58,23 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
|
||||
m_iContainerObjectIndex = 99;
|
||||
//m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object<CBuildingContainer>();
|
||||
|
||||
/*if (FAILED(Load_MapData("Map1205")))
|
||||
if (FAILED(Load_MapData("Map1205")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_LightObject("LightElement")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Load_InteractObject("E_INTER_Barrel")))
|
||||
return E_FAIL;
|
||||
if (FAILED(Load_InteractObject("E_INTER_PostPackage_B")))
|
||||
return E_FAIL;
|
||||
if (FAILED(Load_InteractObject("E_INTER_PostPackage_F")))
|
||||
return E_FAIL;
|
||||
if (FAILED(Load_InteractObject("E_INTER_TeaShopTable")))
|
||||
return E_FAIL;
|
||||
if (FAILED(Load_InteractObject("E_INTER_TeaShopChair")))
|
||||
return E_FAIL;*/
|
||||
|
||||
|
||||
/*if (FAILED(Load_LightObject("LightElement")))
|
||||
return E_FAIL;
|
||||
*/
|
||||
return E_FAIL;*/
|
||||
//
|
||||
//if (FAILED(Load_InteractObject("E_INTER_Barrel")))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(Load_InteractObject("E_INTER_PostPackage_B")))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(Load_InteractObject("E_INTER_PostPackage_F")))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(Load_InteractObject("E_INTER_TeaShopTable")))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(Load_InteractObject("E_INTER_TeaShopChair")))
|
||||
// return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class CAction_Panel final : public CPanelObject
|
||||
private:
|
||||
void Magic_Meter_Visible(_uint iIndex, _bool bVisible);
|
||||
void Magic_Meter_UV();
|
||||
void Matic_Meter_Move();
|
||||
void Magic_Meter_Move();
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
@@ -17,6 +17,9 @@ class CInstancedProp final : public CGameObject
|
||||
typedef struct tagInstancedPropDesc
|
||||
{
|
||||
_bool bEditMode{};
|
||||
_bool isShake;
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
_wstring strPrototypeTag;
|
||||
string strInstanceDataPath;
|
||||
}INSTANCE_PROP_DESC;
|
||||
@@ -33,6 +36,7 @@ class CInstancedProp final : public CGameObject
|
||||
|
||||
private:
|
||||
_bool m_bEditMode = {};
|
||||
_bool m_isShake = {};
|
||||
CVIBuffer_Model_Instance* m_pVIBufferInstanceCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
@@ -45,7 +49,6 @@ class CInstancedProp final : public CGameObject
|
||||
_float3 m_vScale = {};
|
||||
#ifdef _DEBUG
|
||||
_char m_szFileName[MAX_PATH] = {};
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -12,36 +12,35 @@ static const float FLT_EPSILON7 = 1.192092896e-07;
|
||||
static const float FLT_EPSILON5 = 1.192092896e-05;
|
||||
static const float FLT_EPSILON3 = 1.192092896e-03;
|
||||
|
||||
|
||||
static const float AI_TEXTURE_TYPE_NONE = 0.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_DIFFUSE = 1.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_SPECULAR = 2.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_AMBIENT = 3.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_EMISSIVE = 4.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_HEIGHT = 5.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_NORMALS = 6.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_SHININESS = 7.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_OPACITY = 8.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_DISPLACEMENT = 9.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_LIGHTMAP = 10.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_REFLECTION = 11.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_BASE_COLOR = 12.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_NORMAL_CAMERA = 13.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_EMISSION_COLOR = 14.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_METALNESS = 15.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_DIFFUSE_ROUGHNESS = 16.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_AMBIENT_OCCLUSION = 17.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_UNKNOWN = 18.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_SHEEN = 19.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_CLEARCOAT = 20.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_TRANSMISSION = 21.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_BASE = 22.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_SPECULAR = 23.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_SPECULAR_COLOR = 24.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_MAYA_SPECULAR_ROUGHNESS = 25.f / 27.f;
|
||||
static const float AI_TEXTURE_TYPE_ANISOTROPY = 26.f / 27.f;
|
||||
static const uint AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS = 1;
|
||||
static const uint AI_TEXTURE_TYPE_MAX = AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS;
|
||||
static const int AI_TEXTURE_TYPE_NONE = 0 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_DIFFUSE = 1 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_SPECULAR = 2 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_AMBIENT = 3 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_EMISSIVE = 4 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_HEIGHT = 5 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_NORMALS = 6 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_SHININESS = 7 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_OPACITY = 8 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_DISPLACEMENT = 9 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_LIGHTMAP = 10/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_REFLECTION = 11/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_BASE_COLOR = 12/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_NORMAL_CAMERA = 13/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_EMISSION_COLOR = 14/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_METALNESS = 15 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_DIFFUSE_ROUGHNESS = 16/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_AMBIENT_OCCLUSION = 17/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_UNKNOWN = 18/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_SHEEN = 19/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_CLEARCOAT = 20/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_TRANSMISSION = 21 /* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_BASE = 22/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_SPECULAR = 23/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_SPECULAR_COLOR = 24/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_MAYA_SPECULAR_ROUGHNESS = 25/* / 27*/;
|
||||
static const int AI_TEXTURE_TYPE_ANISOTROPY = 26 /* / 27*/;
|
||||
static const uint AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS = 27;
|
||||
static const uint AI_TEXTURE_TYPE_MAX = AI_TEXTURE_TYPE_GLTF_METALLIC_ROUGHNESS;
|
||||
|
||||
|
||||
#endif // ENGINE_SHADER_CONSTANTS_HLSLI
|
||||
|
||||
@@ -228,7 +228,8 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
float3 vToLight = normalize(-g_vLightDir.xyz); // 픽셀에서 라이트로
|
||||
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
{
|
||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||
fMetallic = vMRO.r;
|
||||
@@ -237,7 +238,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
|
||||
vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic);
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -246,7 +247,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
fRoughness = vSRO.g;
|
||||
fOcclusion = vSRO.b;
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -340,7 +341,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
{
|
||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||
fMetallic = vMRO.r;
|
||||
@@ -349,7 +350,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
|
||||
vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic);
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -358,6 +359,15 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
fRoughness = vSRO.g;
|
||||
fOcclusion = vSRO.b;
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
float4 vSRXO = g_SurfaceTexture.Sample(DefaultSampler, uv);
|
||||
vF0 = vSRXO.rrr;
|
||||
fRoughness = vSRXO.g;
|
||||
fOcclusion = vSRXO.a;
|
||||
}
|
||||
else // basic Lighting(phong blinn) // if you were here, you miss some assets.
|
||||
{
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vToLight * -1.f, vNormal), 0.f) + (fAmbientOcclusion * g_vLightAmbient * g_vMtrlAmbient)));
|
||||
@@ -459,7 +469,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
fSpotAttenenuation *= fSpotAttenenuation;
|
||||
fAttenuation *= fSpotAttenenuation;
|
||||
|
||||
if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_METALNESS)) // Metallic
|
||||
{
|
||||
float3 vMRO = g_SurfaceTexture.Sample(DefaultSampler, uv).rgb;
|
||||
fMetallic = vMRO.r;
|
||||
@@ -468,7 +478,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
|
||||
vF0 = lerp(float3(0.04f, 0.04f, 0.04f), vAlbedo, fMetallic);
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_SPECULAR)) // Specular
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
@@ -477,6 +487,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
fRoughness = vSRO.g;
|
||||
fOcclusion = vSRO.b;
|
||||
}
|
||||
else if (true == AlmostEqual3(vDepth.b * AI_TEXTURE_TYPE_MAX, AI_TEXTURE_TYPE_ANISOTROPY))
|
||||
{
|
||||
fMetallic = 0.f;
|
||||
|
||||
float4 vSRXO = g_SurfaceTexture.Sample(DefaultSampler, uv);
|
||||
vF0 = vSRXO.rrr;
|
||||
fRoughness = vSRXO.g;
|
||||
fOcclusion = vSRXO.a;
|
||||
}
|
||||
else // basic Lighting(phong blinn) // if you were here, you miss some assets.
|
||||
{
|
||||
Out.vShade = fAttenuation * (g_vLightDiffuse * saturate(max(dot(vToLight * -1.f, vNormal), 0.f) + (fAmbientOcclusion * g_vLightAmbient * g_vMtrlAmbient)));
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
#include "Engine_Shader_Functions.hlsli"
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
struct Instance
|
||||
{
|
||||
float4 vRight;
|
||||
float4 vUp;
|
||||
float4 vLook;
|
||||
float4 vTranslation;
|
||||
};
|
||||
|
||||
struct InstanceValue
|
||||
{
|
||||
float fSpeed;
|
||||
float fMaxRadian;
|
||||
};
|
||||
|
||||
|
||||
StructuredBuffer<Instance> g_InstanceBufferInput : register(t0);
|
||||
StructuredBuffer<InstanceValue> g_InstanceValueBufferInput : register(t1);
|
||||
|
||||
RWStructuredBuffer<Instance> g_InstanceOutput : register(u0);
|
||||
|
||||
cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
|
||||
{
|
||||
float fTimeDelta;
|
||||
float fPading1;
|
||||
float fPading2;
|
||||
float fPading3;
|
||||
}
|
||||
|
||||
//내가 몇개의 스레드를 사용할 것인지 지정하는데
|
||||
//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다.
|
||||
[numthreads(256, 1, 1)]
|
||||
void CS_MAIN(
|
||||
uint3 DispatchThreadID : SV_DispatchThreadID)
|
||||
{
|
||||
int iIndex = DispatchThreadID.x; // 배열 인덱스
|
||||
|
||||
Instance particle = g_InstanceBufferInput[iIndex];
|
||||
InstanceValue particleValue = g_InstanceValueBufferInput[iIndex];
|
||||
|
||||
float fRadian = sin(particleValue.fSpeed * fTimeDelta) * particleValue.fMaxRadian;
|
||||
|
||||
// 3. 임의의 축 회전 행렬 생성
|
||||
|
||||
// 4. 최종 월드 행렬 (CurMat) 생성
|
||||
|
||||
float4x4 CurMatrix =
|
||||
{
|
||||
particle.vRight,
|
||||
particle.vUp,
|
||||
particle.vLook,
|
||||
particle.vTranslation
|
||||
};
|
||||
|
||||
CurMatrix = mul(RotateAxis(particle.vLook, fRadian), CurMatrix);
|
||||
|
||||
particle.vRight = CurMatrix[0].xyzw;
|
||||
particle.vUp = CurMatrix[1].xyzw;
|
||||
particle.vLook = CurMatrix[2].xyzw;
|
||||
particle.vTranslation = CurMatrix[3].xyzw;
|
||||
|
||||
//아웃풋 대입
|
||||
g_InstanceOutput[iIndex] = particle;
|
||||
}
|
||||
@@ -641,6 +641,7 @@ call Update_Lib.bat
|
||||
<None Include="..\Public\fMod\fmod_errors.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Instance_Compute.hlsl" />
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Mesh_Compute.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
|
||||
@@ -1320,5 +1320,8 @@
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Engine_Shader_Structures.hlsli">
|
||||
<Filter>99.Define\01.SHADER\Inc</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Instance_Compute.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -44,7 +44,7 @@ HRESULT CFont::Render_Rotate(const _tchar* pText, const _float2& vPosition, _fve
|
||||
HRESULT CFont::Perspective_Render(_matrix View, _matrix Proj, const _tchar* pText, const _fvector& vPosition, _fvector vColor, _float vScale)
|
||||
{
|
||||
// 월드 좌표 -> 화면 좌표 변환
|
||||
XMVECTOR projected = XMVector3Project(vPosition, 0.0f, 0.0f, 1280.f, 720.f, 0.0f, 1.0f, Proj, View, XMMatrixIdentity());
|
||||
XMVECTOR projected = XMVector3Project(vPosition, 0.0f, 0.0f, 1920.f, 1080.f, 0.0f, 1.0f, Proj, View, XMMatrixIdentity());
|
||||
|
||||
// 화면 좌표 XY만 사용
|
||||
XMFLOAT2 screenPos;
|
||||
|
||||
@@ -773,7 +773,7 @@ void CGameInstance::RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& De
|
||||
PSX::PxRigidDynamic* CGameInstance::Add_DynamicActor(CRigidBody_Dynamic& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_DynamicActor(RigidBody);
|
||||
}
|
||||
}
|
||||
PSX::PxRigidStatic* CGameInstance::Add_StaticActor(CRigidBody_Static& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_StaticActor(RigidBody);
|
||||
@@ -786,7 +786,7 @@ _bool CGameInstance::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir,
|
||||
{
|
||||
return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer);
|
||||
}
|
||||
_bool CGameInstance::SphereCast(_float fRadius, _fvector vStartPos, _fvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
_bool CGameInstance::SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
{
|
||||
return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer);
|
||||
}
|
||||
@@ -794,7 +794,7 @@ _bool CGameInstance::RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance
|
||||
{
|
||||
return m_pPhysX_Manager->RayCast(_vStartPos, _vDir, fDistance, pRayHitArray, iMaxHitCapacity, iOutHitCount);
|
||||
}
|
||||
_bool CGameInstance::RayCast(_fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount)
|
||||
_bool CGameInstance::RayCast(_fvector _vStartPos, _gvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount)
|
||||
{
|
||||
return m_pPhysX_Manager->RayCast(_vStartPos, _vDir, fDistance, pRayHitArray, iMaxHitCapacity, iOutHitCount);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void CLight_Manager::Delete_Light(_uint _iCurrentLevel, CLight* _pLight)
|
||||
SAFE_RELEASE(_pLight);
|
||||
|
||||
iter = m_Lights[_iCurrentLevel].erase(iter);
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -478,13 +478,29 @@ CMaterial* CMaterial::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContex
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CMaterial::UnbindAllMaterialTextures(CShader* shader)
|
||||
{
|
||||
if (shader == nullptr) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(shader->Bind_SRV("g_DiffuseTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_NormalTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_AmbientTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_EmissiveTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_AmbientOcclusionTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_TransmissionTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_SurfaceParamsTexture", nullptr))) { return E_FAIL; }
|
||||
if (FAILED(shader->Bind_SRV("g_UnknownTexture", nullptr))) { return E_FAIL; }
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMaterial::Bind_SRV(CShader* pShader)
|
||||
{
|
||||
//if (m_SRVs[iType].empty()) {
|
||||
// //assert(false);
|
||||
// return S_OK;
|
||||
//}
|
||||
|
||||
if (FAILED(UnbindAllMaterialTextures(pShader))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_float fZero = 0.f;
|
||||
if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fZero, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
@@ -492,115 +508,119 @@ HRESULT CMaterial::Bind_SRV(CShader* pShader)
|
||||
if (FAILED(pShader->Bind_SRV("g_SurfaceParamsTexture", nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_bool bBinded[AI_TEXTURE_TYPE_MAX] = {};
|
||||
_int iBinded[AI_TEXTURE_TYPE_MAX] = {};
|
||||
memset(iBinded, 0, sizeof(iBinded));
|
||||
|
||||
for (_uint iTextureType = 0; iTextureType < AI_TEXTURE_TYPE_MAX; ++iTextureType) {
|
||||
const _char* pConstantName = "";
|
||||
bBinded[iTextureType] = true;
|
||||
const _char* pConstantName = nullptr;
|
||||
if (m_SRVs[iTextureType].empty()) {
|
||||
bBinded[iTextureType] = false;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
switch (aiTextureType(iTextureType))
|
||||
{
|
||||
case aiTextureType_NONE:
|
||||
break;
|
||||
case aiTextureType_DIFFUSE:
|
||||
pConstantName = "g_DiffuseTexture";
|
||||
break;
|
||||
case aiTextureType_SPECULAR:
|
||||
{
|
||||
_float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX);
|
||||
pConstantName = "g_SurfaceParamsTexture";
|
||||
if (!m_SRVs[iTextureType].empty()) {
|
||||
pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float));
|
||||
iBinded[iTextureType] = 1;
|
||||
|
||||
switch (aiTextureType(iTextureType))
|
||||
{
|
||||
case aiTextureType_NONE:
|
||||
break;
|
||||
case aiTextureType_DIFFUSE:
|
||||
pConstantName = "g_DiffuseTexture";
|
||||
break;
|
||||
case aiTextureType_SPECULAR:
|
||||
{
|
||||
_float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX);
|
||||
pConstantName = "g_SurfaceParamsTexture";
|
||||
if (!m_SRVs[iTextureType].empty()) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
} break;
|
||||
case aiTextureType_AMBIENT:
|
||||
pConstantName = "g_AmbientTexture";
|
||||
break;
|
||||
case aiTextureType_EMISSIVE:
|
||||
pConstantName = "g_EmissiveTexture";
|
||||
break;
|
||||
case aiTextureType_HEIGHT:
|
||||
break;
|
||||
case aiTextureType_NORMALS:
|
||||
pConstantName = "g_NormalTexture";
|
||||
break;
|
||||
case aiTextureType_SHININESS:
|
||||
break;
|
||||
case aiTextureType_OPACITY:
|
||||
break;
|
||||
case aiTextureType_DISPLACEMENT:
|
||||
break;
|
||||
case aiTextureType_LIGHTMAP:
|
||||
break;
|
||||
case aiTextureType_REFLECTION:
|
||||
break;
|
||||
case aiTextureType_BASE_COLOR:
|
||||
break;
|
||||
case aiTextureType_NORMAL_CAMERA:
|
||||
break;
|
||||
case aiTextureType_EMISSION_COLOR:
|
||||
break;
|
||||
case aiTextureType_METALNESS:
|
||||
{
|
||||
_float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX);
|
||||
pConstantName = "g_SurfaceParamsTexture";
|
||||
if (!m_SRVs[iTextureType].empty()) {
|
||||
pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float));
|
||||
}
|
||||
} break;
|
||||
case aiTextureType_DIFFUSE_ROUGHNESS:
|
||||
break;
|
||||
case aiTextureType_AMBIENT_OCCLUSION:
|
||||
pConstantName = "g_AmbientOcclusionTexture";
|
||||
break;
|
||||
case aiTextureType_UNKNOWN:
|
||||
pConstantName = "g_UnknownTexture";
|
||||
break;
|
||||
case aiTextureType_SHEEN:
|
||||
break;
|
||||
case aiTextureType_CLEARCOAT:
|
||||
break;
|
||||
case aiTextureType_TRANSMISSION:
|
||||
pConstantName = "g_TransmissionTexture";
|
||||
break;
|
||||
case aiTextureType_MAYA_BASE:
|
||||
break;
|
||||
case aiTextureType_MAYA_SPECULAR:
|
||||
break;
|
||||
case aiTextureType_MAYA_SPECULAR_COLOR:
|
||||
break;
|
||||
case aiTextureType_MAYA_SPECULAR_ROUGHNESS:
|
||||
break;
|
||||
case aiTextureType_ANISOTROPY:
|
||||
{
|
||||
_float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX);
|
||||
pConstantName = "g_SurfaceParamsTexture";
|
||||
if (!m_SRVs[iTextureType].empty()) {
|
||||
pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float));
|
||||
}
|
||||
} break;
|
||||
case _aiTextureType_Force32Bit:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} break;
|
||||
case aiTextureType_AMBIENT:
|
||||
pConstantName = "g_AmbientTexture";
|
||||
break;
|
||||
case aiTextureType_EMISSIVE:
|
||||
pConstantName = "g_EmissiveTexture";
|
||||
break;
|
||||
case aiTextureType_HEIGHT:
|
||||
break;
|
||||
case aiTextureType_NORMALS:
|
||||
pConstantName = "g_NormalTexture";
|
||||
break;
|
||||
case aiTextureType_SHININESS:
|
||||
break;
|
||||
case aiTextureType_OPACITY:
|
||||
break;
|
||||
case aiTextureType_DISPLACEMENT:
|
||||
break;
|
||||
case aiTextureType_LIGHTMAP:
|
||||
break;
|
||||
case aiTextureType_REFLECTION:
|
||||
break;
|
||||
case aiTextureType_BASE_COLOR:
|
||||
break;
|
||||
case aiTextureType_NORMAL_CAMERA:
|
||||
break;
|
||||
case aiTextureType_EMISSION_COLOR:
|
||||
break;
|
||||
case aiTextureType_METALNESS:
|
||||
{
|
||||
_float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX);
|
||||
pConstantName = "g_SurfaceParamsTexture";
|
||||
if (!m_SRVs[iTextureType].empty()) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case aiTextureType_DIFFUSE_ROUGHNESS:
|
||||
break;
|
||||
case aiTextureType_AMBIENT_OCCLUSION:
|
||||
pConstantName = "g_AmbientOcclusionTexture";
|
||||
break;
|
||||
case aiTextureType_UNKNOWN:
|
||||
pConstantName = "g_UnknownTexture";
|
||||
break;
|
||||
case aiTextureType_SHEEN:
|
||||
break;
|
||||
case aiTextureType_CLEARCOAT:
|
||||
break;
|
||||
case aiTextureType_TRANSMISSION:
|
||||
pConstantName = "g_TransmissionTexture";
|
||||
break;
|
||||
case aiTextureType_MAYA_BASE:
|
||||
break;
|
||||
case aiTextureType_MAYA_SPECULAR:
|
||||
break;
|
||||
case aiTextureType_MAYA_SPECULAR_COLOR:
|
||||
break;
|
||||
case aiTextureType_MAYA_SPECULAR_ROUGHNESS:
|
||||
break;
|
||||
case aiTextureType_ANISOTROPY:
|
||||
{
|
||||
_float fUsingSurfaceParams = ((_float)iTextureType / (_float)AI_TEXTURE_TYPE_MAX);
|
||||
pConstantName = "g_SurfaceParamsTexture";
|
||||
if (!m_SRVs[iTextureType].empty()) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_fUsingSurfaceParams", &fUsingSurfaceParams, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (true == bBinded[iTextureType]) {
|
||||
if (0 == strcmp(pConstantName, "")) { // 미사용 SRV
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(pShader->Bind_SRV(pConstantName, m_SRVs[iTextureType][0]))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (nullptr == pConstantName) { // 미사용 SRV
|
||||
iBinded[iTextureType] = 0;
|
||||
continue;
|
||||
}
|
||||
if (FAILED(pShader->Bind_SRV(pConstantName, m_SRVs[iTextureType][0]))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_bBinded_Texture", &bBinded, sizeof(bBinded)))) {
|
||||
|
||||
if (FAILED(pShader->Bind_IntArray("g_iBinded_Texture", &iBinded[0], AI_TEXTURE_TYPE_MAX))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -516,6 +516,21 @@ const _float4x4* CModel::Get_BoneMatrixPtr(const _char* pBoneName) const
|
||||
|
||||
|
||||
return (*iter)->Get_CombinedTransformationMatrixPtr();
|
||||
|
||||
}
|
||||
|
||||
_matrix CModel::Get_BoneMatrix(const _char* pBoneName) const
|
||||
{
|
||||
vector<CBone*>::const_iterator iter = find_if(m_Bones.begin(), m_Bones.end(), [&](CBone* pBone)->_bool
|
||||
{
|
||||
if (true == pBone->Compare_Name(pBoneName))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
return (*iter)->Get_CombinedTransformationMatrix();
|
||||
}
|
||||
|
||||
const _char* CModel::Get_MeshName(_uint iIndex)
|
||||
|
||||
@@ -18,6 +18,12 @@ void COcclusionQuery::Begin_Query()
|
||||
|
||||
_bool COcclusionQuery::isDraw()
|
||||
{
|
||||
if (false == m_bCurFrameDraw)
|
||||
{
|
||||
m_bPreFrameDraw = m_bCurFrameDraw = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool bVisible = m_bPreFrameDraw;
|
||||
|
||||
_uint iIndex = (m_iCheckFrame + 3) % 5;
|
||||
@@ -71,8 +77,8 @@ HRESULT COcclusionQuery::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
m_bPreFrameDraw = m_bThisFrameDraw = true;
|
||||
m_bCurFrameDraw = false;
|
||||
m_bPreFrameDraw = true;
|
||||
m_iNumCullFrame = 0;
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -56,13 +56,8 @@ PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody_Dynamic& RigidB
|
||||
PSX::PxRigidBodyFlags pxRigidFlags = RigidBody.Get_RigidBodyFlags();
|
||||
pActorDynamic->setRigidBodyFlags(pxRigidFlags);
|
||||
|
||||
if (pxRigidFlags.isSet(PSX::PxRigidBodyFlag::eKINEMATIC)) {
|
||||
|
||||
}
|
||||
else {
|
||||
PSX::PxRigidBodyExt::updateMassAndInertia(*pActorDynamic, (PSX::PxReal)RigidBody.Get_Density());
|
||||
}
|
||||
|
||||
PSX::PxRigidBodyExt::updateMassAndInertia(*pActorDynamic, (PSX::PxReal)RigidBody.Get_Density());
|
||||
m_pRestBodies.insert(pActorDynamic);
|
||||
Attach_Actor(*pActorDynamic);
|
||||
|
||||
@@ -166,7 +161,7 @@ _bool CPhysX_Manager::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir
|
||||
return SphereCast(fRadius, XMLoadFloat3(&vStartPos), XMLoadFloat3(&vDir), fDistance, flagHitsData, flagQuery, hitBuffer);
|
||||
}
|
||||
|
||||
_bool CPhysX_Manager::SphereCast(_float fRadius, _fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
_bool CPhysX_Manager::SphereCast(_float fRadius, _fvector _vStartPos, _gvector _vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
{
|
||||
_float3 vDir = {};
|
||||
_float3 vStartPos = {};
|
||||
@@ -197,7 +192,7 @@ _bool CPhysX_Manager::RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistanc
|
||||
return RayCast(XMLoadFloat3(&_vStartPos), XMLoadFloat3(&_vDir), fDistance, pRayHitArray, iMaxHitCapacity, iOutHitCount);
|
||||
}
|
||||
|
||||
bool CPhysX_Manager::RayCast(_fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount )
|
||||
bool CPhysX_Manager::RayCast(_fvector _vStartPos, _gvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount )
|
||||
{
|
||||
iOutHitCount = 0;
|
||||
|
||||
@@ -562,10 +557,9 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true, m_pPvd);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true);
|
||||
m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true);
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
m_pCookingParam = new PSX::PxCookingParams(m_pPhysics->getTolerancesScale());
|
||||
m_pCookingParam->meshPreprocessParams |= PSX::PxMeshPreprocessingFlag::eWELD_VERTICES;
|
||||
PSX::PxSceneDesc sceneDesc = { m_pPhysics->getTolerancesScale() };
|
||||
|
||||
@@ -335,7 +335,7 @@ void CRenderer::Render_Combined()
|
||||
|
||||
void CRenderer::Render_EnvironmentPostProcess()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_Blur_X")))) {
|
||||
if (FAILED(m_pGameInstance->Begin_MRT(TEXT("MRT_ENV_Blur_X")))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ void CRenderer::Render_EnvironmentPostProcess()
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShader, "g_DepthTexture"))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurTexture"))) {
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_ENV_Blur_X"), m_pShader, "g_BlurTexture"))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_AfterCombined"), m_pShader, "g_DiffuseTexture"))) {
|
||||
|
||||
@@ -216,6 +216,26 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Target_ENV_Blur */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_ENV_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_ENV_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Target_ENV_Blur_X */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_ENV_Blur_X"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_ENV_Blur_X_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Target_SSAO_AmbientOcclusion */
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_SSAO_AmbientOcclusion"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R32_FLOAT, _float4(1.f, 1.f, 1.f, 1.f)))) {
|
||||
@@ -355,7 +375,15 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* MRT_Blur */
|
||||
/* MRT_ENV_Blur */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_ENV_Blur"), TEXT("Target_ENV_Blur")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_ENV_Blur"), TEXT("Target_ENV_Blur_Weight")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* MRT_Bloom */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Bloom"), TEXT("Target_Bloom_Input")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -368,6 +396,14 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* MRT_ENV_Blur_X */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_ENV_Blur_X"), TEXT("Target_ENV_Blur_X")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_ENV_Blur_X"), TEXT("Target_ENV_Blur_X_Weight")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* MRT_Color */
|
||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Color"), TEXT("Target_Color")))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -13,7 +13,8 @@ CRigidBody_Dynamic::CRigidBody_Dynamic(const CRigidBody_Dynamic& rhs) :
|
||||
m_vhalfGeometryInfo(rhs.m_vhalfGeometryInfo),
|
||||
m_PxMassCenter(rhs.m_PxMassCenter),
|
||||
m_eLockFlag(rhs.m_eLockFlag),
|
||||
m_vDamping(rhs.m_vDamping)
|
||||
m_vDamping(rhs.m_vDamping),
|
||||
m_fDensity(rhs.m_fDensity)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -225,7 +226,6 @@ HRESULT CRigidBody_Dynamic::Initialize(void* pArg)
|
||||
m_pRigidBody->setRigidDynamicLockFlags(m_eLockFlag);
|
||||
m_pRigidBody->setLinearDamping(m_vDamping.x);
|
||||
m_pRigidBody->setAngularDamping(m_vDamping.y);
|
||||
|
||||
Move_LocalPos(m_vLocalRotQ, m_vLocalTranslation);
|
||||
//m_pRigidBody->joint;
|
||||
//PSX::PxRevol
|
||||
|
||||
@@ -111,6 +111,23 @@ HRESULT CShader::Bind_SRVs(const _char* pConstantName, ID3D11ShaderResourceView*
|
||||
return pSRVariable->SetResourceArray(ppSRV, 0, iNumSRVs);
|
||||
}
|
||||
|
||||
HRESULT CShader::Bind_IntArray(const _char* pConstantName, const int* pData, _uint elementCount)
|
||||
{
|
||||
if (m_pEffect == nullptr || pConstantName == nullptr || pData == nullptr || elementCount == 0) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3DX11EffectScalarVariable* effectScalarVariable =
|
||||
m_pEffect->GetVariableByName(pConstantName)->AsScalar();
|
||||
|
||||
if (effectScalarVariable == nullptr || effectScalarVariable->IsValid() == false) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return effectScalarVariable->SetIntArray(pData, 0, elementCount);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CShader::CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements)
|
||||
{
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Model.h"
|
||||
#include "Transform.h"
|
||||
#include "Shader.h"
|
||||
#include "ComputeShader.h"
|
||||
|
||||
CVIBuffer_Model_Instance::CVIBuffer_Model_Instance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CVIBuffer_Instance(pDevice, pContext)
|
||||
@@ -55,9 +56,20 @@ HRESULT CVIBuffer_Model_Instance::Initialize_Prototype(const _char* pModelFilePa
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Initialize(void* pArg)
|
||||
{
|
||||
m_fTimeAcc = 0.f;
|
||||
|
||||
if (FAILED(Create_ConstantBuffer()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Instance_Value_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Reay_Instance_Buffer()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_ComputeShader()))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -70,6 +82,68 @@ HRESULT CVIBuffer_Model_Instance::Render(_uint iMeshIndex)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CVIBuffer_Model_Instance::Shake(_float fTimeDelta)
|
||||
{
|
||||
m_fTimeAcc += fTimeDelta;
|
||||
|
||||
if (3600.0f < m_fTimeAcc)
|
||||
m_fTimeAcc = 0.f;
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {};
|
||||
|
||||
if (SUCCEEDED(m_pContext->Map(m_pConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &ConstantSubResource)))
|
||||
{
|
||||
CS_MODEL_INSTANCE_CONSTANT_DESC* pDesc = static_cast<CS_MODEL_INSTANCE_CONSTANT_DESC*>(ConstantSubResource.pData);
|
||||
|
||||
pDesc->fTimeDelta = m_fTimeAcc;
|
||||
pDesc->fPading1 = 0.f;
|
||||
pDesc->fPading2 = 0.f;
|
||||
pDesc->fPading3 = 0.f;
|
||||
m_pContext->Unmap(m_pConstantBuffer, 0);
|
||||
}
|
||||
|
||||
if (m_pComputeShader == nullptr)
|
||||
return;
|
||||
|
||||
_uint iGroupCountX = (m_iNumInstance + 255) / 256;
|
||||
|
||||
ID3D11Buffer* CSBuffers[] = {
|
||||
m_pVBInstance,
|
||||
m_pParticleValueBuffer
|
||||
};
|
||||
|
||||
m_pComputeShader->Dispatch(0, 0, _float3((_float)iGroupCountX, 1.f, 1.f), CSBuffers, m_pConstantBuffer);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Set_Shake_Value(_float2 vRadius, _float2 vSpeed)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE InstanceValueResource = {};
|
||||
|
||||
if (SUCCEEDED(m_pContext->Map(m_pParticleValueBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &InstanceValueResource)))
|
||||
{
|
||||
CS_MODEL_INSTANCE_DESC* pDesc = static_cast<CS_MODEL_INSTANCE_DESC*>(InstanceValueResource.pData);
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; ++i)
|
||||
{
|
||||
pDesc[i].fMaxRadian = m_pGameInstance->Real_Random_Float(vRadius.x, vRadius.y);
|
||||
pDesc[i].fSpeed = m_pGameInstance->Real_Random_Float(vSpeed.x, vSpeed.y);
|
||||
}
|
||||
|
||||
m_pContext->Unmap(m_pParticleValueBuffer, 0);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Bind_OutPut_SRV_VS(_uint Index, _uint iBufferIndex)
|
||||
{
|
||||
m_pComputeShader->Bind_OutPut_SRV_VS(Index, iBufferIndex);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Bind_Matrial(CShader* pShader, _uint iMeshIndex)
|
||||
{
|
||||
if(FAILED(pShader->Bind_SRV("g_DiffuseTexture", m_MeshMaterialsSRV[iMeshIndex][0])))
|
||||
@@ -284,6 +358,78 @@ HRESULT CVIBuffer_Model_Instance::Ready_Materials()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Create_ComputeShader()
|
||||
{
|
||||
_uint CS_InputStrides[] = {
|
||||
sizeof(VTX_INSTANCE_MODEL),
|
||||
sizeof(CS_MODEL_INSTANCE_DESC),
|
||||
};
|
||||
|
||||
_uint CS_OutputStrides[] = {
|
||||
sizeof(VTX_INSTANCE_MODEL),
|
||||
};
|
||||
|
||||
m_pComputeShader = CComputeShader::Create(m_pDevice, m_pContext,
|
||||
L"../Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl", "CS_MAIN", m_iMaxNumInstance, 2, 1, CS_InputStrides, CS_OutputStrides);
|
||||
|
||||
if (m_pComputeShader == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Create_ConstantBuffer()
|
||||
{
|
||||
//컨스턴트 버퍼 생성
|
||||
D3D11_BUFFER_DESC cbDesc = {};
|
||||
cbDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
||||
cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
cbDesc.ByteWidth = sizeof(CS_MODEL_INSTANCE_CONSTANT_DESC);
|
||||
|
||||
D3D11_SUBRESOURCE_DATA CBInitialDesc = {};
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&cbDesc, nullptr, &m_pConstantBuffer)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Create_Instance_Value_Buffer()
|
||||
{
|
||||
// 벨류 버퍼 생성하기
|
||||
D3D11_BUFFER_DESC Particle_Buffer_Desc = {};
|
||||
Particle_Buffer_Desc.ByteWidth = sizeof(CS_MODEL_INSTANCE_DESC) * m_iNumInstance;
|
||||
Particle_Buffer_Desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
Particle_Buffer_Desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
|
||||
Particle_Buffer_Desc.StructureByteStride = sizeof(CS_MODEL_INSTANCE_DESC);
|
||||
Particle_Buffer_Desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
Particle_Buffer_Desc.MiscFlags = 0;
|
||||
|
||||
D3D11_SUBRESOURCE_DATA InitialDesc = {};
|
||||
InitialDesc.pSysMem = nullptr;
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&Particle_Buffer_Desc, nullptr, &m_pParticleValueBuffer)))
|
||||
return E_FAIL;
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE InstanceValueResource = {};
|
||||
|
||||
if (SUCCEEDED(m_pContext->Map(m_pParticleValueBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &InstanceValueResource)))
|
||||
{
|
||||
CS_MODEL_INSTANCE_DESC* pDesc = static_cast<CS_MODEL_INSTANCE_DESC*>(InstanceValueResource.pData);
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; ++i)
|
||||
{
|
||||
pDesc[i].fMaxRadian = 0.f;
|
||||
pDesc[i].fSpeed = 0.f;
|
||||
}
|
||||
|
||||
m_pContext->Unmap(m_pParticleValueBuffer, 0);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::SaveAssimpModel(const _char* pModelFilePath)
|
||||
@@ -563,6 +709,11 @@ void CVIBuffer_Model_Instance::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pComputeShader);
|
||||
|
||||
SAFE_RELEASE(m_pConstantBuffer);
|
||||
SAFE_RELEASE(m_pParticleValueBuffer);
|
||||
|
||||
for (auto& pMesh : m_Meshes)
|
||||
SAFE_RELEASE(pMesh);
|
||||
m_Meshes.clear();
|
||||
|
||||
@@ -21,10 +21,10 @@ class ENGINE_DLL CCamera abstract : public CGameObject
|
||||
_float2 vTransitionTime = { 0.f, 1.f };
|
||||
|
||||
_bool bEnableLookLerp = { false };
|
||||
_float2 vLookLerpTime = { 0.f, 0.16f };
|
||||
_float2 vLookLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
|
||||
_bool bEnableFollowLerp = { false };
|
||||
_float2 vFollowLerpTime = { 0.f, 0.16f };
|
||||
_float2 vFollowLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
}CAMERA_DESC;
|
||||
|
||||
protected:
|
||||
@@ -55,10 +55,10 @@ class ENGINE_DLL CCamera abstract : public CGameObject
|
||||
_float m_fFar = {};
|
||||
|
||||
_float2 m_vTransitionTime = { 0.f, 1.f };
|
||||
_float2 m_vLookLerpTime = { 0.f, 0.16f };
|
||||
_float2 m_vLookLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
_float3 m_vLookPos_Src = { 0.f, 0.f, 1.f };
|
||||
_float3 m_vLookPos_Dest = { 0.f, 0.f, 1.f };
|
||||
_float2 m_vFollowLerpTime = { 0.f, 0.16f };
|
||||
_float2 m_vFollowLerpTime = { 0.f, BASIC_LERP_TIMER };
|
||||
_float3 m_vFollowPos_Src = { 0.f, 0.f, 0.f };
|
||||
_float3 m_vFollowPos_Dest = { 0.f, 0.f, 0.f };
|
||||
_uint m_iPriority = { UINT_MAX };
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
|
||||
|
||||
#define SSAO_SAMPLE_NUMBER 64
|
||||
#define BASIC_LERP_TIMER 0.16f
|
||||
|
||||
constexpr unsigned int g_iMaxShadowWidth = 16384;
|
||||
constexpr unsigned int g_iMaxShadowHeight = 9216;
|
||||
|
||||
@@ -209,9 +209,9 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
PSX::PxRevoluteJoint* Create_PxRevoluteJoint(PSX::PxRigidActor* pActorFrame, PSX::PxTransform& pxLocalWallFrame, PSX::PxRigidActor* pActorObject, PSX::PxTransform& pxLocalActorFrame);
|
||||
|
||||
_bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _fvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
_bool RayCast(_fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
_bool RayCast(_fvector _vStartPos, _gvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
|
||||
PSX::PxController* Add_CapsuleController(PSX::PxCapsuleControllerDesc& Desc);
|
||||
PSX::PxController* Add_BoxController(PSX::PxBoxControllerDesc& Desc);
|
||||
|
||||
@@ -11,6 +11,8 @@ class ENGINE_DLL CMaterial final : public CBase
|
||||
virtual ~CMaterial() = default;
|
||||
|
||||
public:
|
||||
|
||||
HRESULT UnbindAllMaterialTextures(class CShader* shader);
|
||||
HRESULT Bind_SRV(class CShader* pShader);
|
||||
|
||||
private:
|
||||
|
||||
@@ -66,7 +66,8 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
#pragma endregion
|
||||
#pragma region Bone
|
||||
HRESULT Bind_BoneMatrices(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName);
|
||||
const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName) const;
|
||||
const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName) const;
|
||||
_matrix Get_BoneMatrix(const _char* pBoneName) const;
|
||||
static _int Get_BoneIndex(const _char* pBoneName, vector<class CBone*> Bones); // 본의 벡터와 이름을 넘겨주면 인덱스를 넘겨줌 ( n 순회 )
|
||||
_int Get_BoneIndex(const _char* pBoneName) const;
|
||||
_matrix Get_BoneMatrix(_uint iBoneIndex);
|
||||
|
||||
@@ -268,6 +268,24 @@ class CMyTools {
|
||||
}
|
||||
}
|
||||
|
||||
inline static void SortHitsByDistance(vector<PSX::PxRaycastHit>& hits)
|
||||
{
|
||||
sort(hits.begin(), hits.end(),
|
||||
[](const PSX::PxRaycastHit& hitLeft, const PSX::PxRaycastHit& hitRight)
|
||||
{
|
||||
return hitLeft.distance < hitRight.distance;
|
||||
});
|
||||
}
|
||||
|
||||
inline static void SortHitsByDistance(vector<PSX::PxSweepHit>& hits)
|
||||
{
|
||||
sort(hits.begin(), hits.end(),
|
||||
[](const PSX::PxSweepHit& hitLeft, const PSX::PxSweepHit& hitRight)
|
||||
{
|
||||
return hitLeft.distance < hitRight.distance;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
inline static _uint AlphabetToInt(_tchar Alphabet)
|
||||
{
|
||||
|
||||
@@ -15,12 +15,14 @@ class ENGINE_DLL COcclusionQuery final : public CComponent
|
||||
void Begin_Query();
|
||||
_bool isDraw();
|
||||
void End_Query();
|
||||
void Set_PreFrameDraw() { m_bCurFrameDraw = false; }
|
||||
|
||||
private:
|
||||
ID3D11Query* m_pQuery[5] = {};
|
||||
|
||||
_bool m_bPreFrameDraw = { true };
|
||||
_bool m_bThisFrameDraw = {};
|
||||
_bool m_bCurFrameDraw = {};
|
||||
|
||||
_uint m_iNumCullFrame = {};
|
||||
_uint m_iCountFrame = {};
|
||||
_uint m_iGetFrameIndex = {};
|
||||
|
||||
@@ -30,7 +30,7 @@ class CPhysX_Manager final : public CBase
|
||||
PSX::PxMaterial* Create_Material(const _float3* vMatInfo);
|
||||
|
||||
_bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _fvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
_bool RayCast(_fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class ENGINE_DLL CShader final : public CComponent
|
||||
|
||||
HRESULT Bind_SRV(const _char* pConstantName, ID3D11ShaderResourceView* pSRV);
|
||||
HRESULT Bind_SRVs(const _char* pConstantName, ID3D11ShaderResourceView** ppSRV, _uint iNumSRVs);
|
||||
|
||||
HRESULT Bind_IntArray(const _char* pConstantName, const _int* pData, _uint elementCount);
|
||||
|
||||
private:
|
||||
HRESULT CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
NS_BEGIN(STATEANIM)
|
||||
enum ESTATE
|
||||
{
|
||||
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD_L, IDLE_COMBAT_TURN_BWD_R, IDLE_COMBAT_TURN_90_L, IDLE_COMBAT_TURN_90_R,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4,
|
||||
IDLE,IDLE_AIM, IDLE_TURN_L, IDLE_TURN_R, IDLE_TURN_BWD, IDLE_COMBAT_TURN_BWD_L, IDLE_COMBAT_TURN_BWD_R, IDLE_COMBAT_TURN_90_L, IDLE_COMBAT_TURN_90_R,IDLE_BREAK1,IDLE_BREAK2,IDLE_BREAK3,IDLE_BREAK4, IDLE_BREAK5, IDLE_BREAK6, IDLE_BREAK7,
|
||||
MOVE,
|
||||
WALK, WALK_FWD,WALK_RIGHT,WALK_LEFT, WALK_BWD,WALK_START,WALK_STOP,
|
||||
JOG,JOG_START, JOG_FWD, JOG_RIGHT, JOG_LEFT, JOG_BWD, JOG_STOP, JOG_AIM_LEFT, JOG_AIM_RIGHT, JOG_AIM_BWD, JOG_AIM_STOP_L, JOG_AIM_STOP_R, JOG_AIM_STOP_BWD,JOG_LEFT_TURN,JOG_RIGHT_TURN,JOG_112_L,JOG_112_R,JOG_90_L,JOG_90_R,
|
||||
|
||||
@@ -5,6 +5,21 @@ NS_BEGIN(Engine)
|
||||
|
||||
class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
{
|
||||
public:
|
||||
typedef struct tagCS_Model_Instacne_Desc
|
||||
{
|
||||
_float fSpeed;
|
||||
_float fMaxRadian;
|
||||
}CS_MODEL_INSTANCE_DESC;
|
||||
|
||||
typedef struct tagCS_Model_Instacne_Constant_Desc
|
||||
{
|
||||
_float fTimeDelta;
|
||||
_float fPading1;
|
||||
_float fPading2;
|
||||
_float fPading3;
|
||||
}CS_MODEL_INSTANCE_CONSTANT_DESC;
|
||||
|
||||
private:
|
||||
CVIBuffer_Model_Instance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CVIBuffer_Model_Instance(const CVIBuffer_Model_Instance& rhs);
|
||||
@@ -17,8 +32,12 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
virtual HRESULT Initialize_Prototype(const _char* pModelFilePath, const _char* pMatrialPath);
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Render(_uint iMeshIndex);
|
||||
void Shake(_float fTimeDelta);
|
||||
HRESULT Set_Shake_Value(_float2 vRadius, _float2 vSpeed);
|
||||
|
||||
HRESULT Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex);
|
||||
HRESULT Bind_Matrial(class CShader* pShader, _uint iMeshIndex);
|
||||
|
||||
HRESULT Load_WorldData(vector<_float4x4>& WorldMatrices);
|
||||
private:
|
||||
_uint m_iNumBuffer = {};
|
||||
@@ -27,6 +46,12 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
_uint m_iCurrentNumInstance = {};
|
||||
_uint m_iMaxNumInstance = {};
|
||||
|
||||
_float m_fTimeAcc = {};
|
||||
class CComputeShader* m_pComputeShader = { nullptr };
|
||||
|
||||
ID3D11Buffer* m_pConstantBuffer = { nullptr };
|
||||
ID3D11Buffer* m_pParticleValueBuffer = { nullptr };
|
||||
|
||||
INSTANCE_DESC m_InstanceDesc = {};
|
||||
|
||||
vector<class CMesh*> m_Meshes = {};
|
||||
@@ -41,6 +66,9 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
HRESULT Load_ModelData(const _char* pModelFilePath);
|
||||
HRESULT Load_Material(const _char* pModelFilePath, const _char* pMatrialPath);
|
||||
HRESULT Ready_Materials();
|
||||
HRESULT Create_ComputeShader();
|
||||
HRESULT Create_ConstantBuffer();
|
||||
HRESULT Create_Instance_Value_Buffer();
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user