diff --git a/.gitignore b/.gitignore index 06ae45fd..1771ebb0 100644 --- a/.gitignore +++ b/.gitignore @@ -363,8 +363,6 @@ MigrationBackup/ *.filters -Assets/Editor/Layouts/UserLayout.ini - JSON/Schemas/Catalog/ Assets/Editor/Editor.SHConfig diff --git a/Assets/Editor/Editor.SHConfig b/Assets/Editor/Editor.SHConfig deleted file mode 100644 index 51425027..00000000 --- a/Assets/Editor/Editor.SHConfig +++ /dev/null @@ -1,4 +0,0 @@ -Start Maximized: true -Working Scene ID: 97161771 -Window Size: {x: 1920, y: 1080} -Style: 0 \ No newline at end of file diff --git a/Assets/Editor/Layouts/UserLayout.ini b/Assets/Editor/Layouts/UserLayout.ini new file mode 100644 index 00000000..7c2df9e0 --- /dev/null +++ b/Assets/Editor/Layouts/UserLayout.ini @@ -0,0 +1,165 @@ +[Window][MainStatusBar] +Pos=0,989 +Size=1920,20 +Collapsed=0 + +[Window][SHEditorMenuBar] +Pos=0,48 +Size=1920,941 +Collapsed=0 + +[Window][Hierarchy Panel] +Pos=0,187 +Size=300,802 +Collapsed=0 +DockId=0x00000004,0 + +[Window][Debug##Default] +Pos=60,60 +Size=400,400 +Collapsed=0 + +[Window][Inspector] +Pos=1604,48 +Size=316,941 +Collapsed=0 +DockId=0x00000006,0 + +[Window][Profiler] +Pos=0,48 +Size=300,137 +Collapsed=0 +DockId=0x00000003,0 + +[Window][Viewport] +Pos=227,48 +Size=1457,1012 +Collapsed=0 +DockId=0x0000000B,0 + +[Window][面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面o] +Pos=60,60 +Size=32,64 +Collapsed=0 + +[Window][面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面面] +Pos=60,60 +Size=999,581 +Collapsed=0 + +[Window][o] +Pos=60,60 +Size=32,64 +Collapsed=0 + +[Window][面面] +Pos=60,60 +Size=553,422 +Collapsed=0 + +[Window][] +Pos=60,60 +Size=770,394 +Collapsed=0 + +[Window][ Viewport] +Pos=227,48 +Size=1457,1012 +Collapsed=0 +DockId=0x0000000B,0 + +[Window][ Viewport] +Pos=227,48 +Size=1457,1012 +Collapsed=0 +DockId=0x0000000B,0 + +[Window][ Viewport] +Pos=302,48 +Size=1300,836 +Collapsed=0 +DockId=0x0000000B,0 + +[Window][V] +Pos=310,722 +Size=1501,338 +Collapsed=0 +DockId=0x00000008,0 + +[Window][p] +Pos=310,750 +Size=1501,310 +Collapsed=0 +DockId=0x0000000A,0 + +[Window][ Asset Browser] +Pos=302,886 +Size=1300,103 +Collapsed=0 +DockId=0x0000000C,0 + +[Window][Material Inspector] +Pos=1604,48 +Size=316,941 +Collapsed=0 +DockId=0x00000006,1 + +[Window][Save scene as...] +Pos=1197,693 +Size=165,120 +Collapsed=0 + +[Window][Create New Asset] +Pos=896,472 +Size=464,144 +Collapsed=0 + +[Window][Collider Tag Panel] +Pos=60,60 +Size=625,744 +Collapsed=0 + +[Window][Input Bindings Panel] +Pos=60,60 +Size=154,204 +Collapsed=0 + +[Window][Save Scene As] +Pos=877,444 +Size=165,120 +Collapsed=0 + +[Table][0x9D40AE32,17] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 +Column 2 Weight=1.0000 +Column 3 Weight=1.0000 +Column 4 Weight=1.0000 +Column 5 Weight=1.0000 +Column 6 Weight=1.0000 +Column 7 Weight=1.0000 +Column 8 Weight=1.0000 +Column 9 Weight=1.0000 +Column 10 Weight=1.0000 +Column 11 Weight=1.0000 +Column 12 Weight=1.0000 +Column 13 Weight=1.0000 +Column 14 Weight=1.0000 +Column 15 Weight=1.0000 +Column 16 Weight=1.0000 + +[Docking][Data] +DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=1920,941 Split=X + DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=1602,1036 Split=X + DockNode ID=0x00000001 Parent=0x00000005 SizeRef=300,1036 Split=Y Selected=0x1E6EB881 + DockNode ID=0x00000003 Parent=0x00000001 SizeRef=225,147 Selected=0x1E6EB881 + DockNode ID=0x00000004 Parent=0x00000001 SizeRef=225,863 Selected=0xE096E5AE + DockNode ID=0x00000002 Parent=0x00000005 SizeRef=1300,1036 Split=Y Selected=0xB41284E7 + DockNode ID=0x00000007 Parent=0x00000002 SizeRef=1501,672 Split=Y Selected=0xB41284E7 + DockNode ID=0x00000009 Parent=0x00000007 SizeRef=1501,700 Split=Y Selected=0xB41284E7 + DockNode ID=0x0000000B Parent=0x00000009 SizeRef=1501,836 CentralNode=1 Selected=0xB41284E7 + DockNode ID=0x0000000C Parent=0x00000009 SizeRef=1501,103 Selected=0xB128252A + DockNode ID=0x0000000A Parent=0x00000007 SizeRef=1501,310 Selected=0xD446F7B6 + DockNode ID=0x00000008 Parent=0x00000002 SizeRef=1501,338 Selected=0xD9F31532 + DockNode ID=0x00000006 Parent=0xC5C9B8AB SizeRef=316,1036 Selected=0xE7039252 + diff --git a/SHADE_Engine/src/Assets/Asset Types/Models/SHMeshAsset.h b/SHADE_Engine/src/Assets/Asset Types/Models/SHMeshAsset.h index 18272d02..14744c4d 100644 --- a/SHADE_Engine/src/Assets/Asset Types/Models/SHMeshAsset.h +++ b/SHADE_Engine/src/Assets/Asset Types/Models/SHMeshAsset.h @@ -58,6 +58,6 @@ namespace SHADE std::vector Indices; std::vector VertexBoneIndices; std::vector VertexBoneWeights; - uint32_t BoneCount; + uint32_t BoneCount; }; } diff --git a/SHADE_Engine/src/Filesystem/SHFileSystem.cpp b/SHADE_Engine/src/Filesystem/SHFileSystem.cpp index a28f70ca..cbcbd45b 100644 --- a/SHADE_Engine/src/Filesystem/SHFileSystem.cpp +++ b/SHADE_Engine/src/Filesystem/SHFileSystem.cpp @@ -105,6 +105,12 @@ namespace SHADE std::vector assets; // Get all subfolders/files in this current folder + if (!std::filesystem::exists(std::filesystem::path(folder->path))) + { + SHLOG_WARNING("[Asset Manager] Path to build directory does not exist!: {}", folder->path); + continue; + } + for (auto& dirEntry : std::filesystem::directory_iterator(folder->path)) { auto path = dirEntry.path(); diff --git a/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDevice.h b/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDevice.h index a273da74..e2533106 100644 --- a/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDevice.h +++ b/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDevice.h @@ -10,6 +10,7 @@ namespace SHADE enum class SH_PHYSICAL_DEVICE_TYPE { BEST, + DEDICATED, }; class SHVkPhysicalDevice diff --git a/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.cpp b/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.cpp index 050ca769..ebda72c8 100644 --- a/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.cpp +++ b/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.cpp @@ -160,9 +160,31 @@ namespace SHADE } } + return bestDevice; } + vk::PhysicalDevice SHVkPhysicalDeviceLibrary::GetFirstDedicatedDevice(uint32_t apiVersion /*= SHVulkanAPIVersion::V_1_2*/) + { + if (!queried || physicalDevices.empty()) + return nullptr; + + for (auto const& device : physicalDevices) + { + // Check for API version and device type. Ignore if queried device doesn't support version passed in + if (device.getProperties().apiVersion < static_cast(apiVersion)) + continue; + + //VkDeviceSize biggestDeviceHeapSize = device.getMemoryProperties().; + if (device.getProperties().deviceType == vk::PhysicalDeviceType::eDiscreteGpu) + return device; + + } + + + return nullptr; + } + /***************************************************************************/ /*! @@ -181,10 +203,10 @@ namespace SHADE } #ifdef DEBUG - SHLOG_TRACE("Successfully queried Physical Devices:"); + SHLOG_INFO("Successfully queried Physical Devices:"); for (auto const& device : physicalDevices) { - SHLOG_TRACE(std::string_view (std::string("\t-") + GetDeviceTypeName(device.getProperties().deviceType) + device.getProperties().deviceName.operator std::string())); + SHLOG_INFO(std::string_view (std::string("\t-") + GetDeviceTypeName(device.getProperties().deviceType) + device.getProperties().deviceName.operator std::string())); } #endif diff --git a/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.h b/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.h index 79516987..4def81fa 100644 --- a/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.h +++ b/SHADE_Engine/src/Graphics/Devices/SHVkPhysicalDeviceLibrary.h @@ -26,6 +26,7 @@ namespace SHADE static void QueryPhysicalDevices(bool printInfo) noexcept; //static std::vector> GetDevicesByType(VkPhysicalDeviceType gpuType, SHVulkanAPIVersion apiVersion = SHVulkanAPIVersion::V_1_2) noexcept; static vk::PhysicalDevice GetBestDevice(uint32_t apiVersion = VK_API_VERSION_1_3); + static vk::PhysicalDevice GetFirstDedicatedDevice(uint32_t apiVersion = VK_API_VERSION_1_3); }; } diff --git a/SHADE_Engine/src/Graphics/Instance/SHVkInstance.cpp b/SHADE_Engine/src/Graphics/Instance/SHVkInstance.cpp index 237c6fee..067645ff 100644 --- a/SHADE_Engine/src/Graphics/Instance/SHVkInstance.cpp +++ b/SHADE_Engine/src/Graphics/Instance/SHVkInstance.cpp @@ -213,6 +213,8 @@ namespace SHADE { case SH_PHYSICAL_DEVICE_TYPE::BEST: return resourceManager.Create(SHVkPhysicalDeviceLibrary::GetBestDevice()); + case SH_PHYSICAL_DEVICE_TYPE::DEDICATED: + return resourceManager.Create(SHVkPhysicalDeviceLibrary::GetFirstDedicatedDevice()); default: return resourceManager.Create(SHVkPhysicalDeviceLibrary::GetBestDevice()); } diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 18dcbd42..09352923 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -65,7 +65,7 @@ namespace SHADE #endif // Get Physical Device - physicalDevice = SHVkInstance::CreatePhysicalDevice(SH_PHYSICAL_DEVICE_TYPE::BEST); + physicalDevice = SHVkInstance::CreatePhysicalDevice(SH_PHYSICAL_DEVICE_TYPE::DEDICATED); if (!physicalDevice->GetVkPhysicalDevice()) { throw std::runtime_error("[Graphics System] No supported Vulkan 1.3 compatible GPU was detected!"); @@ -127,12 +127,12 @@ namespace SHADE SHFreetypeInstance::Init(); - SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false); - SHAssetManager::CompileAsset("../../Assets/Shaders/SSAO_CS.glsl", false); - SHAssetManager::CompileAsset("../../Assets/Shaders/SSAOBlur_CS.glsl", false); - SHAssetManager::CompileAsset("../../Assets/Shaders/PureCopy_CS.glsl", false); - SHAssetManager::CompileAsset("../../Assets/Shaders/TestCube_VS.glsl", false); - SHAssetManager::CompileAsset("../../Assets/Shaders/TestCube_FS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/SSAO_CS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/SSAOBlur_CS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/PureCopy_CS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/TestCube_VS.glsl", false); + //SHAssetManager::CompileAsset("../../Assets/Shaders/TestCube_FS.glsl", false); // Load Built In Shaders static constexpr AssetID VS_DEFAULT = 39210065; defaultVertShader = SHResourceManager::LoadOrGet(VS_DEFAULT);