diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7e4f4..666391f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,18 +54,20 @@ file(GLOB LIB_SOURCES "src/core/*.cpp" "src/core/scene/*.cpp" "src/core/materials/*.cpp" + "src/core/renderers/*.cpp" "src/utilities/*.cpp" "src/graphics/*.cpp" "src/graphics/renderpasses/*.cpp") file(GLOB LIB_HEADERS - "include/VkFW/*.h" - "include/VkFW/core/*.h" - "include/VkFW/core/scene/*.h" - "include/VkFW/core/materials/*.h" - "include/VkFW/utilities/*.h" - "include/VkFW/graphics/*.h" - "include/VkFW/graphics/renderpasses/*.h") + "include/engine/*.h" + "include/engine/core/*.h" + "include/engine/core/scene/*.h" + "include/engine/core/renderers/*.h" + "include/engine/core/materials/*.h" + "include/engine/utilities/*.h" + "include/engine/graphics/*.h" + "include/engine/graphics/renderpasses/*.h") add_library(VkFW STATIC ${LIB_SOURCES} ${LIB_HEADERS}) @@ -96,6 +98,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") file(GLOB materials_h ${CMAKE_CURRENT_SOURCE_DIR}/include/VkFW/core/materials/*.h ) + file(GLOB rend_h + ${CMAKE_CURRENT_SOURCE_DIR}/include/VkFW/core/renderers/*.h + ) file(GLOB utilities_h ${CMAKE_CURRENT_SOURCE_DIR}/include/VkFW/utilities/*.h ) @@ -112,6 +117,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") source_group("Header Files\\Core" FILES ${core_h}) source_group("Header Files\\Core\\Scene Objects" FILES ${scene_objects_h}) source_group("Header Files\\Core\\Materials" FILES ${materials_h}) + source_group("Header Files\\Core\\Renderers" FILES ${rend_h}) source_group("Header Files\\Graphics" FILES ${backend_h}) source_group("Header Files\\Graphics\\RenderPasses" FILES ${rpass_h}) @@ -121,6 +127,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") file(GLOB materials_cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/core/materials/*.cpp ) + file(GLOB rend_cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/core/renderers/*.cpp + ) file(GLOB utilities_cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/utilities/*.cpp ) @@ -138,6 +147,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") source_group("Source Files\\Core" FILES ${core_cpp}) source_group("Source Files\\Core\\Scene Objects" FILES ${scene_objects_cpp}) source_group("Source Files\\Core\\Materials" FILES ${materials_cpp}) + source_group("Source Files\\Core\\Renderers" FILES ${rend_cpp}) source_group("Source Files\\Graphics" FILES ${backend_cpp}) source_group("Source Files\\Graphics\\RenderPasses" FILES ${rpass_cpp}) diff --git a/examples/lighting-test/application.cpp b/examples/lighting-test/application.cpp index 9b427aa..b012ef5 100644 --- a/examples/lighting-test/application.cpp +++ b/examples/lighting-test/application.cpp @@ -15,7 +15,7 @@ void VulkanRenderer::init(RendererSettings settings) std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); - m_renderer = new Renderer(m_window, settings); + m_renderer = new ForwardRenderer(m_window, settings); setup(); diff --git a/examples/lighting-test/application.h b/examples/lighting-test/application.h index ac73f32..a6e4c8c 100644 --- a/examples/lighting-test/application.h +++ b/examples/lighting-test/application.h @@ -3,14 +3,13 @@ #include -#include -#include +#include #include #include #include -#include + /** * Example app diff --git a/examples/renderer-app/application.cpp b/examples/renderer-app/application.cpp index 6ba90e8..fa1c986 100644 --- a/examples/renderer-app/application.cpp +++ b/examples/renderer-app/application.cpp @@ -15,7 +15,7 @@ void VulkanRenderer::init(RendererSettings settings) std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); - m_renderer = new Renderer(m_window, settings); + m_renderer = settings.renderingType == TFORWARD ? new ForwardRenderer(m_window, settings) : nullptr; setup(); @@ -289,10 +289,6 @@ void VulkanRenderer::setup() // hair->set_scale(0.1f); // m_scene->add(hair); - - - - Mesh *lanternMesh = new Mesh(); lanternMesh->load_file(MESH_PATH + "lantern.obj", true); auto lanternMat = new PhysicallyBasedMaterial(); @@ -336,7 +332,7 @@ void VulkanRenderer::setup() stoneMat->set_roughness(0.9f); m_scene->add(stoneMesh); - m_scene->set_ambient_color({0.2,0.25,0.61}); + m_scene->set_ambient_color({0.2, 0.25, 0.61}); m_controller = new Controller(camera); } diff --git a/examples/rotating-kabuto/main.cpp b/examples/rotating-kabuto/main.cpp index 5f983d7..003415f 100644 --- a/examples/rotating-kabuto/main.cpp +++ b/examples/rotating-kabuto/main.cpp @@ -35,7 +35,7 @@ int main() settings.clearColor = Vec4(0.0, 0.0, 0.0, 1.0); settings.renderingType = TFORWARD; - Renderer* renderer = new Renderer(window, settings); + Renderer* renderer = new ForwardRenderer(window, settings); Camera* camera = new Camera(); camera->set_position(Vec3(0.0f, 0.15f, -1.0f)); diff --git a/include/engine/core.h b/include/engine/core.h index cd7063b..8f661ad 100644 --- a/include/engine/core.h +++ b/include/engine/core.h @@ -28,3 +28,5 @@ #include #include +#include + diff --git a/include/engine/core/renderer.h b/include/engine/core/renderer.h index bce0835..b786e24 100644 --- a/include/engine/core/renderer.h +++ b/include/engine/core/renderer.h @@ -10,7 +10,6 @@ Implementation of this class is fragmentated in three submodules: * vk_renderer.cpp - * vk_renderer_vk_mgr.cpp * vk_renderer_data_mgr.cpp //////////////////////////////////////////////////////////////////////////////////// @@ -51,7 +50,7 @@ Renderer Global Settings Data */ struct RendererSettings { - RendererType renderingType{TDEFERRED}; + RendererType renderingType{TFORWARD}; AntialiasingType AAtype{MSAA_x4}; BufferingType bufferingType{_DOUBLE}; @@ -60,6 +59,7 @@ struct RendererSettings DepthFormatType depthFormat{D32F}; ShadowResolution shadowResolution{LOW}; + bool updateShadows{false}; AmbientOcclusionType occlusionType{SSAO}; @@ -92,33 +92,31 @@ struct RenderPipeline }; /** - * Renders a given scene data to a given window. Fully parametrizable. Main class of the library. It can be inherited for achieving a higher end application. + * Virtual class. Renders a given scene data to a given window. Fully parametrizable. It has to be inherited for achieving a higher end application. */ class Renderer { #pragma region Properties protected: RendererSettings m_settings{}; + Context m_context{}; Window *m_window; + RenderPipeline m_renderPipeline; utils::DeletionQueue m_deletionQueue; - Mesh *m_vignette{nullptr}; - uint32_t m_currentFrame{0}; bool m_initialized{false}; - bool m_updateShadowQuality{false}; - bool m_updateContext{false}; bool m_updateFramebuffers{false}; GUIOverlay *m_gui{nullptr}; #pragma endregion public: - Renderer(Window *window) : m_window(window) { on_awake(); } - Renderer(Window *window, RendererSettings settings) : m_window(window), m_settings(settings) { on_awake(); } + Renderer(Window *window) : m_window(window) { on_instance(); } + Renderer(Window *window, RendererSettings settings) : m_window(window), m_settings(settings) { on_instance(); } #pragma region Getters & Setters @@ -127,84 +125,25 @@ class Renderer inline RendererSettings get_settings() { return m_settings; } inline void set_settings(RendererSettings settings) { m_settings = settings; } - inline void set_clearcolor(Vec4 c) - { - m_settings.clearColor = c; - } - inline void set_antialiasing(AntialiasingType msaa) - { - m_settings.AAtype = msaa; - if (m_initialized) - { - m_updateContext = true; - } - } - inline void set_shadow_quality(ShadowResolution quality) - { - m_settings.shadowResolution = quality; - if (m_initialized) - m_updateShadowQuality = true; - } - inline void set_color_format(ColorFormatType color) - { - m_settings.colorFormat = color; - if (m_initialized) - m_updateContext = true; - } - inline void set_depth_format(DepthFormatType d) - { - m_settings.depthFormat = d; - if (m_initialized) - m_updateContext = true; - } - inline void set_sync_type(SyncType sync) - { - m_settings.screenSync = sync; - if (m_initialized) - m_updateFramebuffers = true; - } - - inline void enable_gui_overlay(bool op) { m_settings.enableUI; } - - inline void set_gui_overlay(GUIOverlay *gui) - { - m_gui = gui; - } - - inline GUIOverlay *get_gui_overlay() - { - return m_gui; - } - inline void set_hardware_depth_bias(bool op) { m_settings.enableHardwareDepthBias = op; }; + inline void set_clearcolor(Vec4 c) { m_settings.clearColor = c; } + inline void set_antialiasing(AntialiasingType msaa) { m_settings.AAtype = msaa; } + inline void set_color_format(ColorFormatType color) { m_settings.colorFormat = color; } + inline void set_depth_format(DepthFormatType d) { m_settings.depthFormat = d; } + inline void set_gui_overlay(GUIOverlay *gui) { m_gui = gui; } + inline GUIOverlay *get_gui_overlay() { return m_gui; } inline RenderPipeline get_render_pipeline() const { return m_renderPipeline; } - inline void set_rendering_method(RendererType type) - { - m_settings.renderingType = type; - if (m_initialized) - m_updateContext = true; - } - inline void set_deferred_output_type(int op) - { - // if (m_initialized) - // static_cast(m_renderPipeline.renderpasses[COMPOSITION])->set_output_type(op); - } - inline int get_deferred_output_type() const - { - // return static_cast(m_renderPipeline.renderpasses[COMPOSITION])->get_output_type(); - return 0; - } - inline AmbientOcclusionType get_ssao_type() const { return m_settings.occlusionType; } - inline void set_ssao_type(AmbientOcclusionType ao) + inline void enable_gui_overlay(bool op) { m_settings.enableUI; } + inline void set_sync_type(SyncType sync) { - m_settings.occlusionType = ao; + m_settings.screenSync = sync; if (m_initialized) m_updateFramebuffers = true; } #pragma endregion -#pragma region Core Functions +#pragma region Public Functions /** * Inits the renderer. @@ -224,11 +163,13 @@ class Renderer */ void shutdown(Scene *const scene); +#pragma endregion +#pragma region Core Functions protected: /* What to do when instancing the renderer */ - virtual void on_awake() {} + virtual void on_instance() {} /* What to do when initiating the renderer */ @@ -248,7 +189,7 @@ class Renderer /* Init renderpasses and create framebuffers and image resources attached to them */ - virtual void setup_renderpasses(); // Should be zero + virtual void setup_renderpasses() = 0; /* Link images of previous passes to current pass */ @@ -257,15 +198,7 @@ class Renderer Clean and recreates swapchain and framebuffers in the renderer. Useful to use when resizing context */ void update_renderpasses(); - /* - Resource like samplers, base textures and misc creation - */ - virtual void init_resources(); - /* - Clean all resources used - */ - virtual void clean_Resources(); - + #pragma endregion /* //////////////////////////////////////////////////////////////////////////////////// @@ -275,20 +208,26 @@ class Renderer //////////////////////////////////////////////////////////////////////////////////// */ #pragma region Data Management + /* + Resource like samplers, base textures and misc creation + */ + virtual void init_resources(); + /* + Clean all resources used + */ + virtual void clean_Resources(); /* Object descriptor layouts uniforms buffer upload to GPU */ - void upload_object_data(Scene *const scene); + virtual void upload_object_data(Scene *const scene); /* Global descriptor layouts uniforms buffer upload to GPU */ - void upload_global_data(Scene *const scene); - + virtual void upload_global_data(Scene *const scene); /* Initialize and setup textures and uniforms in given material */ - void setup_material(Material *const mat); - + virtual void setup_material(Material *const mat); /* Upload geometry vertex buffers to the GPU */ diff --git a/include/engine/core/renderers/forward.h b/include/engine/core/renderers/forward.h new file mode 100644 index 0000000..eb2e863 --- /dev/null +++ b/include/engine/core/renderers/forward.h @@ -0,0 +1,47 @@ +#ifndef FORWARD_H +#define FORWARD_H + +#include + +VULKAN_ENGINE_NAMESPACE_BEGIN + +/* +Renders a given scene data to a given window using forward rendering. Fully parametrizable. +*/ +class ForwardRenderer : public Renderer +{ + Mesh *m_vignette; + + enum RenderPasses{ + SHADOW = 0, + FORWARD = 1 + }; + +public: + ForwardRenderer(Window *window) : Renderer(window) {} + ForwardRenderer(Window *window, RendererSettings settings) : Renderer(window, settings) {} + + inline void set_shadow_quality(ShadowResolution quality) + { + m_settings.shadowResolution = quality; + if (m_initialized) + m_settings.updateShadows = true; + } + +protected: + virtual void on_before_render(Scene *const scene); + + virtual void on_after_render(VkResult &renderResult, Scene *const scene); + + virtual void setup_renderpasses(); + + virtual void init_resources(); + + virtual void clean_Resources(); + + virtual void update_shadow_quality(); +}; + +VULKAN_ENGINE_NAMESPACE_END + +#endif \ No newline at end of file diff --git a/include/engine/graphics/renderpass.h b/include/engine/graphics/renderpass.h index 05d526e..d59b4c8 100644 --- a/include/engine/graphics/renderpass.h +++ b/include/engine/graphics/renderpass.h @@ -70,15 +70,16 @@ It can be inherited for full user control over the render pipeline. class RenderPass { protected: + Context *m_context{nullptr}; + VkRenderPass m_handle; VkExtent2D m_extent; - std::vector m_framebuffer_handles; - - Context *m_context{nullptr}; - std::vector m_attachments; uint32_t m_framebufferCount; // How many framebuffers will be attached to this renderpass, usually is just one. uint32_t m_framebufferImageDepth; // The depth of the framebuffer image layers. + std::vector m_framebuffer_handles; + + std::vector m_attachments; std::unordered_map m_shaderPasses; diff --git a/src/core/renderer.cpp b/src/core/renderer.cpp index f56d9d5..806ee3a 100644 --- a/src/core/renderer.cpp +++ b/src/core/renderer.cpp @@ -100,7 +100,6 @@ void Renderer::shutdown(Scene *const scene) void Renderer::on_before_render(Scene *const scene) { - if (Frame::guiEnabled && m_gui) m_gui->render(); @@ -108,11 +107,6 @@ void Renderer::on_before_render(Scene *const scene) upload_object_data(scene); - m_renderPipeline.renderpasses[1]->set_attachment_clear_value( - {m_settings.clearColor.r, - m_settings.clearColor.g, - m_settings.clearColor.b, - m_settings.clearColor.a}); } void Renderer::on_after_render(VkResult &renderResult, Scene *const scene) @@ -166,33 +160,6 @@ void Renderer::render(Scene *const scene) on_after_render(renderResult, scene); } - -void Renderer::setup_renderpasses() -{ - - const uint32_t SHADOW_RES = (uint32_t)m_settings.shadowResolution; - const uint32_t totalImagesInFlight = (uint32_t)m_settings.bufferingType + 1; - - ForwardPass *forwardPass = new ForwardPass( - &m_context, - m_window->get_extent(), - totalImagesInFlight, - m_settings.colorFormat, - m_settings.depthFormat, - m_settings.AAtype); - forwardPass->set_image_dependace_table({{0, {0}}}); - - ShadowPass *shadowPass = new ShadowPass( - &m_context, - {SHADOW_RES, SHADOW_RES}, - totalImagesInFlight, - VK_MAX_LIGHTS, - m_settings.depthFormat); - - m_renderPipeline.push_renderpass(shadowPass); - m_renderPipeline.push_renderpass(forwardPass); -} - void Renderer::connect_renderpass(RenderPass *const currentPass) { if (currentPass->get_image_dependace_table().empty()) diff --git a/src/core/renderer_data_mgr.cpp b/src/core/renderer_data_mgr.cpp index 2759987..e1de9b9 100644 --- a/src/core/renderer_data_mgr.cpp +++ b/src/core/renderer_data_mgr.cpp @@ -216,9 +216,7 @@ void Renderer::init_resources() Texture::DEBUG_TEXTURE->m_settings.anisotropicFilter, false); Texture::DEBUG_TEXTURE->m_buffer_loaded = true; - // Setup vignette vertex buffers - m_vignette = Mesh::create_quad(); - upload_geometry_data(m_vignette->get_geometry()); + } void Renderer::clean_Resources() @@ -230,11 +228,7 @@ void Renderer::clean_Resources() buffer.cleanup(m_context.memory); } } - Texture::DEBUG_TEXTURE->m_image.cleanup(m_context.device, m_context.memory); - - m_vignette->get_geometry()->get_render_data().vbo.cleanup(m_context.memory); - m_vignette->get_geometry()->get_render_data().ibo.cleanup(m_context.memory); } diff --git a/src/core/renderers/forward.cpp b/src/core/renderers/forward.cpp new file mode 100644 index 0000000..3f36804 --- /dev/null +++ b/src/core/renderers/forward.cpp @@ -0,0 +1,76 @@ +#include + +VULKAN_ENGINE_NAMESPACE_BEGIN + +void ForwardRenderer::on_before_render(Scene *const scene) +{ + Renderer::on_before_render(scene); + + m_renderPipeline.renderpasses[1]->set_attachment_clear_value( + {m_settings.clearColor.r, + m_settings.clearColor.g, + m_settings.clearColor.b, + m_settings.clearColor.a}); +} + +void ForwardRenderer::on_after_render(VkResult &renderResult, Scene *const scene) +{ + Renderer::on_after_render(renderResult, scene); + + if (m_settings.updateShadows) + update_shadow_quality(); +} +void ForwardRenderer::setup_renderpasses() +{ + const uint32_t SHADOW_RES = (uint32_t)m_settings.shadowResolution; + const uint32_t totalImagesInFlight = (uint32_t)m_settings.bufferingType + 1; + + ForwardPass *forwardPass = new ForwardPass( + &m_context, + m_window->get_extent(), + totalImagesInFlight, + m_settings.colorFormat, + m_settings.depthFormat, + m_settings.AAtype); + forwardPass->set_image_dependace_table({{0, {0}}}); + + ShadowPass *shadowPass = new ShadowPass( + &m_context, + {SHADOW_RES, SHADOW_RES}, + totalImagesInFlight, + VK_MAX_LIGHTS, + m_settings.depthFormat); + + m_renderPipeline.push_renderpass(shadowPass); + m_renderPipeline.push_renderpass(forwardPass); +} + +void ForwardRenderer::init_resources() +{ + Renderer::init_resources(); + + m_vignette = Mesh::create_quad(); + upload_geometry_data(m_vignette->get_geometry()); +} + +void ForwardRenderer::clean_Resources() +{ + Renderer::clean_Resources(); + + m_vignette->get_geometry()->get_render_data().vbo.cleanup(m_context.memory); + m_vignette->get_geometry()->get_render_data().ibo.cleanup(m_context.memory); +} + +void ForwardRenderer::update_shadow_quality() +{ + m_context.wait_for_device(); + + const uint32_t SHADOW_RES = (uint32_t)m_settings.shadowResolution; + m_renderPipeline.renderpasses[SHADOW]->set_extent({SHADOW_RES, SHADOW_RES}); + m_renderPipeline.renderpasses[SHADOW]->update(); + + m_settings.updateShadows = false; + + connect_renderpass(m_renderPipeline.renderpasses[FORWARD]); +} +VULKAN_ENGINE_NAMESPACE_END \ No newline at end of file diff --git a/src/utilities/renderer_widget.cpp b/src/utilities/renderer_widget.cpp index 9e5ffa7..3a80603 100644 --- a/src/utilities/renderer_widget.cpp +++ b/src/utilities/renderer_widget.cpp @@ -7,47 +7,47 @@ void RendererSettingsWidget::render() const char *renderTypes[] = {"FORWARD", "DEFERRED"}; static int type_current = static_cast(m_renderer->get_settings().renderingType); - if (ImGui::Combo("Rendering Method", &type_current, renderTypes, IM_ARRAYSIZE(renderTypes))) - { - switch (type_current) - { - case 0: - m_renderer->set_rendering_method(RendererType::TFORWARD); - break; - case 1: - m_renderer->set_rendering_method(RendererType::TDEFERRED); - break; - } - } + // if (ImGui::Combo("Rendering Method", &type_current, renderTypes, IM_ARRAYSIZE(renderTypes))) + // { + // switch (type_current) + // { + // case 0: + // m_renderer->set_rendering_method(RendererType::TFORWARD); + // break; + // case 1: + // m_renderer->set_rendering_method(RendererType::TDEFERRED); + // break; + // } + // } if (type_current == 1) { const char *outputTypes[] = {"LIGHTING", "POSITION", "NORMALS", "ALBEDO", "MATERIAL", "AO"}; - static int otype_current = static_cast(m_renderer->get_deferred_output_type()); - if (ImGui::Combo("Shading Output", &otype_current, outputTypes, IM_ARRAYSIZE(outputTypes))) - { - switch (otype_current) - { - case 0: - m_renderer->set_deferred_output_type(0); - break; - case 1: - m_renderer->set_deferred_output_type(1); - break; - case 2: - m_renderer->set_deferred_output_type(2); - break; - case 3: - m_renderer->set_deferred_output_type(3); - break; - case 4: - m_renderer->set_deferred_output_type(4); - break; - case 5: - m_renderer->set_deferred_output_type(5); - break; - } - } + // static int otype_current = static_cast(m_renderer->get_deferred_output_type()); + // if (ImGui::Combo("Shading Output", &otype_current, outputTypes, IM_ARRAYSIZE(outputTypes))) + // { + // switch (otype_current) + // { + // case 0: + // m_renderer->set_deferred_output_type(0); + // break; + // case 1: + // m_renderer->set_deferred_output_type(1); + // break; + // case 2: + // m_renderer->set_deferred_output_type(2); + // break; + // case 3: + // m_renderer->set_deferred_output_type(3); + // break; + // case 4: + // m_renderer->set_deferred_output_type(4); + // break; + // case 5: + // m_renderer->set_deferred_output_type(5); + // break; + // } + // } } const char *items[] = {"NONE", "MSAAx4", "MSAAx8", "FXAA"}; @@ -112,19 +112,19 @@ void RendererSettingsWidget::render() } const char *ssaoType[] = {"SSAO", "Unsharp SSAO"}; - static int currentSSAO = static_cast(m_renderer->get_ssao_type()); - if (ImGui::Combo("SSAO Implementation", ¤tSSAO, ssaoType, IM_ARRAYSIZE(ssaoType))) - { - switch (currentSSAO) - { - case 0: - m_renderer->set_ssao_type(AmbientOcclusionType::SSAO); - break; - case 1: - m_renderer->set_ssao_type(AmbientOcclusionType::USSAO); - break; - } - }; + // static int currentSSAO = static_cast(m_renderer->get_ssao_type()); + // if (ImGui::Combo("SSAO Implementation", ¤tSSAO, ssaoType, IM_ARRAYSIZE(ssaoType))) + // { + // switch (currentSSAO) + // { + // case 0: + // m_renderer->set_ssao_type(AmbientOcclusionType::SSAO); + // break; + // case 1: + // m_renderer->set_ssao_type(AmbientOcclusionType::USSAO); + // break; + // } + // }; ImGui::BulletText("Gamma Correction Enabled"); ImGui::BulletText("Device Dependable Anisotropic Filter Enabled"); @@ -152,26 +152,26 @@ void RendererSettingsWidget::render() break; } - if (ImGui::Combo("Shadows Quality", &res_current, res, IM_ARRAYSIZE(res))) - { - switch (res_current) - { - case 0: - m_renderer->set_shadow_quality(ShadowResolution::VERY_LOW); - break; - case 1: - m_renderer->set_shadow_quality(ShadowResolution::LOW); - break; - case 2: - m_renderer->set_shadow_quality(ShadowResolution::MEDIUM); - break; - case 3: - m_renderer->set_shadow_quality(ShadowResolution::HIGH); - break; - case 4: - m_renderer->set_shadow_quality(ShadowResolution::ULTRA); - break; - } - } + // if (ImGui::Combo("Shadows Quality", &res_current, res, IM_ARRAYSIZE(res))) + // { + // switch (res_current) + // { + // case 0: + // m_renderer->set_shadow_quality(ShadowResolution::VERY_LOW); + // break; + // case 1: + // m_renderer->set_shadow_quality(ShadowResolution::LOW); + // break; + // case 2: + // m_renderer->set_shadow_quality(ShadowResolution::MEDIUM); + // break; + // case 3: + // m_renderer->set_shadow_quality(ShadowResolution::HIGH); + // break; + // case 4: + // m_renderer->set_shadow_quality(ShadowResolution::ULTRA); + // break; + // } + // } } VULKAN_ENGINE_NAMESPACE_END \ No newline at end of file