[add] Lake class

[fix] Enviroment Model Mesh 수정
[add] 다른 지역 터레인 추가
This commit is contained in:
Chanbin Kim
2025-12-08 11:46:32 +09:00
parent e10a666bf4
commit ed6533e9ad
49 changed files with 1404 additions and 462 deletions
@@ -252,12 +252,12 @@ HRESULT CLevel_GamePlay::Ready_Background()
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
// /* SM_HM_Door1a */
// Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
// Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
// return E_FAIL;
//}
/* SM_HM_Door1a */
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b";
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin";
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
return E_FAIL;
}
return S_OK;
}
+25 -21
View File
@@ -1438,6 +1438,7 @@ HRESULT CLoader::Loading_For_GamePlay()
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
#pragma region UI
/* For.Prototype_GameObject_UI_Manager*/
if (FAILED(m_pGameInstance->Add_Prototype<CUI_Manager>(g_iStaticLevel, CUI_Manager::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
@@ -1632,6 +1633,9 @@ HRESULT CLoader::Loading_For_GamePlay()
return E_FAIL;
}
#pragma endregion
/* For.Prototype_GameObject_SkyBox */
if (FAILED(m_pGameInstance->Add_Prototype<CSkyBox>(g_iStaticLevel, CSkyBox::Create(m_pDevice, m_pContext))))
return E_FAIL;
@@ -1863,28 +1867,28 @@ HRESULT CLoader::Loading_For_GamePlay()
#pragma region RECEIVE_THREAD
//{ // MapModels
// _uint iIndex = 0;
// for (auto& JobMapModels : jobMapModels)
// {
// vector<FOLDER_LOAD*>* pOut = JobMapModels.get();
// for (_uint i = 0; i < pOut->size(); ++i) {
// FOLDER_LOAD* pContents = (*pOut)[i];
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
// return E_FAIL;
// }
{ // MapModels
_uint iIndex = 0;
for (auto& JobMapModels : jobMapModels)
{
vector<FOLDER_LOAD*>* pOut = JobMapModels.get();
for (_uint i = 0; i < pOut->size(); ++i) {
FOLDER_LOAD* pContents = (*pOut)[i];
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
return E_FAIL;
}
// for (_uint j = 0; j < pContents->pRigidBodyTags.size(); ++j) {
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[j], pContents->LoadedRigidBody[j]))) {
// return E_FAIL;
// }
// }
// Safe_Delete(pContents);
// }
// iIndex++;
// Safe_Delete(pOut);
// }
//}
for (_uint j = 0; j < pContents->pRigidBodyTags.size(); ++j) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[j], pContents->LoadedRigidBody[j]))) {
return E_FAIL;
}
}
Safe_Delete(pContents);
}
iIndex++;
Safe_Delete(pOut);
}
}
#pragma endregion
m_strMessage = TEXT("정보를 불러오는 중입니다.");
+1 -1
View File
@@ -80,7 +80,7 @@ HRESULT CMapInfo::Load_MapObjects(const _char* pFileName)
{
const _char* pName = {};
_uint iMapContainerType = {};
//Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
Container->QueryUnsignedAttribute("MapContainerType", &iMapContainerType);
Container->FirstChildElement("MapContainerType")->QueryUnsignedAttribute("type", &iMapContainerType);
@@ -75,7 +75,7 @@ void CMapObject_Render::Update(_float fTimeDelta)
void CMapObject_Render::Late_Update(_float fTimeDelta)
{
m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this);
//m_pGameInstance->Add_RenderGroup(RENDER::SHADOW, this);
if (m_pGameInstance->isIn_WorldFrustum(XMLoadFloat4(&m_vExtentPosition), m_fRadius)) {
m_fCamDepth = XMVectorGetX(XMVector3LengthSq(XMLoadFloat4(m_pGameInstance->Get_CamPosition()) - XMLoadFloat4(&m_vExtentPosition)));
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -43,9 +43,26 @@ Texture2D g_DisolveTexture;
Texture2D g_GlowTexture;
Texture2D g_GlassTexture;
TextureCube g_CubeTexture;
Texture2D g_NormalLargeTexture;
Texture2D g_NormalSubTexture;
float g_fNormalValue1;
float g_fNormalValue2;
float g_fNormalValue3;
float g_fUVSpeed1;
float g_fUVSpeed2;
float g_fUVSpeed3;
float g_fBloomStrength;
float g_fGlassRatio;
float g_fRefractionStrength;
float g_fRefractionPow;
float4 g_vDiffuseColor;
float4 g_vSurfaceColor;
struct VS_IN
{
float3 vPosition : POSITION;
@@ -312,6 +329,8 @@ PS_OUT PS_GLASS(PS_IN In)
return Out;
}
struct PS_IN_SHADOW
{
float4 vPosition : SV_POSITION;
@@ -497,6 +516,47 @@ PS_OUT_CAPTUREDMODEL PS_CAPTUREDMODEL(PS_IN_CAPTUREDMODEL In)
Out.vColor.a = saturate(1 - g_LifeRatio) * 0.5f;
return Out;
}
PS_OUT PS_LAKE(PS_IN In)
{
PS_OUT Out;
float2 vUV = float2(In.vTexcoord.x, In.vTexcoord.y + g_fTime * g_fUVSpeed1) * g_fNormalValue1;
float2 vUVLarge = float2(In.vTexcoord.x, In.vTexcoord.y - g_fTime * g_fUVSpeed2) * g_fNormalValue2;
float2 vUVSub = float2(In.vTexcoord.x - g_fTime * g_fUVSpeed3, In.vTexcoord.y - g_fTime * g_fUVSpeed3) * g_fNormalValue3;
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, AnisoTropy_BLUR_Sampler, vUV);
float3 vNormalLarge = DecodeNormalFromRG(g_NormalLargeTexture, AnisoTropy_BLUR_Sampler, vUVLarge);
float3 vNormalSub = DecodeNormalFromRG(g_NormalSubTexture, AnisoTropy_BLUR_Sampler, vUVSub);
vector vMtrlDiffuse = g_vDiffuseColor;
vector vSurface = g_vSurfaceColor;
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(normalize(vNormalDecoded + vNormalLarge + vNormalSub), WorldMatrix));
float3 vReflaction = reflect(normalize(In.vWorldPos.xyz - g_vCamPosition.xyz), vNormal);
float fReflactionValue = dot(vReflaction, float3(0.f, 1.f, 0.f));
vMtrlDiffuse = g_CubeTexture.Sample(DefaultSampler, vReflaction);
float fFresnelScala = g_fRefractionStrength + (1.f - g_fRefractionStrength) * pow(1.f - dot(normalize(g_vCamPosition.xyz - In.vWorldPos.xyz), vNormal), g_fRefractionPow);
Out.vAlbedo = float4(vMtrlDiffuse.xyz, 1.f) * fFresnelScala + g_vDiffuseColor * (1.f - fFresnelScala);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
2.f / 27.f, // 서페이스 파라미터
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = vSurface;
return Out;
}
technique11 MeshTechnique11
{
pass MeshPass // 0
@@ -654,4 +714,14 @@ technique11 MeshTechnique11
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_BLOOM();
}
pass WaterPass // 16
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_LAKE();
}
}
@@ -242,6 +242,7 @@ call Update_Shaders.bat
<ClInclude Include="..\public\Magic_Item.h" />
<ClInclude Include="..\public\Magic_Meter.h" />
<ClInclude Include="..\Public\EffectPool.h" />
<ClInclude Include="..\public\MapElement_Lake.h" />
<ClInclude Include="..\public\MapElement_Light.h" />
<ClInclude Include="..\Public\MapInfo.h" />
<ClInclude Include="..\Public\MissionBanner_Border.h" />
@@ -342,6 +343,7 @@ call Update_Shaders.bat
<ClInclude Include="..\public\Mouse_Cursor.h" />
<ClInclude Include="..\Public\RootModelPart.h" />
<ClInclude Include="..\public\UI_Manager.h" />
<ClInclude Include="..\public\Unified.h" />
<ClInclude Include="..\Public\Wand.h" />
<ClInclude Include="Editor.h" />
<ClInclude Include="framework.h" />
@@ -419,6 +421,7 @@ call Update_Shaders.bat
<ClCompile Include="..\private\Magic_Item.cpp" />
<ClCompile Include="..\private\Magic_Meter.cpp" />
<ClCompile Include="..\Private\EffectPool.cpp" />
<ClCompile Include="..\private\MapElement_Lake.cpp" />
<ClCompile Include="..\private\MapElement_Light.cpp" />
<ClCompile Include="..\Private\MapInfo.cpp" />
<ClCompile Include="..\Private\MissionBanner_Border.cpp" />
@@ -521,6 +524,7 @@ call Update_Shaders.bat
</ClCompile>
<ClCompile Include="..\Private\RootModelPart.cpp" />
<ClCompile Include="..\private\UI_Manager.cpp" />
<ClCompile Include="..\private\Unified.cpp" />
<ClCompile Include="..\Private\Wand.cpp" />
<ClCompile Include="Editor.cpp" />
</ItemGroup>
@@ -511,6 +511,12 @@
<Filter Include="50.UI\Logo\Logo_Glow">
<UniqueIdentifier>{d8a5038f-4f2c-4226-85ba-9202f11f822d}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Env\07.Unified">
<UniqueIdentifier>{4b6ac1df-5642-42f1-a492-5c2ca2433559}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Env\03.MapElement\Lake">
<UniqueIdentifier>{df91c194-9910-489b-a9bb-724e1c1f4440}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Editor.h">
@@ -993,6 +999,12 @@
<ClInclude Include="..\public\Logo_Glow.h">
<Filter>50.UI\Logo\Logo_Glow</Filter>
</ClInclude>
<ClInclude Include="..\public\Unified.h">
<Filter>02.GameObjects\Env\07.Unified</Filter>
</ClInclude>
<ClInclude Include="..\public\MapElement_Lake.h">
<Filter>02.GameObjects\Env\03.MapElement\Lake</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Editor.ico">
@@ -1474,6 +1486,12 @@
<ClCompile Include="..\private\Logo_Glow.cpp">
<Filter>50.UI\Logo\Logo_Glow</Filter>
</ClCompile>
<ClCompile Include="..\private\Unified.cpp">
<Filter>02.GameObjects\Env\07.Unified</Filter>
</ClCompile>
<ClCompile Include="..\private\MapElement_Lake.cpp">
<Filter>02.GameObjects\Env\03.MapElement\Lake</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Editor.rc">
@@ -12,6 +12,8 @@
#include "Land.h"
#include "InstancedProp.h"
#include "Player.h"
#include "Unified.h"
#include "MapElement_Lake.h"
CLevel_MapViewer::CLevel_MapViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
@@ -47,12 +49,16 @@ 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_Unified(TEXT("Layer_Unified")))) {
return E_FAIL;
}
if (FAILED(Ready_Layer_MapObjectManager(LAYER_MAPOBJECTMANAGER))) {
@@ -76,7 +82,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
CCamera_Debug::CAMERA_DEBUG_DESC Camera_Desc{};
Camera_Desc.fFovy = XMConvertToRadians(60.0f);
Camera_Desc.fNear = 0.1f;
Camera_Desc.fFar = 200.f;
Camera_Desc.fFar = 600.f;
Camera_Desc.vEye = _float3(0.f, 10.f, -10.f);
Camera_Desc.vAt = _float3(0.f, 0.f, 0.f);
Camera_Desc.fSpeedPerSec = 5.f;
@@ -111,7 +117,55 @@ HRESULT CLevel_MapViewer::Ready_Layer_Background(const _wstring& strLayerTag)
HRESULT CLevel_MapViewer::Ready_Layer_Terrain(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
CTerrain::TERRAIN_DESC Desc = {};
/* Hogsmeade */
Desc.isEdit = false;
Desc.iAlphaSizeX = 2048;
Desc.iAlphaSizeY = 2048;
Desc.vPosition = _float3(-194, 18.5f, -153.f);
Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade");
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
return E_FAIL;
/* Hogwart */
Desc.isEdit = false;
Desc.iAlphaSizeX = 2048;
Desc.iAlphaSizeY = 2560;
Desc.vPosition = _float3(-451.f, 18.5f, -791.f);
Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_Hogwart");
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
return E_FAIL;
/* North_Hogwart */
Desc.isEdit = false;
Desc.iAlphaSizeX = 1536;
Desc.iAlphaSizeY = 1024;
Desc.vPosition = _float3(-577.f, 18.5f, -153.f);
Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_North_Hogwart");
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
return E_FAIL;
/* South_Hogwart */
Desc.isEdit = true;
Desc.iAlphaSizeX = 2048;
Desc.iAlphaSizeY = 1, 536;
Desc.vPosition = _float3(61.f, 18.5f, -535.f);
Desc.strBufferTag = TEXT("Prototype_Component_VIBuffer_Terrain_South_Hogwart");
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
return E_FAIL;
CMapElement_Lake::MAPOBJECT_LAKE_DESC Lake_Desc = {};
vector<_wstring> ModelPrototypeTags;
ModelPrototypeTags.push_back(TEXT("Prototype_Component_Hogwart_Lake"));
Lake_Desc.iMaxLodLevel = 0;
Lake_Desc.iRenderType = 4;
Lake_Desc.vPosition = _float3(-144.f, -61.9f, -115.f);
Lake_Desc.vRotation = _float3(0.f, 0.f, 0.f);
Lake_Desc.vScale = _float3(3.f, 3.f, 3.f);
Lake_Desc.ModelPrototypeTags = ModelPrototypeTags;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Lake>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Lake_Desc)))
return E_FAIL;
return S_OK;
@@ -216,13 +270,19 @@ HRESULT CLevel_MapViewer::Ready_Layer_BuildingContainer(const _wstring& strLayer
return S_OK;
}
HRESULT CLevel_MapViewer::Ready_Layer_Unified(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CUnified>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
return E_FAIL;
return S_OK;
}
HRESULT CLevel_MapViewer::Ready_Layer_MapObjectManager(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapObject_Manager>(g_iStaticLevel, NEXT_LEVEL, strLayerTag)))
return E_FAIL;
return S_OK;
}
+403 -324
View File
@@ -114,6 +114,8 @@
#include "VIBuffer_Model_Instance.h"
#include "Instance_Model.h"
#include "InstancedProp.h"
#include "Unified.h"
#include "MapElement_Lake.h"
#pragma endregion
@@ -2313,6 +2315,43 @@ HRESULT CLoader::Loading_For_MapViewer()
return E_FAIL;
}
/* For.Prototype_Component_Water_Noise_D */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Noises_D"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE,
TEXT("../Bin/Resources/Models/Lake/T_Noises_D.dds"), 0)))) {
return E_FAIL;
}
/* For.Prototype_Component_T_Water_Normal_Large_N */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Water_Normal_Large_N"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE,
TEXT("../Bin/Resources/Models/Lake/T_Water_Normal_Large_N.dds"), 0)))) {
return E_FAIL;
}
/* For.Prototype_Component_T_Water_Normal_Subtle_N */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Water_Normal_Subtle_N"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE,
TEXT("../Bin/Resources/Models/Lake/T_Water_Normal_Subtle_N.dds"), 0)))) {
return E_FAIL;
}
/* For.Prototype_Component_T_Caustics_D */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Caustics_D"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE,
TEXT("../Bin/Resources/Models/Lake/T_Caustics_D.dds"), 0)))) {
return E_FAIL;
}
/* For.Prototype_Component_T_Water_N */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("T_Water_N"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE,
TEXT("../Bin/Resources/Models/Lake/T_Water_N.dds"), 0)))) {
return E_FAIL;
}
/* Lake_Cube_D */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Lake_Cube_D"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Models/Lake/SkyCube.dds"), 0)))) {
return E_FAIL;
}
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
/* For.Prototype_Component_SkyboxModel */
@@ -2325,6 +2364,16 @@ HRESULT CLoader::Loading_For_MapViewer()
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Land/Hogsmead_Land.fbx", XMMatrixIdentity()))))
return E_FAIL;
/* For.Prototype_Component_Hogwart_Lake */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Hogwart_Lake"),
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Lake/SM_Lake_A_Collision_Deep.fbx", XMMatrixIdentity()))))
return E_FAIL;
/* For.Prototype_Component_Hogwart_LakeSurFace */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_Hogwart_LakeSurFace"),
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Lake/SM_Lake_A_Collision_Shallow.fbx", XMMatrixIdentity()))))
return E_FAIL;
vector<_wstring> ModelPrototypeTags = {};
vector<filesystem::path> ModelPrototypePath = {};
@@ -2514,42 +2563,47 @@ 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", true, ModelPrototypeTags, ModelPrototypePath)))
///* 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",
".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
return E_FAIL;
#pragma endregion
@@ -2560,292 +2614,292 @@ vector<future<void>> jobFutures;
_uint iLoadCount = 46;
vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
{
{ /* Terrain */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Terrain",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Terrain",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* Ollivanders*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Ollivanders/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* Gatehouse*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Gatehouse/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* TScrolls */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TScrolls/Collisions",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* 3BroomStick*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_ThreeBroomsticks/Meshes/3Broom_Kit",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_QuidditchShop */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_QuidditchShop/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_HogsheadInn */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_HogsheadInn/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_Honeydukes */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Honeydukes/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_OwlPost */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_OwlPost/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_TeaShop */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_TeaShop/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_Zonkos */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Zonkos/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_DB_GR */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_DB_GR/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_Potions */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Potions/Collisions",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* BLDG_Salon */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_Salon/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* Hengist_Tree */
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Meshes/Vegetation/Hengist_Tree",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/Common/Collision/Vegetation",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN A*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_A/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN B*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_B/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN C*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_C/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN E*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_E/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN F*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_F/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN G*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_G/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN H*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_H/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
{ /* GEN J*/
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Meshes",
".bin", false,
&Contents[jobFutures.size()]
));
jobFutures.emplace_back(Deferred_FolderLoad(
"../Bin/Resources/Models/MapMesh/Game/Environment/Hogsmeade/BLDG_GEN_J/Collision",
".bin", false,
&Contents[jobFutures.size()]
));
}
}
for (auto& jobFuture : jobFutures)
//
//{
// { /* 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)
{
jobFuture.get();
}
@@ -2869,7 +2923,7 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
}
}
}
}*/
m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다.");
@@ -2917,7 +2971,7 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
{
CVIBuffer_Terrain* pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "Hogsmeade_HeightMap.bin", 512, 512);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"), pTerrain))) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain_Hogsmeade"), pTerrain))) {
return E_FAIL;
}
pTerrain->ConvertToHeightField(TEXT("Hogsmeade_HeightMap"));
@@ -2938,6 +2992,22 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
}
CVIBuffer_Terrain* pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "../Bin/Resources/Data/Map/Hogwart_Height.png");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain_Hogwart"), pTerrain))) {
return E_FAIL;
}
pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "../Bin/Resources/Data/Map/North_Hogwart_Height.png");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain_North_Hogwart"), pTerrain))) {
return E_FAIL;
}
pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "../Bin/Resources/Data/Map/South_Hogwart_Height.png");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain_South_Hogwart"), pTerrain))) {
return E_FAIL;
}
#pragma region INSTANCE_MODEL
CVIBuffer_Model_Instance::INSTANCE_DESC InstanceDesc = {};
InstanceDesc.iNum = 20;
@@ -3019,6 +3089,7 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
"../Bin/Resources/Models/InstanceProp/SM_HM_Door2b.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
return E_FAIL;
#pragma endregion // INSTANCE_MODEL
/* For.Prototype_Component_VIBuffer_Box */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Box"),
@@ -3072,6 +3143,14 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
if (FAILED(m_pGameInstance->Add_Prototype<CInstancedProp>(g_iStaticLevel, CInstancedProp::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Unified */
if (FAILED(m_pGameInstance->Add_Prototype<CUnified>(g_iStaticLevel, CUnified::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Unified */
if (FAILED(m_pGameInstance->Add_Prototype<CMapElement_Lake>(g_iStaticLevel, CMapElement_Lake::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_MapObject_Manager */
if (FAILED(m_pGameInstance->Add_Prototype<CMapObject_Manager>(g_iStaticLevel, CMapObject_Manager::Create(m_pDevice, m_pContext, ModelPrototypeTags, ModelPrototypePath))))
return E_FAIL;
@@ -3083,12 +3162,12 @@ vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
m_isFinished = true;
for (_uint i = 0; i < Contents.size(); ++i) {
for (_uint j = 0; j < (Contents[i])->size(); ++j) {
Safe_Delete((*Contents[i])[j]);
}
Safe_Delete(Contents[i]);
}
//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;
}
@@ -136,6 +136,12 @@ HRESULT CMainLight::Ready_Components()
LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK);
LightDesc.iLevel = NEXT_LEVEL;
#ifdef gimch
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f);
#endif // gimch
/* Com_Light*/
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc)))
{
@@ -0,0 +1,324 @@
#include "pch.h"
#include "MapElement_Lake.h"
#include "GameInstance.h"
#include "Terrain.h"
#include "Layer.h"
CMapElement_Lake::CMapElement_Lake(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMapElement{ pDevice, pContext }
{
}
CMapElement_Lake::CMapElement_Lake(const CMapElement_Lake& rhs)
: CMapElement(rhs)
{
}
HRESULT CMapElement_Lake::Initialize_Prototype()
{
return S_OK;
}
HRESULT CMapElement_Lake::Initialize(void* pArg)
{
MAPOBJECT_LOD_DESC* pDesc = static_cast<MAPOBJECT_LOD_DESC*>(pArg);
m_iMaxLodLevel = pDesc->iMaxLodLevel;
for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
{
m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
//m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
}
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
#ifdef _DEBUG
m_bSelected = false;
m_vPosition = pDesc->vPosition;
m_vScale = pDesc->vScale;
m_vRotation = pDesc->vRotation;
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 // _DEBUG
m_vRefractionColor = _float4(0.29f, 0.375f, 0.4f, 1.f);
m_vSurfaceColor = _float4(0.f, 1.f, 1.f, 1.f);
return S_OK;
}
void CMapElement_Lake::Priority_Update(_float fTimeDelta)
{
#ifdef _DEBUG
m_bSelected = false;
#endif
}
void CMapElement_Lake::Update(_float fTimeDelta)
{
m_fTimeAcc += fTimeDelta * m_fUVValue;
//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);
}
HRESULT CMapElement_Lake::Render()
{
if (FAILED(Bind_ShaderResources()))
return E_FAIL;
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::LAKE)))) {
return E_FAIL;
}
if (FAILED(m_pModelComs[0]->Render(0))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CMapElement_Lake::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
{
CModel* pModel = { nullptr };
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
reinterpret_cast<CComponent**>(&pModel))))
return E_FAIL;
m_pModelComs.push_back(pModel);
}
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
reinterpret_cast<CComponent**>(&m_pShaderCom))))
return E_FAIL;
/* Com_Texture */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("T_Noises_D"),
reinterpret_cast<CComponent**>(&m_pNoiseTextureCom))))
return E_FAIL;
/* Com_Texture */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("T_Water_Normal_Large_N"),
reinterpret_cast<CComponent**>(&m_pNormalLargeTextureCom))))
return E_FAIL;
/* Com_Texture */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("T_Water_Normal_Subtle_N"),
reinterpret_cast<CComponent**>(&m_pNormalSubTextureCom))))
return E_FAIL;
/* Com_Texture */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("T_Caustics_D"),
reinterpret_cast<CComponent**>(&m_pCausticsTextureCom))))
return E_FAIL;
/* Com_Texture */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("T_Water_N"),
reinterpret_cast<CComponent**>(&m_pNormalTextureCom))))
return E_FAIL;
/* Com_Texture */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Lake_Cube_D"),
reinterpret_cast<CComponent**>(&m_pCubeMapTextureCom))))
return E_FAIL;
return S_OK;
}
HRESULT CMapElement_Lake::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;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTimeAcc, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNormalValue1", &m_fUVValue1, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNormalValue2", &m_fUVValue2, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNormalValue3", &m_fUVValue3, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fUVSpeed1", &m_fUVSpeed1, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fUVSpeed2", &m_fUVSpeed2, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fUVSpeed3", &m_fUVSpeed3, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fRefractionStrength", &m_fRefractionStrength, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fRefractionPow", &m_fRefractionPow, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float3)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_vDiffuseColor", &m_vRefractionColor, sizeof(_float4)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_vSurfaceColor", &m_vSurfaceColor, sizeof(_float4)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_SRV("g_NormalTexture", m_pNormalTextureCom->Get_SRV(0)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_SRV("g_NormalLargeTexture", m_pNormalLargeTextureCom->Get_SRV(0)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_SRV("g_NormalSubTexture", m_pNormalSubTextureCom->Get_SRV(0)))) {
return E_FAIL;
}
if (FAILED(m_pCubeMapTextureCom->Bind_ShaderResource(m_pShaderCom, "g_CubeTexture", 0))) {
return E_FAIL;
}
return S_OK;
}
CMapElement_Lake* CMapElement_Lake::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CMapElement_Lake* pInstance = new CMapElement_Lake(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CMapElement_Lake");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CMapElement_Lake::Clone(void* pArg, CGameObject* pOwner)
{
CMapElement_Lake* pInstance = new CMapElement_Lake(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CMapElement_Lake");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CMapElement_Lake::Free()
{
__super::Free();
SAFE_RELEASE(m_pCubeMapTextureCom);
SAFE_RELEASE(m_pNormalTextureCom);
SAFE_RELEASE(m_pNormalLargeTextureCom);
SAFE_RELEASE(m_pNormalSubTextureCom);
SAFE_RELEASE(m_pCausticsTextureCom);
SAFE_RELEASE(m_pNoiseTextureCom);
SAFE_RELEASE(m_pShaderCom);
for (auto& pModel : m_pModelComs)
SAFE_RELEASE(pModel);
}
void CMapElement_Lake::Describe_Entity()
{
if (m_bDead)
return;
if (nullptr == m_pGameInstance)
return;
GUI::Begin("Lake");
GUI::Text(CMyTools::ToString(m_ModelPrototypeTags[m_iLodIndex]).c_str());
GUI::InputInt("Lod Level", (_int*)(&m_iLodIndex));
GUI::InputFloat("N_V1", (&m_fUVValue1));
GUI::InputFloat("N_V2", (&m_fUVValue2));
GUI::InputFloat("N_V3", (&m_fUVValue3));
GUI::InputFloat("UV_Speed1", (&m_fUVSpeed1));
GUI::InputFloat("UV_Speed2", (&m_fUVSpeed2));
GUI::InputFloat("UV_Speed3", (&m_fUVSpeed3));
GUI::InputFloat("m_fRefractionStrength", (&m_fRefractionStrength));
GUI::InputFloat("m_fRefractionPow", (&m_fRefractionPow));
m_iLodIndex = max(0, m_iLodIndex);
m_iLodIndex = min(m_iMaxLodLevel, m_iLodIndex);
GUI::ColorEdit4("Refaction Color", (_float*)&m_vRefractionColor);
GUI::ColorEdit4("Surface Color", (_float*)&m_vSurfaceColor);
GUI::InputFloat("UV", (_float*)&m_fUVValue);
GUI::Text("----- Transfrom ----");
GUI::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
GUI::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
GUI::InputFloat("Z##Position", &m_vPosition.z, 0.1f, 1.f);
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
{
if (m_pGameInstance->isPicking(&m_vPosition))
{
}
}
GUI::Text("----- Rotation ----");
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 10.f, 45.f);
GUI::Text("----- Scale ----");
GUI::InputFloat("X##Scale", &m_vScale.x, 0.1f, 1.f);
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.1f, 1.f);
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.1f, 1.f);
m_vScale.x = max(0.01f, m_vScale.x);
m_vScale.y = max(0.01f, m_vScale.y);
m_vScale.z = max(0.01f, m_vScale.z);
if (GUI::Button("Delete"))
m_bDead = true;
GUI::End();
m_bSelected = true;
}
@@ -58,7 +58,7 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
m_iContainerObjectIndex = 99;
//m_pContainer = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Building"))->Get_Object<CBuildingContainer>();
if (FAILED(Load_MapData("Map1205")))
/*if (FAILED(Load_MapData("Map1205")))
return E_FAIL;
if (FAILED(Load_LightObject("LightElement")))
@@ -73,7 +73,7 @@ HRESULT CMapObject_Manager::Initialize(void* pArg)
if (FAILED(Load_InteractObject("E_INTER_TeaShopTable")))
return E_FAIL;
if (FAILED(Load_InteractObject("E_INTER_TeaShopChair")))
return E_FAIL;
return E_FAIL;*/
/*if (FAILED(Load_LightObject("LightElement")))
+139 -83
View File
@@ -26,108 +26,61 @@ HRESULT CTerrain::Initialize(void* pArg)
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components()))
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
if (FAILED(Ready_AlphaMap()))
return E_FAIL;
m_fUsingSurfaceParams = 15.f / 27.f;
m_vRotation = _float3{ 0.f, 0.f, 0.f };
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-194, 18.5f, -153.f, 1.f));
TERRAIN_DESC* pDesc = static_cast<TERRAIN_DESC*>(pArg);
m_isEdit = pDesc->isEdit;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
if (FAILED(Ready_AlphaMap(pDesc)))
return E_FAIL;
//m_pVIBufferCom->Set_CullingRadius(0.04f);
m_pAlphaMap->Load_ToFile("Hogsmeade_AlphaMap.bin");
if(!m_isEdit)
m_pAlphaMap->Load_ToFile("Hogsmeade_AlphaMap.bin");
// Psx 적용할지 안할지
m_bUsePsx = true;
if(!m_bUsePsx)
{
if (FAILED(m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin")))
return E_FAIL;
}
else
{
CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
Desc.pMeshName = TEXT("Hogsmeade_HeightMap");
Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
/* Com_RigidBody */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"),
reinterpret_cast<CComponent**>(&m_pRigidBody), &Desc))) {
return E_FAIL;
}
}
//if(!m_bUsePsx)
//{
// if (FAILED(m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin")))
// return E_FAIL;
//}
//else
//{
// CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc{};
// Desc.pMeshName = TEXT("Hogsmeade_HeightMap");
// Desc.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN);
// /* Com_RigidBody */
// if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"),
// reinterpret_cast<CComponent**>(&m_pRigidBody), &Desc))) {
// return E_FAIL;
// }
//}
return S_OK;
}
void CTerrain::Priority_Update(_float fTimeDelta)
{
GUI::Begin("Terrain");
#pragma region ALPHA_MAP
//GUI::InputInt("Color", &m_iColorIndex);
//m_iColorIndex = max(0, min(4, m_iColorIndex));
//GUI::InputInt("Rnage", (_int*)(&m_iMaskRange));
//GUI::DragFloat("Value", &m_fMaskValue, 0.01f, -1.0f, 1.f);
//if (GUI::Button("Save", ImVec2(100.f, 30.f)))
//{
// m_pAlphaMap->Save_ToFile("Hogsmeade_AlphaMap.bin");
//}
//if (GUI::Button("Load", ImVec2(100.f, 30.f)))
//{
// m_pAlphaMap->Load_ToFile("Hogsmeade_AlphaMap.bin");
//}
//GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f);
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
{
if (m_pGameInstance->isPicking(&m_vPickingPosition))
{
if (m_pGameInstance->Key_Pressing(DIK_PERIOD))
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue);
if (m_pGameInstance->Key_Pressing(DIK_COMMA))
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue * -1.f);
//XMStoreFloat3(&m_vPickingPosition, XMVector3TransformCoord(XMLoadFloat3(&m_vPickingPosition), m_pTransformCom->Get_WorldMatrixInv()));
//m_pAlphaMap->Update(m_vPickingPosition, m_iColorIndex, m_fMaskValue, m_iMaskRange);
}
}
#pragma endregion
#pragma region HEIGHT MAP
HRESULT hr = {};
if(GUI::Button("Save HeightMap"))
hr = m_pVIBufferCom->Save_HeightMap("Hogsmeade_HeightMap2.bin");
//if(GUI::Button("Load HeightMap"))
// hr = m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin");
#pragma endregion
//_float4 vPos = {};
//_float3 vRotation = {};
//XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
//GUI::DragFloat3("Pos", (_float*)(&vPos));
//GUI::DragFloat3("Rota", (_float*)(&m_vRotation));
//m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
//m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
//GUI::DragFloat("Culling Radius", &m_fCullingRadius, 0.01f, 0.01f, 2.f);
GUI::End();
}
void CTerrain::Update(_float fTimeDelta)
{
//m_pVIBufferCom->Culling(XMMatrixIdentity());
if (m_isEdit)
Describe_Entity();
//m_pVIBufferCom->Culling(m_pTransformCom->Get_XMWorldMatrix());
if(m_pGameInstance->Key_Down(DIK_LSHIFT) && m_pGameInstance->Key_Down(DIK_W))
{
@@ -172,12 +125,14 @@ HRESULT CTerrain::Render()
return S_OK;
}
HRESULT CTerrain::Ready_Components()
HRESULT CTerrain::Ready_Components(void* pArg)
{
__super::Ready_Components(nullptr);
TERRAIN_DESC* pDesc = static_cast<TERRAIN_DESC*>(pArg);
/* Com_VIBuffer */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"),
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, pDesc->strBufferTag,
reinterpret_cast<CComponent**>(&m_pVIBufferCom))))
return E_FAIL;
@@ -251,9 +206,53 @@ HRESULT CTerrain::Bind_ShaderResources()
return S_OK;
}
HRESULT CTerrain::Ready_AlphaMap()
HRESULT CTerrain::Bind_ShaderResources_Edit()
{
m_pAlphaMap = CAlphaMap::Create(m_pDevice, m_pContext, 2048, 2048);
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDiffuseMultiplier", &m_vDRN.x, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fSurfaceMultiplier", &m_vDRN.y, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNormalMultiplier", &m_vDRN.z, sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pDiffuseTextureCom->Bind_ShaderResources(m_pShaderCom, "g_DiffuseTextures", 0, m_pDiffuseTextureCom->Get_Size()))) {
return E_FAIL;
}
if (FAILED(m_pNormalTextureCom->Bind_ShaderResources(m_pShaderCom, "g_NormalTextures", 0, m_pNormalTextureCom->Get_Size()))) {
return E_FAIL;
}
if (FAILED(m_pMROTextureCom->Bind_ShaderResources(m_pShaderCom, "g_SurfaceParamsTextures", 0, m_pMROTextureCom->Get_Size()))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_SRV("g_MaskTexture", m_pAlphaMap->Get_SRV()))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float))))
return E_FAIL;
return S_OK;
}
HRESULT CTerrain::Ready_AlphaMap(TERRAIN_DESC* pDesc)
{
m_pAlphaMap = CAlphaMap::Create(m_pDevice, m_pContext, pDesc->iAlphaSizeX, pDesc->iAlphaSizeY);
if(nullptr == m_pAlphaMap)
return E_FAIL;
@@ -303,5 +302,62 @@ void CTerrain::Free()
void CTerrain::Describe_Entity()
{
GUI::Begin("Terrain");
#pragma region ALPHA_MAP
GUI::InputInt("Color", &m_iColorIndex);
m_iColorIndex = max(0, min(4, m_iColorIndex));
GUI::InputInt("Rnage", (_int*)(&m_iMaskRange));
GUI::DragFloat("Value", &m_fMaskValue, 0.01f, -1.0f, 1.f);
if (GUI::Button("Save", ImVec2(100.f, 30.f)))
{
//m_pAlphaMap->Save_ToFile("Hogwart_AlphaMap.bin");
}
if (GUI::Button("Load", ImVec2(100.f, 30.f)))
{
//m_pAlphaMap->Load_ToFile("Hogwart_AlphaMap.bin");
}
//GUI::DragFloat("Up", &m_fUpValue, 0.01f, -1.0f, 1.f);
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
{
if (m_pGameInstance->isPicking(&m_vPickingPosition))
{
if (m_pGameInstance->Key_Pressing(DIK_PERIOD))
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue);
if (m_pGameInstance->Key_Pressing(DIK_COMMA))
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_fUpValue * -1.f);
XMStoreFloat3(&m_vPickingPosition, XMVector3TransformCoord(XMLoadFloat3(&m_vPickingPosition), m_pTransformCom->Get_WorldMatrixInv()));
m_pAlphaMap->Update(m_vPickingPosition, m_iColorIndex, m_fMaskValue, m_iMaskRange);
}
}
#pragma endregion
#pragma region HEIGHT MAP
HRESULT hr = {};
if(GUI::Button("Save HeightMap"))
hr = m_pVIBufferCom->Save_HeightMap("Hogwart.bin");
if(GUI::Button("Load HeightMap"))
hr = m_pVIBufferCom->Load_HeightMap("Hogwart.bin");
#pragma endregion
_float4 vPos = {};
_float3 vRotation = {};
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
GUI::DragFloat3("Pos", (_float*)(&vPos));
GUI::DragFloat3("Rota", (_float*)(&m_vRotation));
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
//GUI::DragFloat("Culling Radius", &m_fCullingRadius, 0.01f, 0.01f, 2.f);
GUI::End();
}
+159
View File
@@ -0,0 +1,159 @@
#include "pch.h"
#include "Unified.h"
#include "GameInstance.h"
CUnified::CUnified(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject{ pDevice, pContext }
{
}
CUnified::CUnified(const CUnified& rhs)
: CGameObject(rhs)
{
}
void CUnified::Priority_Update(_float fTimeDelta)
{
}
void CUnified::Update(_float fTimeDelta)
{
Describe_Entity();
}
void CUnified::Late_Update(_float fTimeDelta)
{
if(m_isVisible)
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
HRESULT CUnified::Render()
{
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
}
return S_OK;
}
HRESULT CUnified::Initialize_Prototype()
{
return S_OK;
}
HRESULT CUnified::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components(pArg)))
return E_FAIL;
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-291.2f,17.2f, -474.7f, 1.f));
m_fUsingSurfaceParams = 0.f;
return S_OK;
}
HRESULT CUnified::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_GameObject_SM_HW_HogwartsShell_B"),
reinterpret_cast<CComponent**>(&m_pModelCom))))
return E_FAIL;
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
reinterpret_cast<CComponent**>(&m_pShaderCom))))
return E_FAIL;
return S_OK;
}
HRESULT CUnified::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float)))) {
return E_FAIL;
}
return S_OK;
}
CUnified* CUnified::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CUnified* pInstance = new CUnified(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CUnified");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CUnified::Clone(void* pArg, CGameObject* pOwner)
{
CUnified* pInstance = new CUnified(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CUnified");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CUnified::Free()
{
__super::Free();
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pModelCom);
}
void CUnified::Describe_Entity()
{
GUI::Begin("Unified");
GUI::Checkbox("Visible ON / OFF", &m_isVisible);
GUI::End();
}
@@ -19,7 +19,7 @@ namespace Editor
enum class MAPOBJECT_RENDER_TYPE { NORMAL, DECAL, GLASS };
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, HAIR, EYELASH, OUTLINE_WRITE, OUTLINE_READ, END };
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, END };
enum class SHADER_PASS_MESH { DEFAULT, SHADOW, SKYBOX, ALPHABLEND, EFFECT_ALPHABLEND, EFFECT_BLEND, EFFECT_ALPHABLEND_CULL, EFFECT_BLEND_CULL, CAPTURE, BLUR, EFFECT_ALPHABLEND_UVMOVE, MAPTOOL, GLASS, OUTLINE_WRITE, OUTLINE_READ, BLOOM, LAKE, END };
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
@@ -23,6 +23,7 @@ class CLevel_MapViewer final : public CLevel
HRESULT Ready_Layer_Terrain(const _wstring& strLayerTag);
HRESULT Ready_Layer_InstanceProp(const _wstring& strLayerTag);
HRESULT Ready_Layer_BuildingContainer(const _wstring& strLayerTag);
HRESULT Ready_Layer_Unified(const _wstring& strLayerTag);
HRESULT Ready_Layer_MapObjectManager(const _wstring& strLayerTag);
@@ -27,9 +27,6 @@ class CMapElement abstract : public CGameObject
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
protected:
_bool m_bSelected = { false };
_uint m_iMaxLodLevel = {};
@@ -0,0 +1,67 @@
#pragma once
#include "Editor_Define.h"
#include "MapElement.h"
NS_BEGIN(Engine)
class CTexture;
NS_END
NS_BEGIN(Editor)
class CMapElement_Lake final : public CMapElement
{
public:
typedef struct tagMapObejct_Lake_Desc : public MAPOBJECT_LOD_DESC
{
vector<_wstring> SurfaceModelPrototypeTags;
}MAPOBJECT_LAKE_DESC;
private:
CMapElement_Lake(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CMapElement_Lake(const CMapElement_Lake& rhs);
virtual ~CMapElement_Lake() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
CTexture* m_pNormalTextureCom = { nullptr };
CTexture* m_pNormalLargeTextureCom = { nullptr };
CTexture* m_pNormalSubTextureCom = { nullptr };
CTexture* m_pCausticsTextureCom = { nullptr };
CTexture* m_pNoiseTextureCom = { nullptr };
CTexture* m_pCubeMapTextureCom = { nullptr };
_float m_fRefractionStrength = {0.1f};
_float m_fRefractionPow = {5.f};
_float m_fTimeAcc = {};
_float m_fUVValue = {0.05f};
_float m_fUVValue1 = {10.f};
_float m_fUVValue2 = {20.f};
_float m_fUVValue3 = {10.f};
_float m_fUVSpeed1 = { 0.01f };
_float m_fUVSpeed2 = { 0.001f };
_float m_fUVSpeed3 = { 0.01f };
_float4 m_vRefractionColor = {};
_float4 m_vSurfaceColor = {};
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Bind_ShaderResources() override;
public:
static CMapElement_Lake* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
NS_END
+14 -2
View File
@@ -14,6 +14,16 @@ NS_BEGIN(Editor)
class CTerrain final : public CGameObject
{
public:
typedef struct tagTerrainDesc
{
_bool isEdit;
_uint iAlphaSizeX;
_uint iAlphaSizeY;
_float3 vPosition;
_wstring strBufferTag;
}TERRAIN_DESC;
private:
CTerrain(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CTerrain(const CTerrain& Prototype);
@@ -38,6 +48,7 @@ class CTerrain final : public CGameObject
CRigidBody_Static* m_pRigidBody = { nullptr };
_bool m_bUsePsx = { false };
_bool m_isEdit = {};
_float m_fUsingSurfaceParams = {};
_float m_fHeightRatio = {1.f};
@@ -60,9 +71,10 @@ class CTerrain final : public CGameObject
_bool m_bWasWireFrame = { false };
private:
HRESULT Ready_Components();
HRESULT Ready_Components(void* pArg);
HRESULT Bind_ShaderResources();
HRESULT Ready_AlphaMap();
HRESULT Bind_ShaderResources_Edit();
HRESULT Ready_AlphaMap(TERRAIN_DESC* pDesc);
public:
static CTerrain* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+56
View File
@@ -0,0 +1,56 @@
#pragma once
#include "Editor_Define.h"
#include "GameObject.h"
NS_BEGIN(Engine)
class CModel;
class CShader;
NS_END
NS_BEGIN(Editor)
class CUnified final : public CGameObject
{
private:
CUnified(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CUnified(const CUnified& rhs);
virtual ~CUnified() = default;
public:
_uint Get_LodLevel() const { return m_iMaxLodLevel; }
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
_bool m_bSelected = { false };
_bool m_isVisible = { true };
_uint m_iMaxLodLevel = {};
_uint m_iLodIndex = {};
_float m_fUsingSurfaceParams = {};
CShader* m_pShaderCom = { nullptr };
CModel* m_pModelCom = { nullptr };
_float4 m_vPosition = {};
_float4x4 m_ProjMatrix = {};
_float4x4 m_ViewMatrix = {};
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
virtual HRESULT Bind_ShaderResources() override;
public:
static CUnified* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
virtual void Free() override;
void Describe_Entity() override;
};
NS_END
@@ -313,6 +313,9 @@ HRESULT CMaterial::Add_Texture(const _char* pTextureFolderPath, string& FileType
else if (!strcmp(FileType.c_str(), "Diff")){
eTexture = aiTextureType::aiTextureType_DIFFUSE;
}
else if (!strcmp(FileType.c_str(), "Diffuse")){
eTexture = aiTextureType::aiTextureType_DIFFUSE;
}
else if (!strcmp(FileType.c_str(), "d")){
eTexture = aiTextureType::aiTextureType_DIFFUSE;
}
@@ -325,6 +328,9 @@ HRESULT CMaterial::Add_Texture(const _char* pTextureFolderPath, string& FileType
else if (!strcmp(FileType.c_str(), "normal")){
eTexture = aiTextureType::aiTextureType_NORMALS;
}
else if (!strcmp(FileType.c_str(), "Normal")){
eTexture = aiTextureType::aiTextureType_NORMALS;
}
else if (!strcmp(FileType.c_str(), "Norm")){
eTexture = aiTextureType::aiTextureType_NORMALS;
}
+6 -9
View File
@@ -77,14 +77,15 @@ HRESULT CMesh::Initialize_Prototype(MODEL eType, vector<class CBone*>& Bones, co
{
case Engine::MODEL::NONANIM:
case Engine::MODEL::PBR_NONANIM:
case Engine::MODEL::ENVIROMENT:
hr = Ready_VertexBuffer_For_NonAnim(pAIMesh, PreTransformMatrix);
break;
case Engine::MODEL::ANIM:
case Engine::MODEL::PBR_ANIM:
hr = Ready_VertexBuffer_For_Anim(Bones, pAIMesh);
break;
case Engine::MODEL::ENVIROMENT:
break;
default:
break;
}
@@ -203,19 +204,15 @@ HRESULT CMesh::Initialize_Prototype(MODEL eType, const CModel* pModel, SaveMesh*
{
case Engine::MODEL::NONANIM:
case Engine::MODEL::PBR_NONANIM:
case Engine::MODEL::ENVIROMENT:
hr = Ready_VertexBuffer_For_NonAnim(_SaveMesh, PreTransformMatrix);
break;
case Engine::MODEL::ANIM:
case Engine::MODEL::PBR_ANIM:
hr = Ready_VertexBuffer_For_Anim(pModel, _SaveMesh);
break;
case Engine::MODEL::ENVIROMENT:
m_pVertexPositions = new _float3[m_iNumVertices];
for (size_t i = 0; i < m_iNumVertices; ++i)
{
memcpy_s(m_pVertexPositions, sizeof(_float3) * m_iNumVertices, m_Vertices.data(), sizeof(_float3) * m_iNumVertices);
}
break;
default:
break;
}
+1 -2
View File
@@ -24,8 +24,7 @@ void CQuadTree::Set_CullingRadius(_float fRadius)
void CQuadTree::Culling(CGameInstance* pGameInstance, const _float3* pVertexPositions, _uint* pIndices, _uint* pNumIndices)
{
/* 해당 노드에서 그릴건지 확인 */
if (nullptr == m_pChildren[CORNER_LT] ||
true == isDraw(pGameInstance, pVertexPositions))
if (nullptr == m_pChildren[CORNER_LT] || true == isDraw(pGameInstance, pVertexPositions))
{
_bool isDraw[NEIGHBOR_END] = { true, true, true, true };
@@ -77,6 +77,11 @@ HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pT
return E_FAIL;
}
break;
case Engine::TEXTURE_LOAD_TYPE::CUBE:
if (FAILED(ParseTexturePathToSRVs(pTextureFilePath))) {
return E_FAIL;
}
break;
default:
break;
}
@@ -174,6 +179,11 @@ HRESULT CTexture::ParseTexturePathToSRVs(const _tchar* pTextureFolderPath)
return S_OK;
}
HRESULT CTexture::Load_CubeSRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV)
{
return S_OK;
}
CTexture* CTexture::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrGroupName)
{
CTexture* pInstance = new CTexture(pDevice, pContext);
@@ -17,6 +17,7 @@ enum class TEXTURE_LOAD_TYPE {
SINGLE, // original/diffuseddd.png
INCREMENTAL, // original/diffuse[%d].png
PATH, // original/
CUBE,
END
};
enum class PXMATERIAL {
+1 -1
View File
@@ -31,7 +31,7 @@ class CQuadTree final : public CBase
_float m_fCullingRadius = { 0.2f };
CQuadTree* m_pChildren[CORNER_END] = { nullptr };
CQuadTree* m_pChildren[CORNER_END] = { nullptr, nullptr, nullptr, nullptr };
CQuadTree* m_pNeighbors[NEIGHBOR_END] = { nullptr, nullptr, nullptr, nullptr };
private:
+1 -1
View File
@@ -62,7 +62,7 @@ class CRenderer final : public CBase
_float m_fDOF_ENV_MaxEnd = { 360.f };
_float m_fDOF_ENV_AmountRadius = { 1.f };
_float m_fSSAO_Radius = { 1.812f };
_float m_fSSAO_Radius = { 0.812f };
_float m_fSSAO_BIAS = { 0.042f };
SSAO_GEOMETRY_HEMISPHERE m_tagSSAOGeometry = {};
+1
View File
@@ -32,6 +32,7 @@ class ENGINE_DLL CTexture final :
HRESULT Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV);
HRESULT ParseTextureIncrementalToSRVs(_uint iNumTextures, const _tchar* pTextureFilePath);
HRESULT ParseTexturePathToSRVs(const _tchar* pTextureFolderPath);
HRESULT Load_CubeSRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV);
private:
vector<ID3D11ShaderResourceView*> m_SRVs = {};