[merge commit]
This commit is contained in:
@@ -178,6 +178,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Sword.h" />
|
||||
<ClInclude Include="..\public\InstancedProp_Light.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Breath.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_FireBall.h" />
|
||||
<ClInclude Include="..\Public\CamPosition_AI.h" />
|
||||
@@ -438,6 +439,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Sword.cpp" />
|
||||
<ClCompile Include="..\private\InstancedProp_Light.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Breath.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_FireBall.cpp" />
|
||||
<ClCompile Include="..\Private\CamPosition_AI.cpp" />
|
||||
|
||||
@@ -797,6 +797,9 @@
|
||||
<ClInclude Include="..\Public\ReparoObject.h">
|
||||
<Filter>02.GameObjects\ReparoObject</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\InstancedProp_Light.h">
|
||||
<Filter>02.GameObjects\Environment\02.InstancedProp\Light</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1659,6 +1662,9 @@
|
||||
<Filter Include="02.GameObjects\ReparoObject\99.Define\00.DEFAULT">
|
||||
<UniqueIdentifier>{05a0db73-4fbf-456c-9137-bb605c632d68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Environment\02.InstancedProp\Light">
|
||||
<UniqueIdentifier>{2e3b9cee-41ee-4984-a1d0-3aaebbcf41a4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -2403,6 +2409,9 @@
|
||||
<ClCompile Include="..\Private\ReparoObject.cpp">
|
||||
<Filter>02.GameObjects\ReparoObject</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\InstancedProp_Light.cpp">
|
||||
<Filter>02.GameObjects\Environment\02.InstancedProp\Light</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -105,7 +105,8 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
#ifndef 기무리
|
||||
|
||||
#ifndef _DEBUG
|
||||
if (dynamic_cast<CPlayer*>(m_pOwner)->Get_UIState() == ENUM_CLASS(UI_STATE::GAMEPLAYER))
|
||||
{
|
||||
m_bMovable = true;
|
||||
@@ -113,7 +114,7 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
else {
|
||||
m_bMovable = false;
|
||||
}
|
||||
#endif // 기무리
|
||||
#endif
|
||||
if (m_pGameInstance->Key_Up(DIK_PGDN)) {
|
||||
m_bDampingParentPos = !m_bDampingParentPos;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ HRESULT CInstancedProp::Render()
|
||||
if (FAILED(m_pVIBufferInstanceCom->Bind_Matrial(m_pShaderCom, i)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(0)))
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_WORLDMODLE_INSTANCE::DEFAULT))))
|
||||
return E_FAIL;
|
||||
|
||||
m_pVIBufferInstanceCom->Render(i);
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
#include "pch.h"
|
||||
#include "InstancedProp_Light.h"
|
||||
#include "VIBuffer_Model_Instance.h"
|
||||
|
||||
CInstancedProp_Light::CInstancedProp_Light(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CInstancedProp_Light::CInstancedProp_Light(const CInstancedProp_Light& rhs)
|
||||
:CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CInstancedProp_Light::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CInstancedProp_Light::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CInstancedProp_Light::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
|
||||
if (m_bLightOn)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
for (_uint i = 0; i < m_iNumMesh; i++)
|
||||
{
|
||||
if (m_iGlassMeshIndex == i)
|
||||
{
|
||||
if (FAILED(m_pVIBufferInstanceCom->Bind_Matrial(m_pShaderCom, m_iGlassMeshIndex))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_DiffuseTexture", m_pMaskTextureCom->Get_SRV(0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_GlassTexture", m_pGlassTextureCom->Get_SRV(0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fGlassRatio", &m_fGlassRatio, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_WORLDMODLE_INSTANCE::LIGHT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FAILED(m_pVIBufferInstanceCom->Bind_Matrial(m_pShaderCom, i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_WORLDMODLE_INSTANCE::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
m_pVIBufferInstanceCom->Render(i);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Render_Bloom()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fBloomStrength", &m_fBloomStrength, sizeof(_float))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_EmissiveTexture", m_pEmissiveTextureCom->Get_SRV(0))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_WORLDMODLE_INSTANCE::BLOOM)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pVIBufferInstanceCom->Render(m_iGlassMeshIndex))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Initialize(void* pArg)
|
||||
{
|
||||
INSTANCE_PROP_LIGHT_DESC* pDesc = static_cast<INSTANCE_PROP_LIGHT_DESC*>(pArg);
|
||||
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_iGlassMeshIndex = pDesc->iGlassMeshIndex;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
Load_InstancedProp(pDesc->strInstanceDataPath.c_str());
|
||||
|
||||
m_iNumMesh = m_pVIBufferInstanceCom->Get_NumMesh();
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
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,
|
||||
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))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("LightPost_Mask"),
|
||||
reinterpret_cast<CComponent**>(&m_pMaskTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("LightPost_Base"),
|
||||
reinterpret_cast<CComponent**>(&m_pGlassTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("LightPost_Emissive"),
|
||||
reinterpret_cast<CComponent**>(&m_pEmissiveTextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
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;
|
||||
}
|
||||
|
||||
HRESULT CInstancedProp_Light::Load_InstancedProp(const _char* pFilePath)
|
||||
{
|
||||
ifstream FileIn(pFilePath, ios::binary);
|
||||
|
||||
if (!FileIn.is_open())
|
||||
{
|
||||
MSG_BOX("Failed to Load InstancedProp File");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
vector<_float4x4> WorldMatrices = {};
|
||||
|
||||
_uint iNumWorldMatrix = 0;
|
||||
|
||||
FileIn.read(reinterpret_cast<char*>(&iNumWorldMatrix), sizeof(_uint));
|
||||
WorldMatrices.reserve(iNumWorldMatrix);
|
||||
|
||||
_float4x4 WorldMatrix = {};
|
||||
|
||||
for (_uint i = 0; i < iNumWorldMatrix; ++i)
|
||||
{
|
||||
FileIn.read(reinterpret_cast<char*>(&WorldMatrix), sizeof(_float4x4));
|
||||
|
||||
WorldMatrices.push_back(WorldMatrix);
|
||||
}
|
||||
FileIn.close();
|
||||
|
||||
if (FAILED(m_pVIBufferInstanceCom->Load_WorldData(WorldMatrices)))
|
||||
{
|
||||
MSG_BOX("Failed to Load World Matrices to VIBuffer Instance");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CInstancedProp_Light* CInstancedProp_Light::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CInstancedProp_Light* pInstance = new CInstancedProp_Light(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CInstancedProp_Light");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CInstancedProp_Light::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CInstancedProp_Light* pInstance = new CInstancedProp_Light(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CInstancedProp_Light");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CInstancedProp_Light::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferInstanceCom);
|
||||
SAFE_RELEASE(m_pGlassTextureCom);
|
||||
SAFE_RELEASE(m_pMaskTextureCom);
|
||||
SAFE_RELEASE(m_pEmissiveTextureCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CInstancedProp_Light::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Terrain.h"
|
||||
#include "EffectPool.h"
|
||||
#include "InstancedProp.h"
|
||||
#include "InstancedProp_Light.h"
|
||||
#include "Land.h"
|
||||
#include "Unified.h"
|
||||
#include "MapElement_Lake.h"
|
||||
@@ -590,6 +591,28 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
CInstancedProp_Light::INSTANCE_PROP_LIGHT_DESC LightDesc = {};
|
||||
|
||||
/* LightPost */
|
||||
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, LAYER_HOGSMEADE, &LightDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* LightPost_Floating */
|
||||
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, LAYER_HOGSMEADE, &LightDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@
|
||||
#include "MapObject_Render.h"
|
||||
#include "MapObject_Collision.h"
|
||||
#include "InstancedProp.h"
|
||||
#include "InstancedProp_Light.h"
|
||||
#include "MapElement_Light.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "MapElement_Lake.h"
|
||||
@@ -703,6 +704,42 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
{ /* SUB_HogsHead */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_HogsHead/SUB_HogsHead_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
/* SUB_PippensPotions */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_PippensPotions/SUB_Pippens_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
/* GEN_E_LOD */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_GEN_E/SUB_GEN_E_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
/* GEN_F_LOD */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_GEN_F/SUB_GEN_F_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
/* GEN_G_LOD */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_GEN_G/SUB_GEN_G_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
/* GEN_H_LOD */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_GEN_H/SUB_GEN_H_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
/* GEN_J_LOD */
|
||||
jobMapModels.emplace_back(Deferred_FolderLoad(
|
||||
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/SUB_GEN_J/SUB_GEN_J_EXTLOD/ProxyAssets",
|
||||
".bin", false
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------ HOGWART ------------------------------- */
|
||||
@@ -2785,6 +2822,18 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
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;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* 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;
|
||||
#pragma endregion
|
||||
|
||||
/* For.Prototype_Component_South_Hogwart_Land_LOD1 */
|
||||
@@ -2866,6 +2915,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CInstancedProp>(g_iStaticLevel, CInstancedProp::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_CInstancedProp_Light */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CInstancedProp_Light>(g_iStaticLevel, CInstancedProp_Light::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_MapElement_Light */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Light>(g_iStaticLevel, CMapElement_Light::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -59,33 +59,33 @@ void CMapElement_Light::Update(_float fTimeDelta)
|
||||
|
||||
void CMapElement_Light::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius()))
|
||||
{
|
||||
if (m_isLightOn)
|
||||
{
|
||||
_float fDistance = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - m_pTransformCom->Get_State(STATE::POSITION)));
|
||||
if (m_LightAdded_Distance > fDistance) // 카메라 범위 안
|
||||
{
|
||||
if (!m_isLightAdded)
|
||||
{
|
||||
m_isLightAdded = true;
|
||||
m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_isLightAdded)
|
||||
{
|
||||
m_isLightAdded = false;
|
||||
m_pGameInstance->Delete_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
}
|
||||
}
|
||||
//if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius()))
|
||||
//{
|
||||
// if (m_isLightOn)
|
||||
// {
|
||||
// _float fDistance = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - m_pTransformCom->Get_State(STATE::POSITION)));
|
||||
// if (m_LightAdded_Distance > fDistance) // 카메라 범위 안
|
||||
// {
|
||||
// if (!m_isLightAdded)
|
||||
// {
|
||||
// m_isLightAdded = true;
|
||||
// m_pGameInstance->Add_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (m_isLightAdded)
|
||||
// {
|
||||
// m_isLightAdded = false;
|
||||
// m_pGameInstance->Delete_Light(CURRENT_LEVEL, m_pLightCom);
|
||||
// }
|
||||
// }
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
}
|
||||
// m_pGameInstance->Add_RenderGroup(RENDER::BLOOM, this);
|
||||
// }
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
// m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
//}
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Light::Render()
|
||||
|
||||
@@ -28,6 +28,7 @@ void CMapObject_Collision::Update(_float fTimeDelta)
|
||||
|
||||
void CMapObject_Collision::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(XMLoadFloat4((_float4*)&m_CombinedWorldMatrix.m[3][0]), m_fRadius));
|
||||
}
|
||||
|
||||
HRESULT CMapObject_Collision::Render()
|
||||
@@ -35,6 +36,57 @@ HRESULT CMapObject_Collision::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapObject_Collision::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iMeshes = m_pModelComs[0]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[0]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ViewMatrix", D3DTS::VIEW, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_Shadow_Resource(m_pShaderCom, "g_ProjMatrix", D3DTS::PROJ, eType))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_uint iMeshes = m_pModelComs[0]->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SHADOW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelComs[0]->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapObject_Collision::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
@@ -70,6 +122,8 @@ HRESULT CMapObject_Collision::Initialize(void* pArg)
|
||||
ReadyForPhysX();
|
||||
ConvertToPhysX();
|
||||
|
||||
m_fRadius = m_pModelComs[0]->Get_Radius();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ void CMapObject_Render::Late_Update(_float fTimeDelta)
|
||||
m_iNumMeshe = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
|
||||
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(XMLoadFloat4((_float4*)&m_CombinedWorldMatrix.m[3][0]), m_fRadius));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Client
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE,END
|
||||
};
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
|
||||
|
||||
enum class SHADER_PASS_WORLDMODLE_INSTANCE {DEFAULT, LIGHT, BLOOM};
|
||||
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
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CVIBuffer_Model_Instance;
|
||||
class CShader;
|
||||
class CTexture;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CInstancedProp_Light final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagInstancedPropLightDesc
|
||||
{
|
||||
_bool isShake;
|
||||
_uint iGlassMeshIndex{};
|
||||
_float2 vRadius;
|
||||
_float2 vSpeed;
|
||||
_wstring strPrototypeTag;
|
||||
_string strInstanceDataPath;
|
||||
}INSTANCE_PROP_LIGHT_DESC;
|
||||
private:
|
||||
CInstancedProp_Light(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CInstancedProp_Light(const CInstancedProp_Light& rhs);
|
||||
virtual ~CInstancedProp_Light() = 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 HRESULT Render_Bloom() override;
|
||||
|
||||
|
||||
private:
|
||||
_bool m_bLightOn = { true };
|
||||
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 };
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
|
||||
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
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -17,20 +17,23 @@ class CMapObject_Collision final : public CMapPartObject // 충돌용 Mesh
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
|
||||
public:
|
||||
virtual _wstring Get_PrototypeTag(_uint iLodIndex = 0);
|
||||
void ReadyForPhysX();
|
||||
void ConvertToPhysX();
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
vector<vector<CRigidBody_Static*>> m_RigidBodies;
|
||||
vector<CModel*> m_pModelComs;
|
||||
|
||||
_uint m_iLodIndex = {};
|
||||
_bool m_bReadyToCreatePhysX = { false };
|
||||
_bool m_bConverted = { false };
|
||||
|
||||
_uint m_iLodIndex = {};
|
||||
_float m_fRadius = { 0.f };
|
||||
|
||||
vector<_wstring> m_ModelPrototypeTags;
|
||||
vector<_uint> m_ModelPathIndices = { };
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -210,4 +210,32 @@
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_ScotsPine_LargeA_Master>
|
||||
<SM_HM_LightPost mesh="2">
|
||||
<Mesh>
|
||||
<Material>T_HM_LampPost_Glass_Dark_D</Material>
|
||||
<Material>T_HM_LampPost_Glass_MRO</Material>
|
||||
<Material>T_HM_LampPost_Glass_MRO</Material>
|
||||
<Surface>MRO</Surface>
|
||||
</Mesh>
|
||||
<Mesh>
|
||||
<Material>T_HM_LampPost_D</Material>
|
||||
<Material>T_HM_LampPost_N</Material>
|
||||
<Material>T_HM_LampPost_MRO</Material>
|
||||
<Surface>MRO</Surface>
|
||||
</Mesh>
|
||||
</SM_HM_LightPost>
|
||||
<SM_HM_Light_Post_Floating mesh="2">
|
||||
<Mesh>
|
||||
<Material>T_HM_LampPost_D</Material>
|
||||
<Material>T_HM_LampPost_N</Material>
|
||||
<Material>T_HM_LampPost_MRO</Material>
|
||||
<Surface>MRO</Surface>
|
||||
</Mesh>
|
||||
<Mesh>
|
||||
<Material>T_HM_LampPost_Glass_Dark_D</Material>
|
||||
<Material>T_HM_LampPost_Glass_MRO</Material>
|
||||
<Material>T_HM_LampPost_Glass_MRO</Material>
|
||||
<Surface>MRO</Surface>
|
||||
</Mesh>
|
||||
</SM_HM_Light_Post_Floating>
|
||||
</Instance>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user