diff --git a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp index 386cfd141..7f4d702b3 100644 --- a/Jusin154_Team3D/Client/Private/BuildingContainer.cpp +++ b/Jusin154_Team3D/Client/Private/BuildingContainer.cpp @@ -40,9 +40,8 @@ void CBuildingContainer::Late_Update(_float fTimeDelta) if (m_pOcclusionQueryCom->isDraw()) __super::Late_Update(fTimeDelta); } - else{ + else __super::Late_Update(fTimeDelta); - } m_pGameInstance->Add_RenderGroup(RENDER::OCCLUSION, this); @@ -50,6 +49,9 @@ void CBuildingContainer::Late_Update(_float fTimeDelta) pCollisiton->Late_Update(fTimeDelta); } } + else + m_pOcclusionQueryCom->Set_PreFrameDraw(); + } HRESULT CBuildingContainer::Render() diff --git a/Jusin154_Team3D/Client/Private/InstancedProp.cpp b/Jusin154_Team3D/Client/Private/InstancedProp.cpp index 195d5a2e6..15cb800c5 100644 --- a/Jusin154_Team3D/Client/Private/InstancedProp.cpp +++ b/Jusin154_Team3D/Client/Private/InstancedProp.cpp @@ -22,6 +22,9 @@ void CInstancedProp::Update(_float fTimeDelta) void CInstancedProp::Late_Update(_float fTimeDelta) { + if (m_isShake) + m_pVIBufferInstanceCom->Shake(fTimeDelta); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -86,6 +89,7 @@ HRESULT CInstancedProp::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) return E_FAIL; + m_iNumMesh = m_pVIBufferInstanceCom->Get_NumMesh(); return S_OK; @@ -107,6 +111,10 @@ HRESULT CInstancedProp::Ready_Components(void* pArg) if(FAILED(Load_InstancedProp(pDesc->strInstanceDataPath.c_str()))) return E_FAIL; + m_isShake = pDesc->isShake; + if (m_isShake) + m_pVIBufferInstanceCom->Set_Shake_Value(pDesc->vRadius, pDesc->vSpeed); + /* Com_Shader */ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_INSTANCE_PROP_MODEL, reinterpret_cast(&m_pShaderCom)))) diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 020185b5e..1d6969164 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -222,7 +222,7 @@ HRESULT CLevel_GamePlay::Ready_Background() if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UNIFIED))) return E_FAIL; - + CMapElement_Lake::MAPOBJECT_LAKE_DESC Lake_Desc = {}; @@ -244,7 +244,7 @@ HRESULT CLevel_GamePlay::Ready_Background() _bool isReady_Background = { false }; #ifdef gimch - isReady_Background = false; + isReady_Background = true; #endif // gimch #ifdef Bin isReady_Background = false; @@ -281,87 +281,119 @@ HRESULT CLevel_GamePlay::Ready_Background() CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopTable"); CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_TeaShopChair"); - CInstancedProp::INSTANCE_PROP_DESC Desc = {}; - - /* InstanceProp Oak_Tree*/ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) { + if (FAILED(Ready_IntstanceProp())) return E_FAIL; - } - - /* BearBerry */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) { - return E_FAIL; - } - - /* SM_HM_OwlPost_Window_A */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - ///* WA_Rectangle_Double_A */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - ///* WC_Retangle_Double_A */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - ///* WA_Square_Double_C */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - /* Quid_Window_A */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - /* Ollivanders_Box_Window */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - /* WC_L_DoubleS_A */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - /* WC_Round_Double_A */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - /* SM_HM_Door1a */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - - /* SM_HM_Door1a */ - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin"; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) - return E_FAIL; - } return S_OK; } +HRESULT CLevel_GamePlay::Ready_IntstanceProp() +{ + CInstancedProp::INSTANCE_PROP_DESC Desc = {}; + + /* InstanceProp Oak_Tree*/ + Desc.isShake = true; + Desc.vRadius = _float2(0.015f, 0.04f); + Desc.vSpeed = _float2(0.3f, 1.f); + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) { + return E_FAIL; + } + + /* BearBerry */ + Desc.isShake = true; + Desc.vRadius = _float2(0.015f, 0.02f); + Desc.vSpeed = _float2(0.6f, 1.f); + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) { + return E_FAIL; + } + + /* SM_HM_OwlPost_Window_A */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + ///* WA_Rectangle_Double_A */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + ///* WC_Retangle_Double_A */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + ///* WA_Square_Double_C */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* Quid_Window_A */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* Ollivanders_Box_Window */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* WC_L_DoubleS_A */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* WC_Round_Double_A */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* SM_HM_Door1a */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* SM_HM_Door2b */ + Desc.isShake = false; + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + /* OakTree_TallA */ + Desc.isShake = true; + Desc.vRadius = _float2(0.f, 0.01f); + Desc.vSpeed = _float2(0.01f, 0.1f); + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_TallA.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc))) + return E_FAIL; + + return S_OK; +} + HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag) { CInfoInstance::GetInstance()->Load_SpellInfo("../Bin/Resources/Data/UI/Spell/SpellInfo.xml"); diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 256e72722..7aca53522 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -295,7 +295,7 @@ HRESULT CLoader::Loading_For_GamePlay() _bool isLoad_Background = { false }; #ifdef gimch - isLoad_Background = false; + isLoad_Background = true; #endif // gimch #ifdef Bin isLoad_Background = false; @@ -1895,6 +1895,12 @@ HRESULT CLoader::Loading_For_GamePlay() CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml")))) return E_FAIL; + + /* For.Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA*/ + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"), + CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext, + "../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml")))) + return E_FAIL; #pragma endregion /* For.Prototype_Component_South_Hogwart_Land_LOD1 */ diff --git a/Jusin154_Team3D/Client/Private/MapObject_Render.cpp b/Jusin154_Team3D/Client/Private/MapObject_Render.cpp index 6cf5da9f2..1857ee068 100644 --- a/Jusin154_Team3D/Client/Private/MapObject_Render.cpp +++ b/Jusin154_Team3D/Client/Private/MapObject_Render.cpp @@ -108,7 +108,7 @@ HRESULT CMapObject_Render::Render() return E_FAIL; } - for (_uint i = 0; i < m_iNumMeshe; i++) + for (_uint i = 0; i < m_iNumMeshe; ++i) { if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom))) { return E_FAIL; diff --git a/Jusin154_Team3D/Client/Public/InstancedProp.h b/Jusin154_Team3D/Client/Public/InstancedProp.h index accf7104a..77a2af368 100644 --- a/Jusin154_Team3D/Client/Public/InstancedProp.h +++ b/Jusin154_Team3D/Client/Public/InstancedProp.h @@ -16,8 +16,11 @@ class CInstancedProp final : public CGameObject public: typedef struct tagInstancedPropDesc { - _wstring strPrototypeTag; - _string strInstanceDataPath; + _bool isShake; + _float2 vRadius; + _float2 vSpeed; + _wstring strPrototypeTag; + _string strInstanceDataPath; }INSTANCE_PROP_DESC; private: CInstancedProp(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); @@ -32,7 +35,9 @@ class CInstancedProp final : public CGameObject virtual HRESULT Render_Shadow()override; private: + _bool m_isShake = {}; _uint m_iNumMesh = {}; + CVIBuffer_Model_Instance* m_pVIBufferInstanceCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; diff --git a/Jusin154_Team3D/Client/Public/Level_GamePlay.h b/Jusin154_Team3D/Client/Public/Level_GamePlay.h index ed2a0b758..cddda5fc3 100644 --- a/Jusin154_Team3D/Client/Public/Level_GamePlay.h +++ b/Jusin154_Team3D/Client/Public/Level_GamePlay.h @@ -24,6 +24,7 @@ class CLevel_GamePlay final : public CLevel HRESULT Initialize(void* pArg); HRESULT Ready_Lights(); HRESULT Ready_Background(); + HRESULT Ready_IntstanceProp(); HRESULT Ready_Markers(); HRESULT Ready_Layer_UI(const _wstring& strLayerTag); HRESULT Ready_Layer_Camera(); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds index 95887abf3..5db06d3ea 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Hogwart_AlphaMap.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/InstanceMaterial.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/InstanceMaterial.xml index 08b8328ce..af60495b3 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/InstanceMaterial.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/InstanceMaterial.xml @@ -136,4 +136,18 @@ MRO + + + T_Oak_Leaves02_D + T_Oak_Leaves02_N + T_Oak_Leaves02_SRO + SRO + + + T_BogTree_Oak_BarkA_D + T_BogTree_Oak_BarkA_N + T_BogTree_Oak_BarkA_SROH + SRO + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/OakTree_TallA.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/OakTree_TallA.bin new file mode 100644 index 000000000..05fd5fd99 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Instance/OakTree_TallA.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56bb0f2cc0bb682a1017983b88c73e61b67ccda90a40bbe9b8cb51c224bf308c +size 5188 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin new file mode 100644 index 000000000..5a05b3452 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07141211ac5b0b0a9acaa3ead9701bc92e2c63171528dc4afe891cbe47c07652 +size 906880 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.fbx new file mode 100644 index 000000000..8a304f13a --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fa2cef30105cd4517a7c2f2338d5d6db2b8d7cd983965c1030d4e0ce9c943eb +size 381084 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_D.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_D.dds new file mode 100644 index 000000000..f871a0c40 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_D.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_N.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_N.dds new file mode 100644 index 000000000..b918894e3 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_N.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_SRO.dds b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_SRO.dds new file mode 100644 index 000000000..a014e6dd0 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/InstanceProp/Textures/T_Oak_Leaves_SRO.dds differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl new file mode 100644 index 000000000..b8af76bd4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl @@ -0,0 +1,66 @@ +#include "Engine_Shader_Functions.hlsli" +#include "Engine_Shader_Defines.hlsli" + +struct Instance +{ + float4 vRight; + float4 vUp; + float4 vLook; + float4 vTranslation; +}; + +struct InstanceValue +{ + float fSpeed; + float fMaxRadian; +}; + + +StructuredBuffer g_InstanceBufferInput : register(t0); +StructuredBuffer g_InstanceValueBufferInput : register(t1); + +RWStructuredBuffer g_InstanceOutput : register(u0); + +cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함 +{ + float fTimeDelta; + float fPading1; + float fPading2; + float fPading3; +} + +//내가 몇개의 스레드를 사용할 것인지 지정하는데 +//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다. +[numthreads(256, 1, 1)] +void CS_MAIN( + uint3 DispatchThreadID : SV_DispatchThreadID) +{ + int iIndex = DispatchThreadID.x; // 배열 인덱스 + + Instance particle = g_InstanceBufferInput[iIndex]; + InstanceValue particleValue = g_InstanceValueBufferInput[iIndex]; + + float fRadian = sin(particleValue.fSpeed * fTimeDelta) * particleValue.fMaxRadian; + + // 3. 임의의 축 회전 행렬 생성 + + // 4. 최종 월드 행렬 (CurMat) 생성 + + float4x4 CurMatrix = + { + particle.vRight, + particle.vUp, + particle.vLook, + particle.vTranslation + }; + + CurMatrix = mul(RotateAxis(particle.vLook, fRadian), CurMatrix); + + particle.vRight = CurMatrix[0].xyzw; + particle.vUp = CurMatrix[1].xyzw; + particle.vLook = CurMatrix[2].xyzw; + particle.vTranslation = CurMatrix[3].xyzw; + + //아웃풋 대입 + g_InstanceOutput[iIndex] = particle; +} diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl index e3980199a..7a5cdb835 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxWorldModelInstance.hlsl @@ -87,7 +87,7 @@ PS_OUT PS_MAIN(PS_IN In) vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord); - if (vMtrlDiffuse.a < 0.1f) + if (vMtrlDiffuse.a < 0.4f) discard; vector vMtrlNormal = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord); @@ -101,7 +101,7 @@ PS_OUT PS_MAIN(PS_IN In) Out.vNormal = float4(vNormal.xyz * 0.5f + 0.5f, 0.f); Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, g_fUsingSurfaceParams, 0.0f); Out.vColor = float4(0.f, 0.f, 0.f, 1.f); - Out.vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord); + Out.vSurface = float4(g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord).xy, 1.f, 1.f); return Out; } diff --git a/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp index 66e018e39..e1092e701 100644 --- a/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp @@ -29,9 +29,18 @@ void CCamera_Debug::Update(_float fTimeDelta) if (m_pGameInstance->Key_Up(DIK_GRAVE)) { m_bMovable = !m_bMovable; } +#ifdef 진우 if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) { m_pGameInstance->Toggle_MouseCenter(); } +#endif +#ifndef 진우 + if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) { + m_pGameInstance->Toggle_MouseCenter(); + } +#endif // gimch + + if (m_bMovable) { #pragma region Position _float fSpeed = 5.f; diff --git a/Jusin154_Team3D/Editor/Private/InstancedProp.cpp b/Jusin154_Team3D/Editor/Private/InstancedProp.cpp index 8931c57c0..1e816d2c0 100644 --- a/Jusin154_Team3D/Editor/Private/InstancedProp.cpp +++ b/Jusin154_Team3D/Editor/Private/InstancedProp.cpp @@ -14,6 +14,7 @@ CInstancedProp::CInstancedProp(const CInstancedProp& rhs) void CInstancedProp::Priority_Update(_float fTimeDelta) { + } void CInstancedProp::Update(_float fTimeDelta) @@ -28,7 +29,9 @@ void CInstancedProp::Update(_float fTimeDelta) m_pVIBufferInstanceCom->Add_Instance(m_pTransformCom->Get_XMWorldMatrix()); m_pVIBufferInstanceCom->Update_Instance(); - //m_vRotation.y = m_pGameInstance->Random_Float(0.f, 360.f); + + m_vRotation.y = m_pGameInstance->Random_Float(0.f, 360.f); + m_vScale.y = m_pGameInstance->Random_Float(0.8f, 1.2f); _float3 vPosition = {}; if (m_pGameInstance->isPicking(&vPosition)) @@ -45,6 +48,11 @@ void CInstancedProp::Update(_float fTimeDelta) void CInstancedProp::Late_Update(_float fTimeDelta) { + if(true == m_isShake) + { + m_pVIBufferInstanceCom->Shake(fTimeDelta); + } + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } @@ -82,15 +90,20 @@ HRESULT CInstancedProp::Initialize(void* pArg) return E_FAIL; m_bEditMode = pDesc->bEditMode; + m_isShake = pDesc->isShake; m_strPrototypeTag = pDesc->strPrototypeTag; if (FAILED(Ready_Components(pArg))) return E_FAIL; + if(m_isShake) + m_pVIBufferInstanceCom->Set_Shake_Value(pDesc->vRadius, pDesc->vSpeed); + m_vPosition = _float4(0.f, 0.f, 0.f, 1.f); m_vRotation = _float3(0.f, 0.f, 0.f); m_vScale = _float3(1.f, 1.f, 1.f); + XMStoreFloat4x4(&m_WorldMatrixIdentity, XMMatrixIdentity()); if(!m_bEditMode) @@ -114,6 +127,8 @@ HRESULT CInstancedProp::Ready_Components(void* pArg) reinterpret_cast(&m_pVIBufferInstanceCom)))) return E_FAIL; + + /* Com_Shader */ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_INSTANCE_PROP_MODEL, reinterpret_cast(&m_pShaderCom)))) @@ -354,7 +369,7 @@ void CInstancedProp::Describe_Entity() m_pTransformCom->Set_Scale(m_vScale); //m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_vPosition)); - m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z)); + //m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z)); m_pVIBufferInstanceCom->Fix_Instance(m_pTransformCom->Get_XMWorldMatrix()); if (GUI::Button("Delete", ImVec2(150.f, 30.f))) diff --git a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp index 10d022917..4480a3a5b 100644 --- a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp @@ -52,13 +52,13 @@ HRESULT CLevel_MapViewer::Initialize() return E_FAIL; } - /*if (FAILED(Ready_Layer_InstanceProp(TEXT("Layer_InstanceProp")))) { + if (FAILED(Ready_Layer_InstanceProp(TEXT("Layer_InstanceProp")))) { return E_FAIL; } - if (FAILED(Ready_Layer_BuildingContainer(TEXT("Layer_Building")))) { - return E_FAIL; - }*/ + //if (FAILED(Ready_Layer_BuildingContainer(TEXT("Layer_Building")))) { + // return E_FAIL; + //} if (FAILED(Ready_Layer_Unified(TEXT("Layer_Unified")))) { return E_FAIL; @@ -120,16 +120,16 @@ HRESULT CLevel_MapViewer::Ready_Layer_Terrain(const _wstring& strLayerTag) CTerrain::TERRAIN_DESC Desc = {}; /* Hogsmeade */ - //Desc.isEdit = false; - //Desc.iAlphaSizeX = 2048; - //Desc.iAlphaSizeY = 2048; - //Desc.vPosition = _float3(-194, 18.5f, -153.f); - //Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade"); - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) - // return E_FAIL; + Desc.isEdit = false; + Desc.iAlphaSizeX = 2048; + Desc.iAlphaSizeY = 2048; + Desc.vPosition = _float3(-194, 18.5f, -153.f); + Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade"); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) + return E_FAIL; /* Hogwart */ - Desc.isEdit = true; + Desc.isEdit = false; Desc.iAlphaSizeX = 2048; Desc.iAlphaSizeY = 2560; Desc.vPosition = _float3(-451.f, 18.5f, -791.f); @@ -227,16 +227,22 @@ HRESULT CLevel_MapViewer::Ready_Layer_Land(const _wstring& strLayerTag) HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) { CInstancedProp::INSTANCE_PROP_DESC Desc = {}; - Desc.bEditMode = false; - Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"; - Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin"; /* Oak_Tree */ + Desc.bEditMode = false; + Desc.isShake = true; + Desc.vRadius = _float2(0.015f, 0.04f); + Desc.vSpeed = _float2(0.3f, 1.f); + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) return E_FAIL; /* BearBerry */ Desc.bEditMode = false; + Desc.isShake = true; + Desc.vRadius = _float2(0.015f, 0.02f); + Desc.vSpeed = _float2(0.6f, 1.f); Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_BearBerry_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BearBerry_A.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -244,6 +250,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* SM_HM_OwlPost_Window_A */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -251,6 +258,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) ///* WA_Rectangle_Double_A */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -258,6 +266,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) ///* WC_Retangle_Double_A */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -265,6 +274,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) ///* WA_Square_Double_C */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -272,6 +282,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* Quid_Window_A */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -279,6 +290,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* Ollivanders_Box_Window */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -286,6 +298,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* WC_L_DoubleS_A */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -293,6 +306,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* WC_Round_Double_A */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -300,6 +314,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* SM_HM_Door1a */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) @@ -307,11 +322,22 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag) /* SM_HM_Door1a */ Desc.bEditMode = false; + Desc.isShake = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin"; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) return E_FAIL; + /* OakTree_TallA */ + Desc.bEditMode = false; + Desc.isShake = true; + Desc.vRadius = _float2(0.f, 0.01f); + Desc.vSpeed = _float2(0.01f, 0.1f); + Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"; + Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_TallA.bin"; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc))) + return E_FAIL; + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 2ad97b8fd..e1ef58464 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -2713,43 +2713,43 @@ HRESULT CLoader::Loading_For_MapViewer() // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) // return E_FAIL; - ///* Light */ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\LightPosts", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* Light */ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\LightPosts", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; - ///* Doors */ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* Doors */ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Doors", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; - ///* Step */ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\GroundSurfaces", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\GroundSurfaces", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* Step */ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\GroundSurfaces", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\GroundSurfaces", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; - ///* Barrel */ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Meshes", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* Barrel */ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Objects\\Meshes", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; - ///* Box */ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\MiscProps", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* Box */ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\MiscProps", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; - ///* TeaShop Table */ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Tables", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* TeaShop Table */ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Tables", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; - ///* TeaShop Chair*/ - //if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Chairs", - // ".bin", false, ModelPrototypeTags, ModelPrototypePath))) - // return E_FAIL; + /* TeaShop Chair*/ + if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Chairs", + ".bin", false, ModelPrototypeTags, ModelPrototypePath))) + return E_FAIL; /* Hogwart LOD */ if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogwarts\\HogwartsLOD", @@ -2764,292 +2764,296 @@ vector> jobFutures; _uint iLoadCount = 46; vector*> Contents(iLoadCount); -// -//{ -// { /* Terrain */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// -// { /* Ollivanders*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// -// { /* Gatehouse*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// -// { /* TScrolls */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* 3BroomStick*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// -// -// { /* BLDG_QuidditchShop */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_HogsheadInn */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Honeydukes */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_OwlPost */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_TeaShop */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Zonkos */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_DB_GR */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Potions */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* BLDG_Salon */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* Hengist_Tree */ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN A*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN B*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN C*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN E*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN F*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN G*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN H*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -// { /* GEN J*/ -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// jobFutures.emplace_back(Deferred_FolderLoad( -// "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision", -// ".bin", false, -// &Contents[jobFutures.size()] -// )); -// } -//} -// - /*for (auto& jobFuture : jobFutures) + +_bool isLoad_Map = { true }; +if(isLoad_Map) +{ + { /* Terrain */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + + { /* Ollivanders*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + + { /* Gatehouse*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + + { /* TScrolls */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* 3BroomStick*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + + + { /* BLDG_QuidditchShop */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_HogsheadInn */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_Honeydukes */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_OwlPost */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_TeaShop */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_Zonkos */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_DB_GR */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_Potions */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* BLDG_Salon */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* Hengist_Tree */ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN A*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN B*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN C*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN E*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN F*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN G*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN H*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } + { /* GEN J*/ + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes", + ".bin", false, + &Contents[jobFutures.size()] + )); + jobFutures.emplace_back(Deferred_FolderLoad( + "../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision", + ".bin", false, + &Contents[jobFutures.size()] + )); + } +} + +if(isLoad_Map) +{ + for (auto& jobFuture : jobFutures) { jobFuture.get(); } @@ -3073,7 +3077,8 @@ vector*> Contents(iLoadCount); } } - }*/ + } +} m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다."); @@ -3160,7 +3165,7 @@ vector*> Contents(iLoadCount); #pragma region INSTANCE_MODEL CVIBuffer_Model_Instance::INSTANCE_DESC InstanceDesc = {}; - InstanceDesc.iNum = 20; + InstanceDesc.iNum = 100; ///* For.Prototype_Component_VIBuffer_Model_Instancel */ //if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel"), @@ -3239,6 +3244,12 @@ vector*> Contents(iLoadCount); CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml")))) return E_FAIL; + + /* For.Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA*/ + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"), + CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,&InstanceDesc, + "../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.fbx", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml")))) + return E_FAIL; #pragma endregion // INSTANCE_MODEL /* For.Prototype_Component_VIBuffer_Box */ @@ -3312,12 +3323,15 @@ vector*> Contents(iLoadCount); m_isFinished = true; - //for (_uint i = 0; i < Contents.size(); ++i) { - // for (_uint j = 0; j < (Contents[i])->size(); ++j) { - // Safe_Delete((*Contents[i])[j]); - // } - // Safe_Delete(Contents[i]); - //} + if(isLoad_Map) + { + for (_uint i = 0; i < Contents.size(); ++i) { + for (_uint j = 0; j < (Contents[i])->size(); ++j) { + Safe_Delete((*Contents[i])[j]); + } + Safe_Delete(Contents[i]); + } + } #endif return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp b/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp index c09ac0614..6be50f795 100644 --- a/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp +++ b/Jusin154_Team3D/Editor/Private/MapElement_Lake.cpp @@ -66,16 +66,12 @@ void CMapElement_Lake::Priority_Update(_float fTimeDelta) void CMapElement_Lake::Update(_float fTimeDelta) { m_fTimeAcc += fTimeDelta * m_fUVValue; - Describe_Entity(); + //Describe_Entity(); } void CMapElement_Lake::Late_Update(_float fTimeDelta) { #ifdef _DEBUG - - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&m_vPosition), 1.f)); - m_pTransformCom->Set_Scale(m_vScale); - m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z)); #endif m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp index 8925d8561..cae2b5389 100644 --- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp +++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp @@ -58,27 +58,23 @@ HRESULT CMapObject_Manager::Initialize(void* pArg) m_iContainerObjectIndex = 99; //m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object(); - /*if (FAILED(Load_MapData("Map1205"))) + if (FAILED(Load_MapData("Map1205"))) return E_FAIL; - if (FAILED(Load_LightObject("LightElement"))) - return E_FAIL; - - if (FAILED(Load_InteractObject("E_INTER_Barrel"))) - return E_FAIL; - if (FAILED(Load_InteractObject("E_INTER_PostPackage_B"))) - return E_FAIL; - if (FAILED(Load_InteractObject("E_INTER_PostPackage_F"))) - return E_FAIL; - if (FAILED(Load_InteractObject("E_INTER_TeaShopTable"))) - return E_FAIL; - if (FAILED(Load_InteractObject("E_INTER_TeaShopChair"))) - return E_FAIL;*/ - - /*if (FAILED(Load_LightObject("LightElement"))) - return E_FAIL; - */ + return E_FAIL;*/ + // + //if (FAILED(Load_InteractObject("E_INTER_Barrel"))) + // return E_FAIL; + //if (FAILED(Load_InteractObject("E_INTER_PostPackage_B"))) + // return E_FAIL; + //if (FAILED(Load_InteractObject("E_INTER_PostPackage_F"))) + // return E_FAIL; + //if (FAILED(Load_InteractObject("E_INTER_TeaShopTable"))) + // return E_FAIL; + //if (FAILED(Load_InteractObject("E_INTER_TeaShopChair"))) + // return E_FAIL; + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Public/InstancedProp.h b/Jusin154_Team3D/Editor/Public/InstancedProp.h index 3dca3f32a..30722e8e4 100644 --- a/Jusin154_Team3D/Editor/Public/InstancedProp.h +++ b/Jusin154_Team3D/Editor/Public/InstancedProp.h @@ -17,6 +17,9 @@ class CInstancedProp final : public CGameObject typedef struct tagInstancedPropDesc { _bool bEditMode{}; + _bool isShake; + _float2 vRadius; + _float2 vSpeed; _wstring strPrototypeTag; string strInstanceDataPath; }INSTANCE_PROP_DESC; @@ -33,6 +36,7 @@ class CInstancedProp final : public CGameObject private: _bool m_bEditMode = {}; + _bool m_isShake = {}; CVIBuffer_Model_Instance* m_pVIBufferInstanceCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; @@ -45,7 +49,6 @@ class CInstancedProp final : public CGameObject _float3 m_vScale = {}; #ifdef _DEBUG _char m_szFileName[MAX_PATH] = {}; - #endif // _DEBUG diff --git a/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl new file mode 100644 index 000000000..b8af76bd4 --- /dev/null +++ b/Jusin154_Team3D/Engine/Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl @@ -0,0 +1,66 @@ +#include "Engine_Shader_Functions.hlsli" +#include "Engine_Shader_Defines.hlsli" + +struct Instance +{ + float4 vRight; + float4 vUp; + float4 vLook; + float4 vTranslation; +}; + +struct InstanceValue +{ + float fSpeed; + float fMaxRadian; +}; + + +StructuredBuffer g_InstanceBufferInput : register(t0); +StructuredBuffer g_InstanceValueBufferInput : register(t1); + +RWStructuredBuffer g_InstanceOutput : register(u0); + +cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함 +{ + float fTimeDelta; + float fPading1; + float fPading2; + float fPading3; +} + +//내가 몇개의 스레드를 사용할 것인지 지정하는데 +//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다. +[numthreads(256, 1, 1)] +void CS_MAIN( + uint3 DispatchThreadID : SV_DispatchThreadID) +{ + int iIndex = DispatchThreadID.x; // 배열 인덱스 + + Instance particle = g_InstanceBufferInput[iIndex]; + InstanceValue particleValue = g_InstanceValueBufferInput[iIndex]; + + float fRadian = sin(particleValue.fSpeed * fTimeDelta) * particleValue.fMaxRadian; + + // 3. 임의의 축 회전 행렬 생성 + + // 4. 최종 월드 행렬 (CurMat) 생성 + + float4x4 CurMatrix = + { + particle.vRight, + particle.vUp, + particle.vLook, + particle.vTranslation + }; + + CurMatrix = mul(RotateAxis(particle.vLook, fRadian), CurMatrix); + + particle.vRight = CurMatrix[0].xyzw; + particle.vUp = CurMatrix[1].xyzw; + particle.vLook = CurMatrix[2].xyzw; + particle.vTranslation = CurMatrix[3].xyzw; + + //아웃풋 대입 + g_InstanceOutput[iIndex] = particle; +} diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj b/Jusin154_Team3D/Engine/Default/Engine.vcxproj index 95e1f38f6..389a14646 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj @@ -641,6 +641,7 @@ call Update_Lib.bat + Effect 5.0 diff --git a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters index 67cb0c16c..d9f41ede5 100644 --- a/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters +++ b/Jusin154_Team3D/Engine/Default/Engine.vcxproj.filters @@ -1320,5 +1320,8 @@ 99.Define\01.SHADER\Inc + + 99.Define\01.SHADER + \ No newline at end of file diff --git a/Jusin154_Team3D/Engine/Private/Light_Manager.cpp b/Jusin154_Team3D/Engine/Private/Light_Manager.cpp index 4c89fe94d..7103da91e 100644 --- a/Jusin154_Team3D/Engine/Private/Light_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Light_Manager.cpp @@ -49,7 +49,7 @@ void CLight_Manager::Delete_Light(_uint _iCurrentLevel, CLight* _pLight) SAFE_RELEASE(_pLight); iter = m_Lights[_iCurrentLevel].erase(iter); - + return; } else { diff --git a/Jusin154_Team3D/Engine/Private/OcclusionQuery.cpp b/Jusin154_Team3D/Engine/Private/OcclusionQuery.cpp index 44742260c..62c1608a8 100644 --- a/Jusin154_Team3D/Engine/Private/OcclusionQuery.cpp +++ b/Jusin154_Team3D/Engine/Private/OcclusionQuery.cpp @@ -18,6 +18,12 @@ void COcclusionQuery::Begin_Query() _bool COcclusionQuery::isDraw() { + if (false == m_bCurFrameDraw) + { + m_bPreFrameDraw = m_bCurFrameDraw = true; + return true; + } + bool bVisible = m_bPreFrameDraw; _uint iIndex = (m_iCheckFrame + 3) % 5; @@ -71,8 +77,8 @@ HRESULT COcclusionQuery::Initialize(void* pArg) return E_FAIL; } } - - m_bPreFrameDraw = m_bThisFrameDraw = true; + m_bCurFrameDraw = false; + m_bPreFrameDraw = true; m_iNumCullFrame = 0; return S_OK; diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp index 21575c4a5..d916afa88 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_Model_Instance.cpp @@ -7,6 +7,7 @@ #include "Model.h" #include "Transform.h" #include "Shader.h" +#include "ComputeShader.h" CVIBuffer_Model_Instance::CVIBuffer_Model_Instance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CVIBuffer_Instance(pDevice, pContext) @@ -55,9 +56,20 @@ HRESULT CVIBuffer_Model_Instance::Initialize_Prototype(const _char* pModelFilePa HRESULT CVIBuffer_Model_Instance::Initialize(void* pArg) { + m_fTimeAcc = 0.f; + + if (FAILED(Create_ConstantBuffer())) + return E_FAIL; + + if (FAILED(Create_Instance_Value_Buffer())) + return E_FAIL; + if (FAILED(Reay_Instance_Buffer())) return E_FAIL; + if (FAILED(Create_ComputeShader())) + return E_FAIL; + return S_OK; } @@ -70,6 +82,68 @@ HRESULT CVIBuffer_Model_Instance::Render(_uint iMeshIndex) return S_OK; } +void CVIBuffer_Model_Instance::Shake(_float fTimeDelta) +{ + m_fTimeAcc += fTimeDelta; + + if (3600.0f < m_fTimeAcc) + m_fTimeAcc = 0.f; + + D3D11_MAPPED_SUBRESOURCE ConstantSubResource = {}; + + if (SUCCEEDED(m_pContext->Map(m_pConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &ConstantSubResource))) + { + CS_MODEL_INSTANCE_CONSTANT_DESC* pDesc = static_cast(ConstantSubResource.pData); + + pDesc->fTimeDelta = m_fTimeAcc; + pDesc->fPading1 = 0.f; + pDesc->fPading2 = 0.f; + pDesc->fPading3 = 0.f; + m_pContext->Unmap(m_pConstantBuffer, 0); + } + + if (m_pComputeShader == nullptr) + return; + + _uint iGroupCountX = (m_iNumInstance + 255) / 256; + + ID3D11Buffer* CSBuffers[] = { + m_pVBInstance, + m_pParticleValueBuffer + }; + + m_pComputeShader->Dispatch(0, 0, _float3((_float)iGroupCountX, 1.f, 1.f), CSBuffers, m_pConstantBuffer); + + return; +} + +HRESULT CVIBuffer_Model_Instance::Set_Shake_Value(_float2 vRadius, _float2 vSpeed) +{ + D3D11_MAPPED_SUBRESOURCE InstanceValueResource = {}; + + if (SUCCEEDED(m_pContext->Map(m_pParticleValueBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &InstanceValueResource))) + { + CS_MODEL_INSTANCE_DESC* pDesc = static_cast(InstanceValueResource.pData); + + for (_uint i = 0; i < m_iNumInstance; ++i) + { + pDesc[i].fMaxRadian = m_pGameInstance->Real_Random_Float(vRadius.x, vRadius.y); + pDesc[i].fSpeed = m_pGameInstance->Real_Random_Float(vSpeed.x, vSpeed.y); + } + + m_pContext->Unmap(m_pParticleValueBuffer, 0); + } + + return S_OK; +} + +HRESULT CVIBuffer_Model_Instance::Bind_OutPut_SRV_VS(_uint Index, _uint iBufferIndex) +{ + m_pComputeShader->Bind_OutPut_SRV_VS(Index, iBufferIndex); + + return S_OK; +} + HRESULT CVIBuffer_Model_Instance::Bind_Matrial(CShader* pShader, _uint iMeshIndex) { if(FAILED(pShader->Bind_SRV("g_DiffuseTexture", m_MeshMaterialsSRV[iMeshIndex][0]))) @@ -284,6 +358,78 @@ HRESULT CVIBuffer_Model_Instance::Ready_Materials() return S_OK; } +HRESULT CVIBuffer_Model_Instance::Create_ComputeShader() +{ + _uint CS_InputStrides[] = { + sizeof(VTX_INSTANCE_MODEL), + sizeof(CS_MODEL_INSTANCE_DESC), + }; + + _uint CS_OutputStrides[] = { + sizeof(VTX_INSTANCE_MODEL), + }; + + m_pComputeShader = CComputeShader::Create(m_pDevice, m_pContext, + L"../Bin/Resources/ShaderFiles/Shader_Instance_Compute.hlsl", "CS_MAIN", m_iMaxNumInstance, 2, 1, CS_InputStrides, CS_OutputStrides); + + if (m_pComputeShader == nullptr) + return E_FAIL; + + return S_OK; +} + +HRESULT CVIBuffer_Model_Instance::Create_ConstantBuffer() +{ + //컨스턴트 버퍼 생성 + D3D11_BUFFER_DESC cbDesc = {}; + cbDesc.Usage = D3D11_USAGE_DYNAMIC; + cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; + cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + cbDesc.ByteWidth = sizeof(CS_MODEL_INSTANCE_CONSTANT_DESC); + + D3D11_SUBRESOURCE_DATA CBInitialDesc = {}; + + if (FAILED(m_pDevice->CreateBuffer(&cbDesc, nullptr, &m_pConstantBuffer))) + return E_FAIL; + + return S_OK; +} + +HRESULT CVIBuffer_Model_Instance::Create_Instance_Value_Buffer() +{ + // 벨류 버퍼 생성하기 + D3D11_BUFFER_DESC Particle_Buffer_Desc = {}; + Particle_Buffer_Desc.ByteWidth = sizeof(CS_MODEL_INSTANCE_DESC) * m_iNumInstance; + Particle_Buffer_Desc.Usage = D3D11_USAGE_DYNAMIC; + Particle_Buffer_Desc.BindFlags = D3D11_BIND_VERTEX_BUFFER; + Particle_Buffer_Desc.StructureByteStride = sizeof(CS_MODEL_INSTANCE_DESC); + Particle_Buffer_Desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + Particle_Buffer_Desc.MiscFlags = 0; + + D3D11_SUBRESOURCE_DATA InitialDesc = {}; + InitialDesc.pSysMem = nullptr; + + if (FAILED(m_pDevice->CreateBuffer(&Particle_Buffer_Desc, nullptr, &m_pParticleValueBuffer))) + return E_FAIL; + + D3D11_MAPPED_SUBRESOURCE InstanceValueResource = {}; + + if (SUCCEEDED(m_pContext->Map(m_pParticleValueBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &InstanceValueResource))) + { + CS_MODEL_INSTANCE_DESC* pDesc = static_cast(InstanceValueResource.pData); + + for (_uint i = 0; i < m_iNumInstance; ++i) + { + pDesc[i].fMaxRadian = 0.f; + pDesc[i].fSpeed = 0.f; + } + + m_pContext->Unmap(m_pParticleValueBuffer, 0); + } + + return S_OK; +} + #ifdef EDITOR_PROJECT HRESULT CVIBuffer_Model_Instance::SaveAssimpModel(const _char* pModelFilePath) @@ -563,6 +709,11 @@ void CVIBuffer_Model_Instance::Free() { __super::Free(); + SAFE_RELEASE(m_pComputeShader); + + SAFE_RELEASE(m_pConstantBuffer); + SAFE_RELEASE(m_pParticleValueBuffer); + for (auto& pMesh : m_Meshes) SAFE_RELEASE(pMesh); m_Meshes.clear(); diff --git a/Jusin154_Team3D/Engine/Public/OcclusionQuery.h b/Jusin154_Team3D/Engine/Public/OcclusionQuery.h index 8b181cb43..55515af49 100644 --- a/Jusin154_Team3D/Engine/Public/OcclusionQuery.h +++ b/Jusin154_Team3D/Engine/Public/OcclusionQuery.h @@ -15,12 +15,14 @@ class ENGINE_DLL COcclusionQuery final : public CComponent void Begin_Query(); _bool isDraw(); void End_Query(); + void Set_PreFrameDraw() { m_bCurFrameDraw = false; } private: ID3D11Query* m_pQuery[5] = {}; _bool m_bPreFrameDraw = { true }; - _bool m_bThisFrameDraw = {}; + _bool m_bCurFrameDraw = {}; + _uint m_iNumCullFrame = {}; _uint m_iCountFrame = {}; _uint m_iGetFrameIndex = {}; diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_Model_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_Model_Instance.h index c459ea1bb..9484a81a3 100644 --- a/Jusin154_Team3D/Engine/Public/VIBuffer_Model_Instance.h +++ b/Jusin154_Team3D/Engine/Public/VIBuffer_Model_Instance.h @@ -5,6 +5,21 @@ NS_BEGIN(Engine) class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance { +public: + typedef struct tagCS_Model_Instacne_Desc + { + _float fSpeed; + _float fMaxRadian; + }CS_MODEL_INSTANCE_DESC; + + typedef struct tagCS_Model_Instacne_Constant_Desc + { + _float fTimeDelta; + _float fPading1; + _float fPading2; + _float fPading3; + }CS_MODEL_INSTANCE_CONSTANT_DESC; + private: CVIBuffer_Model_Instance(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CVIBuffer_Model_Instance(const CVIBuffer_Model_Instance& rhs); @@ -17,8 +32,12 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance virtual HRESULT Initialize_Prototype(const _char* pModelFilePath, const _char* pMatrialPath); virtual HRESULT Initialize(void* pArg) override; virtual HRESULT Render(_uint iMeshIndex); + void Shake(_float fTimeDelta); + HRESULT Set_Shake_Value(_float2 vRadius, _float2 vSpeed); + HRESULT Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex); HRESULT Bind_Matrial(class CShader* pShader, _uint iMeshIndex); + HRESULT Load_WorldData(vector<_float4x4>& WorldMatrices); private: _uint m_iNumBuffer = {}; @@ -27,6 +46,12 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance _uint m_iCurrentNumInstance = {}; _uint m_iMaxNumInstance = {}; + _float m_fTimeAcc = {}; + class CComputeShader* m_pComputeShader = { nullptr }; + + ID3D11Buffer* m_pConstantBuffer = { nullptr }; + ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; + INSTANCE_DESC m_InstanceDesc = {}; vector m_Meshes = {}; @@ -41,6 +66,9 @@ class ENGINE_DLL CVIBuffer_Model_Instance final : public CVIBuffer_Instance HRESULT Load_ModelData(const _char* pModelFilePath); HRESULT Load_Material(const _char* pModelFilePath, const _char* pMatrialPath); HRESULT Ready_Materials(); + HRESULT Create_ComputeShader(); + HRESULT Create_ConstantBuffer(); + HRESULT Create_Instance_Value_Buffer(); #ifdef EDITOR_PROJECT public: