@@ -168,6 +168,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\CallBack_Ranrok_HitReport.h" />
|
||||
<ClInclude Include="..\Public\Camera_Model.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Sword.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Breath.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_FireBall.h" />
|
||||
@@ -332,8 +333,6 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Monster.h" />
|
||||
<ClInclude Include="..\Public\NoMountIcon.h" />
|
||||
<ClInclude Include="..\Public\PhysXEffectHitBox.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXWall.h" />
|
||||
<ClInclude Include="..\Public\EffectParts.h" />
|
||||
<ClInclude Include="..\Public\EffectObject.h" />
|
||||
<ClInclude Include="..\Public\Effect_Container.h" />
|
||||
@@ -418,6 +417,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Sword.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Breath.cpp" />
|
||||
@@ -583,8 +583,6 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\CamPosition_Shoulder.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_Socket.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_Target.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp" />
|
||||
<ClCompile Include="..\Private\EffectParts.cpp" />
|
||||
<ClCompile Include="..\Private\EffectObject.cpp" />
|
||||
<ClCompile Include="..\Private\Effect_Container.cpp" />
|
||||
|
||||
@@ -79,12 +79,6 @@
|
||||
<ClInclude Include="..\Public\Broom.h">
|
||||
<Filter>02.GameObjects\Item\Broom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_PhysXWall.h">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\State_Root.h">
|
||||
<Filter>04.Mechanic\State</Filter>
|
||||
</ClInclude>
|
||||
@@ -410,9 +404,6 @@
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||
</ClInclude>
|
||||
@@ -770,6 +761,12 @@
|
||||
<ClInclude Include="..\Public\State_Dash.h">
|
||||
<Filter>04.Mechanic\State\Movement\Dash</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1596,6 +1593,12 @@
|
||||
<Filter Include="04.Mechanic\State\Movement\Dash">
|
||||
<UniqueIdentifier>{6d1f0862-40a4-4c0b-9921-87fe6af2008b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector">
|
||||
<UniqueIdentifier>{0c62f4f7-a0e6-4ff2-a4dd-25e3dd79709e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector">
|
||||
<UniqueIdentifier>{bf7cf91b-742f-4913-8af2-39ed94d19e23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -1661,12 +1664,6 @@
|
||||
<ClCompile Include="..\Private\Broom.cpp">
|
||||
<Filter>02.GameObjects\Item\Broom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp">
|
||||
<Filter>02.GameObjects\PhysX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\State_Root.cpp">
|
||||
<Filter>04.Mechanic\State</Filter>
|
||||
</ClCompile>
|
||||
@@ -2000,9 +1997,6 @@
|
||||
<ClCompile Include="..\Private\Enemy_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Enemy_Penel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Warrior</Filter>
|
||||
</ClCompile>
|
||||
@@ -2295,7 +2289,6 @@
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin</Filter>
|
||||
</ClCompile>
|
||||
@@ -2311,6 +2304,15 @@
|
||||
<ClCompile Include="..\Private\State_Dash.cpp">
|
||||
<Filter>04.Mechanic\State\Movement\Dash</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp">
|
||||
<Filter>02.GameObjects\Player\Robe</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Warrior_Spector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -174,7 +174,7 @@ HRESULT CBroomRacerAI::Render()
|
||||
}
|
||||
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CDummy_PhysXPlayable::CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext):
|
||||
CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_PhysXPlayable::CDummy_PhysXPlayable(const CDummy_PhysXPlayable& rhs):
|
||||
CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Pressing(DIK_UPARROW)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, 1.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LEFT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(-1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_DOWN)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 0.f, -1.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_RIGHT)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(1.f, 0.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_LCONTROL)) {
|
||||
if (m_pGameInstance->Key_Pressing(DIK_SPACE)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, 10.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Pressing(DIK_C)) {
|
||||
m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -10.f, 0.f, 0.f) * m_pTransformCom->Get_Speed() * fTimeDelta);
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pGameInstance->Detach_Actor(*m_pCharacter_Controller->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_pGameInstance->Key_Down(DIK_V)) {
|
||||
m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
}
|
||||
}
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Render()
|
||||
{
|
||||
//if (FAILED(Bind_ShaderResources())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Render(0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
|
||||
{
|
||||
CTransform::TRANSFORM_DESC TransformDesc{};
|
||||
TransformDesc.fRadius = 100.f;
|
||||
TransformDesc.fRotationPerSec = XMConvertToRadians(60.f);
|
||||
TransformDesc.fSpeedPerSec = 15.f;
|
||||
if (FAILED(__super::Ready_Components(&TransformDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
PHYSXDUMMY_DESC* pDesc = static_cast<PHYSXDUMMY_DESC*>(pArg);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPos), 1.f));
|
||||
m_pTransformCom->Rotation(pDesc->vRotRPY.x, pDesc->vRotRPY.y, pDesc->vRotRPY.z);
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = pDesc->iSubKind;
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 1.0f;
|
||||
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;
|
||||
Desc.fWalkableSlope = 45.f;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = pDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXPlayable::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_PhysXPlayable* CDummy_PhysXPlayable::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_PhysXPlayable* pInstance = new CDummy_PhysXPlayable(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_PhysXPlayable");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_PhysXPlayable::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_PhysXPlayable* pInstance = new CDummy_PhysXPlayable(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_PhysXPlayable");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_PhysXPlayable::Free()
|
||||
{
|
||||
__super::Free();
|
||||
if (nullptr != m_pCallBack_Behavior) {
|
||||
m_pCallBack_Behavior->Finalize();
|
||||
}
|
||||
if (nullptr != m_pCallBack_HitReport) {
|
||||
m_pCallBack_HitReport->Finalize();
|
||||
}
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDummy_PhysXPlayable::Describe_Entity()
|
||||
{
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -1,170 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Dummy_PhysXWall.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
|
||||
|
||||
CDummy_PhysXWall::CDummy_PhysXWall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CDummy_PhysXWall::CDummy_PhysXWall(const CDummy_PhysXWall& rhs)
|
||||
: CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Render()
|
||||
{
|
||||
//if (FAILED(Bind_ShaderResources())) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Bind_Material(0, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
//if (FAILED(m_pModelCom->Render(0))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pRigidBody->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
PHYSXDUMMY_DESC* pPhysXDummyDesc = static_cast<PHYSXDUMMY_DESC*>(pArg);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pPhysXDummyDesc->vPos), 1.f));
|
||||
m_pTransformCom->Rotation(pPhysXDummyDesc->vRotRPY.x, pPhysXDummyDesc->vRotRPY.y, pPhysXDummyDesc->vRotRPY.z);
|
||||
|
||||
|
||||
{ // RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = pPhysXDummyDesc->iSubKind;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Box"), (CComponent**)&m_pModelCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummy_PhysXWall::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummy_PhysXWall* CDummy_PhysXWall::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummy_PhysXWall* pInstance = new CDummy_PhysXWall(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummy_PhysXWall");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummy_PhysXWall::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummy_PhysXWall* pInstance = new CDummy_PhysXWall(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummy_PhysXWall");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummy_PhysXWall::Free()
|
||||
{
|
||||
//if (nullptr != m_pRigidBody) {
|
||||
// m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor(), m_pGameInstance->Get_CurrentLevelID());
|
||||
//}
|
||||
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDummy_PhysXWall::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
#include "Goblin_Sword.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "EffectPool.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
@@ -175,16 +175,23 @@ HRESULT CGoblin_Assassin::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
@@ -222,13 +229,16 @@ HRESULT CGoblin_Assassin::Render_OutLine()
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.01f, 0.1f, fRatio);
|
||||
if (m_fOutLineThickness > 0.1f) {
|
||||
m_fOutLineThickness = 0.1f;
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
else if (m_fOutLineThickness < 0.01f) {
|
||||
m_fOutLineThickness = 0.01f;
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
@@ -487,6 +497,7 @@ HRESULT CGoblin_Assassin::Ready_Parts()
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
Goblin_SwordDesc.iIndex = 0;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_L", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
@@ -499,6 +510,7 @@ HRESULT CGoblin_Assassin::Ready_Parts()
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
Goblin_SwordDesc.iIndex = 1;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_R", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
@@ -507,13 +519,13 @@ HRESULT CGoblin_Assassin::Ready_Parts()
|
||||
}
|
||||
|
||||
|
||||
//CGoblin_Spector::GOBLIN_SPECTOR_DESC Goblin_SpectorDesc{};
|
||||
CGoblin_Assassin_Spector::GOBLIN_SPECTOR_DESC Goblin_SpectorDesc{};
|
||||
|
||||
//Goblin_SpectorDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SpectorDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Spector>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc, this, &m_pGoblinSpector))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Assassin_Spector>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER, &Goblin_SpectorDesc, this, &m_pGoblinSpector))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma region EFFECT
|
||||
/* EFFECT */
|
||||
|
||||
@@ -0,0 +1,367 @@
|
||||
#include "pch.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Goblin_Assassin.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "Goblin_Sword.h"
|
||||
|
||||
#include "EffectParts.h"
|
||||
#include "TrailObject.h"
|
||||
|
||||
|
||||
CGoblin_Assassin_Spector::CGoblin_Assassin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CMonster(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CGoblin_Assassin_Spector::CGoblin_Assassin_Spector(const CGoblin_Assassin_Spector& Prototype)
|
||||
: CMonster(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Initialize(void* pArg)
|
||||
{
|
||||
GOBLIN_SPECTOR_DESC* pDesc = static_cast<GOBLIN_SPECTOR_DESC*> (pArg);
|
||||
m_pParentTransformCom = pDesc->pParentTransform;
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Parts()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pInfoInstance->Deregist_ActiveMonster(this);
|
||||
|
||||
m_pGoblin = dynamic_cast<CGoblin_Assassin*>(m_pOwner);
|
||||
SAFE_ADDREF(m_pGoblin);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_Offset = _float3(0.f, 0.3f, 0.f);
|
||||
|
||||
_matrix Offset = XMMatrixTranslation(m_Offset.x,
|
||||
m_Offset.y, m_Offset.z);
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(Offset * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||
|
||||
if (m_bVisible)
|
||||
{
|
||||
if (m_vScale.x <= 2.f)
|
||||
{
|
||||
m_vScale.x += fTimeDelta;
|
||||
m_vScale.y += fTimeDelta;
|
||||
m_vScale.z += fTimeDelta;
|
||||
}
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
m_pModelCom->Set_AnimationIndex(m_pGoblin->Get_Component<CModel>()->Get_AnimIndex());
|
||||
m_pModelCom->Set_CurrentTrackPosition(m_pGoblin->Get_Component<CModel>()->Get_CurrentTrackPosition());
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_L")->Set_Visible(true);
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_R")->Set_Visible(true);
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
}
|
||||
else {
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_L")->Set_Visible(false);
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_R")->Set_Visible(false);
|
||||
m_vScale = { 1.f,1.f,1.f };
|
||||
m_pTransformCom->Set_Scale(m_vOriginScale);
|
||||
m_pModelCom->Set_AnimationIndex(5);
|
||||
}
|
||||
|
||||
if (m_bDisolve) {
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_L")->Set_Disolve(true);
|
||||
Get_PartObject<CGoblin_Sword>("Goblin_Sword_R")->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
|
||||
|
||||
#pragma region TRAIL_UPDATE
|
||||
|
||||
_matrix WorldMat = m_pTransformCom->Get_XMWorldMatrix();
|
||||
|
||||
_matrix LeftHandMatrix = {};
|
||||
_matrix RightHandMatrix = {};
|
||||
_matrix WeaponMatrix = {};
|
||||
|
||||
LeftHandMatrix = XMLoadFloat4x4(m_pLeftHand_BoneMat);
|
||||
RightHandMatrix = XMLoadFloat4x4(m_pRightHand_BoneMat);
|
||||
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
LeftHandMatrix.r[i] = XMVector3Normalize(LeftHandMatrix.r[i]);
|
||||
RightHandMatrix.r[i] = XMVector3Normalize(RightHandMatrix.r[i]);
|
||||
WeaponMatrix.r[i] = XMVector3Normalize(WeaponMatrix.r[i]);
|
||||
}
|
||||
|
||||
_matrix WeaponSoket = WeaponMatrix * Get_Component<CTransform>()->Get_XMWorldMatrix();
|
||||
|
||||
m_pLeft_Trail->Trail_Update(LeftHandMatrix * WorldMat, fTimeDelta);
|
||||
m_pRight_Trail->Trail_Update(RightHandMatrix * WorldMat, fTimeDelta);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Render()
|
||||
{
|
||||
if (!m_bVisible)
|
||||
return S_OK;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_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_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(iShaderPass))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
_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;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
|
||||
Desc.fSpeedPerSec = 10.f;
|
||||
Desc.fRotationPerSec = XMConvertToRadians(180.0f);
|
||||
Desc.fRadius = 10.f;
|
||||
|
||||
__super::Ready_Components(&Desc);
|
||||
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Spector_Model");
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Spector_Trail_Visible(_bool isTrailVisible)
|
||||
{
|
||||
m_pLeft_Trail->Set_Visible(isTrailVisible);
|
||||
m_pRight_Trail->Set_Visible(isTrailVisible);
|
||||
|
||||
m_pLeft_Trail->Get_Component<CTrail>()->Reset_Trail();
|
||||
m_pRight_Trail->Get_Component<CTrail>()->Reset_Trail();
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Ready_Parts()
|
||||
{
|
||||
|
||||
{
|
||||
CGoblin_Sword::GOBLIN_SWORD_DESC Goblin_SwordDesc{};
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_LeftHand");
|
||||
Goblin_SwordDesc.iIndex = 0;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_L", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
CGoblin_Sword::GOBLIN_SWORD_DESC Goblin_SwordDesc{};
|
||||
|
||||
Goblin_SwordDesc.pParentTransform = m_pTransformCom;
|
||||
Goblin_SwordDesc.pSocketMatrices = m_pModelCom->Get_BoneMatrixPtr("SKT_RightHand");
|
||||
Goblin_SwordDesc.iIndex = 1;
|
||||
|
||||
if (FAILED(Add_PartObject<CGoblin_Sword>("Goblin_Sword_R", g_iStaticLevel, nullptr, &Goblin_SwordDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("Left_Trail", g_iStaticLevel, &m_pLeft_Trail, &PartsDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pLeft_Trail->Load_Trail("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Trail_R", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pLeft_Trail->Set_Visible(false);
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("Right_Trail", g_iStaticLevel, &m_pRight_Trail, &PartsDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pRight_Trail->Load_Trail("../Bin/Resources/Data/Effect/Goblin/GoblinSide/Goblin_Trail_R", static_cast<LEVEL>(g_iStaticLevel));
|
||||
m_pRight_Trail->Set_Visible(false);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin_Spector::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CGoblin_Assassin_Spector* CGoblin_Assassin_Spector::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CGoblin_Assassin_Spector* pInstance = new CGoblin_Assassin_Spector(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGoblin_Assassin_Spector");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CGoblin_Assassin_Spector::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CGoblin_Assassin_Spector* pInstance = new CGoblin_Assassin_Spector(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CGoblin_Assassin_Spector");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin_Spector::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pGoblin);
|
||||
SAFE_RELEASE(m_pLeft_Trail);
|
||||
SAFE_RELEASE(m_pRight_Trail);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CGoblin_Assassin_Spector::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("GoblinSpector")) {
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -3,12 +3,11 @@
|
||||
#include "InfoInstance.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Player.h"
|
||||
#include "Goblin_Dagger.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
#include "EffectParts.h"
|
||||
|
||||
#include "EffectPool.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
#include "Goblin_Sword.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -252,8 +251,31 @@ void CGoblin_Assassin::Behavior_SlashEnter()
|
||||
m_pFSM->Enable_State(FSMSTATE::SLASH);
|
||||
|
||||
pairAnimInfo = m_Animation[STATEANIM::SLASH];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second,1.5f);
|
||||
m_fSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::SLASH)] = m_fMaxSkillCoolTime[ENUM_CLASS(GOBLIN_ASSASSIN_SKILL::SLASH)];
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGoblinSpector->Set_Visible(true);
|
||||
m_pGoblinSpector->Spector_Trail_Visible(true);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_Sword>(), (void*)&m_pGoblinSpector->Get_PartObject<CGoblin_Sword>()->Get_SwordMatrix());
|
||||
},
|
||||
0.05f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_pGoblinSpector->Set_Disolve(true); },
|
||||
0.28f);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_bLookAt = false; },
|
||||
0.3f);
|
||||
|
||||
Set_Easing(pairAnimInfo.first, 0.01f, 0.15f, 0.8f);
|
||||
|
||||
Set_Easing(pairAnimInfo.first, 0.15f, 0.4f, 1.4f);
|
||||
}
|
||||
|
||||
HRESULT CGoblin_Assassin::Behavior_SlashExitCheck(_float fTimeDelta)
|
||||
@@ -270,6 +292,7 @@ HRESULT CGoblin_Assassin::Behavior_SlashExitCheck(_float fTimeDelta)
|
||||
void CGoblin_Assassin::Behavior_SlashExit()
|
||||
{
|
||||
m_pFSM->Disable_State(FSMSTATE::SLASH);
|
||||
m_bLookAt = true;
|
||||
}
|
||||
|
||||
void CGoblin_Assassin::Behavior_DashEnter()
|
||||
|
||||
@@ -66,12 +66,8 @@ void CGoblin_Attack::Update(_float fTimeDelta)
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
|
||||
|
||||
}
|
||||
@@ -90,13 +86,18 @@ HRESULT CGoblin_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
//
|
||||
//CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
//
|
||||
//_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_vMat = *static_cast<_float4x4*>(pArg);
|
||||
|
||||
//m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
//m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&m_vMat));
|
||||
|
||||
m_pPT1->Set_Visible(true);
|
||||
m_pPT2->Set_Visible(true);
|
||||
|
||||
@@ -265,7 +265,7 @@ void CGoblin::Behavior_SwingEnter()
|
||||
m_pGoblinSpector->Set_Visible(true);
|
||||
m_pGoblinSpector->Spector_Trail_Visible(true);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>());
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>(), (void*)&m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>()->Get_AxeMatrix());
|
||||
},
|
||||
0.05f);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ HRESULT CGoblin_Sword::Initialize(void* pArg)
|
||||
{
|
||||
GOBLIN_SWORD_DESC* pDesc = static_cast<GOBLIN_SWORD_DESC*> (pArg);
|
||||
m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||
m_iIndex = pDesc->iIndex;
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
@@ -49,11 +50,19 @@ void CGoblin_Sword::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CGoblin_Sword::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_Sword::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Combined_BoneMatrix();
|
||||
XMStoreFloat4(&m_vStartPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_matrix socketMatrix = {};
|
||||
@@ -65,7 +74,14 @@ void CGoblin_Sword::Late_Update(_float fTimeDelta)
|
||||
}
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||
Sword_Hit();
|
||||
XMStoreFloat4x4(&m_vSwordMat, XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone")) * m_pTransformCom->Get_XMWorldMatrix());
|
||||
if (m_bCanTakeDamage)
|
||||
{
|
||||
Sword_Hit();
|
||||
}
|
||||
else {
|
||||
m_bHit = false;
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
@@ -81,6 +97,10 @@ HRESULT CGoblin_Sword::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Render_Disolve())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
@@ -89,7 +109,7 @@ HRESULT CGoblin_Sword::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SPECTOR_WEAPON)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -98,6 +118,43 @@ HRESULT CGoblin_Sword::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_Sword::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;
|
||||
}
|
||||
|
||||
@@ -113,8 +170,16 @@ HRESULT CGoblin_Sword::Ready_Components()
|
||||
__super::Ready_Components(&Desc);
|
||||
|
||||
|
||||
if (m_iIndex == 0)
|
||||
{
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Sword_L_Model");
|
||||
}
|
||||
else {
|
||||
m_strModelPrototypeTag = TEXT("Prototype_Component_Goblin_Sword_R_Model");
|
||||
}
|
||||
|
||||
/* Com_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Goblin_Sword_Model"),
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -203,6 +268,8 @@ void CGoblin_Sword::Sword_Hit()
|
||||
case Engine::PXOBJECT::PLAYER:
|
||||
{
|
||||
pUserData->pOwner->OnCollision(this, &tagCollInfo);
|
||||
m_bHit = true;
|
||||
m_bCanTakeDamage = false;
|
||||
}
|
||||
break;
|
||||
case Engine::PXOBJECT::ALLY_HITBOX:
|
||||
|
||||
@@ -130,7 +130,22 @@ HRESULT CLevel_Field::Ready_Lights()
|
||||
{
|
||||
CLight_Main* pLight = { nullptr };
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT,nullptr, nullptr, &pLight))) {
|
||||
LIGHT_DESC Desc = {};
|
||||
if (m_isDay)
|
||||
{
|
||||
Desc.vDiffuse = _float4(0.6529f, 0.6157f, 0.7843f, 1.0f);
|
||||
Desc.vAmbient = _float4(0.6275f, 0.6275f, 0.6275f, 0.0314f);
|
||||
Desc.vSpecular = _float4(0.05f, 0.05f, 0.05f, 0.05f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Desc.vDiffuse = _float4(0.0471f, 0.0745f, 0.1294f, 0.2549f);
|
||||
Desc.vAmbient = _float4(0.1686f, 0.1765f, 0.1373f, 0.0f);
|
||||
Desc.vSpecular = _float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLight_Main>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT, &Desc, nullptr, &pLight))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "Layer.h"
|
||||
#include "SkyBox.h"
|
||||
#include "Broom.h"
|
||||
#include "Dummy_PhysXWall.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "Terrain.h"
|
||||
#include "EffectPool.h"
|
||||
#include "InstancedProp.h"
|
||||
@@ -331,8 +329,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = false;
|
||||
@@ -646,20 +644,43 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
_bool isLoad_NPC = { true };
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
|
||||
#endif // gimch
|
||||
#ifdef 진우
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_NPC = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
|
||||
if(true == isLoad_NPC)
|
||||
{
|
||||
CNPC_Ollivander::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(40.f, 4.f, 68.9f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_Ollivander>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
{
|
||||
CNPC_Ollivander::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(40.f, 4.f, 68.9f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_Ollivander>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
CNPC_EleazarFig::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(101.f, 14.f, 100.f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_EleazarFig>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
{
|
||||
CNPC_EleazarFig::NPCDESC NPCDesc{};
|
||||
NPCDesc.vPos = _float4(101.f, 14.f, 100.f, 1.f);
|
||||
NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNPC_EleazarFig>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
@@ -703,49 +724,61 @@ HRESULT CLevel_GamePlay::Ready_Layer_SkyBox(const _wstring& strLayerTag)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
CDummy_PhysXWall::PHYSXDUMMY_DESC Desc{};
|
||||
Desc.vPos = { 0.f, 0.f, 0.f };
|
||||
Desc.vRotRPY = { 0.f, m_pGameInstance->Random_Float(0.f, XM_2PI), 0.f };
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::WALL);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_PhysXWall>(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
{
|
||||
/*for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
_bool isLoad_Monster = { true };
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
|
||||
#endif // gimch
|
||||
#ifdef 진우
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
if (true == isLoad_Monster) {
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Assassin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
for (_uint i = 0; i <1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Mage>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrok>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}*/
|
||||
|
||||
for (_uint i = 0; i < 1; ++i)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGoblin_Assassin>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTroll>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrok>(g_iStaticLevel, NEXT_LEVEL, LAYER_MONSTER))) {
|
||||
return E_FAIL;
|
||||
}*/
|
||||
|
||||
#if 진우
|
||||
#else
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "Goblin_Mage.h"
|
||||
#include "Goblin_Assassin.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "Goblin_Assassin_Spector.h"
|
||||
#include "Troll.h"
|
||||
#include "NPC_Ollivander.h"
|
||||
#include "NPC_EleazarFig.h"
|
||||
@@ -139,9 +140,6 @@
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PHYSX
|
||||
|
||||
#include "Dummy_PhysXWall.h"
|
||||
#include "Dummy_PhysXPlayable.h"
|
||||
#include "PhysXEffectHitBox.h"
|
||||
|
||||
#pragma endregion
|
||||
@@ -358,27 +356,39 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
_bool isLoad_Background = { true };
|
||||
_bool isLoad_Hogwart = { false };
|
||||
_bool isLoad_UI_SEQUANTIAL = { true };
|
||||
_bool isLoad_NPC = { true };
|
||||
_bool isLoad_Monster = { true };
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifdef gimch
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
isLoad_NPC = true;
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif //
|
||||
#ifdef Bin
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
#endif // Bin
|
||||
#endif // _DEBUG
|
||||
|
||||
#pragma region MAP_MODELS
|
||||
vector<future<vector<FOLDER_LOAD*>*>> jobMapModels;
|
||||
@@ -948,8 +958,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region UI
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Keyboard", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
@@ -1228,106 +1236,103 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma region UI_ANI
|
||||
if (true == isLoad_UI_SEQUANTIAL) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Global_SRV
|
||||
{
|
||||
m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_NOISE_05"), "../Bin/Resources/Textures/Effect/Noises/VFX_T_Noise05_D.png");
|
||||
m_pGameInstance->Load_GlobalSRV(TEXT("GLOBAL_DISOLVE_BURN_VERTICAL"), "../Bin/Resources/Textures/Effect/Diffuse/drp_fire_Line_Vertical.png");
|
||||
}
|
||||
#pragma endregion
|
||||
#if 진우
|
||||
#elif 기무리
|
||||
#elif 인혁
|
||||
#elif Bin
|
||||
#elif gimch
|
||||
#else
|
||||
#pragma region UI_ANI
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic_Throw"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Arresto_Momentum"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Avada_Kedavra"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Basic_Cast"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Bombarda"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Descendo"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Levioso"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lumos"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Petrificus_Totalus"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Protego"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Revelio"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Stupefy"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Transformation"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#endif
|
||||
#pragma endregion
|
||||
#pragma region TERRAIN_TEXTURE
|
||||
/* Terrain_Diffuse */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Diffuse"),
|
||||
@@ -1376,7 +1381,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region LAKE_TEXTURE
|
||||
/* For.Prototype_Component_Water_Noise_D */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Noises_D"),
|
||||
@@ -1513,6 +1517,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
|
||||
#pragma endregion
|
||||
#pragma region SHADER
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
@@ -1534,7 +1539,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl"),
|
||||
VTX_MODEL_INSTANCE_MODEL::Elements, VTX_MODEL_INSTANCE_MODEL::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
@@ -1575,6 +1580,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
CVIBuffer_UI_Instance::UI_INSTANCE_DESC SpellSlotUIDesc{};
|
||||
@@ -1823,29 +1829,43 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (true == isLoad_NPC) {
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Npc_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Npc_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin",XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
if (true == isLoad_Monster) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Mage_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Mage_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Spector_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Assassin_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GerboldOlivander_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
@@ -1856,26 +1876,22 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_VictorRookWood_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ghost_Peeves_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ITEM
|
||||
@@ -1908,8 +1924,12 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/SK_WPN_GOB_SmallSword.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity()))))
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_L_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_L.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_Sword_R_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Goblin_Sword/SK_WPN_GOB_SmallSword_R.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Goblin_BattleAxe_Model"),
|
||||
@@ -2803,6 +2823,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Spector>(g_iStaticLevel, CGoblin_Spector::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Goblin_Assassin_Spector */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Assassin_Spector>(g_iStaticLevel, CGoblin_Assassin_Spector::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Troll */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTroll>(g_iStaticLevel, CTroll::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
@@ -2897,15 +2921,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroomRaceManager>(g_iStaticLevel, CBroomRaceManager::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_PhysXWall>(g_iStaticLevel, CDummy_PhysXWall::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_PhysXPlayable>(g_iStaticLevel, CDummy_PhysXPlayable::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CPhysXEffectHitBox>(g_iStaticLevel, CPhysXEffectHitBox::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ HRESULT CMonster::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_pInfoInstance->Regist_ActiveMonster(this);
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -115,14 +115,8 @@ HRESULT CMonster::Render_OutLine()
|
||||
return E_FAIL;
|
||||
}
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (m_fOutLineThickness > 6.f) {
|
||||
m_fOutLineThickness = 6.f;
|
||||
}
|
||||
else if (m_fOutLineThickness < 2.f) {
|
||||
m_fOutLineThickness = 2.f;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -189,37 +189,6 @@ __super::Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::UpdateGrapInteractive(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
m_vGrapInteratableLerp.x += fTimeDelta;
|
||||
m_pGrapInteractive->GrapToPlayer(m_pTransformCom->Get_State(STATE::POSITION) + m_pCamPosition_ShoulderPart->Get_ShoulderGlobalPos(), m_vGrapInteratableLerp.x);
|
||||
if (m_vGrapInteratableLerp.x > m_vGrapInteratableLerp.y) {
|
||||
m_vGrapInteratableLerp.x -= m_vGrapInteratableLerp.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Update_CameraShake(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_bCameraShake) {
|
||||
m_vCameraShakeTimer.x += fTimeDelta;
|
||||
if (m_vCameraShakeTimer.x > m_vCameraShakeTimer.y) {
|
||||
m_vCameraShakeTimer.x = 0.f;
|
||||
m_pCamPosition_ShoulderPart->Set_CameraShake(0.f, 0.f);
|
||||
m_bCameraShake = false;
|
||||
}
|
||||
else {
|
||||
_float fIntense = { 1.f - m_vCameraShakeTimer.x / m_vCameraShakeTimer.y };
|
||||
fIntense *= fIntense;
|
||||
m_pCamPosition_ShoulderPart->Set_CameraShake(
|
||||
fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense),
|
||||
fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||
@@ -262,21 +231,22 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef 기무리
|
||||
if (nullptr == m_pRobePart) {
|
||||
{
|
||||
CPlayerRobe::PlayerRobe_DESC Desc{};
|
||||
Desc.pModel = m_pModelCom;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
|
||||
if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // 기무리
|
||||
//#ifdef 기무리
|
||||
// if (nullptr == m_pRobePart) {
|
||||
// {
|
||||
// CPlayerRobe::PlayerRobe_DESC Desc{};
|
||||
// Desc.pModel = m_pModelCom;
|
||||
// Desc.pParentTransform = m_pTransformCom;
|
||||
// Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
|
||||
// if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
|
||||
// assert(false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//#endif // 기무리
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayer::Render()
|
||||
{
|
||||
if (!m_bVisible){
|
||||
@@ -303,7 +273,7 @@ HRESULT CPlayer::Render()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -318,17 +288,47 @@ HRESULT CPlayer::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
Render_CameraCoordinateSystem();
|
||||
//m_pCharacter_Controller->Render();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (RENDER::NONLIGHT == eType) {
|
||||
//m_pCharacter_Controller->Render();
|
||||
//m_pRigidBody->Render();
|
||||
Render_CameraCoordinateSystem();
|
||||
}
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CPlayer::UpdateGrapInteractive(_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
m_vGrapInteratableLerp.x += fTimeDelta;
|
||||
m_pGrapInteractive->GrapToPlayer(m_pTransformCom->Get_State(STATE::POSITION) + m_pCamPosition_ShoulderPart->Get_ShoulderGlobalPos(), m_vGrapInteratableLerp.x);
|
||||
if (m_vGrapInteratableLerp.x > m_vGrapInteratableLerp.y) {
|
||||
m_vGrapInteratableLerp.x -= m_vGrapInteratableLerp.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Update_CameraShake(_float fTimeDelta)
|
||||
{
|
||||
if (true == m_bCameraShake) {
|
||||
m_vCameraShakeTimer.x += fTimeDelta;
|
||||
if (m_vCameraShakeTimer.x > m_vCameraShakeTimer.y) {
|
||||
m_vCameraShakeTimer.x = 0.f;
|
||||
m_pCamPosition_ShoulderPart->Set_CameraShake(0.f, 0.f);
|
||||
m_bCameraShake = false;
|
||||
}
|
||||
else {
|
||||
_float fIntense = { 1.f - m_vCameraShakeTimer.x / m_vCameraShakeTimer.y };
|
||||
fIntense *= fIntense;
|
||||
m_pCamPosition_ShoulderPart->Set_CameraShake(
|
||||
fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense),
|
||||
fIntense * m_pGameInstance->Real_Random_Float(-m_fCameraShakeIntense, m_fCameraShakeIntense)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
|
||||
@@ -47,13 +47,25 @@ HRESULT CPlayerRobe::Render()
|
||||
|
||||
HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
{
|
||||
PSX::PxTransform pxTransform = {};
|
||||
_matrix WorldMatrix = {};
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
|
||||
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
|
||||
m_pModelCom->Set_BoneCombinedTransformation(PLAYER_JOINT_BONE_NAMES[i], WorldMatrix);
|
||||
{
|
||||
PSX::PxTransform pxTransform = {};
|
||||
_matrix WorldMatrix = {};
|
||||
_matrix OwnerInvWorldMatrix = m_pParentTransformCom->Get_WorldMatrixInv();
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
|
||||
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
|
||||
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], WorldMatrix * OwnerInvWorldMatrix);
|
||||
}
|
||||
}
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
|
||||
m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
|
||||
}
|
||||
m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -80,6 +92,34 @@ HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DY
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Create_BoneCombinedMatrixSRV()
|
||||
{
|
||||
D3D11_BUFFER_DESC desc{};
|
||||
desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
desc.ByteWidth = sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
desc.StructureByteStride = sizeof(_float4x4);
|
||||
desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&desc, nullptr, &m_pBoneCombinedMatrixBuffer))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
|
||||
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
|
||||
srvDesc.Format = DXGI_FORMAT_UNKNOWN;
|
||||
srvDesc.Buffer.FirstElement = 0;
|
||||
srvDesc.Buffer.NumElements = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
|
||||
|
||||
if (FAILED(m_pDevice->CreateShaderResourceView(m_pBoneCombinedMatrixBuffer, &srvDesc, &m_pBoneCombinedMatrixSRV))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayerRobe::Update_LegsPosition()
|
||||
{
|
||||
@@ -200,13 +240,13 @@ HRESULT CPlayerRobe::Render_BonePhysX()
|
||||
});
|
||||
Render_Legs();
|
||||
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
if (nullptr != m_pRobeJointRoute[i]) {
|
||||
m_pRobeJointRoute[i]->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
//for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
// if (nullptr != m_pRobeJointRoute[i]) {
|
||||
// m_pRobeJointRoute[i]->Render([this]() {
|
||||
// m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
m_pRobeJointAnchor[i]->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
@@ -455,6 +495,13 @@ HRESULT CPlayerRobe::Initialize(void* pArg)
|
||||
m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg");
|
||||
m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
|
||||
m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg");
|
||||
|
||||
{
|
||||
ZeroMemory(&m_BoneInsertionDesc, sizeof(m_BoneInsertionDesc));
|
||||
m_BoneInsertionDesc.iMatrixCount = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
m_BoneInsertionDesc.iStartOffset = m_pModelCom->Get_BoneIndex(PLAYER_JOINT_BONE_NAMES[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP)]);
|
||||
}
|
||||
Create_BoneCombinedMatrixSRV();
|
||||
|
||||
XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr()));
|
||||
|
||||
@@ -570,6 +617,8 @@ void CPlayerRobe::Free()
|
||||
#ifdef _DEBUG
|
||||
SAFE_RELEASE(m_pDepthStencilStateNone);
|
||||
#endif // _DEBUG
|
||||
SAFE_RELEASE(m_pBoneCombinedMatrixSRV);
|
||||
SAFE_RELEASE(m_pBoneCombinedMatrixBuffer);
|
||||
SAFE_RELEASE(m_pRightLeg);
|
||||
SAFE_RELEASE(m_pLeftLeg);
|
||||
SAFE_RELEASE(m_pRobeMainAnchor);
|
||||
|
||||
@@ -436,16 +436,23 @@ HRESULT CRanrok::Render_Nonblend()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bDrawOutLine) {
|
||||
@@ -498,7 +505,82 @@ HRESULT CRanrok::Render_Blend()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
Render_OutLine();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRanrok::Render_OutLine()
|
||||
{
|
||||
m_bDrawOutLine = false;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineThickness", &m_fOutLineThickness, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLineScale", &m_fOutLineScale, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOutLinePower", &m_fOutLinePower, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::OUTLINE_READ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -509,7 +591,6 @@ HRESULT CRanrok::Render_Blend()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -197,16 +197,24 @@ HRESULT CTroll::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
@@ -252,6 +260,15 @@ HRESULT CTroll::Render_OutLine()
|
||||
else if (m_fOutLineThickness < 2.f) {
|
||||
m_fOutLineThickness = 2.f;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Client
|
||||
|
||||
enum class SHADER_PASS_NPC_PBR_ANIM {
|
||||
EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To
|
||||
, OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE
|
||||
, OUTLINE_READ
|
||||
, END
|
||||
};
|
||||
enum class UI_STATE { GAMEPLAYER, SPELL, QUEST, INVENTORY, SPELLLNEARN, END };
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDummy_PhysXPlayable final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagPhysXDummyDesc
|
||||
{
|
||||
_float3 vPos = { };
|
||||
_float3 vRotRPY = { };
|
||||
_uint iSubKind = { };
|
||||
}PHYSXDUMMY_DESC;
|
||||
private:
|
||||
CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_PhysXPlayable(const CDummy_PhysXPlayable& rhs);
|
||||
virtual ~CDummy_PhysXPlayable() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
CCallBack_Playable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
CCallBack_Playable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CDummy_PhysXPlayable* 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
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CDummy_PhysXWall final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagPhysXDummyDesc
|
||||
{
|
||||
_float3 vPos = { };
|
||||
_float3 vRotRPY = { };
|
||||
_uint iSubKind = { };
|
||||
}PHYSXDUMMY_DESC;
|
||||
private:
|
||||
CDummy_PhysXWall(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummy_PhysXWall(const CDummy_PhysXWall& rhs);
|
||||
virtual ~CDummy_PhysXWall() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
const PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
public:
|
||||
static CDummy_PhysXWall* 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
|
||||
@@ -53,7 +53,7 @@ class CGoblin_Assassin final : public CMonster
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle2 = { nullptr };
|
||||
class CGoblin_Spector* m_pGoblinSpector = { nullptr };
|
||||
class CGoblin_Assassin_Spector* m_pGoblinSpector = { nullptr };
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Monster.h"
|
||||
#include "CallBack_Monster_Behavior.h"
|
||||
#include "CallBack_Monster_HitReport.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTransform;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CGoblin_Assassin_Spector final : public CMonster
|
||||
{
|
||||
public:
|
||||
typedef struct tagSpector
|
||||
{
|
||||
CTransform* pParentTransform = { nullptr };
|
||||
}GOBLIN_SPECTOR_DESC;
|
||||
private:
|
||||
CGoblin_Assassin_Spector(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CGoblin_Assassin_Spector(const CGoblin_Assassin_Spector& Prototype);
|
||||
virtual ~CGoblin_Assassin_Spector() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
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_Assassin* m_pGoblin = { nullptr };
|
||||
CTransform* m_pParentTransformCom = { nullptr };
|
||||
_uint iIndex;
|
||||
_float3 m_Offset = {};
|
||||
_float3 m_vOriginScale = {};
|
||||
_float3 m_vScale = { 1.f, 1.f, 1.f };
|
||||
|
||||
|
||||
class CTrailObject* m_pLeft_Trail = { nullptr };
|
||||
class CTrailObject* m_pRight_Trail = { nullptr };
|
||||
|
||||
const _float4x4* m_pLeftHand_BoneMat = { nullptr };
|
||||
const _float4x4* m_pRightHand_BoneMat = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Ready_Parts();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CGoblin_Assassin_Spector* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
_bool m_bStep = { false };
|
||||
_float m_fTpTime = {};
|
||||
_float m_fAirTime = {};
|
||||
_vector m_vOriginPos = {};
|
||||
_float m_fLength = {};
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -34,6 +34,7 @@ class CGoblin_Attack final : public CEffect_Container
|
||||
_wstring m_wstrEffectName = {};
|
||||
class CEffectParts* m_pPT1 = { nullptr };
|
||||
class CEffectParts* m_pPT2 = { nullptr };
|
||||
_float4x4 m_vMat = {};
|
||||
public:
|
||||
static CGoblin_Attack* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -24,7 +24,7 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Render_Disolve();
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
const _float4x4 Get_AxeMatrix() { return m_vAxeMat; };
|
||||
const _float4x4& Get_AxeMatrix() { return m_vAxeMat; };
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
|
||||
@@ -11,6 +11,7 @@ class CGoblin_Sword final : public CPartObject
|
||||
typedef struct tagSword : public CPartObject::PARTOBJECT_DESC
|
||||
{
|
||||
const _float4x4* pSocketMatrices = { };
|
||||
_int iIndex = {};
|
||||
}GOBLIN_SWORD_DESC;
|
||||
private:
|
||||
CGoblin_Sword(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -24,14 +25,25 @@ class CGoblin_Sword 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; }
|
||||
void Set_CanTakeDamage(_bool bCanTake) { m_bCanTakeDamage = bCanTake; }
|
||||
const _float4x4& Get_SwordMatrix() { return m_vSwordMat; };
|
||||
public:
|
||||
|
||||
private:
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
const _float4x4* m_pSocketMatrices = { };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_int m_iIndex = {};
|
||||
_wstring m_strModelPrototypeTag;
|
||||
_bool m_bCanTakeDamage = { false };
|
||||
_bool m_bHit = { false };
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDisolveTime = { 0.f };
|
||||
_float4x4 m_vSwordMat = {};
|
||||
|
||||
_float4 m_vStartPos = {};
|
||||
_float4 m_vStartPos = {};
|
||||
PSX::PxSweepBufferN<12> m_SweepBuffer = {};
|
||||
|
||||
private:
|
||||
|
||||
@@ -15,6 +15,7 @@ class CLevel_Field final : public CLevel
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
_bool m_isDay = { true };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
|
||||
@@ -49,6 +49,11 @@ class CPlayerRobe final : public CPartObject
|
||||
CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr };
|
||||
|
||||
ID3D11Buffer* m_pBoneCombinedMatrixBuffer = { nullptr };
|
||||
ID3D11ShaderResourceView* m_pBoneCombinedMatrixSRV = { nullptr };
|
||||
|
||||
CModel::BONEINSERTION_DESC m_BoneInsertionDesc = {};
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
|
||||
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
|
||||
@@ -65,6 +70,7 @@ class CPlayerRobe final : public CPartObject
|
||||
HRESULT Update_LegsPosition();
|
||||
HRESULT Update_RobeSocketPosition();
|
||||
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
|
||||
HRESULT Create_BoneCombinedMatrixSRV();
|
||||
#ifdef _DEBUG
|
||||
HRESULT Render_BonePhysX();
|
||||
HRESULT Render_Legs();
|
||||
|
||||
@@ -43,21 +43,20 @@ static const _char* PLAYER_JOINT_BONE_NAMES[12] = {
|
||||
|
||||
enum class PLAYER_JOINT_BONE_ORDER {
|
||||
RIGHTUP
|
||||
, TAILUP
|
||||
, LEFTUP
|
||||
|
||||
, RIGHT
|
||||
, TAIL
|
||||
, LEFT
|
||||
|
||||
, RIGHTDOWNRIGHT
|
||||
, RIGHTDOWN
|
||||
, RIGHTDOWNRIGHT
|
||||
|
||||
, TAILRIGHTDOWN
|
||||
, TAILLEFTDOWN
|
||||
|
||||
, LEFTUP
|
||||
, LEFT
|
||||
, LEFTDOWN
|
||||
, LEFTDOWNLEFT
|
||||
|
||||
, TAILUP
|
||||
, TAIL
|
||||
, TAILLEFTDOWN
|
||||
, TAILRIGHTDOWN
|
||||
|
||||
, END
|
||||
};
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ class CRanrok final : public CMonster
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_OutLine() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual _vector Get_LockOnPos() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr)override;
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="T_HUM_M_Body_ArmsOld0_Fig_SRXO" Extension=".dds"/>
|
||||
</MI_HUM_M_Arms_ArmsOld_Fig>
|
||||
<MI_Professor_EleazarFig_02 ShaderIndex = "20" OutLineWrite="21">
|
||||
<MI_Professor_EleazarFig_02 ShaderIndex = "14" OutLineWrite="21">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_Professor_EleazarFig_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="T_Professor_EleazaFig_SRO" Extension=".dds"/>
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="T_HUM_M_Body_ArmsOld0_Fig_SRXO" Extension=".dds"/>
|
||||
</MI_HUM_M_Arms_ArmsOld_Fig>
|
||||
<MI_Professor_EleazarFig_02 ShaderIndex = "20" OutLineWrite="21">
|
||||
<MI_Professor_EleazarFig_02 ShaderIndex = "14" OutLineWrite="14">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_Professor_EleazarFig_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="T_Professor_EleazaFig_SRO" Extension=".dds"/>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="T_HUM_Head_Teeth_SRXO" Extension=".dds"/>
|
||||
</MI_HUM_N_Heads_Teeth>
|
||||
<MI_HUM_N_Heads_Eyelash ShaderIndex = "36" OutLineWrite="36">
|
||||
<MI_HUM_N_Heads_Eyelash ShaderIndex = "25" OutLineWrite="36">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Hair_STUHair18_PrincessLong_DAO_MSK" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -115,7 +115,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_HUM_N_Heads_Eyelash>
|
||||
<MI_HUM_N_Heads_Eye ShaderIndex = "37" OutLineWrite="37">
|
||||
<MI_HUM_N_Heads_Eye ShaderIndex = "26" OutLineWrite="37">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_Poltergeist_Eye_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -173,7 +173,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="T_Adult_F_Arms_Ivory_SRXO" Extension=".dds"/>
|
||||
</MI_HUM_F_Body_Arms01>
|
||||
<MI_HUM_F_Hair_Kit ShaderIndex = "34" OutLineWrite="34">
|
||||
<MI_HUM_F_Hair_Kit ShaderIndex = "23" OutLineWrite="34">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Hair_STUHair18_PrincessLong_DAO_MSK" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -231,7 +231,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_ClothSim>
|
||||
<M_HUM_F_Lower_ArcanePants01_Long_RonanAvatar ShaderIndex = "35" OutLineWrite="35">
|
||||
<M_HUM_F_Lower_ArcanePants01_Long_RonanAvatar ShaderIndex = "24" OutLineWrite="35">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Low_ArcanePants01_Long_RonanAvatar2_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="T_HUM_F_Low_ArcanePants01_Long_RonanAvatar2_SRO" Extension=".dds"/>
|
||||
@@ -260,7 +260,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</M_HUM_F_Lower_ArcanePants01_Long_RonanAvatar>
|
||||
<MI_HUM_F_Shoes_DarkArts01_Short_RonanAvatar ShaderIndex = "35" OutLineWrite="35">
|
||||
<MI_HUM_F_Shoes_DarkArts01_Short_RonanAvatar ShaderIndex = "24" OutLineWrite="35">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Shoes_DarkArts01_Short_RonanAvatar_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="T_HUM_F_Shoes_DarkArts01_Short_RonanAvatar_SRO" Extension=".dds"/>
|
||||
@@ -289,7 +289,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_HUM_F_Shoes_DarkArts01_Short_RonanAvatar>
|
||||
<MI_HUM_F_Upp_StuUni01 ShaderIndex = "35" OutLineWrite="35">
|
||||
<MI_HUM_F_Upp_StuUni01 ShaderIndex = "24" OutLineWrite="35">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_F_Upp_StuUni01_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="T_HUM_F_Upp_StuUni01_SRO" Extension=".dds"/>
|
||||
@@ -318,7 +318,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_HUM_F_Upp_StuUni01>
|
||||
<MI_HUM_M_Robe_RelicRobeGry ShaderIndex = "38" OutLineWrite="38">
|
||||
<MI_HUM_M_Robe_RelicRobeGry ShaderIndex = "27" OutLineWrite="38">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_HUM_M_Robe_RelicRobeGry_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
<Material>
|
||||
<MI_GB_RedHot ShaderIndex = "31" OutLineWrite="31">
|
||||
<MI_GB_RedHot ShaderIndex = "20" OutLineWrite="31">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="drp_fire_Red" Extension=".png"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -28,7 +28,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_GB_RedHot>
|
||||
<MI_GB_PinkHot ShaderIndex = "32" OutLineWrite="32">
|
||||
<MI_GB_PinkHot ShaderIndex = "21" OutLineWrite="32">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="drp_fire_Pink" Extension=".png"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -57,7 +57,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_GB_PinkHot>
|
||||
<MI_GB_YellowHot ShaderIndex = "33" OutLineWrite="33">
|
||||
<MI_GB_YellowHot ShaderIndex = "22" OutLineWrite="33">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="drp_fire_Yellow" Extension=".png"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -86,7 +86,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MI_GB_YellowHot>
|
||||
<MM_ConjuredDragonAura_01 ShaderIndex = "23" OutLineWrite="23">
|
||||
<MM_ConjuredDragonAura_01 ShaderIndex = "15" OutLineWrite="23">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_WaterCaustics_Disorder_A" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -115,7 +115,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</MM_ConjuredDragonAura_01>
|
||||
<VFX_MI_ConjuredDragon_EtherealEyes ShaderIndex = "24" OutLineWrite="25">
|
||||
<VFX_MI_ConjuredDragon_EtherealEyes ShaderIndex = "16" OutLineWrite="25">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_DragonEye_Iris_D" Extension=".png"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -144,7 +144,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</VFX_MI_ConjuredDragon_EtherealEyes>
|
||||
<VFX_MI_ConjuredDragon_EtherealWings ShaderIndex = "26" OutLineWrite="26">
|
||||
<VFX_MI_ConjuredDragon_EtherealWings ShaderIndex = "17" OutLineWrite="26">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="VFX_T_MarbleSkin_01_BPF_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -173,7 +173,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</VFX_MI_ConjuredDragon_EtherealWings>
|
||||
<VFX_MI_ConjuredDragon_Wings ShaderIndex = "27" OutLineWrite="28">
|
||||
<VFX_MI_ConjuredDragon_Wings ShaderIndex = "18" OutLineWrite="28">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_ConjuredDragon_Wings_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
@@ -202,7 +202,7 @@
|
||||
<aiTextureType_MAYA_SPECULAR_ROUGHNESS Index="25" Filename="" Extension=""/>
|
||||
<aiTextureType_ANISOTROPY Index="26" Filename="" Extension=""/>
|
||||
</VFX_MI_ConjuredDragon_Wings>
|
||||
<VFX_MI_ConjuredDragon_Body ShaderIndex = "29" OutLineWrite="30">
|
||||
<VFX_MI_ConjuredDragon_Body ShaderIndex = "19" OutLineWrite="30">
|
||||
<aiTextureType_NONE Index="0" Filename="" Extension=""/>
|
||||
<aiTextureType_DIFFUSE Index="1" Filename="T_ConjuredDragon_Body_D" Extension=".dds"/>
|
||||
<aiTextureType_SPECULAR Index="2" Filename="" Extension=""/>
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+40
@@ -0,0 +1,40 @@
|
||||
struct LocalPos
|
||||
{
|
||||
row_major float4x4 Combined;
|
||||
row_major float4x4 Local;
|
||||
row_major float4x4 LocalCombined;
|
||||
};
|
||||
|
||||
struct BoneCombined
|
||||
{
|
||||
row_major float4x4 BoneCombinedTransformation;
|
||||
};
|
||||
|
||||
StructuredBuffer<BoneCombined> g_CombinedMatIn : register(t0);
|
||||
|
||||
RWStructuredBuffer<LocalPos> g_LocalPosOutput : register(u0);
|
||||
|
||||
cbuffer BoneInsertionCB : register(b0)
|
||||
{
|
||||
uint iStartOffset;
|
||||
uint iMatrixCount;
|
||||
uint iPad0;
|
||||
uint iPad1;
|
||||
};
|
||||
|
||||
[numthreads(256, 1, 1)]
|
||||
void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
|
||||
{
|
||||
uint iBoneIndex = DTid.x;
|
||||
|
||||
if (iBoneIndex >= iMatrixCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float4x4 CombinedMatrix = g_CombinedMatIn[iBoneIndex].BoneCombinedTransformation;
|
||||
|
||||
g_LocalPosOutput[iBoneIndex+iStartOffset].LocalCombined = CombinedMatrix;
|
||||
g_LocalPosOutput[iBoneIndex+iStartOffset].Combined = CombinedMatrix;
|
||||
|
||||
}
|
||||
@@ -306,10 +306,12 @@ struct PS_OUT_BLEND
|
||||
};
|
||||
struct PS_OUT_OUTLINE
|
||||
{
|
||||
float4 vOutLine : SV_TARGET0;
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float2 vVelocityUV : SV_TARGET3;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
|
||||
PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
@@ -327,12 +329,14 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
Out.vOutLine = float4(g_vOutLineColor.rgb, fRim);
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
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
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
|
||||
Out.vSurface = float4(0.5f, 1.f, 1.f, 0.f);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
|
||||
|
||||
return Out;
|
||||
@@ -1334,62 +1338,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_OUTLINE_READ();
|
||||
}
|
||||
pass TEETH_SRXO_ToSRO__OUTLINE_WRITE // 14
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_TEETH_SRXO_ToSRO();
|
||||
}
|
||||
pass EYE_DN_ToSRO__OUTLINE_WRITE // 15
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_EYE_DN_SRO();
|
||||
}
|
||||
pass HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE // 16
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_HEADwtHAND_DSRXON_ToSRO();
|
||||
}
|
||||
pass UPPER_DMRON_ToMRO__OUTLINE_WRITE // 17
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_UPPER_DMRON_ToMRO();
|
||||
}
|
||||
pass EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE // 18
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_EmissiveMetalness_DENMRO_ToMRO();
|
||||
}
|
||||
pass MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE // 19
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_MI_ClothSim_DSEN_ToSRO();
|
||||
}
|
||||
///////
|
||||
pass MI_DANSROMRO_ToSRO // 20
|
||||
pass MI_DANSROMRO_ToSRO // 14
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1398,26 +1347,8 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MI_DANSROMRO_ToSRO();
|
||||
}
|
||||
pass MI_DANSROMRO_ToSRO_OUTLINE_WRITE // 21
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_MI_DANSROMRO_ToSRO();
|
||||
}
|
||||
pass DNMRO_ToMRO__OUTLINE_WRITE // 22
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_DNMRO_ToMRO();
|
||||
}
|
||||
//// DRAGON
|
||||
pass DragonAuraPass // 23
|
||||
pass DragonAuraPass // 15
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1426,7 +1357,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_Aura();
|
||||
}
|
||||
pass DragonEtherealEyesPass // 24
|
||||
pass DragonEtherealEyesPass // 16
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1435,16 +1366,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_EtherealEyes();
|
||||
}
|
||||
pass DragonEtherealEyes_OUTLINE_WRITEPass // 25
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
SetBlendState(BS_AlphaBlend, 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_Dragon_EtherealEyes();
|
||||
}
|
||||
pass DragonEtherealWingsPass // 26
|
||||
pass DragonEtherealWingsPass // 17
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1453,7 +1375,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_EtherealWings();
|
||||
}
|
||||
pass DragonWingsPass // 27
|
||||
pass DragonWingsPass // 18
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1462,16 +1384,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_Wings();
|
||||
}
|
||||
pass DragonWings_OUTLINE_WRITEPass // 28
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_Dragon_Wings();
|
||||
}
|
||||
pass DragonBodyPass // 29
|
||||
pass DragonBodyPass // 19
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1480,16 +1393,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_Body();
|
||||
}
|
||||
pass DragonBody_OUTLINE_WRITEPass // 30
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default_OutLine_SWrite, 2);
|
||||
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_Dragon_Body();
|
||||
}
|
||||
pass DragonRedHotPass // 31
|
||||
pass DragonRedHotPass // 20
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1498,7 +1402,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_RedHot();
|
||||
}
|
||||
pass DragonPinkHotPass // 32
|
||||
pass DragonPinkHotPass // 21
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1507,7 +1411,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Dragon_PinkHot();
|
||||
}
|
||||
pass DragonYellowHotPass // 33
|
||||
pass DragonYellowHotPass // 22
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1517,7 +1421,7 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_Dragon_YellowHot();
|
||||
}
|
||||
//// PLAYER_
|
||||
pass PLAYER_HAIR_DAOTHV_ToSRO // 34
|
||||
pass PLAYER_HAIR_DAOTHV_ToSRO // 23
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1526,7 +1430,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Player_HairDAOTHV_ToSRO();
|
||||
}
|
||||
pass PLAYER_Suit_DSRON_ToSRO // 35
|
||||
pass PLAYER_Suit_DSRON_ToSRO // 24
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1535,7 +1439,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Player_Suit_DSRON_ToSRO();
|
||||
}
|
||||
pass PLAYER_EyeLash_DAOTHV_ToSRO // 36
|
||||
pass PLAYER_EyeLash_DAOTHV_ToSRO // 25
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1544,7 +1448,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Player_EyeLash_DAOTHV_ToSRO();
|
||||
}
|
||||
pass PLAYER_Eye_ToSRO // 37
|
||||
pass PLAYER_Eye_ToSRO // 26
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
@@ -1553,7 +1457,7 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Player_Eye_ToMRO();
|
||||
}
|
||||
pass PLAYER_Robe_ToMRO // 38
|
||||
pass PLAYER_Robe_ToMRO // 27
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
|
||||
@@ -450,10 +450,12 @@ struct PS_IN_OUTLINE
|
||||
};
|
||||
struct PS_OUT_OUTLINE
|
||||
{
|
||||
float4 vOutLine : SV_TARGET0;
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float2 vVelocityUV : SV_TARGET3;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
|
||||
PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
@@ -470,13 +472,15 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
float fNdotV = saturate(dot(vNormal, vToView));
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
Out.vOutLine = float4(g_vOutLineColor.rgb, fRim);
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
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
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
|
||||
Out.vSurface = float4(0.5f, 1.f, 1.f, 0.f);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
|
||||
|
||||
return Out;
|
||||
|
||||
@@ -672,10 +672,12 @@ struct PS_IN_OUTLINE
|
||||
};
|
||||
struct PS_OUT_OUTLINE
|
||||
{
|
||||
float4 vOutLine : SV_TARGET0;
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float2 vVelocityUV : SV_TARGET3;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
float2 vVelocityUV : SV_TARGET5;
|
||||
};
|
||||
|
||||
PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
@@ -684,6 +686,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
float3 vToView = normalize(g_vCamPosition.xyz - In.vWorldPos.xyz);
|
||||
@@ -691,15 +694,17 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
float fNdotV = saturate(dot(vNormal, vToView));
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
Out.vOutLine = float4(g_vOutLineColor.rgb, fRim);
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
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, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
|
||||
Out.vSurface = float4(0.5f, 1.f, 1.f, 0.f);
|
||||
Out.vVelocityUV = CalcVelocityUV(In.vProjPos, In.vPrevProjPos, g_fMBIntensity);
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ HRESULT CDummyObject::Render()
|
||||
|
||||
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, false))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Land.h"
|
||||
#include "InstancedProp.h"
|
||||
#include "Player.h"
|
||||
#include "Ranrok.h"
|
||||
#include "Unified.h"
|
||||
#include "MapElement_Lake.h"
|
||||
#include "MapElement_Door.h"
|
||||
@@ -48,6 +49,12 @@ HRESULT CLevel_MapViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Layer_Player_And_Ranrok())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if (FAILED(Ready_Layer_Terrain(TEXT("Layer_Terrain")))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
@@ -524,6 +531,19 @@ HRESULT CLevel_MapViewer::Ready_Layer_MapObjectManager(const _wstring& strLayerT
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLevel_MapViewer::Ready_Layer_Player_And_Ranrok()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CRanrok>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Monster"))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLevel_MapViewer* CLevel_MapViewer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
{
|
||||
CLevel_MapViewer* pInstance = new CLevel_MapViewer(pDevice, pContext, eLevelID);
|
||||
|
||||
@@ -2385,7 +2385,7 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
vector<future<pair<_wstring, CModel*>*>> futures = {};
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Anim_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Goblins\\SK_WPN_GOB_SmallSword.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Goblins\\SK_WPN_GOB_SmallSword.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
@@ -2668,6 +2668,31 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
|
||||
HRESULT CLoader::Loading_For_MapViewer()
|
||||
{
|
||||
#pragma region PLAYER_AND_RANROK
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Ranrok_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok>(g_iStaticLevel, CRanrok::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CFSM>(g_iStaticLevel, CFSM::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Player */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CPlayer>(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
#pragma region TEXTURES
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("TerrainTest"),
|
||||
@@ -2858,6 +2883,8 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Hogsmead_NorthLakeShallow"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/River/NorthLake/HDA_SM_LakeA_Collision_Shallow.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
vector<_wstring> ModelPrototypeTags = {};
|
||||
|
||||
@@ -418,16 +418,23 @@ HRESULT CRanrok::Render_Nonblend()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bDrawOutLine) {
|
||||
@@ -480,16 +487,23 @@ HRESULT CRanrok::Render_Blend()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom, m_bDrawOutLine))) {
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Editor
|
||||
|
||||
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, SPECTOR, END };
|
||||
enum class SHADER_PASS_NPC_PBR_ANIM { EYELASH_DAOTHV_ToSRO, TEETH_SRXO_ToSRO, EYE_DN_ToSRO, EYE_OCC, FACIAL_HAIR_DAOTHV_ToSRO, HEAD_HAIR_DAOTHV_ToSRO, HEADwtHAND_DSRXON_ToSRO, LOWER_DSRON_ToSRO, UPPER_DMRON_ToMRO, GLASSES_DMRON_ToMRO, EmissiveMetalness_DENMRO_ToMRO, MI_ClothSim_DSEN_ToSRO, MI_Troll_Club_DAENMROSRXO_To
|
||||
, OUTLINE_READ, TEETH_SRXO_ToSRO__OUTLINE_WRITE, EYE_DN_ToSRO__OUTLINE_WRITE, HEADwtHAND_DSRXON_ToSRO__OUTLINE_WRITE, UPPER_DMRON_ToMRO__OUTLINE_WRITE, EmissiveMetalness_DENMRO_ToMRO__OUTLINE_WRITE, MI_ClothSim_DSEN_ToSRO__OUTLINE_WRITE
|
||||
, OUTLINE_READ
|
||||
, 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, LAKE, END };
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
|
||||
|
||||
@@ -28,6 +28,7 @@ class CLevel_MapViewer final : public CLevel
|
||||
HRESULT Ready_Layer_Door(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Chest(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_MapObjectManager(const _wstring& strLayerTag);
|
||||
HRESULT Ready_Layer_Player_And_Ranrok();
|
||||
|
||||
|
||||
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
struct LocalPos
|
||||
{
|
||||
row_major float4x4 Combined;
|
||||
row_major float4x4 Local;
|
||||
row_major float4x4 LocalCombined;
|
||||
};
|
||||
|
||||
struct BoneCombined
|
||||
{
|
||||
row_major float4x4 BoneCombinedTransformation;
|
||||
};
|
||||
|
||||
StructuredBuffer<BoneCombined> g_CombinedMatIn : register(t0);
|
||||
|
||||
RWStructuredBuffer<LocalPos> g_LocalPosOutput : register(u0);
|
||||
|
||||
cbuffer BoneInsertionCB : register(b0)
|
||||
{
|
||||
uint iStartOffset;
|
||||
uint iMatrixCount;
|
||||
uint iPad0;
|
||||
uint iPad1;
|
||||
};
|
||||
|
||||
[numthreads(256, 1, 1)]
|
||||
void CS_MAIN(uint3 DTid : SV_DispatchThreadID)
|
||||
{
|
||||
uint iBoneIndex = DTid.x;
|
||||
|
||||
if (iBoneIndex >= iMatrixCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float4x4 CombinedMatrix = g_CombinedMatIn[iBoneIndex].BoneCombinedTransformation;
|
||||
|
||||
g_LocalPosOutput[iBoneIndex+iStartOffset].LocalCombined = CombinedMatrix;
|
||||
g_LocalPosOutput[iBoneIndex+iStartOffset].Combined = CombinedMatrix;
|
||||
|
||||
}
|
||||
@@ -627,6 +627,10 @@ call Update_Lib.bat
|
||||
<None Include="..\Public\fMod\fmod_errors.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_BoneCombinedInsertion_Compute.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Distortion.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
|
||||
@@ -1356,5 +1356,8 @@
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Volumetric_Accumulate.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_BoneCombinedInsertion_Compute.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -82,7 +82,7 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
if (nullptr == m_pKey_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pPipeLine = CPipeLine::Create();
|
||||
m_pPipeLine = CPipeLine::Create(*ppDevice, *ppContext);
|
||||
if (nullptr == m_pPipeLine) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -799,6 +799,16 @@ _float CGameInstance::Get_ShadowBoxFar(_uint iShadowBoxIndex)
|
||||
return m_pPipeLine->Get_ShadowBoxFar(iShadowBoxIndex);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Begin_OutLine_Write(_uint iDSSRef)
|
||||
{
|
||||
return m_pPipeLine->Begin_OutLine_Write(iDSSRef);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::End_OutLine_Write()
|
||||
{
|
||||
return m_pPipeLine->End_OutLine_Write();
|
||||
}
|
||||
|
||||
void CGameInstance::Add_Light(_uint _iCurrentLevel, CLight* _pLight)
|
||||
{
|
||||
m_pLight_Manager->Add_Light(_iCurrentLevel, _pLight);
|
||||
|
||||
@@ -95,7 +95,7 @@ HRESULT CModel::Bind_Material(_uint iMeshIndex, CShader* pShader)
|
||||
return m_Materials[iMaterialIndex]->Bind_SRV(pShader, m_eType);
|
||||
}
|
||||
|
||||
HRESULT CModel::Begin(_uint iMeshIndex, CShader* pShader, _bool OutLine)
|
||||
HRESULT CModel::Begin(_uint iMeshIndex, CShader* pShader)
|
||||
{
|
||||
if (iMeshIndex >= m_iNumMeshes) {
|
||||
return E_FAIL;
|
||||
@@ -107,12 +107,7 @@ HRESULT CModel::Begin(_uint iMeshIndex, CShader* pShader, _bool OutLine)
|
||||
return E_FAIL;
|
||||
}
|
||||
HRESULT hr = { E_FAIL };
|
||||
if (false == OutLine) {
|
||||
hr = pShader->Begin(m_Materials[iMaterialIndex]->Get_UsingPass());
|
||||
}
|
||||
else {
|
||||
hr = pShader->Begin(m_Materials[iMaterialIndex]->Get_OutLinePass());
|
||||
}
|
||||
hr = pShader->Begin(m_Materials[iMaterialIndex]->Get_UsingPass());
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1563,6 +1558,34 @@ HRESULT CModel::Create_ComputeShaderLocal()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CModel::Create_ComputeShaderBoneInsertion()
|
||||
{
|
||||
_uint CS_InputStrides[] = {
|
||||
sizeof(_float4x4)
|
||||
};
|
||||
|
||||
_uint CS_OutputStrides[] = {
|
||||
sizeof(BONE_DESC),
|
||||
};
|
||||
|
||||
CComputeShader::CS_INFO CS_Desc = {};
|
||||
|
||||
CS_Desc.iNumElement = (_uint)m_Bones.size();
|
||||
CS_Desc.iNumInputBuffer = 1;
|
||||
CS_Desc.iNumOutputBuffer = 1;
|
||||
|
||||
CS_Desc.iInputStructStride = CS_InputStrides;
|
||||
CS_Desc.iOutputStructStride = CS_OutputStrides;
|
||||
|
||||
m_pCS_BoneInsertion = (CComputeShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, CS_BONEINSERT, &CS_Desc, nullptr);
|
||||
|
||||
if (nullptr == m_pCS_BoneInsertion) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CModel::Create_Temp()
|
||||
{
|
||||
for (auto& anim : m_Animations)
|
||||
@@ -1688,18 +1711,28 @@ HRESULT CModel::Create_BoneMatrixVB()
|
||||
|
||||
HRESULT CModel::Create_Const()
|
||||
{
|
||||
{
|
||||
D3D11_BUFFER_DESC cbDesc = {};
|
||||
cbDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
||||
cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
cbDesc.ByteWidth = sizeof(ANIMSTATE_DESC);
|
||||
|
||||
D3D11_BUFFER_DESC cbDesc = {};
|
||||
cbDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
||||
cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
cbDesc.ByteWidth = sizeof(ANIMSTATE_DESC);
|
||||
|
||||
D3D11_SUBRESOURCE_DATA CBInitialDesc = {};
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&cbDesc, nullptr, &m_pConstantBuffer)))
|
||||
return E_FAIL;
|
||||
if (FAILED(m_pDevice->CreateBuffer(&cbDesc, nullptr, &m_pConstantBuffer))){
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
D3D11_BUFFER_DESC cbDesc = {};
|
||||
cbDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
||||
cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
cbDesc.ByteWidth = sizeof(BONEINSERTION_DESC);
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&cbDesc, nullptr, &m_pInsertionCB))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -1935,6 +1968,55 @@ void CModel::ComputeLocal(_uint AnimIndex, _uint MeshIndex)
|
||||
|
||||
}
|
||||
|
||||
void CModel::ComputeInsertionBoneBuffer(BONEINSERTION_DESC& CBDesc, ID3D11ShaderResourceView* pSRV)
|
||||
{
|
||||
if (m_pComputeShader == nullptr){
|
||||
return;
|
||||
}
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {};
|
||||
|
||||
if (SUCCEEDED(m_pContext->Map(m_pInsertionCB, 0, D3D11_MAP_WRITE_DISCARD, 0, &ConstantSubResource)))
|
||||
{
|
||||
BONEINSERTION_DESC* pDesc = static_cast<BONEINSERTION_DESC*>(ConstantSubResource.pData);
|
||||
memcpy_s(pDesc, sizeof(BONEINSERTION_DESC), &CBDesc, sizeof(BONEINSERTION_DESC));
|
||||
m_pContext->Unmap(m_pInsertionCB, 0);
|
||||
}
|
||||
|
||||
ID3D11ShaderResourceView* srvs[] =
|
||||
{
|
||||
pSRV,
|
||||
};
|
||||
|
||||
ID3D11UnorderedAccessView* uavs[] =
|
||||
{
|
||||
m_pBoneMatrixUAV
|
||||
};
|
||||
_uint iThreadPerX = 256;
|
||||
_uint iGroupCountX = (CBDesc.iMatrixCount + iThreadPerX - 1) / iThreadPerX;
|
||||
if (iGroupCountX == 0) {
|
||||
iGroupCountX = 1;
|
||||
}
|
||||
|
||||
m_pCS_BoneInsertion->Dispatch_ExternalSRV_UAV(
|
||||
0,
|
||||
0,
|
||||
_float3((_float)iGroupCountX, 1.f, 1.f),
|
||||
srvs,
|
||||
1,
|
||||
uavs,
|
||||
1,
|
||||
m_pInsertionCB
|
||||
);
|
||||
|
||||
ID3D11UnorderedAccessView* nullUAV[1] = { nullptr };
|
||||
UINT counts[1] = { 0 };
|
||||
m_pContext->CSSetUnorderedAccessViews(0, 1, nullUAV, counts);
|
||||
|
||||
ID3D11ShaderResourceView* nullSRV[1] = { nullptr };
|
||||
m_pContext->CSSetShaderResources(0, 1, nullSRV);
|
||||
}
|
||||
|
||||
|
||||
void CModel::Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex)
|
||||
{
|
||||
@@ -2416,6 +2498,10 @@ HRESULT CModel::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Create_ComputeShaderBoneInsertion())){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_Meshes.size(); i++)
|
||||
{
|
||||
if (1 < m_Meshes[i]->Get_NumBone()) {
|
||||
@@ -2536,6 +2622,7 @@ void CModel::Free()
|
||||
|
||||
SAFE_RELEASE(m_pComputeShader);
|
||||
SAFE_RELEASE(m_pCS_AnimLocal);
|
||||
SAFE_RELEASE(m_pCS_BoneInsertion);
|
||||
SAFE_RELEASE(m_pConstantBuffer);
|
||||
SAFE_RELEASE(m_pParentBuffer);
|
||||
SAFE_RELEASE(m_pBoneLocalBuffer);
|
||||
@@ -2543,6 +2630,7 @@ void CModel::Free()
|
||||
SAFE_RELEASE(m_pPrevBoneMatrixBuffer);
|
||||
SAFE_RELEASE(m_pSkipBoneBuffer);
|
||||
SAFE_RELEASE(m_pLocalMatrixBuffer);
|
||||
SAFE_RELEASE(m_pInsertionCB);
|
||||
SAFE_RELEASE(m_pParentSRV);
|
||||
SAFE_RELEASE(m_pBoneLocalSRV);
|
||||
SAFE_RELEASE(m_pBoneMatrixSRV);
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
#include "Shader.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CPipeLine::CPipeLine()
|
||||
:m_pGameInstance(CGameInstance::GetInstance())
|
||||
CPipeLine::CPipeLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
, m_pGameInstance{ CGameInstance::GetInstance() }
|
||||
{
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
SAFE_ADDREF(m_pContext);
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
}
|
||||
|
||||
@@ -167,6 +171,20 @@ HRESULT CPipeLine::Load_GlobalSRV(const _tchar* wszKeyGlobalSRV, filesystem::pat
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPipeLine::Begin_OutLine_Write(_uint iDSSRef)
|
||||
{
|
||||
m_pContext->OMGetDepthStencilState(&m_pPrevDSS, &m_iPrevDSSRef);
|
||||
m_pContext->OMSetDepthStencilState(m_pDSS_OutLineWrite, iDSSRef);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPipeLine::End_OutLine_Write()
|
||||
{
|
||||
m_pContext->OMSetDepthStencilState(m_pPrevDSS, m_iPrevDSSRef);
|
||||
SAFE_RELEASE(m_pPrevDSS);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPipeLine::Ready_Shadow_Light(const _float4& vShadowDirRPYQuat)
|
||||
{
|
||||
_vector vShadowQuat = XMQuaternionNormalize(XMLoadFloat4(&vShadowDirRPYQuat));
|
||||
@@ -273,6 +291,30 @@ HRESULT CPipeLine::Initialize()
|
||||
XMStoreFloat4x4(&m_TransformStateMatrices[i], XMMatrixIdentity());
|
||||
}
|
||||
|
||||
if (nullptr == m_pDSS_OutLineWrite) {
|
||||
D3D11_DEPTH_STENCIL_DESC depthStencilDescription{};
|
||||
depthStencilDescription.DepthEnable = TRUE;
|
||||
depthStencilDescription.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; // true에 해당
|
||||
depthStencilDescription.DepthFunc = D3D11_COMPARISON_LESS_EQUAL; // less_equal
|
||||
|
||||
depthStencilDescription.StencilEnable = TRUE;
|
||||
depthStencilDescription.StencilReadMask = 0xFF;
|
||||
depthStencilDescription.StencilWriteMask = 0xFF;
|
||||
|
||||
// FrontFace
|
||||
depthStencilDescription.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
|
||||
depthStencilDescription.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
|
||||
depthStencilDescription.FrontFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE; // Replace
|
||||
depthStencilDescription.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; // Always
|
||||
|
||||
// BackFace
|
||||
depthStencilDescription.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
|
||||
depthStencilDescription.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
|
||||
depthStencilDescription.BackFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE;
|
||||
depthStencilDescription.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
|
||||
m_pDevice->CreateDepthStencilState(&depthStencilDescription, &m_pDSS_OutLineWrite);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -457,9 +499,9 @@ ID3D11ShaderResourceView* CPipeLine::Find_GlobalShaderResourceView(const _tchar*
|
||||
return (*iter).second;
|
||||
}
|
||||
|
||||
CPipeLine* CPipeLine::Create()
|
||||
CPipeLine* CPipeLine::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CPipeLine* pInstance = new CPipeLine();
|
||||
CPipeLine* pInstance = new CPipeLine(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize()))
|
||||
{
|
||||
@@ -472,6 +514,10 @@ CPipeLine* CPipeLine::Create()
|
||||
void CPipeLine::Free()
|
||||
{
|
||||
__super::Free();
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
SAFE_RELEASE(m_pDSS_OutLineWrite);
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
for (auto& pairSRV : m_mapGlobalSRV) {
|
||||
SAFE_RELEASE(pairSRV.second);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,6 @@ HRESULT CPrototype_Manager::Ready_EngineAssets()
|
||||
CComputeShader::Create(m_pDevice, m_pContext,
|
||||
L"../Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl", "CS_MAIN")))) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Prototype(g_iStaticLevel, CS_MODEL,
|
||||
@@ -161,7 +160,12 @@ HRESULT CPrototype_Manager::Ready_EngineAssets()
|
||||
CComputeShader::Create(m_pDevice, m_pContext,
|
||||
L"../Bin/Resources/ShaderFiles/Shader_Local_Compute.hlsl", "CS_LOCAL")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Prototype(g_iStaticLevel, CS_BONEINSERT,
|
||||
CComputeShader::Create(m_pDevice, m_pContext,
|
||||
L"../Bin/Resources/ShaderFiles/Shader_BoneCombinedInsertion_Compute.hlsl", "CS_MAIN")))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
#define CS_INSTANCE_MODEL TEXT("CS_INSTANCE_MODEL")
|
||||
#define CS_MODEL TEXT("CS_MODEL")
|
||||
#define CS_LOCAL TEXT("CS_LOCAL")
|
||||
#define CS_BONEINSERT TEXT("CS_BONEINSERT")
|
||||
|
||||
|
||||
#define SAFE_ADDREF(pInstance) Safe_AddRef(pInstance)
|
||||
|
||||
@@ -152,6 +152,8 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Bind_Shadow_Resource(class CShader* pShader, const _char* pConstantName, D3DTS eType, SHADOW eShadowType) const;
|
||||
const _float4x4* Get_ShadowMatricesPtr(_uint iShadowBoxIndex);
|
||||
_float Get_ShadowBoxFar(_uint iShadowBoxIndex);
|
||||
HRESULT Begin_OutLine_Write(_uint iDSSMask);
|
||||
HRESULT End_OutLine_Write();
|
||||
#pragma endregion
|
||||
#pragma region LIGHT_MANAGER
|
||||
void Add_Light(_uint _iCurrentLevel, class CLight* _pLight);
|
||||
|
||||
@@ -36,6 +36,12 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
_float4 RootInitRot;
|
||||
}ANIMSTATE_DESC;
|
||||
|
||||
typedef struct tagBoneInsertionDesc {
|
||||
_uint iStartOffset;
|
||||
_uint iMatrixCount;
|
||||
_uint iPad0;
|
||||
_uint iPad1;
|
||||
}BONEINSERTION_DESC;
|
||||
|
||||
|
||||
private:
|
||||
@@ -115,17 +121,18 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
#pragma endregion
|
||||
#pragma region Material
|
||||
HRESULT Bind_Material(_uint iMeshIndex, class CShader* pShader);
|
||||
HRESULT Begin(_uint iMeshIndex, class CShader* pShader, _bool OutLine = false);
|
||||
HRESULT Begin(_uint iMeshIndex, class CShader* pShader);
|
||||
#pragma endregion
|
||||
|
||||
void ComputeAnimation(_uint AnimIndex, _uint MeshIndex);
|
||||
void ComputeLocal(_uint AnimIndex, _uint MeshIndex);
|
||||
void Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex);
|
||||
void Bind_OutPut_SRV_VS_Prev(_uint iIndex, _uint iBufferIndex);
|
||||
void ComputeAnimation_Second(_uint AnimIndex);
|
||||
void InItialize_BoneIndex();
|
||||
void ComputeAnimation(_uint AnimIndex, _uint MeshIndex);
|
||||
void ComputeLocal(_uint AnimIndex, _uint MeshIndex);
|
||||
void ComputeInsertionBoneBuffer(BONEINSERTION_DESC& CBDesc, ID3D11ShaderResourceView* pSRV);
|
||||
void Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex);
|
||||
void Bind_OutPut_SRV_VS_Prev(_uint iIndex, _uint iBufferIndex);
|
||||
void ComputeAnimation_Second(_uint AnimIndex);
|
||||
void InItialize_BoneIndex();
|
||||
|
||||
void Initialize_BoneMasks();
|
||||
void Initialize_BoneMasks();
|
||||
|
||||
public:
|
||||
HRESULT Ready_PhysXMeshes(_fmatrix& PreTransformMatrix, _uint iLevel);
|
||||
@@ -236,6 +243,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
private:
|
||||
HRESULT Create_ComputeShader();
|
||||
HRESULT Create_ComputeShaderLocal();
|
||||
HRESULT Create_ComputeShaderBoneInsertion();
|
||||
HRESULT Create_ParentVB();
|
||||
HRESULT Create_BoneLocalVB();
|
||||
HRESULT Create_SkipBoneVB();
|
||||
@@ -247,7 +255,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
|
||||
HRESULT Create_Local();
|
||||
|
||||
_uint m_iNumBuffer = {};
|
||||
_uint m_iNumBuffer = {};
|
||||
|
||||
vector<_int> m_Parent = {};
|
||||
vector<_float4x4> m_BoneLocal = {};
|
||||
@@ -257,6 +265,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
|
||||
class CComputeShader* m_pComputeShader = nullptr;
|
||||
class CComputeShader* m_pCS_AnimLocal = nullptr;
|
||||
class CComputeShader* m_pCS_BoneInsertion = nullptr;
|
||||
|
||||
ID3D11Buffer* m_pConstantBuffer = { nullptr };
|
||||
ID3D11Buffer* m_pParentBuffer = { nullptr };
|
||||
@@ -265,7 +274,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
ID3D11Buffer* m_pBoneLocalBuffer = { nullptr };
|
||||
ID3D11Buffer* m_pSkipBoneBuffer = { nullptr };
|
||||
ID3D11Buffer* m_pLocalMatrixBuffer = { nullptr };
|
||||
|
||||
ID3D11Buffer* m_pInsertionCB = { nullptr };
|
||||
|
||||
ID3D11ShaderResourceView* m_pParentSRV = { nullptr };
|
||||
ID3D11ShaderResourceView* m_pBoneLocalSRV = { nullptr };
|
||||
|
||||
@@ -21,7 +21,7 @@ cascade
|
||||
class CPipeLine final : public CBase
|
||||
{
|
||||
private:
|
||||
CPipeLine();
|
||||
CPipeLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual ~CPipeLine() = default;
|
||||
public:
|
||||
void Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix);
|
||||
@@ -44,6 +44,9 @@ class CPipeLine final : public CBase
|
||||
HRESULT Bind_GlobalSRV(class CShader* pShader, const _tchar* wszKeyGlobalSRV, const _char* pConstantName);
|
||||
HRESULT Load_GlobalSRV(const _tchar* wszKeyGlobalSRV, filesystem::path pathSRVFolder);
|
||||
|
||||
HRESULT Begin_OutLine_Write(_uint iDSSRef);
|
||||
HRESULT End_OutLine_Write();
|
||||
|
||||
HRESULT Ready_Shadow_Light(const _float4& vShadowDirRPYQuat);
|
||||
HRESULT Bind_Shadow_Resource(class CShader* pShader, const _char* pConstantName, D3DTS eType, SHADOW eShadowType) const;
|
||||
const _float4x4* Get_ShadowMatricesPtr(_uint iShadowBoxIndex);
|
||||
@@ -52,6 +55,8 @@ class CPipeLine final : public CBase
|
||||
void Update(); // Objects의 Priority, Update사이에서 불려야만 함
|
||||
|
||||
private:
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
class CGameInstance* m_pGameInstance = { nullptr };
|
||||
_float4x4 m_TransformStateMatrices[ENUM_CLASS(D3DTS::END)] = {};
|
||||
_float4x4 m_ShadowTransformStateMatrices[3][ENUM_CLASS(D3DTS::END)] = {};
|
||||
@@ -84,6 +89,10 @@ class CPipeLine final : public CBase
|
||||
_float4 m_vShadowInvDirectionalRPYQuat = { 0.f, 0.f, 0.f, 1.f };
|
||||
|
||||
unordered_map<_wstring, ID3D11ShaderResourceView*> m_mapGlobalSRV = {};
|
||||
ID3D11DepthStencilState* m_pDSS_OutLineWrite = { nullptr };
|
||||
ID3D11DepthStencilState* m_pPrevDSS = { nullptr };
|
||||
_uint m_iPrevDSSRef = { };
|
||||
|
||||
private:
|
||||
HRESULT Initialize();
|
||||
void Make_Planes(const _float4* pPoints, _float4* pPlanes);
|
||||
@@ -94,7 +103,7 @@ class CPipeLine final : public CBase
|
||||
ID3D11ShaderResourceView* Find_GlobalShaderResourceView(const _tchar* wszKeyGlobalSRV);
|
||||
|
||||
public:
|
||||
static CPipeLine* Create();
|
||||
static CPipeLine* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity();
|
||||
|
||||
Reference in New Issue
Block a user