@@ -197,28 +197,28 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
g_hWnd = hWnd;
|
||||
|
||||
#ifndef _DEBUG
|
||||
int screenX = GetSystemMetrics(SM_CXSCREEN);
|
||||
int screenY = GetSystemMetrics(SM_CYSCREEN);
|
||||
//int screenX = GetSystemMetrics(SM_CXSCREEN);
|
||||
//int screenY = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
HWND hWnd = CreateWindowW(
|
||||
szWindowClass,
|
||||
szTitle,
|
||||
WS_POPUP,
|
||||
0, 0,
|
||||
screenX, screenY,
|
||||
nullptr,
|
||||
nullptr,
|
||||
hInstance,
|
||||
nullptr
|
||||
);
|
||||
//HWND hWnd = CreateWindowW(
|
||||
// szWindowClass,
|
||||
// szTitle,
|
||||
// WS_POPUP,
|
||||
// 0, 0,
|
||||
// screenX, screenY,
|
||||
// nullptr,
|
||||
// nullptr,
|
||||
// hInstance,
|
||||
// nullptr
|
||||
//);
|
||||
|
||||
if (!hWnd)
|
||||
return FALSE;
|
||||
//if (!hWnd)
|
||||
// return FALSE;
|
||||
|
||||
g_hWnd = hWnd;
|
||||
//g_hWnd = hWnd;
|
||||
|
||||
ShowWindow(hWnd, SW_SHOW);
|
||||
UpdateWindow(hWnd);
|
||||
//ShowWindow(hWnd, SW_SHOW);
|
||||
//UpdateWindow(hWnd);
|
||||
|
||||
#endif // !_DEBUG
|
||||
|
||||
|
||||
@@ -17,6 +17,16 @@ CCamera_Model::CCamera_Model(const CCamera_Model& rhs)
|
||||
|
||||
void CCamera_Model::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
_float3 vCamPos = {};
|
||||
_float3 vCamMomentum = {};
|
||||
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
XMStoreFloat3(&vCamMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
#ifdef _DEBUG
|
||||
GUI::Text("Cam_Model Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
|
||||
GUI::Text("v %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
|
||||
#endif // _DEBUG
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_MODEL, false);
|
||||
#endif // _DEBUG
|
||||
@@ -24,13 +34,7 @@ void CCamera_Model::Priority_Update(_float fTimeDelta)
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
|
||||
return;
|
||||
}
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
_float3 vCamPos = {};
|
||||
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
#ifdef _DEBUG
|
||||
GUI::Text("Cam_Model Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
|
||||
#endif // _DEBUG
|
||||
|
||||
__super::Bind_Matrices();
|
||||
}
|
||||
@@ -39,12 +43,15 @@ void CCamera_Model::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
_matrix matBoneSKT = m_pModelCom->Get_BoneMatrix(m_pModelCom->Get_BoneIndex("ctrl_1"));
|
||||
m_pTransformCom->Set_WorldMatrix(matBoneSKT);
|
||||
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CCamera_Model::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Render()
|
||||
@@ -61,24 +68,10 @@ HRESULT CCamera_Model::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
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_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
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;
|
||||
}
|
||||
@@ -103,6 +96,7 @@ HRESULT CCamera_Model::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pModelCom->Set_DisableRootMotionScale(true);
|
||||
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
m_bActive = true;
|
||||
|
||||
@@ -190,6 +184,8 @@ void CCamera_Model::Describe_Entity()
|
||||
{
|
||||
_float3 vPosition = {};
|
||||
GUI::Begin("CameraAnim List");
|
||||
//GUI::Text("%f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
|
||||
for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
|
||||
{
|
||||
if (GUI::Button(m_pModelCom->Get_AnimList(i)))
|
||||
|
||||
@@ -208,19 +208,6 @@ HRESULT CGoblin_Assassin::Render()
|
||||
Render_OutLine();
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
//if (true == m_pCharacter_Controller->IsActive()) {
|
||||
// if (FAILED(m_pCharacter_Controller->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
//else {
|
||||
// if (FAILED(m_pRigidBody->Render())) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
|
||||
if (0.f < m_fDeadRatio) {
|
||||
_bool bDisolve = false;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
@@ -327,7 +314,7 @@ HRESULT CGoblin_Assassin::Render_Shadow(SHADOW eType)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,9 +89,6 @@ HRESULT CInstancedProp::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_iNumMesh = m_pVIBufferInstanceCom->Get_NumMesh();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -107,8 +104,16 @@ HRESULT CInstancedProp::Ready_Components(void* pArg)
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferInstanceCom))))
|
||||
return E_FAIL;
|
||||
|
||||
m_iNumMesh = m_pVIBufferInstanceCom->Get_NumMesh();
|
||||
|
||||
if(pDesc->bEnableRigidbody)
|
||||
{
|
||||
if (FAILED(ReadyForPhysX()))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Laod Instance Data */
|
||||
if(FAILED(Load_InstancedProp(pDesc->strInstanceDataPath.c_str())))
|
||||
if(FAILED(Load_InstancedProp(pDesc->strInstanceDataPath.c_str(), pDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_isShake = pDesc->isShake;
|
||||
@@ -143,7 +148,16 @@ HRESULT CInstancedProp::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp::Load_InstancedProp(const _char* pFilePath)
|
||||
HRESULT CInstancedProp::ReadyForPhysX()
|
||||
{
|
||||
if (FAILED(m_pVIBufferInstanceCom->Ready_PhysXMeshes(NEXT_LEVEL))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp::Load_InstancedProp(const _char* pFilePath, INSTANCE_PROP_DESC* pDesc)
|
||||
{
|
||||
ifstream FileIn(pFilePath, ios::binary);
|
||||
|
||||
@@ -155,19 +169,52 @@ HRESULT CInstancedProp::Load_InstancedProp(const _char* pFilePath)
|
||||
|
||||
vector<_float4x4> WorldMatrices = {};
|
||||
|
||||
_uint iNumWorldMatrix = 0;
|
||||
m_iNumInstacne = 0;
|
||||
|
||||
FileIn.read(reinterpret_cast<char*>(&iNumWorldMatrix), sizeof(_uint));
|
||||
WorldMatrices.reserve(iNumWorldMatrix);
|
||||
FileIn.read(reinterpret_cast<char*>(&m_iNumInstacne), sizeof(_uint));
|
||||
WorldMatrices.reserve(m_iNumInstacne);
|
||||
m_RigidBody.reserve(m_iNumInstacne);
|
||||
|
||||
_float4x4 WorldMatrix = {};
|
||||
|
||||
for (_uint i = 0; i < iNumWorldMatrix; ++i)
|
||||
#pragma region FOR RIGIDBODY
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
|
||||
vector<_wstring> RigidBodyTags;
|
||||
|
||||
|
||||
for (_uint i = 0; i < m_iNumMesh; ++i)
|
||||
{
|
||||
RigidBodyTags.push_back(CMyTools::ToWstring(m_pVIBufferInstanceCom->Get_MeshName(i)) + to_wstring(i));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstacne; ++i)
|
||||
{
|
||||
FileIn.read(reinterpret_cast<char*>(&WorldMatrix), sizeof(_float4x4));
|
||||
|
||||
WorldMatrices.push_back(WorldMatrix);
|
||||
|
||||
if(pDesc->bEnableRigidbody)
|
||||
{
|
||||
for (_uint i = 0; i < m_iNumMesh; ++i)
|
||||
{
|
||||
CRigidBody_Static* pRigidBody = { nullptr };
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
Desc.pMeshName = RigidBodyTags[i].c_str();
|
||||
Desc.pWorldMatrix = &WorldMatrix;
|
||||
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, RigidBodyTags[i], (CComponent**)&pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_RigidBody.push_back(pRigidBody);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
FileIn.close();
|
||||
|
||||
if (FAILED(m_pVIBufferInstanceCom->Load_WorldData(WorldMatrices)))
|
||||
@@ -209,6 +256,11 @@ void CInstancedProp::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pRigidBody : m_RigidBody)
|
||||
{
|
||||
SAFE_RELEASE(pRigidBody);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferInstanceCom);
|
||||
}
|
||||
|
||||
@@ -111,16 +111,22 @@ HRESULT CInstancedProp_Light::Initialize(void* pArg)
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_bEnableRigidbody = pDesc->bEnableRigidbody;
|
||||
m_iGlassMeshIndex = pDesc->iGlassMeshIndex;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
Load_InstancedProp(pDesc->strInstanceDataPath.c_str());
|
||||
|
||||
m_iNumMesh = m_pVIBufferInstanceCom->Get_NumMesh();
|
||||
|
||||
if(m_bEnableRigidbody)
|
||||
{
|
||||
if (FAILED(ReadyForPhysX()))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Load_InstancedProp(pDesc->strInstanceDataPath.c_str())))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -133,7 +139,7 @@ HRESULT CInstancedProp_Light::Ready_Components(void* pArg)
|
||||
INSTANCE_PROP_LIGHT_DESC* pDesc = static_cast<INSTANCE_PROP_LIGHT_DESC*>(pArg);
|
||||
|
||||
/* Com_VIBuffer_Instance_Model */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pDesc->strPrototypeTag,
|
||||
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, pDesc->strPrototypeTag,
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferInstanceCom))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -180,6 +186,15 @@ HRESULT CInstancedProp_Light::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::ReadyForPhysX()
|
||||
{
|
||||
if (FAILED(m_pVIBufferInstanceCom->Ready_PhysXMeshes(NEXT_LEVEL))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Load_InstancedProp(const _char* pFilePath)
|
||||
{
|
||||
ifstream FileIn(pFilePath, ios::binary);
|
||||
@@ -192,18 +207,47 @@ HRESULT CInstancedProp_Light::Load_InstancedProp(const _char* pFilePath)
|
||||
|
||||
vector<_float4x4> WorldMatrices = {};
|
||||
|
||||
_uint iNumWorldMatrix = 0;
|
||||
#pragma region FOR RIGIDBODY
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
|
||||
|
||||
FileIn.read(reinterpret_cast<char*>(&iNumWorldMatrix), sizeof(_uint));
|
||||
WorldMatrices.reserve(iNumWorldMatrix);
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
|
||||
vector<_wstring> RigidBodyTags;
|
||||
|
||||
|
||||
for (_uint i = 0; i < m_iNumMesh; ++i)
|
||||
{
|
||||
RigidBodyTags.push_back(CMyTools::ToWstring(m_pVIBufferInstanceCom->Get_MeshName(i)) + to_wstring(i));
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
FileIn.read(reinterpret_cast<char*>(&m_iNumInstacne), sizeof(_uint));
|
||||
WorldMatrices.reserve(m_iNumInstacne);
|
||||
|
||||
_float4x4 WorldMatrix = {};
|
||||
|
||||
for (_uint i = 0; i < iNumWorldMatrix; ++i)
|
||||
for (_uint i = 0; i < m_iNumInstacne; ++i)
|
||||
{
|
||||
FileIn.read(reinterpret_cast<char*>(&WorldMatrix), sizeof(_float4x4));
|
||||
|
||||
WorldMatrices.push_back(WorldMatrix);
|
||||
|
||||
if (m_bEnableRigidbody)
|
||||
{
|
||||
for (_uint i = 0; i < m_iNumMesh; ++i)
|
||||
{
|
||||
CRigidBody_Static* pRigidBody = { nullptr };
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
Desc.pMeshName = RigidBodyTags[i].c_str();
|
||||
Desc.pWorldMatrix = &WorldMatrix;
|
||||
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, RigidBodyTags[i], (CComponent**)&pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_RigidBody.push_back(pRigidBody);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
FileIn.close();
|
||||
|
||||
@@ -246,6 +290,11 @@ void CInstancedProp_Light::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (auto& pRigidBody : m_RigidBody)
|
||||
{
|
||||
SAFE_RELEASE(pRigidBody);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferInstanceCom);
|
||||
SAFE_RELEASE(m_pGlassTextureCom);
|
||||
|
||||
@@ -449,7 +449,8 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* InstanceProp Oak_Tree*/
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.bEnableRigidbody = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
@@ -459,6 +460,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* BearBerry */
|
||||
Desc.isShake = true;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.6f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A";
|
||||
@@ -469,6 +471,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* SM_HM_OwlPost_Window_A */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -476,6 +479,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
///* WA_Rectangle_Double_A */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -483,6 +487,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
///* WC_Retangle_Double_A */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -490,6 +495,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
///* WA_Square_Double_C */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -497,6 +503,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* Quid_Window_A */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -504,6 +511,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* Ollivanders_Box_Window */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -511,6 +519,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* WC_L_DoubleS_A */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -518,6 +527,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* WC_Round_Double_A */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -525,6 +535,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* SM_HM_Door1a */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = true;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -532,6 +543,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* SM_HM_Door2b */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = true;
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_HOGSMEADE, &Desc)))
|
||||
@@ -539,6 +551,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* OakTree_TallA */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.016f);
|
||||
Desc.vSpeed = _float2(0.01f, 0.1f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA";
|
||||
@@ -548,6 +561,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* Shrub_B */
|
||||
Desc.isShake = true;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Shrub_B";
|
||||
@@ -557,6 +571,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* BogMyrtle_A */
|
||||
Desc.isShake = true;
|
||||
Desc.bEnableRigidbody = false;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A";
|
||||
@@ -566,6 +581,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* Dogwood_B */
|
||||
Desc.isShake = true;
|
||||
Desc.bEnableRigidbody = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B";
|
||||
@@ -575,6 +591,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* ScotsPine_LargeA */
|
||||
Desc.isShake = false;
|
||||
Desc.bEnableRigidbody = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA";
|
||||
@@ -587,6 +604,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* LightPost */
|
||||
LightDesc.isShake = false;
|
||||
LightDesc.bEnableRigidbody = true;
|
||||
LightDesc.iGlassMeshIndex = 0;
|
||||
LightDesc.vRadius = _float2(0.f, 0.f);
|
||||
LightDesc.vSpeed = _float2(0.f, 0.f);
|
||||
@@ -597,6 +615,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
|
||||
/* LightPost_Floating */
|
||||
LightDesc.isShake = false;
|
||||
LightDesc.bEnableRigidbody = true;
|
||||
LightDesc.iGlassMeshIndex = 1;
|
||||
LightDesc.vRadius = _float2(0.f, 0.f);
|
||||
LightDesc.vSpeed = _float2(0.f, 0.f);
|
||||
|
||||
@@ -68,7 +68,7 @@ HRESULT CLight_Main::Capture_PreShadow()
|
||||
vector<_float3> vNeededPos = {};
|
||||
vNeededPos.reserve(12);
|
||||
{
|
||||
// 외곽이 더 많아지면 많아질수록 더 정밀한 경계가 가능
|
||||
// 외곽이 더 많아지면 많아질수록 더 정밀한 경계가 가능함
|
||||
// 하지만 더 실제보다 멀리 외곽을 두르면 필요한 것보다 더 많이 찍게 됨
|
||||
// 결국 딱 맞춰서 찍는게 제일 중요함
|
||||
vNeededPos.emplace_back(_float3(-112.f, 155.f, 362.f));
|
||||
@@ -97,7 +97,13 @@ HRESULT CLight_Main::Capture_PreShadow()
|
||||
HRESULT CLight_Main::Ready_Components(void* pArg)
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
m_pTransformCom->Rotation(60.f, 0.f, 0.f);
|
||||
|
||||
_matrix LIGHT_WorldMatrixDoNotModify =
|
||||
_matrix(0.819145918f, 0.f, -0.573572040f, 0.f,
|
||||
0.553958654f, 0.258784860f, 0.791134834f, 0.f
|
||||
, 0.148416296f, -0.965690017f, 0.211960629f, 0.f
|
||||
, 0.f, 0.f, 0.f, 1.f);
|
||||
m_pTransformCom->Set_WorldMatrix(LIGHT_WorldMatrixDoNotModify);
|
||||
|
||||
LIGHT_DESC* pLightDescArg = static_cast<LIGHT_DESC*>(pArg);
|
||||
|
||||
|
||||
@@ -2068,7 +2068,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Camera_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity())))) {
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationX(XMConvertToRadians(-90.f)) * XMMatrixIdentity())))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -2861,12 +2861,21 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
#pragma region MAP_INSTANCE
|
||||
|
||||
_string strMaterailPath = "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml";
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin",
|
||||
"../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_MedA.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"),
|
||||
@@ -2924,22 +2933,43 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door1a.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Shrub_B*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Shrub_B"),
|
||||
@@ -2954,28 +2984,56 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_Dogwood_B.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_Dogwood_B.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_ScotsPine_LargeA_Master.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_ScotsPine_LargeA_Master.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_LightPost */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_LightPost"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_LightPost.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_LightPost.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_LightPost"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Light_Post_Floating */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Light_Post_Floating"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Light_Post_Floating.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
{
|
||||
CVIBuffer_Model_Instance* pModel_Instance = CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_HM_Light_Post_Floating.bin", strMaterailPath.c_str());
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Light_Post_Floating"),
|
||||
pModel_Instance)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_RigidBody_Static(pModel_Instance)))
|
||||
return E_FAIL;
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
/* For.Prototype_Component_South_Hogwart_Land_LOD1 */
|
||||
@@ -3599,6 +3657,30 @@ void CLoader::Ready_MapModels(vector<future<vector<FOLDER_LOAD*>*>>& jobMapModel
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLoader::Ready_RigidBody_Static(CVIBuffer_Model_Instance* pModel_Instance)
|
||||
{
|
||||
_uint iNumMesh = pModel_Instance->Get_NumMesh();
|
||||
for (_uint i = 0; i < iNumMesh; ++i)
|
||||
{
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_PROTOTYPEDESC Desc{}; //
|
||||
{
|
||||
Desc.eType = ACTOR::TRIANGLEMESH;
|
||||
Desc.ePxRigidBodyFlags = {};
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
|
||||
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
Desc.fContactOffset = 0.001f;
|
||||
}
|
||||
CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(NEXT_LEVEL, CMyTools::ToWstring(pModel_Instance->Get_MeshName(i) + to_string(i)), pRigid))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID)
|
||||
{
|
||||
CLoader* pInstance = new CLoader(pDevice, pContext);
|
||||
|
||||
@@ -181,6 +181,7 @@ void CMapElement_Static::ConvertToPhysX()
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
Desc.pMeshName = wstrName.c_str();
|
||||
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
|
||||
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&pRigidBody, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -188,6 +188,7 @@ void CMapObject_Collision::ConvertToPhysX()
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
Desc.pMeshName = wstrName.c_str();
|
||||
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
|
||||
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&pRigidBody, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -187,6 +187,7 @@ void CMapObject_Render::ConvertToPhysX()
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
Desc.pMeshName = wstrName.c_str();
|
||||
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
|
||||
if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, wstrName, (CComponent**)&pRigidBody, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ HRESULT CNPC_EleazarFig::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ HRESULT CNPC_Ollivander::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -345,10 +345,13 @@ HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (i == ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)){
|
||||
#ifdef 기무리
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW_LEGACY)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // 기무리
|
||||
}
|
||||
else {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
@@ -543,6 +546,8 @@ HRESULT CPlayer::Ready_Parts()
|
||||
|
||||
//m_pModelCom->Play_Animation()
|
||||
//XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("broomSocket"));
|
||||
#ifdef 기무리
|
||||
|
||||
{
|
||||
CPlayerRobe::PlayerRobe_DESC Desc{};
|
||||
Desc.pModel = m_pModelCom;
|
||||
@@ -553,6 +558,8 @@ HRESULT CPlayer::Ready_Parts()
|
||||
}
|
||||
}
|
||||
|
||||
#endif // 기무리
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -619,7 +626,8 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
fMixerFactor = 0.658333f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
|
||||
case PLAYER_MESH_ORDER::ROBE_CLOTH:
|
||||
{
|
||||
CMesh* pMesh = m_pModelCom->Get_Mesh(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
|
||||
@@ -662,7 +670,7 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif // _DEBUG
|
||||
#endif // 기무리
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -29,7 +29,7 @@ void CPlayerRobe::Update(_float fTimeDelta)
|
||||
XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr());
|
||||
|
||||
m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false);
|
||||
m_pRobeMainAnchor->Get_Actor()->wakeUp();
|
||||
//m_pRobeMainAnchor->Get_Actor()->wakeUp();
|
||||
|
||||
Update_LegsPosition();
|
||||
Update_RobeSocketPosition();
|
||||
|
||||
@@ -234,7 +234,7 @@ HRESULT CRanrok::Render_Shadow(SHADOW eType)
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::SHADOW)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
|
||||
Desc.pMeshName = pDesc->strRigidBody_MeshName.c_str();
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
|
||||
/* Com_RigidBody */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pDesc->strRigidBody_ComponentTag,
|
||||
reinterpret_cast<CComponent**>(&m_pRigidBody), &Desc))) {
|
||||
|
||||
@@ -333,7 +333,7 @@ HRESULT CTroll::Render_Shadow(SHADOW eType)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_NPC_PBR_ANIM::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,11 +16,12 @@ class CInstancedProp final : public CGameObject
|
||||
public:
|
||||
typedef struct tagInstancedPropDesc
|
||||
{
|
||||
_bool isShake;
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
_wstring strPrototypeTag;
|
||||
_string strInstanceDataPath;
|
||||
_bool isShake;
|
||||
_bool bEnableRigidbody;
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
_wstring strPrototypeTag;
|
||||
_string strInstanceDataPath;
|
||||
}INSTANCE_PROP_DESC;
|
||||
private:
|
||||
CInstancedProp(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -37,7 +38,9 @@ class CInstancedProp final : public CGameObject
|
||||
private:
|
||||
_bool m_isShake = {};
|
||||
_uint m_iNumMesh = {};
|
||||
_uint m_iNumInstacne = {};
|
||||
|
||||
vector<CRigidBody_Static*> m_RigidBody = { nullptr };
|
||||
CVIBuffer_Model_Instance* m_pVIBufferInstanceCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
@@ -47,12 +50,14 @@ class CInstancedProp final : public CGameObject
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
HRESULT Load_InstancedProp(const _char* pFilePath);
|
||||
HRESULT ReadyForPhysX();
|
||||
HRESULT Load_InstancedProp(const _char* pFilePath, INSTANCE_PROP_DESC* pDesc);
|
||||
|
||||
public:
|
||||
static CInstancedProp* 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
|
||||
|
||||
@@ -17,12 +17,14 @@ class CInstancedProp_Light final : public CGameObject
|
||||
typedef struct tagInstancedPropLightDesc
|
||||
{
|
||||
_bool isShake;
|
||||
_bool bEnableRigidbody;
|
||||
_uint iGlassMeshIndex{};
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
_wstring strPrototypeTag;
|
||||
_string strInstanceDataPath;
|
||||
_string strInstanceDataPath;
|
||||
}INSTANCE_PROP_LIGHT_DESC;
|
||||
|
||||
private:
|
||||
CInstancedProp_Light(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CInstancedProp_Light(const CInstancedProp_Light& rhs);
|
||||
@@ -35,23 +37,25 @@ class CInstancedProp_Light final : public CGameObject
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Bloom() override;
|
||||
|
||||
|
||||
private:
|
||||
_bool m_bLightOn = { true };
|
||||
_bool m_bEnableRigidbody = { };
|
||||
|
||||
_uint m_iNumMesh = {};
|
||||
_uint m_iNumInstacne = {};
|
||||
_uint m_iGlassMeshIndex = {};
|
||||
|
||||
_float m_fGlassRatio = { 0.5f };
|
||||
_float m_fBloomStrength = { 15.f };
|
||||
|
||||
CVIBuffer_Model_Instance* m_pVIBufferInstanceCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
|
||||
CTexture* m_pGlassTextureCom = { nullptr };
|
||||
CTexture* m_pMaskTextureCom = { nullptr };
|
||||
CTexture* m_pEmissiveTextureCom = { nullptr };
|
||||
|
||||
_uint m_iNumMesh = {};
|
||||
_uint m_iGlassMeshIndex = {};
|
||||
|
||||
_float m_fGlassRatio = { 0.5f };
|
||||
_float m_fBloomStrength = { 15.f };
|
||||
|
||||
|
||||
vector<CRigidBody_Static*> m_RigidBody = { nullptr };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
@@ -59,12 +63,14 @@ class CInstancedProp_Light final : public CGameObject
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
HRESULT ReadyForPhysX();
|
||||
HRESULT Load_InstancedProp(const _char* pFilePath);
|
||||
|
||||
public:
|
||||
static CInstancedProp_Light* 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
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
NS_BEGIN(Engine)
|
||||
class CGameInstance;
|
||||
class CModel;
|
||||
class CVIBuffer_Model_Instance;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
@@ -43,6 +44,7 @@ class CLoader final : public CBase
|
||||
future<vector<FOLDER_LOAD*>*> Deferred_FolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag);
|
||||
future<pair<_wstring, CModel*>*> Deferred_ModelLoad(MODEL eType, const _char* pDirectoryPath, _fmatrix PreTransform, const _tchar* pPrototypeTag);
|
||||
void Ready_MapModels(vector<future<vector<FOLDER_LOAD*>*>>& jobMapModels);
|
||||
HRESULT Ready_RigidBody_Static(CVIBuffer_Model_Instance* pModel_Instance);
|
||||
|
||||
public:
|
||||
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
|
||||
|
||||
Binary file not shown.
@@ -231,7 +231,11 @@ struct PS_OUT_FLT4_DOUBLE
|
||||
struct PS_OUT_BLUR_X
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
struct PS_OUT_BLUR_X_ENV
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
float fBlurWeight : SV_TARGET1;
|
||||
};
|
||||
struct PS_OUT_SSAO_AMBIENT_OCCLUSION
|
||||
{
|
||||
@@ -956,13 +960,12 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
Out.vBlurWeight = 0.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
PS_OUT_BLUR_X_ENV PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
{
|
||||
PS_OUT_BLUR_X Out;
|
||||
PS_OUT_BLUR_X_ENV Out;
|
||||
|
||||
float4 vDepthDesc = float4(0.f, 0.f, 0.f, 1.f);
|
||||
float3 vColor = float3(0.f, 0.f, 0.f);
|
||||
@@ -979,7 +982,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
if (false == AlmostEqual3(vCenter.a, fTerrain))
|
||||
{ // 터레인셀이 아니면 스킵
|
||||
Out.vBlurX = vOriginal;
|
||||
Out.vBlurWeight = 0.0f;
|
||||
Out.fBlurWeight = 0.f;
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -994,7 +997,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
if (fBlurAmount <= FLT_EPSILON3) {
|
||||
// 최소치 이내면 블러 안함
|
||||
Out.vBlurX = vOriginal;
|
||||
Out.vBlurWeight = 0.0f;
|
||||
Out.fBlurWeight = 0.f;
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -1024,7 +1027,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
if (fAcc <= FLT_EPSILON3)
|
||||
{ // 블러 실패하면 원본값 씀
|
||||
Out.vBlurX = vOriginal;
|
||||
Out.vBlurWeight = 0.0f;
|
||||
Out.fBlurWeight = 0.f;
|
||||
return Out;
|
||||
}
|
||||
else
|
||||
@@ -1046,7 +1049,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
float3 vFinalColor = lerp(vOriginal.rgb, vBlurAdjusted, fBlendAmount);
|
||||
|
||||
Out.vBlurX = float4(vColor, fOriginalAlpha);
|
||||
Out.vBlurWeight = fAcc;
|
||||
Out.fBlurWeight = fAcc;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1157,7 +1160,6 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_Y(PS_IN In)
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
Out.vBlurWeight = 0.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -205,8 +205,8 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
||||
matrix BoneMatrix = (matrix) 0;
|
||||
matrix TempBoneMatrix = (matrix) 0;
|
||||
|
||||
int MinIdx = 30;
|
||||
int MaxIdx = 41;
|
||||
uint MinIdx = 30;
|
||||
uint MaxIdx = 41;
|
||||
|
||||
if (idx.x >= MinIdx && idx.x <= MaxIdx)
|
||||
//g_RobeBoneMask[idx.x] == 1)
|
||||
@@ -412,8 +412,8 @@ VS_OUT_SHADOW VS_MAIN_SHADOW_LEGACY(VS_IN In)
|
||||
matrix BoneMatrix = (matrix) 0;
|
||||
matrix TempBoneMatrix = (matrix) 0;
|
||||
|
||||
int MinIdx = 30;
|
||||
int MaxIdx = 41;
|
||||
uint MinIdx = 30;
|
||||
uint MaxIdx = 41;
|
||||
|
||||
if (idx.x >= MinIdx && idx.x <= MaxIdx)
|
||||
//g_RobeBoneMask[idx.x] == 1)
|
||||
|
||||
@@ -127,8 +127,6 @@ HRESULT CInstancedProp::Ready_Components(void* pArg)
|
||||
reinterpret_cast<CComponent**>(&m_pVIBufferInstanceCom))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
/* Com_Shader */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_INSTANCE_PROP_MODEL,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom))))
|
||||
|
||||
@@ -68,9 +68,9 @@ HRESULT CLevel_MapViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/*if (FAILED(Ready_Layer_InstanceProp(TEXT("Layer_InstanceProp")))) {
|
||||
if (FAILED(Ready_Layer_InstanceProp(TEXT("Layer_InstanceProp")))) {
|
||||
return E_FAIL;
|
||||
}*/
|
||||
}
|
||||
|
||||
//if (FAILED(Ready_Layer_BuildingContainer(TEXT("Layer_Building")))) {
|
||||
// return E_FAIL;
|
||||
@@ -148,7 +148,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_Terrain(const _wstring& strLayerTag)
|
||||
CTerrain::TERRAIN_DESC Desc = {};
|
||||
|
||||
///* Hogsmeade */
|
||||
Desc.isEdit = false;
|
||||
Desc.isEdit = true;
|
||||
Desc.iAlphaSizeX = 2048;
|
||||
Desc.iAlphaSizeY = 2048;
|
||||
Desc.vPosition = _float3(-194, 18.5f, -153.f);
|
||||
@@ -427,27 +427,27 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
CInstancedProp_Light::INSTANCE_PROP_LIGHT_DESC LightDesc = {};
|
||||
|
||||
///* LightPost */
|
||||
//LightDesc.bEditMode = false;
|
||||
//LightDesc.isShake = false;
|
||||
//LightDesc.iGlassMeshIndex = 0;
|
||||
//LightDesc.vRadius = _float2(0.f, 0.f);
|
||||
//LightDesc.vSpeed = _float2(0.f, 0.f);
|
||||
//LightDesc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_LightPost";
|
||||
//LightDesc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Light_Post_Floating.bin";
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp_Light>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &LightDesc)))
|
||||
// return E_FAIL;
|
||||
/* LightPost */
|
||||
LightDesc.bEditMode = false;
|
||||
LightDesc.isShake = false;
|
||||
LightDesc.iGlassMeshIndex = 0;
|
||||
LightDesc.vRadius = _float2(0.f, 0.f);
|
||||
LightDesc.vSpeed = _float2(0.f, 0.f);
|
||||
LightDesc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_LightPost";
|
||||
LightDesc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/LightPost.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp_Light>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &LightDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
///* LightPost_Floating */
|
||||
//LightDesc.bEditMode = false;
|
||||
//LightDesc.isShake = false;
|
||||
//LightDesc.iGlassMeshIndex = 1;
|
||||
//LightDesc.vRadius = _float2(0.f, 0.f);
|
||||
//LightDesc.vSpeed = _float2(0.f, 0.f);
|
||||
//LightDesc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Light_Post_Floating";
|
||||
//LightDesc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/LightPost.bin";
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp_Light>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &LightDesc)))
|
||||
// return E_FAIL;
|
||||
/* LightPost_Floating */
|
||||
LightDesc.bEditMode = false;
|
||||
LightDesc.isShake = false;
|
||||
LightDesc.iGlassMeshIndex = 1;
|
||||
LightDesc.vRadius = _float2(0.f, 0.f);
|
||||
LightDesc.vSpeed = _float2(0.f, 0.f);
|
||||
LightDesc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Light_Post_Floating";
|
||||
LightDesc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Light_Post_Floating.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp_Light>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &LightDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2952,7 +2952,7 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
#pragma endregion
|
||||
|
||||
_bool bLoadHogsmeade = false;
|
||||
_bool bLoadHogsmeade = true;
|
||||
if (bLoadHogsmeade)
|
||||
{
|
||||
#pragma region HOGSMEADE_OBJECT
|
||||
@@ -3342,7 +3342,7 @@ vector<future<void>> jobFutures;
|
||||
_uint iLoadCount = 44;
|
||||
vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
|
||||
_bool isLoad_Map = { false };
|
||||
_bool isLoad_Map = { true };
|
||||
if(isLoad_Map)
|
||||
{
|
||||
{ /* Terrain */
|
||||
|
||||
@@ -183,10 +183,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_GerboldOlivander_Model")
|
||||
));
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Camera_Model")
|
||||
));
|
||||
//futures.emplace_back(Deferred_ModelLoad(
|
||||
// MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity(),
|
||||
// TEXT("Prototype_Component_Camera_Model")
|
||||
//));
|
||||
|
||||
//futures.emplace_back(Deferred_ModelLoad(
|
||||
// MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera_Spell.fbx", XMMatrixIdentity(),
|
||||
@@ -202,6 +202,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Camera_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Playable_Model")
|
||||
|
||||
@@ -407,7 +407,7 @@ void CMapObject_LOD::Describe_Entity()
|
||||
_wstring dest = CMyTools::ToWstring(m_pModelComs[iModelIndex]->Get_MeshName(iMeshIndex) + to_string(iMeshIndex)).c_str();
|
||||
Desc.pMeshName = dest.c_str();
|
||||
Desc.iSubKind = 998;
|
||||
|
||||
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, Desc.pMeshName, nullptr, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -65,9 +65,9 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
|
||||
|
||||
m_iContainerObjectIndex = 99;
|
||||
|
||||
/*if (FAILED(Load_MapData("Hogsmeade_MapContainer_Data", LAYER_HOGSMEADE)))
|
||||
if (FAILED(Load_MapData("Hogsmeade_MapContainer_Data", LAYER_HOGSMEADE)))
|
||||
return E_FAIL;
|
||||
*/
|
||||
|
||||
|
||||
//m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object<CBuildingContainer>();
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
|
||||
Desc.pMeshName = TEXT("Hogsmeade_HeightMap");
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
|
||||
Desc.pWorldMatrix = m_pTransformCom->Get_WorldMatrixPtr();
|
||||
/* Com_RigidBody */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"),
|
||||
reinterpret_cast<CComponent**>(&m_pRigidBody), &Desc))) {
|
||||
@@ -305,36 +306,35 @@ void CTerrain::Describe_Entity()
|
||||
GUI::Begin("Terrain");
|
||||
|
||||
#pragma region ALPHA_MAP
|
||||
GUI::InputInt("Color", &m_iColorIndex);
|
||||
m_iColorIndex = max(0, min(4, m_iColorIndex));
|
||||
//GUI::InputInt("Color", &m_iColorIndex);
|
||||
//m_iColorIndex = max(0, min(4, m_iColorIndex));
|
||||
|
||||
GUI::InputInt("Rnage", (_int*)(&m_iMaskRange));
|
||||
GUI::DragFloat("Value", &m_fMaskValue, 0.01f, -1.0f, 1.f);
|
||||
if (GUI::Button("Save", ImVec2(100.f, 30.f)))
|
||||
{
|
||||
m_pAlphaMap->Save_ToFile("Hogwart_AlphaMap.bin");
|
||||
}
|
||||
if (GUI::Button("Load", ImVec2(100.f, 30.f)))
|
||||
{
|
||||
m_pAlphaMap->Load_ToFile("Hogwart_AlphaMap.bin");
|
||||
}
|
||||
//GUI::DragFloat("Value", &m_fMaskValue, 0.01f, -1.0f, 1.f);
|
||||
//if (GUI::Button("Save", ImVec2(100.f, 30.f)))
|
||||
//{
|
||||
// m_pAlphaMap->Save_ToFile("Hogwart_AlphaMap.bin");
|
||||
//}
|
||||
//if (GUI::Button("Load", ImVec2(100.f, 30.f)))
|
||||
//{
|
||||
// m_pAlphaMap->Load_ToFile("Hogwart_AlphaMap.bin");
|
||||
//}
|
||||
|
||||
m_iMaskRange = max(1, m_iMaskRange);
|
||||
GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f);
|
||||
m_iMaskRange = max(0, m_iMaskRange);
|
||||
GUI::InputFloat("Up Value", &m_fUpValue, 0.001f, 0.1f);
|
||||
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
{
|
||||
if (m_pGameInstance->isPicking(&m_vPickingPosition))
|
||||
{
|
||||
//if (m_pGameInstance->Key_Pressing(DIK_PERIOD))
|
||||
// m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue, m_vPickingPosition, m_iMaskRange);
|
||||
//if (m_pGameInstance->Key_Pressing(DIK_COMMA))
|
||||
// m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue * -1.f, m_vPickingPosition, m_iMaskRange);
|
||||
if (m_pGameInstance->Key_Pressing(DIK_PERIOD))
|
||||
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue, m_vPickingPosition, m_iMaskRange);
|
||||
if (m_pGameInstance->Key_Pressing(DIK_COMMA))
|
||||
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue * -1.f, m_vPickingPosition, m_iMaskRange);
|
||||
|
||||
|
||||
XMStoreFloat3(&m_vPickingPosition, XMVector3TransformCoord(XMLoadFloat3(&m_vPickingPosition), m_pTransformCom->Get_WorldMatrixInv()));
|
||||
if(m_pGameInstance->Key_Pressing(DIK_M))
|
||||
m_pAlphaMap->Update(m_vPickingPosition, m_iColorIndex, m_fMaskValue, m_iMaskRange);
|
||||
//XMStoreFloat3(&m_vPickingPosition, XMVector3TransformCoord(XMLoadFloat3(&m_vPickingPosition), m_pTransformCom->Get_WorldMatrixInv()));
|
||||
//if(m_pGameInstance->Key_Pressing(DIK_M))
|
||||
// m_pAlphaMap->Update(m_vPickingPosition, m_iColorIndex, m_fMaskValue, m_iMaskRange);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -343,9 +343,9 @@ void CTerrain::Describe_Entity()
|
||||
#pragma region HEIGHT MAP
|
||||
HRESULT hr = {};
|
||||
if(GUI::Button("Save HeightMap"))
|
||||
hr = m_pVIBufferCom->Save_HeightMap("Hogwart_HeightMap.bin");
|
||||
hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap.bin");
|
||||
if(GUI::Button("Load HeightMap"))
|
||||
hr = m_pVIBufferCom->Load_HeightMap("Hogwart_HeightMap.bin");
|
||||
hr = m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin");
|
||||
#pragma endregion
|
||||
|
||||
_float4 vPos = {};
|
||||
|
||||
@@ -17,6 +17,7 @@ class CInstancedProp final : public CGameObject
|
||||
typedef struct tagInstancedPropDesc
|
||||
{
|
||||
_bool bEditMode{};
|
||||
_bool isAddCollider{};
|
||||
_bool isShake;
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
|
||||
@@ -231,7 +231,11 @@ struct PS_OUT_FLT4_DOUBLE
|
||||
struct PS_OUT_BLUR_X
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
struct PS_OUT_BLUR_X_ENV
|
||||
{
|
||||
float4 vBlurX : SV_TARGET0;
|
||||
float fBlurWeight : SV_TARGET1;
|
||||
};
|
||||
struct PS_OUT_SSAO_AMBIENT_OCCLUSION
|
||||
{
|
||||
@@ -956,13 +960,12 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
Out.vBlurWeight = 0.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
PS_OUT_BLUR_X_ENV PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
{
|
||||
PS_OUT_BLUR_X Out;
|
||||
PS_OUT_BLUR_X_ENV Out;
|
||||
|
||||
float4 vDepthDesc = float4(0.f, 0.f, 0.f, 1.f);
|
||||
float3 vColor = float3(0.f, 0.f, 0.f);
|
||||
@@ -979,7 +982,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
if (false == AlmostEqual3(vCenter.a, fTerrain))
|
||||
{ // 터레인셀이 아니면 스킵
|
||||
Out.vBlurX = vOriginal;
|
||||
Out.vBlurWeight = 0.0f;
|
||||
Out.fBlurWeight = 0.f;
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -994,7 +997,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
if (fBlurAmount <= FLT_EPSILON3) {
|
||||
// 최소치 이내면 블러 안함
|
||||
Out.vBlurX = vOriginal;
|
||||
Out.vBlurWeight = 0.0f;
|
||||
Out.fBlurWeight = 0.f;
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -1024,7 +1027,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
if (fAcc <= FLT_EPSILON3)
|
||||
{ // 블러 실패하면 원본값 씀
|
||||
Out.vBlurX = vOriginal;
|
||||
Out.vBlurWeight = 0.0f;
|
||||
Out.fBlurWeight = 0.f;
|
||||
return Out;
|
||||
}
|
||||
else
|
||||
@@ -1046,7 +1049,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
float3 vFinalColor = lerp(vOriginal.rgb, vBlurAdjusted, fBlendAmount);
|
||||
|
||||
Out.vBlurX = float4(vColor, fOriginalAlpha);
|
||||
Out.vBlurWeight = fAcc;
|
||||
Out.fBlurWeight = fAcc;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1157,7 +1160,6 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_Y(PS_IN In)
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
Out.vBlurWeight = 0.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -1065,6 +1065,10 @@ PSX::PxRigidStatic* CGameInstance::Add_StaticActor(CRigidBody_Static& RigidBody,
|
||||
{
|
||||
return m_pPhysX_Manager->Add_StaticActor(RigidBody, iLevel);
|
||||
}
|
||||
PSX::PxRigidStatic* CGameInstance::Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel, const _float4x4* pWorldMatrix)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_StaticActor(RigidBody, iLevel, pWorldMatrix);
|
||||
}
|
||||
PSX::PxJoint* CGameInstance::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_PxJoint(eType, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1);
|
||||
|
||||
@@ -72,7 +72,6 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody
|
||||
_matrix WorldMatrix = RigidBody.Get_TransformPtr()->Get_XMWorldMatrix();
|
||||
PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScaleNoFlip(WorldMatrix);
|
||||
|
||||
|
||||
// PxRigidStatic 씬의 정적 바디 인터페이스
|
||||
PSX::PxRigidStatic* pActorStatic = m_pPhysics->createRigidStatic(pxWorldMatrix);
|
||||
PSX::PxShape* pShape = { nullptr };
|
||||
@@ -146,6 +145,85 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody
|
||||
return pActorStatic;
|
||||
}
|
||||
|
||||
PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel, const _float4x4* pWorldMatrix)
|
||||
{
|
||||
_matrix WorldMatrix = XMLoadFloat4x4(pWorldMatrix);
|
||||
|
||||
PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScaleNoFlip(WorldMatrix);
|
||||
|
||||
// PxRigidStatic 씬의 정적 바디 인터페이스
|
||||
PSX::PxRigidStatic* pActorStatic = m_pPhysics->createRigidStatic(pxWorldMatrix);
|
||||
PSX::PxShape* pShape = { nullptr };
|
||||
PSX::PxGeometry* pGeometry = { nullptr };
|
||||
|
||||
switch (RigidBody.Get_Type())
|
||||
{
|
||||
case ACTOR::PLANE:
|
||||
break;
|
||||
case ACTOR::TRIANGLEMESH:
|
||||
{ // SetUp Geometry
|
||||
PSX::PxTriangleMesh* pPxMesh = Find_TriangleMesh(RigidBody.Get_PxMeshKey(), iLevel);
|
||||
PSX::PxTriangleMeshGeometry* pPxMeshGeometry = { nullptr };
|
||||
|
||||
_vector vPos, vRotq, vScale;
|
||||
XMMatrixDecompose(&vScale, &vRotq, &vPos, WorldMatrix);
|
||||
vRotq = XMQuaternionNormalize(vRotq);
|
||||
|
||||
PSX::PxTransform out;
|
||||
XMStoreFloat3((_float3*)&out.p, vPos);
|
||||
XMStoreFloat4((_float4*)&out.q, vRotq);
|
||||
PSX::PxMeshScale meshScale(
|
||||
PSX::PxVec3(fabsf(vScale.m128_f32[0]), fabsf(vScale.m128_f32[1]), fabsf(vScale.m128_f32[2])),
|
||||
PSX::PxQuat(PSX::PxIdentity) // 스케일 축은 로컬 기준
|
||||
);
|
||||
pPxMeshGeometry = new PSX::PxTriangleMeshGeometry(pPxMesh, meshScale);
|
||||
|
||||
// GeoFlag 중 더블사이드는 이제 지원 안함, 할거면 노말 뒤집어서 하라고 함
|
||||
// pPxMeshGeometry->meshFlags |= PSX::PxMeshGeometryFlag::eDOUBLE_SIDED;
|
||||
// 유효성 체크
|
||||
PX_ASSERT(pPxMeshGeometry->isValid());
|
||||
pGeometry = pPxMeshGeometry;
|
||||
_bool bEmplaceSuccess = m_TriangleMeshGeometry[iLevel].emplace(RigidBody.Get_PxMeshKey(), pPxMeshGeometry).second;
|
||||
if (false == bEmplaceSuccess) {
|
||||
Safe_Delete(pPxMeshGeometry);
|
||||
pGeometry = (*m_TriangleMeshGeometry[iLevel].find(RigidBody.Get_PxMeshKey())).second;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTOR::HEIGHTFIELD:
|
||||
{ // SetUp HeightField
|
||||
PSX::PxHeightField* pHeightField = Find_HeightField(RigidBody.Get_PxMeshKey(), iLevel);
|
||||
PSX::PxHeightFieldGeometry* pPxHeightGeometry = new PSX::PxHeightFieldGeometry(pHeightField);
|
||||
pPxHeightGeometry->heightScale = 0.01f/* 기본 정밀도 100배 0.01 -> 1cm, 1 -> 1m */;
|
||||
|
||||
// 유효성 체크
|
||||
PX_ASSERT(pPxHeightGeometry->isValid());
|
||||
pGeometry = pPxHeightGeometry;
|
||||
_bool bEmplaceSuccess = m_HeightFieldGeometry[iLevel].emplace(RigidBody.Get_PxMeshKey(), pPxHeightGeometry).second;
|
||||
if (false == bEmplaceSuccess) {
|
||||
Safe_Delete(pPxHeightGeometry);
|
||||
pGeometry = (*m_HeightFieldGeometry[iLevel].find(RigidBody.Get_PxMeshKey())).second;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorStatic, *pGeometry, *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
|
||||
pShape->setFlags(RigidBody.Get_ShapeFlags());
|
||||
pShape->setContactOffset(RigidBody.Get_ContactOffset());
|
||||
pShape->setRestOffset(0.f);
|
||||
|
||||
m_pRestBodies[iLevel].insert(pActorStatic);
|
||||
ApplyFilterData(pActorStatic);
|
||||
Attach_Actor(*pActorStatic, iLevel);
|
||||
|
||||
return pActorStatic;
|
||||
}
|
||||
|
||||
PSX::PxJoint* CPhysX_Manager::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1)
|
||||
{
|
||||
PSX::PxJoint* pOut = { nullptr };
|
||||
@@ -233,6 +311,9 @@ _bool CPhysX_Manager::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir
|
||||
|
||||
_bool CPhysX_Manager::SphereCast(_float fRadius, _fvector _vStartPos, _gvector _vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
{
|
||||
if (fDistance < FLT_EPSILON3) {
|
||||
return false;
|
||||
}
|
||||
_float3 vDir = {};
|
||||
_float3 vStartPos = {};
|
||||
|
||||
@@ -766,6 +847,7 @@ HRESULT CPhysX_Manager::Initialize(_uint iLevel)
|
||||
PxInitExtensions(*m_pPhysics, m_pPvd);
|
||||
|
||||
m_pCookingParam = new PSX::PxCookingParams(m_pPhysics->getTolerancesScale());
|
||||
m_pCookingParam->meshWeldTolerance = FLT_EPSILON3;
|
||||
m_pCookingParam->meshPreprocessParams |= PSX::PxMeshPreprocessingFlag::eWELD_VERTICES;
|
||||
PSX::PxSceneDesc sceneDesc = { m_pPhysics->getTolerancesScale() };
|
||||
|
||||
|
||||
@@ -516,6 +516,24 @@ HRESULT CRenderTarget_Manager::Finish_RenderTarget(CVIBuffer_Rect* pVIBuffer, CS
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRenderTarget_Manager::Flush_All_SRVs(_uint iStartSlot, _uint numSlots)
|
||||
{
|
||||
ID3D11ShaderResourceView* nullSrvs[D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT] = {};
|
||||
|
||||
m_pContext->VSSetShaderResources(iStartSlot, numSlots, nullSrvs);
|
||||
m_pContext->PSSetShaderResources(iStartSlot, numSlots, nullSrvs);
|
||||
m_pContext->GSSetShaderResources(iStartSlot, numSlots, nullSrvs);
|
||||
m_pContext->HSSetShaderResources(iStartSlot, numSlots, nullSrvs);
|
||||
m_pContext->DSSetShaderResources(iStartSlot, numSlots, nullSrvs);
|
||||
m_pContext->CSSetShaderResources(iStartSlot, numSlots, nullSrvs);
|
||||
}
|
||||
|
||||
void CRenderTarget_Manager::Flush_All_CSUAVs(_uint iStartSlot, _uint numSlots)
|
||||
{
|
||||
ID3D11UnorderedAccessView* nullUavs[D3D11_PS_CS_UAV_REGISTER_COUNT] = {};
|
||||
m_pContext->CSSetUnorderedAccessViews(iStartSlot, numSlots, nullUavs, nullptr);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CRenderTarget_Manager::End_MRT()
|
||||
{
|
||||
@@ -525,7 +543,8 @@ HRESULT CRenderTarget_Manager::End_MRT()
|
||||
|
||||
SAFE_RELEASE(m_pBackBufferRTV);
|
||||
SAFE_RELEASE(m_pOriginalDSV);
|
||||
|
||||
Flush_All_SRVs();
|
||||
Flush_All_CSUAVs();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -572,23 +572,33 @@ void CRenderer::Render_Fog()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::FOG));
|
||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::PRINT_BACKBUFFER));
|
||||
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
m_pVIBuffer->Render();
|
||||
|
||||
|
||||
{ // BackBuffer
|
||||
ID3D11Texture2D* pBackBuffer = nullptr;
|
||||
m_pGameInstance->Get_BackBufferPTR(&pBackBuffer);
|
||||
m_pGameInstance->Copy_RenderTargetFrom(TEXT("Target_Fog"), pBackBuffer);
|
||||
SAFE_RELEASE(pBackBuffer);
|
||||
}
|
||||
|
||||
m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
|
||||
m_pShader->Bind_RawValue("g_fDepthPackExponent", m_pGameInstance->Get_DepthPackExponentPtr(), sizeof(_float));
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_FogValue(m_pShader))) { // 여기서 포그에서 쓰는 상수들 바인딩 해줌
|
||||
assert(false);
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShader, "g_DepthTexture"))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Fog"), m_pShader, "g_OriginalTexture"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::PRINT_BACKBUFFER));
|
||||
if (FAILED(m_pShader->Bind_SRV("g_VolumeTexture", m_pGameInstance->Get_VolumeSRV())))
|
||||
return;
|
||||
|
||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::FOG));
|
||||
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
m_pVIBuffer->Render();
|
||||
@@ -653,8 +663,11 @@ void CRenderer::Render_NonLight()
|
||||
m_eType = RENDER::NONLIGHT;
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::NONLIGHT)])
|
||||
{
|
||||
if (nullptr != pRenderObject)
|
||||
pRenderObject->Render();
|
||||
if (nullptr != pRenderObject){
|
||||
if (FAILED(pRenderObject->Render())) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
SAFE_RELEASE(pRenderObject);
|
||||
}
|
||||
|
||||
@@ -276,6 +276,9 @@ void CRigidBody_Dynamic::Set_Transform(PSX::PxTransform pxTransform, _bool bTele
|
||||
m_pRigidBody->setGlobalPose(pxTransform, true);
|
||||
|
||||
if (true == bTeleport) {
|
||||
if (IsKinematic()) {
|
||||
return;
|
||||
}
|
||||
m_pRigidBody->setLinearVelocity(PSX::PxVec3(0.f, 0.f, 0.f));
|
||||
m_pRigidBody->setAngularVelocity(PSX::PxVec3(0.f, 0.f, 0.f));
|
||||
m_pRigidBody->clearForce();
|
||||
@@ -396,6 +399,11 @@ HRESULT CRigidBody_Dynamic::Initialize(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CRigidBody_Dynamic::IsKinematic()
|
||||
{
|
||||
return m_pRigidBody->getRigidBodyFlags().isSet(PSX::PxRigidBodyFlag::eKINEMATIC);
|
||||
}
|
||||
|
||||
//void CRigidBody_Dynamic::Move(PSX::PxTransform& pxTransform, _bool bTeleport)
|
||||
//{
|
||||
// if (m_pRigidBody->getRigidBodyFlags().isSet(PSX::PxRigidBodyFlag::eKINEMATIC)) {
|
||||
|
||||
@@ -32,12 +32,13 @@ HRESULT CRigidBody_Static::Initialize(void* pArg)
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
RIGIDBODY_STATIC_DESC* pDesc = static_cast<RIGIDBODY_STATIC_DESC*>(pArg);
|
||||
m_wstrMeshName = pDesc->pMeshName;
|
||||
m_tagData.pOwner = m_pOwner;
|
||||
XMStoreFloat4x4(&m_tagData.BeforeMatrix, m_pTransform->Get_XMWorldMatrix());
|
||||
m_tagData.pBody = this;
|
||||
m_pRigidBody = m_pGameInstance->Add_StaticActor(*this, m_pGameInstance->Get_NextLevelID());
|
||||
m_pRigidBody = m_pGameInstance->Add_StaticActor(*this, m_pGameInstance->Get_NextLevelID(), pDesc->pWorldMatrix);
|
||||
m_pRigidBody->userData = &m_tagData;
|
||||
m_pRigidBody->setName(CMyTools::ToString(m_wstrMeshName).c_str());
|
||||
|
||||
|
||||
@@ -40,6 +40,28 @@ CVIBuffer_Model_Instance::CVIBuffer_Model_Instance(const CVIBuffer_Model_Instanc
|
||||
}
|
||||
}
|
||||
|
||||
const _char* CVIBuffer_Model_Instance::Get_MeshName(_uint iMeshIndex)
|
||||
{
|
||||
if (m_iNumMeshes <= iMeshIndex)
|
||||
return nullptr;
|
||||
|
||||
return m_Meshes[iMeshIndex]->Get_Name();
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Ready_PhysXMeshes(_uint iLevel)
|
||||
{
|
||||
m_iNumPhysXMeshes = m_iNumMeshes;
|
||||
|
||||
m_TriMeshes.reserve(m_iNumMeshes);
|
||||
|
||||
m_pGameInstance->ConvertToTriMeshes(m_Meshes, m_TriMeshes);
|
||||
|
||||
for (_uint i = 0; i < m_iNumMeshes; ++i) {
|
||||
m_pGameInstance->RegistTriMesh((m_Meshes[i]->Get_Name() + to_string(i)).c_str(), m_TriMeshes[i], iLevel);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CVIBuffer_Model_Instance::Initialize_Prototype(const _char* pModelFilePath, const _char* pMatrialPath)
|
||||
{
|
||||
if (FAILED(Load_ModelData(pModelFilePath)))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#undef ASSERT_NURI
|
||||
#define ASSERT_NURI(expression) assert(expression)
|
||||
#define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK); assert(false);
|
||||
//#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지
|
||||
#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지
|
||||
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
|
||||
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK true||
|
||||
#elif 진우
|
||||
|
||||
@@ -218,6 +218,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
void RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& Desc, _uint iLevel);
|
||||
PSX::PxRigidDynamic* Add_DynamicActor(CRigidBody_Dynamic& RigidBody, _uint iLevel);
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel);
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel, const _float4x4* pWorldMatrix);
|
||||
PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1);
|
||||
PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos);
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ class CPhysX_Manager final : public CBase
|
||||
|
||||
PSX::PxRigidDynamic* Add_DynamicActor(CRigidBody_Dynamic& RigidBody, _uint iLevel);
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel);
|
||||
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel, const _float4x4* pWorldMatrix);
|
||||
|
||||
// https://documentation.help/nvidia-physx-sdk-guide/Joints.html
|
||||
PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1);
|
||||
PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos);
|
||||
|
||||
@@ -29,6 +29,8 @@ class CRenderTarget_Manager final : public CBase
|
||||
// 랜더 타겟의 크기를 dest로 다시 맞춤
|
||||
HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Finish_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetOriginal, const _wstring& wstrRenderTargetBloomed, SHADER_PASS_DEFERRED ePass);
|
||||
void Flush_All_SRVs(_uint iStartSlot = 0, _uint numSlots = D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT);
|
||||
void Flush_All_CSUAVs(_uint iStartSlot = 0, _uint numSlots = D3D11_PS_CS_UAV_REGISTER_COUNT);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
|
||||
@@ -74,7 +74,7 @@ class CRenderer final : public CBase
|
||||
#pragma region TunningParameters
|
||||
/* TunningParam */
|
||||
// Variable
|
||||
_float m_fLightSpecularMaximum = { 1.f };
|
||||
_float m_fLightSpecularMaximum = { 2.f };
|
||||
|
||||
// MotionBlur
|
||||
_float m_fMBBlurRadius = { 28.f };
|
||||
@@ -94,16 +94,16 @@ class CRenderer final : public CBase
|
||||
_float m_fBloomThreshold = { 1.26f };
|
||||
|
||||
// DOF Environment
|
||||
_float m_fDOF_ENV_CutThreshold = { 0.1350f };
|
||||
_float m_fDOF_ENV_FocusDistance = { 31.1f };
|
||||
_float m_fDOF_ENV_StartDistance = { 130.f };
|
||||
_float m_fDOF_ENV_MaxEnd = { 350.f };
|
||||
_float m_fDOF_ENV_AmountRadius = { 1.f };
|
||||
_float m_fDOF_ENV_CutThreshold = { 0.191f };
|
||||
_float m_fDOF_ENV_FocusDistance = { 38.f };
|
||||
_float m_fDOF_ENV_StartDistance = { 88.f };
|
||||
_float m_fDOF_ENV_MaxEnd = { 237.f };
|
||||
_float m_fDOF_ENV_AmountRadius = { 1.2f };
|
||||
|
||||
// SSAO
|
||||
_float m_fSSAO_Radius = { 1.6300f };
|
||||
_float m_fSSAO_BIAS = { 0.234f };
|
||||
_float m_fSSAOStrength = { 2.83f };
|
||||
_float m_fSSAO_Radius = { 0.543f };
|
||||
_float m_fSSAO_BIAS = { 0.401f };
|
||||
_float m_fSSAOStrength = { 4.f };
|
||||
|
||||
SSAO_GEOMETRY_HEMISPHERE m_tagSSAOGeometry = {};
|
||||
SSAO_GEOMETRYDIRECTIONS_RANDOM_REAL m_tagSSAOGeometryDirections = {};
|
||||
|
||||
@@ -93,6 +93,7 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody
|
||||
HRESULT Initialize_Prototype(RIGIDBODY_PROTOTYPE_DYNAMIC_DESC& Desc);
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
// void Move(PSX::PxTransform& pxTransform, _bool bTeleport);
|
||||
_bool IsKinematic();
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT Add_DebugShape();
|
||||
|
||||
@@ -16,7 +16,8 @@ class ENGINE_DLL CRigidBody_Static : public CRigidBody
|
||||
|
||||
typedef struct tagRigidBody_STATIC_Desc : public CRigidBody::RIGIDBODY_DESC
|
||||
{
|
||||
const _tchar* pMeshName = { nullptr };
|
||||
const _tchar* pMeshName = { nullptr };
|
||||
const _float4x4* pWorldMatrix = { nullptr };
|
||||
}RIGIDBODY_STATIC_DESC;
|
||||
|
||||
private:
|
||||
|
||||
@@ -27,6 +27,9 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
|
||||
public:
|
||||
_uint Get_NumMesh() const { return m_iNumMeshes; }
|
||||
const _char* Get_MeshName(_uint iMeshIndex);
|
||||
HRESULT Ready_PhysXMeshes(_uint iLevel);
|
||||
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype(const _char* pModelFilePath, const _char* pMatrialPath);
|
||||
@@ -46,6 +49,8 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
_uint m_iCurrentNumInstance = {};
|
||||
_uint m_iMaxNumInstance = {};
|
||||
|
||||
_uint m_iNumPhysXMeshes = {};
|
||||
|
||||
_float m_fTimeAcc = {};
|
||||
class CComputeShader* m_pComputeShader = { nullptr };
|
||||
|
||||
@@ -60,6 +65,7 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance
|
||||
|
||||
vector<vector<string>> m_MeshMaterialPathes = {};
|
||||
|
||||
vector<PSX::PxTriangleMesh*> m_TriMeshes = {};
|
||||
private:
|
||||
HRESULT Reay_Instance_Buffer();
|
||||
HRESULT Load_InstanceData(ifstream& in);
|
||||
|
||||
Reference in New Issue
Block a user