Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GameWin221 committed Jul 20, 2023
2 parents 781266c + eb1c93e commit fd4fa32
Show file tree
Hide file tree
Showing 57 changed files with 1,318 additions and 9,418 deletions.
2 changes: 1 addition & 1 deletion EruptionEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define SHADOW_CASCADES 3

#define SOFT_SHADOWS 1
#define BLUR_SSAO 0
#define SOFT_SSAO 1

#define MAX_POINT_LIGHT_SHADOWS 4
#define MAX_SPOT_LIGHT_SHADOWS 4
Expand Down
23 changes: 10 additions & 13 deletions EruptionEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalIncludeDirectories>$(VULKAN_SDK)\Include;$(SolutionDir)External\GLFW\include;$(SolutionDir)External\GLM\include;$(SolutionDir)External\STB;$(SolutionDir)Source;$(SolutionDir)External\ImGui;$(SolutionDir)External\CL;$(SolutionDir)External\PFD;$(SolutionDir)External\VMA;$(SolutionDir);$(SolutionDir)External\TinyGLTF;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(VULKAN_SDK)\Include;$(SolutionDir)External\GLFW\include;$(SolutionDir)External\GLM\include;$(SolutionDir)External\STB;$(SolutionDir)Source;$(SolutionDir)External\ImGui;$(SolutionDir)External\CL;$(SolutionDir)External\PFD;$(SolutionDir)External\VMA;$(SolutionDir);$(SolutionDir)External\JSON;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Expand Down Expand Up @@ -169,7 +169,7 @@
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalIncludeDirectories>$(VULKAN_SDK)\Include;$(SolutionDir)External\GLFW\include;$(SolutionDir)External\GLM\include;$(SolutionDir)External\STB;$(SolutionDir)Source;$(SolutionDir)External\ImGui;$(SolutionDir)External\CL;$(SolutionDir)External\PFD;$(SolutionDir)External\VMA;$(SolutionDir);$(SolutionDir)External\TinyGLTF;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(VULKAN_SDK)\Include;$(SolutionDir)External\GLFW\include;$(SolutionDir)External\GLM\include;$(SolutionDir)External\STB;$(SolutionDir)Source;$(SolutionDir)External\ImGui;$(SolutionDir)External\CL;$(SolutionDir)External\PFD;$(SolutionDir)External\VMA;$(SolutionDir);$(SolutionDir)External\JSON;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Expand All @@ -194,11 +194,10 @@
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="External\TinyGLTF\tiny_gltf.cpp" />
<ClCompile Include="Source\Renderer\ImGuiContext.cpp" />
<ClCompile Include="Source\Assets\MeshImporter\Importer.cpp" />
<ClCompile Include="Source\Assets\MeshImporter\GLTFImporter.cpp" />
<ClCompile Include="Source\Renderer\Sampler.cpp" />
<ClCompile Include="Source\Renderer\Framebuffer.cpp" />
<ClCompile Include="Source\Editor\EditorImageAtlas.cpp" />
<ClCompile Include="Source\Editor\UIPanels\AssetManagerPanel.cpp" />
<ClCompile Include="Source\Editor\UIPanels\InspectorPanel.cpp" />
Expand Down Expand Up @@ -244,7 +243,6 @@
<ClCompile Include="External\VMA\VMA.cpp" />
<ClCompile Include="Source\Editor\EditorLayer.cpp" />
<ClCompile Include="Source\Input\InputManager.cpp" />
<ClCompile Include="Source\Renderer\RenderPass.cpp" />
<ClCompile Include="Source\Assets\AssetManager.cpp" />
<ClCompile Include="Source\Assets\Material.cpp" />
<ClCompile Include="Source\Assets\Mesh.cpp" />
Expand All @@ -254,25 +252,25 @@
<ClCompile Include="Source\Renderer\Buffers\MemoryBuffer.cpp" />
<ClCompile Include="Source\Renderer\DescriptorSet.cpp" />
<ClCompile Include="Source\Renderer\Image.cpp" />
<ClCompile Include="Source\Renderer\Pipelines\Pipeline.cpp" />
<ClCompile Include="Source\Renderer\Passes\Pass.cpp" />
<ClCompile Include="Source\Renderer\Camera\Camera.cpp" />
<ClCompile Include="Source\Renderer\Camera\CameraBuffer.cpp" />
<ClCompile Include="Source\Renderer\Pipelines\ComputePipeline.cpp" />
<ClCompile Include="Source\Renderer\Passes\ComputePass.cpp" />
<ClCompile Include="Source\Renderer\Context.cpp" />
<ClCompile Include="Source\Core\Eruption.cpp" />
<ClCompile Include="Source\main.cpp" />
<ClCompile Include="Source\Renderer\Pipelines\GraphicsPipeline.cpp" />
<ClCompile Include="Source\Renderer\Passes\GraphicsPass.cpp" />
<ClCompile Include="Source\Renderer\Renderer.cpp" />
<ClCompile Include="Source\Renderer\Swapchain.cpp" />
<ClCompile Include="Source\Renderer\Window.cpp" />
<ClCompile Include="Source\Scene\Scene.cpp" />
<ClCompile Include="Source\Scene\SceneObject.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Source\Renderer\ImGuiContext.hpp" />
<ClInclude Include="Source\Assets\MeshImporter\Importer.hpp" />
<ClInclude Include="Source\Assets\MeshImporter\GLTFImporter.hpp" />
<ClInclude Include="Source\Renderer\Sampler.hpp" />
<ClInclude Include="Source\Renderer\Framebuffer.hpp" />
<ClInclude Include="Source\Editor\EditorImageAtlas.hpp" />
<ClInclude Include="Source\Editor\UIPanels\AssetManagerPanel.hpp" />
<ClInclude Include="Source\Editor\UIPanels\InspectorPanel.hpp" />
Expand All @@ -293,7 +291,6 @@
<ClInclude Include="Source\Editor\EditorCommons.hpp" />
<ClInclude Include="Source\Editor\EditorLayer.hpp" />
<ClInclude Include="Source\Input\InputManager.hpp" />
<ClInclude Include="Source\Renderer\RenderPass.hpp" />
<ClInclude Include="Source\Assets\Asset.hpp" />
<ClInclude Include="Source\Assets\AssetManager.hpp" />
<ClInclude Include="Source\Assets\Material.hpp" />
Expand All @@ -305,18 +302,18 @@
<ClInclude Include="Source\Renderer\Buffers\Vertex.hpp" />
<ClInclude Include="Source\Renderer\DescriptorSet.hpp" />
<ClInclude Include="Source\Renderer\Image.hpp" />
<ClInclude Include="Source\Renderer\Pipelines\Pipeline.hpp" />
<ClInclude Include="Source\Renderer\Passes\Pass.hpp" />
<ClInclude Include="Source\Core\Log.hpp" />
<ClInclude Include="Source\Core\Types.hpp" />
<ClInclude Include="Source\Renderer\Camera\Camera.hpp" />
<ClInclude Include="Source\Renderer\Camera\CameraBuffer.hpp" />
<ClInclude Include="Source\Renderer\Pipelines\ComputePipeline.hpp" />
<ClInclude Include="Source\Renderer\Passes\ComputePass.hpp" />
<ClInclude Include="Source\Renderer\Context.hpp" />
<ClInclude Include="Source\Core\Eruption.hpp" />
<ClInclude Include="Source\Renderer\Lights\DirectionalLight.hpp" />
<ClInclude Include="Source\Renderer\Lights\PointLight.hpp" />
<ClInclude Include="Source\Renderer\Lights\Spotlight.hpp" />
<ClInclude Include="Source\Renderer\Pipelines\GraphicsPipeline.hpp" />
<ClInclude Include="Source\Renderer\Passes\GraphicsPass.hpp" />
<ClInclude Include="Source\Renderer\Renderer.hpp" />
<ClInclude Include="Source\Renderer\Swapchain.hpp" />
<ClInclude Include="Source\Renderer\Window.hpp" />
Expand Down
33 changes: 12 additions & 21 deletions EruptionEngine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
<ClCompile Include="Source\Renderer\Camera\CameraBuffer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\Pipelines\ComputePipeline.cpp">
<ClCompile Include="Source\Renderer\Passes\ComputePass.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\Pipelines\GraphicsPipeline.cpp">
<ClCompile Include="Source\Renderer\Passes\GraphicsPass.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\Pipelines\Pipeline.cpp">
<ClCompile Include="Source\Renderer\Passes\Pass.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\DescriptorSet.cpp">
Expand Down Expand Up @@ -111,9 +111,6 @@
<ClCompile Include="Source\Renderer\Renderer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\RenderPass.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Editor\EditorLayer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -138,21 +135,18 @@
<ClCompile Include="Source\Editor\UIPanels\AssetManagerPanel.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\Framebuffer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\Sampler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="External\TinyGLTF\tiny_gltf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Assets\MeshImporter\GLTFImporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Assets\MeshImporter\Importer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\ImGuiContext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Include\EnPch.hpp">
Expand Down Expand Up @@ -227,13 +221,13 @@
<ClInclude Include="Source\Renderer\Camera\CameraBuffer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\Pipelines\ComputePipeline.hpp">
<ClInclude Include="Source\Renderer\Passes\ComputePass.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\Pipelines\GraphicsPipeline.hpp">
<ClInclude Include="Source\Renderer\Passes\GraphicsPass.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\Pipelines\Pipeline.hpp">
<ClInclude Include="Source\Renderer\Passes\Pass.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\DescriptorSet.hpp">
Expand Down Expand Up @@ -275,9 +269,6 @@
<ClInclude Include="Source\Renderer\Renderer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\RenderPass.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Editor\EditorLayer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -305,9 +296,6 @@
<ClInclude Include="Source\Editor\UIPanels\AssetManagerPanel.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\Framebuffer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\Sampler.hpp">
<Filter>Header Files</Filter>
</ClInclude>
Expand All @@ -317,6 +305,9 @@
<ClInclude Include="Source\Assets\MeshImporter\Importer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\Renderer\ImGuiContext.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="EruptionEngine.ini" />
Expand Down
20 changes: 10 additions & 10 deletions External/ImGui/imgui_impl_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct ImGui_ImplVulkan_Data
VkPipelineCreateFlags PipelineCreateFlags;
VkDescriptorSetLayout DescriptorSetLayout;
VkPipelineLayout PipelineLayout;
VkPipeline GraphicsPipeline;
VkPipeline GraphicsPass;
uint32_t Subpass;
VkShaderModule ShaderModuleVert;
VkShaderModule ShaderModuleFrag;
Expand Down Expand Up @@ -460,7 +460,7 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm
ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
if (pipeline == VK_NULL_HANDLE)
pipeline = bd->GraphicsPipeline;
pipeline = bd->GraphicsPass;

// Allocate array to store enough vertex/index buffers. Each unique viewport gets its own storage.
ImGui_ImplVulkan_ViewportData* viewport_renderer_data = (ImGui_ImplVulkan_ViewportData*)draw_data->OwnerViewport->RendererUserData;
Expand Down Expand Up @@ -986,7 +986,7 @@ bool ImGui_ImplVulkan_CreateDeviceObjects()
check_vk_result(err);
}

ImGui_ImplVulkan_CreatePipeline(v->Device, v->Allocator, v->PipelineCache, bd->RenderPass, v->MSAASamples, &bd->GraphicsPipeline, bd->Subpass);
ImGui_ImplVulkan_CreatePipeline(v->Device, v->Allocator, v->PipelineCache, bd->RenderPass, v->MSAASamples, &bd->GraphicsPass, bd->Subpass);

return true;
}
Expand Down Expand Up @@ -1022,7 +1022,7 @@ void ImGui_ImplVulkan_DestroyDeviceObjects()
if (bd->FontSampler) { vkDestroySampler(v->Device, bd->FontSampler, v->Allocator); bd->FontSampler = VK_NULL_HANDLE; }
if (bd->DescriptorSetLayout) { vkDestroyDescriptorSetLayout(v->Device, bd->DescriptorSetLayout, v->Allocator); bd->DescriptorSetLayout = VK_NULL_HANDLE; }
if (bd->PipelineLayout) { vkDestroyPipelineLayout(v->Device, bd->PipelineLayout, v->Allocator); bd->PipelineLayout = VK_NULL_HANDLE; }
if (bd->GraphicsPipeline) { vkDestroyPipeline(v->Device, bd->GraphicsPipeline, v->Allocator); bd->GraphicsPipeline = VK_NULL_HANDLE; }
if (bd->GraphicsPass) { vkDestroyPipeline(v->Device, bd->GraphicsPass, v->Allocator); bd->GraphicsPass = VK_NULL_HANDLE; }
}

bool ImGui_ImplVulkan_LoadFunctions(PFN_vkVoidFunction(*loader_func)(const char* function_name, void* user_data), void* user_data)
Expand Down Expand Up @@ -1333,8 +1333,8 @@ void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, V
wd->ImageCount = 0;
if (wd->RenderPass)
vkDestroyRenderPass(device, wd->RenderPass, allocator);
if (wd->GraphicsPipeline)
vkDestroyPipeline(device, wd->GraphicsPipeline, allocator);
if (wd->GraphicsPass)
vkDestroyPipeline(device, wd->GraphicsPass, allocator);

// If min image count was not specified, request different count of images dependent on selected present mode
if (min_image_count == 0)
Expand Down Expand Up @@ -1433,7 +1433,7 @@ void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, V

// We do not create a pipeline by default as this is also used by examples' main.cpp,
// but secondary viewport in multi-viewport mode may want to create one with:
//ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->GraphicsPipeline, bd->Subpass);
//ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->GraphicsPass, bd->Subpass);
}

// Create The Image Views
Expand Down Expand Up @@ -1484,7 +1484,7 @@ void ImGui_ImplVulkanH_CreateOrResizeWindow(VkInstance instance, VkPhysicalDevic
IM_ASSERT(g_FunctionsLoaded && "Need to call ImGui_ImplVulkan_LoadFunctions() if IMGUI_IMPL_VULKAN_NO_PROTOTYPES or VK_NO_PROTOTYPES are set!");
(void)instance;
ImGui_ImplVulkanH_CreateWindowSwapChain(physical_device, device, wd, allocator, width, height, min_image_count);
//ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->GraphicsPipeline, g_VulkanInitInfo.Subpass);
//ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->GraphicsPass, g_VulkanInitInfo.Subpass);
ImGui_ImplVulkanH_CreateWindowCommandBuffers(physical_device, device, wd, queue_family, allocator);
}

Expand All @@ -1502,7 +1502,7 @@ void ImGui_ImplVulkanH_DestroyWindow(VkInstance instance, VkDevice device, ImGui
IM_FREE(wd->FrameSemaphores);
wd->Frames = NULL;
wd->FrameSemaphores = NULL;
vkDestroyPipeline(device, wd->GraphicsPipeline, allocator);
vkDestroyPipeline(device, wd->GraphicsPass, allocator);
vkDestroyRenderPass(device, wd->RenderPass, allocator);
vkDestroySwapchainKHR(device, wd->Swapchain, allocator);
vkDestroySurfaceKHR(instance, wd->Surface, allocator);
Expand Down Expand Up @@ -1677,7 +1677,7 @@ static void ImGui_ImplVulkan_RenderWindow(ImGuiViewport* viewport, void*)
}
}

ImGui_ImplVulkan_RenderDrawData(viewport->DrawData, fd->CommandBuffer, wd->GraphicsPipeline);
ImGui_ImplVulkan_RenderDrawData(viewport->DrawData, fd->CommandBuffer, wd->GraphicsPass);

{
vkCmdEndRenderPass(fd->CommandBuffer);
Expand Down
2 changes: 1 addition & 1 deletion External/ImGui/imgui_impl_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct ImGui_ImplVulkanH_Window
VkSurfaceFormatKHR SurfaceFormat;
VkPresentModeKHR PresentMode;
VkRenderPass RenderPass;
VkPipeline GraphicsPipeline; // The window pipeline may uses a different VkRenderPass than the one passed in ImGui_ImplVulkan_InitInfo
VkPipeline GraphicsPass; // The window pipeline may uses a different VkRenderPass than the one passed in ImGui_ImplVulkan_InitInfo
bool ClearEnable;
VkClearValue ClearValue;
uint32_t FrameIndex; // Current frame being rendered to (0 <= FrameIndex < FrameInFlightCount)
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions External/TinyGLTF/tiny_gltf.cpp

This file was deleted.

Loading

0 comments on commit fd4fa32

Please sign in to comment.