diff --git a/Editor/src/Commands/Commands/Commands.cpp b/Editor/src/Commands/Commands/Commands.cpp index 9a7143a6..51bde9d3 100644 --- a/Editor/src/Commands/Commands/Commands.cpp +++ b/Editor/src/Commands/Commands/Commands.cpp @@ -139,4 +139,11 @@ namespace NuakeEditor } return true; } + + bool SetVSync::Execute() + { + Engine::GetCurrentWindow()->SetVSync(value); + + return true; + } } \ No newline at end of file diff --git a/Editor/src/Commands/Commands/Commands.h b/Editor/src/Commands/Commands/Commands.h index 78abd447..843feb4a 100644 --- a/Editor/src/Commands/Commands/Commands.h +++ b/Editor/src/Commands/Commands/Commands.h @@ -60,4 +60,18 @@ namespace NuakeEditor { bool Execute() override; }; + + class SetVSync : public ICommand + { + private: + bool value; + + public: + SetVSync(bool value) : value(value) + { + } + + bool Execute() override; + }; + } \ No newline at end of file diff --git a/Editor/src/Misc/GizmoDrawer.cpp b/Editor/src/Misc/GizmoDrawer.cpp index 496bd6ff..2fd37f8e 100644 --- a/Editor/src/Misc/GizmoDrawer.cpp +++ b/Editor/src/Misc/GizmoDrawer.cpp @@ -445,6 +445,8 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) const Vector3& cameraPosition = scene->m_EditorCamera->GetTranslation(); + const Vector3 gizmoSize = Vector3(Engine::GetProject()->Settings.GizmoSize); + // Camera auto camView = scene->m_Registry.view(); for (auto e : camView) @@ -461,7 +463,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) const Vector3& particleGlobalPosition = transform.GetGlobalPosition(); particleTransform[3] = initialTransform[3]; - particleTransform = glm::scale(particleTransform, m_GizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); + particleTransform = glm::scale(particleTransform, gizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, particleTransform); renderList.Flush(gizmoShader, true); @@ -500,7 +502,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) const Vector3& particleGlobalPosition = transform.GetGlobalPosition(); particleTransform[3] = initialTransform[3]; - particleTransform = glm::scale(particleTransform, m_GizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); + particleTransform = glm::scale(particleTransform, gizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, particleTransform); renderList.Flush(gizmoShader, true); @@ -522,7 +524,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) const Vector3& particleGlobalPosition = transform.GetGlobalPosition(); particleTransform[3] = initialTransform[3]; - particleTransform = glm::scale(particleTransform, m_GizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); + particleTransform = glm::scale(particleTransform, gizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, particleTransform); renderList.Flush(gizmoShader, true); @@ -544,7 +546,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) // Translation const Vector3& particleGlobalPosition = transform.GetGlobalPosition(); particleTransform[3] = initialTransform[3]; - particleTransform = glm::scale(particleTransform, Vector3(0.1, 0.1, 0.1) * GetGizmoScale(cameraPosition, particleGlobalPosition)); + particleTransform = glm::scale(particleTransform, (gizmoSize / 2.0f) * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, particleTransform); renderList.Flush(gizmoShader, true); @@ -566,7 +568,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) // Translation const Vector3& particleGlobalPosition = transformComponent.GetGlobalPosition(); transform[3] = initialTransform[3]; - transform = glm::scale(transform, m_GizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); + transform = glm::scale(transform, gizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, transform); renderList.Flush(gizmoShader, true); @@ -587,7 +589,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) // Translation const Vector3& particleGlobalPosition = transformComponent.GetGlobalPosition(); transform[3] = initialTransform[3]; - transform = glm::scale(transform, m_GizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); + transform = glm::scale(transform, gizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, transform); renderList.Flush(gizmoShader, true); @@ -608,7 +610,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) // Translation const Vector3& particleGlobalPosition = transformComponent.GetGlobalPosition(); transform[3] = initialTransform[3]; - transform = glm::scale(transform, m_GizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); + transform = glm::scale(transform, gizmoSize * GetGizmoScale(cameraPosition, particleGlobalPosition)); renderList.AddToRenderList(Renderer::QuadMesh, transform); renderList.Flush(gizmoShader, true); diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 6f76a4ed..64f51dcf 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -61,6 +61,8 @@ namespace Nuake { ImFont* boldFont; ImFont* EditorInterface::bigIconFont; + NuakeEditor::CommandBuffer* EditorInterface::mCommandBuffer; + glm::vec3 DepthToWorldPosition(const glm::vec2& pixelPos, float depth, const glm::mat4& projectionMatrix, const glm::mat4& viewMatrix, const glm::vec2& viewportSize) { // Convert pixel position to normalized device coordinates (NDC) @@ -93,14 +95,16 @@ namespace Nuake { return worldPos; } - EditorInterface::EditorInterface(CommandBuffer& commandBuffer) : - mCommandBuffer(&commandBuffer) + EditorInterface::EditorInterface(CommandBuffer& commandBuffer) { + mCommandBuffer = &commandBuffer; + Logger::Log("Creating editor windows", "window", VERBOSE); filesystem = new FileSystemUI(this); _WelcomeWindow = new WelcomeWindow(this); _audioWindow = new AudioWindow(); + m_ProjectSettingsWindow = new ProjectSettingsWindow(); Logger::Log("Building fonts", "window", VERBOSE); BuildFonts(); @@ -140,8 +144,8 @@ namespace Nuake { Vector2 viewportPanelSize = glm::vec2(regionAvail.x, regionAvail.y); Ref framebuffer = Engine::GetCurrentWindow()->GetFrameBuffer(); - if (framebuffer->GetSize() != viewportPanelSize) - framebuffer->QueueResize(viewportPanelSize); + if (framebuffer->GetSize() != viewportPanelSize * Engine::GetProject()->Settings.ResolutionScale) + framebuffer->QueueResize(viewportPanelSize * Engine::GetProject()->Settings.ResolutionScale); Ref texture = framebuffer->GetTexture(); ImVec2 imagePos = ImGui::GetWindowPos() + ImGui::GetCursorPos(); @@ -315,10 +319,9 @@ namespace Nuake { if (!Engine::IsPlayMode() && ImGui::GetIO().WantCaptureMouse && m_IsHoveringViewport && Input::IsMouseButtonPressed(GLFW_MOUSE_BUTTON_1) && !ImGuizmo::IsUsing() && m_IsViewportFocused) { - - + const float resolutionScale = Engine::GetProject()->Settings.ResolutionScale; auto& gbuffer = Engine::GetCurrentScene()->m_SceneRenderer->GetGBuffer(); - auto pixelPos = Input::GetMousePosition() - windowPosNuake; + auto pixelPos = (Input::GetMousePosition() - windowPosNuake) * resolutionScale; pixelPos.y = gbuffer.GetSize().y - pixelPos.y; // imgui coords are inverted on the Y axis auto gizmoBuffer = Engine::GetCurrentWindow()->GetFrameBuffer(); @@ -454,7 +457,8 @@ namespace Nuake { if (Engine::IsPlayMode() && Engine::GetTimeScale() != 0.0f) { - ImGui::PushStyleColor(ImGuiCol_Text, { 97.0 / 255.0, 0, 1, 1 }); + Color color = Engine::GetProject()->Settings.PrimaryColor; + ImGui::PushStyleColor(ImGuiCol_Text, { color.r, color.g, color.b, 1.0f }); if (ImGui::Button(ICON_FA_PAUSE, ImVec2(30, 30)) || (Input::IsKeyPressed(Key::F6))) { Engine::SetGameState(GameState::Paused); @@ -475,7 +479,8 @@ namespace Nuake { std::string tooltip; if (Engine::GetGameState() == GameState::Paused) { - ImGui::PushStyleColor(ImGuiCol_Text, { 97.0 / 255.0, 0, 1, 1 }); + Color color = Engine::GetProject()->Settings.PrimaryColor; + ImGui::PushStyleColor(ImGuiCol_Text, { color.r, color.g, color.b, 1.0f }); playButtonPressed = ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)) || Input::IsKeyPressed(Key::F6); ImGui::PopStyleColor(); @@ -493,8 +498,9 @@ namespace Nuake { { PushCommand(SetGameState(GameState::Playing)); + Color color = Engine::GetProject()->Settings.PrimaryColor; std::string statusMessage = ICON_FA_RUNNING + std::string(" Playing..."); - SetStatusMessage(statusMessage.c_str(), { 97.0 / 255.0, 0, 1, 1 }); + SetStatusMessage(statusMessage.c_str(), { color.r, color.g, color.b, 1.0f }); } else { @@ -531,7 +537,7 @@ namespace Nuake { PushCommand(SetGameState(GameState::Playing)); std::string statusMessage = ICON_FA_RUNNING + std::string(" Playing..."); - SetStatusMessage(statusMessage.c_str(), { 97.0 / 255.0, 0, 1, 1 }); + SetStatusMessage(statusMessage.c_str(), Engine::GetProject()->Settings.PrimaryColor); } }); } @@ -984,7 +990,7 @@ namespace Nuake { Vector3 sunDirection = env->ProceduralSkybox->GetSunDirection(); ImGuiHelper::DrawVec3("##Sun Direction", &sunDirection); - env->ProceduralSkybox->SunDirection = glm::normalize(sunDirection); + env->ProceduralSkybox->SunDirection = glm::mix(env->ProceduralSkybox->GetSunDirection(), glm::normalize(sunDirection), 0.1f); ImGui::TableNextColumn(); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0)); @@ -1223,6 +1229,24 @@ namespace Nuake { ImGui::PopStyleColor(); } + ImGui::TableNextColumn(); + { + // Title + ImGui::Text("Volumetric Strength"); + ImGui::TableNextColumn(); + + float fogAmount = env->mVolumetric->GetFogExponant(); + ImGui::DragFloat("##Volumetric Strength", &fogAmount, .001f, 0.f, 1.0f); + env->mVolumetric->SetFogExponant(fogAmount); + ImGui::TableNextColumn(); + + // Reset button + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1, 1, 1, 0)); + std::string resetBloomThreshold = ICON_FA_UNDO + std::string("##resetFogExpo"); + if (ImGui::Button(resetBloomThreshold.c_str())) env->mBloom->SetThreshold(2.4f); + ImGui::PopStyleColor(); + } + ImGui::TableNextColumn(); { // Title @@ -2528,7 +2552,7 @@ namespace Nuake { ImGui::Separator(); if (ImGui::MenuItem("Project Settings", "")) { - m_ShowProjectSettings = true; + m_ProjectSettingsWindow->m_DisplayWindow = true; } ImGui::EndMenu(); } @@ -2721,9 +2745,15 @@ namespace Nuake { _WelcomeWindow->Draw(); return; } + else + { + m_ProjectSettingsWindow->Init(Engine::GetProject()); + } pInterface.m_CurrentProject = Engine::GetProject(); + m_ProjectSettingsWindow->Draw(); + m_DemoWindow.Draw(); _audioWindow->Draw(); @@ -2755,11 +2785,6 @@ namespace Nuake { SelectionPanel.Draw(Selection); DrawLogger(); - if (m_ShowProjectSettings) - { - DrawProjectSettings(); - } - filesystem->Draw(); filesystem->DrawDirectoryExplorer(); diff --git a/Editor/src/Windows/EditorInterface.h b/Editor/src/Windows/EditorInterface.h index 2f0b78cb..fc681d86 100644 --- a/Editor/src/Windows/EditorInterface.h +++ b/Editor/src/Windows/EditorInterface.h @@ -16,6 +16,7 @@ #include "MapImporterWindow.h" #include +#include "ProjectSettings/ProjectSettingsWindow.h" using namespace NuakeEditor; @@ -29,7 +30,7 @@ namespace Nuake private: std::vector errors; Ref SceneSnapshot; - NuakeEditor::CommandBuffer* mCommandBuffer; + static NuakeEditor::CommandBuffer* mCommandBuffer; bool m_DrawGrid = false; bool m_DrawAxis = true; @@ -66,6 +67,8 @@ namespace Nuake TrenchbroomConfiguratorWindow m_TrenchhbroomConfigurator; MapImporterWindow m_MapImporter; + ProjectSettingsWindow* m_ProjectSettingsWindow; + EditorInterface(CommandBuffer& commandBuffer); static ImFont* bigIconFont; @@ -90,8 +93,8 @@ namespace Nuake bool ShouldDrawNavMesh() const { return m_DrawNavMesh; } bool LoadProject(const std::string& projectPath); - private: + public: std::string GetEntityTypeName(const Entity& entity) const; - void PushCommand(ICommand&& command); + static void PushCommand(ICommand&& command); }; } diff --git a/Editor/src/Windows/ProjectSettings/ProjectSettingsWindow.cpp b/Editor/src/Windows/ProjectSettings/ProjectSettingsWindow.cpp new file mode 100644 index 00000000..71c92ada --- /dev/null +++ b/Editor/src/Windows/ProjectSettings/ProjectSettingsWindow.cpp @@ -0,0 +1,209 @@ +#include "ProjectSettingsWindow.h" +#include +#include "../../Misc/InterfaceFonts.h" +#include +#include "../EditorInterface.h" +#include "../../Commands/Commands/Commands.h" +#include + +ProjectSettingsCategoryWindowGeneral::ProjectSettingsCategoryWindowGeneral(Ref project) : + m_Project(project) +{ + Name = "General"; +} + +void ProjectSettingsCategoryWindowGeneral::Draw() +{ + using namespace Nuake; + //ImGui::InputText("Project Name", &m_Project->Name); + //ImGui::InputTextMultiline("Project Description", &m_Project->Description); + + if (ImGui::Button("Locate")) + { + const std::string& locationPath = Nuake::FileDialog::OpenFile("TrenchBroom (.exe)\0TrenchBroom.exe\0"); + + if (!locationPath.empty()) + { + m_Project->TrenchbroomPath = locationPath; + } + } + + ImGui::ColorEdit4("Primary Color", &m_Project->Settings.PrimaryColor.r); + + //ImGui::InputText("Trenchbroom Path", &m_Project->TrenchbroomPath); +} + +ProjectSettingsWindow::ProjectSettingsWindow() +{ + +} + +void ProjectSettingsWindow::Init(Ref project) +{ + if (m_Project == project) + { + return; + } + + m_Project = project; + + m_CategoryWindows.clear(); + m_CategoryWindows.push_back(CreateRef(project)); + m_CategoryWindows.push_back(CreateRef(project)); + m_CategoryWindows.push_back(CreateRef(project)); + m_CategoryWindows.push_back(CreateRef(project)); + m_CategoryWindows.push_back(CreateRef(project)); + m_CategoryWindows.push_back(CreateRef(project)); +} + +void ProjectSettingsWindow::Draw() +{ + if (!m_DisplayWindow) + { + return; + } + + ImGui::SetNextWindowSizeConstraints({600, 300}, {1280, 720}); + if (ImGui::Begin("Project Settings", &m_DisplayWindow, ImGuiWindowFlags_NoDocking)) + { + ImVec4* colors = ImGui::GetStyle().Colors; + ImGui::PushStyleColor(ImGuiCol_ChildBg, colors[ImGuiCol_TitleBgCollapsed]); + ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 8); + if(ImGui::BeginChild("ProjectSettingsLeft", { 200, ImGui::GetContentRegionAvail().y }, true)) + { + for (int i = 0; i < static_cast(m_CategoryWindows.size()); i++) + { + ImGuiTreeNodeFlags base_flags = ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_SpanFullWidth | ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_FramePadding; + bool is_selected = m_CurrentTab == i; + if (is_selected) + { + base_flags |= ImGuiTreeNodeFlags_Selected; + } + + Ref window = m_CategoryWindows.at(i); + + ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(0, 0)); + ImGui::PushFont(FontManager::GetFont(Bold)); + ImGui::TreeNodeEx(window->Name.c_str(), base_flags); + + if (ImGui::IsItemClicked()) + { + m_CurrentTab = i; + } + + ImGui::TreePop(); + + ImGui::PopFont(); + ImGui::PopStyleVar(); + } + } + ImGui::EndChild(); + + ImGui::PopStyleVar(); + ImGui::PopStyleColor(); + + ImGui::SameLine(); + + if(ImGui::BeginChild("ProjectSettingsRight", ImGui::GetContentRegionAvail(), ImGuiChildFlags_Border)) + { + m_CategoryWindows.at(m_CurrentTab)->Draw(); + } + ImGui::EndChild(); + } + ImGui::End(); +} + +ProjectSettingsCategoryWindowViewport::ProjectSettingsCategoryWindowViewport(Ref project) : + m_Project(project) +{ + Name = "Viewport"; +} + +void ProjectSettingsCategoryWindowViewport::Draw() +{ + ImGui::DragFloat("Outline Radius", &m_Project->Settings.OutlineRadius, 0.1f, 1.0f, 10.0f); + ImGui::DragFloat("Gizmo Size", &m_Project->Settings.GizmoSize, 0.01f, 0.05f, 0.5f); + ImGui::Separator(); + ImGui::Checkbox("Smooth Camera", &m_Project->Settings.SmoothCamera); + + if (!m_Project->Settings.SmoothCamera) + { + ImGui::BeginDisabled(); + } + + ImGui::DragFloat("Smooth Camera Speed", &m_Project->Settings.SmoothCameraSpeed, 0.01f, 0.01f, 1.0f); + + if (!m_Project->Settings.SmoothCamera) + { + ImGui::EndDisabled(); + } +} + +ProjectSettingsCategoryWindowRendering::ProjectSettingsCategoryWindowRendering(Ref project) : + m_Project(project) +{ + Name = "Rendering"; +} + +void ProjectSettingsCategoryWindowRendering::Draw() +{ + bool oldVsync = m_Project->Settings.VSync; + ImGui::Checkbox("VSync", &m_Project->Settings.VSync); + if (oldVsync != m_Project->Settings.VSync) + { + Nuake::EditorInterface::PushCommand(SetVSync(m_Project->Settings.VSync)); + } + + ImGui::DragFloat("Resolution Scale", &m_Project->Settings.ResolutionScale, 0.01f, 0.05f, 2.0f); +} + +ProjectSettingsCategoryScripting::ProjectSettingsCategoryScripting(Ref project) : + m_Project(project) +{ + Name = "Scripting"; +} + +void ProjectSettingsCategoryScripting::Draw() +{ +} + +ProjectSettingsCategoryPhysics::ProjectSettingsCategoryPhysics(Ref project) : + m_Project(project) +{ + Name = "Physics"; +} + +void ProjectSettingsCategoryPhysics::Draw() +{ + int oldStep = Engine::GetProject()->Settings.PhysicsStep; + ImGui::DragInt("Physics Step", &Engine::GetProject()->Settings.PhysicsStep, 1.0f, 30.0f, 200.0f); + if (oldStep != Engine::GetProject()->Settings.PhysicsStep) + { + Engine::SetPhysicsStep(Engine::GetProject()->Settings.PhysicsStep); + } + + ImGui::DragInt("Maximum SubSteps", &Engine::GetProject()->Settings.MaxPhysicsSubStep, 1.0f, 8.0f, 128); + + ImGui::DragInt("Maximum Bodies", &Engine::GetProject()->Settings.MaxPhysicsBodies, 1.0f, 256.0f, 8000); + ImGui::DragInt("Maximum Body Pair", &Engine::GetProject()->Settings.MaxPhysicsBodyPair, 1.0f, 256.0f, 4096.0f); + ImGui::DragInt("Maximum Contact Constraint", &Engine::GetProject()->Settings.MaxPhysicsContactConstraints, 1.0f, 256.0f, 4096.0f); +} + +ProjectSettingsCategoryAudio::ProjectSettingsCategoryAudio(Ref project) : + m_Project(project) +{ + Name = "Audio"; +} + +void ProjectSettingsCategoryAudio::Draw() +{ + float oldVolume = Engine::GetProject()->Settings.GlobalVolume; + ImGui::DragFloat("Global Volume", &Engine::GetProject()->Settings.GlobalVolume, 0.01f, 0.0f, 1.0f); + + if (oldVolume != Engine::GetProject()->Settings.GlobalVolume) + { + Nuake::AudioManager::Get().SetGlobalVolume(Engine::GetProject()->Settings.GlobalVolume); + } + + ImGui::DragInt("Max Active Voices", &Engine::GetProject()->Settings.MaxActiveVoiceCount, 1.0f, 8.0f, 64.0f); +} diff --git a/Editor/src/Windows/ProjectSettings/ProjectSettingsWindow.h b/Editor/src/Windows/ProjectSettings/ProjectSettingsWindow.h new file mode 100644 index 00000000..f5c7c2d3 --- /dev/null +++ b/Editor/src/Windows/ProjectSettings/ProjectSettingsWindow.h @@ -0,0 +1,86 @@ +#pragma once +#include "src/Core/Core.h" +#include "src/Resource/Project.h" + +class ProjectSettingsCategoryWindow +{ +public: + std::string Name = "NO_NAME"; + + virtual void Draw() = 0; +}; + +class ProjectSettingsCategoryWindowGeneral : public ProjectSettingsCategoryWindow +{ +private: + Ref m_Project; +public: + ProjectSettingsCategoryWindowGeneral(Ref project); + + void Draw() override; +}; + +class ProjectSettingsCategoryWindowViewport : public ProjectSettingsCategoryWindow +{ +private: + Ref m_Project; +public: + ProjectSettingsCategoryWindowViewport(Ref project); + + void Draw() override; +}; + +class ProjectSettingsCategoryWindowRendering : public ProjectSettingsCategoryWindow +{ +private: + Ref m_Project; +public: + ProjectSettingsCategoryWindowRendering(Ref project); + + void Draw() override; +}; + +class ProjectSettingsCategoryScripting : public ProjectSettingsCategoryWindow +{ +private: + Ref m_Project; +public: + ProjectSettingsCategoryScripting(Ref project); + + void Draw() override; +}; + +class ProjectSettingsCategoryPhysics : public ProjectSettingsCategoryWindow +{ +private: + Ref m_Project; +public: + ProjectSettingsCategoryPhysics(Ref project); + + void Draw() override; +}; + +class ProjectSettingsCategoryAudio : public ProjectSettingsCategoryWindow +{ +private: + Ref m_Project; +public: + ProjectSettingsCategoryAudio(Ref project); + + void Draw() override; +}; + +class ProjectSettingsWindow +{ +private: + std::vector> m_CategoryWindows; + uint32_t m_CurrentTab = 0; + Ref m_Project; +public: + bool m_DisplayWindow = false; + ProjectSettingsWindow(); + ~ProjectSettingsWindow() = default; + + void Init(Ref project); + void Draw(); +}; \ No newline at end of file diff --git a/Editor/src/Windows/ProjectSettingsWindow.h b/Editor/src/Windows/ProjectSettingsWindow.h deleted file mode 100644 index 5f3d6c64..00000000 --- a/Editor/src/Windows/ProjectSettingsWindow.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once -#include "src/Core/Core.h" -#include "src/Resource/Project.h" - -class ProjectSettingsCategoryWindow -{ -public: - - void Draw(); -}; - -class ProjectSettingsWindow -{ -private: - std::vector CategoryWindows; - -public: - ProjectSettingsWindow(Ref project); - ~ProjectSettingsWindow(); - - void Draw(); -}; \ No newline at end of file diff --git a/Nuake/Engine.cpp b/Nuake/Engine.cpp index cce332a0..2234548b 100644 --- a/Nuake/Engine.cpp +++ b/Nuake/Engine.cpp @@ -90,6 +90,8 @@ namespace Nuake return; } + PhysicsManager::Get().ReInit(); + if (GetCurrentScene()->OnInit()) { SetGameState(GameState::Playing); diff --git a/Nuake/Engine.h b/Nuake/Engine.h index eb149701..ee76641a 100644 --- a/Nuake/Engine.h +++ b/Nuake/Engine.h @@ -52,6 +52,7 @@ namespace Nuake static inline float GetTime() { return s_Time; } static inline Timestep GetTimestep() { return s_TimeStep; } + static inline void SetPhysicsStep(int amount) { s_FixedUpdateRate = 1.0f / static_cast(amount); } static inline void SetTimeScale(float timeScale) { s_TimeScale = timeScale; } static inline float GetTimeScale() { return s_TimeScale; } diff --git a/Nuake/src/Audio/AudioManager.h b/Nuake/src/Audio/AudioManager.h index 283f16f8..7ea1fc5a 100644 --- a/Nuake/src/Audio/AudioManager.h +++ b/Nuake/src/Audio/AudioManager.h @@ -34,7 +34,7 @@ namespace Nuake class AudioManager { private: - const int MAX_VOICE_COUNT = 32; + int m_MaxVoiceCount = 32; float m_GlobalVolume = 1.0f; Ref m_Soloud; @@ -74,6 +74,10 @@ namespace Nuake void PlayTTS(const std::string& text); float GetGlobalVolume() const { return m_GlobalVolume; } + void SetGlobalVolume(float volume) { m_GlobalVolume = volume; } + + int GetMaxVoiceCount() const { return m_MaxVoiceCount; } + void SetMaxVoiceCount(int count) { m_MaxVoiceCount = count; } void QueueWavAudio(const AudioRequest& request); void UpdateVoice(const AudioRequest & request); diff --git a/Nuake/src/Physics/DynamicWorld.cpp b/Nuake/src/Physics/DynamicWorld.cpp index 29bd3da3..75cd034a 100644 --- a/Nuake/src/Physics/DynamicWorld.cpp +++ b/Nuake/src/Physics/DynamicWorld.cpp @@ -248,14 +248,61 @@ namespace Nuake _registeredCharacters = std::map(); // Initialize Jolt Physics - const uint32_t MaxBodies = 4096; + ProjectSettings settings; + if (Engine::GetProject()) + { + settings = Engine::GetProject()->Settings; + } + + const uint32_t MaxBodies = settings.MaxPhysicsBodies; const uint32_t NumBodyMutexes = 0; - const uint32_t MaxBodyPairs = 2048; - const uint32_t MaxContactConstraints = 2048; + const uint32_t MaxBodyPairs = settings.MaxPhysicsBodyPair; + const uint32_t MaxContactConstraints = settings.MaxPhysicsContactConstraints; _JoltPhysicsSystem = CreateRef(); _JoltPhysicsSystem->Init(MaxBodies, NumBodyMutexes, MaxBodyPairs, MaxContactConstraints, JoltBroadphaseLayerInterface, JoltObjectVSBroadphaseLayerFilter, JoltObjectVSObjectLayerFilter); + // A body activation listener gets notified when bodies activate and go to sleep + // Note that this is called from a job so whatever you do here needs to be thread safe. + // Registering one is entirely optional. + _bodyActivationListener = CreateScope(); + _JoltPhysicsSystem->SetBodyActivationListener(_bodyActivationListener.get()); + // A contact listener gets notified when bodies (are about to) collide, and when they separate again. + // Note that this is called from a job so whatever you do here needs to be thread safe. + // Registering one is entirely optional. + _contactListener = CreateScope(this); + _JoltPhysicsSystem->SetContactListener(_contactListener.get()); + + // The main way to interact with the bodies in the physics system is through the body interface. There is a locking and a non-locking + // variant of this. We're going to use the locking version (even though we're not planning to access bodies from multiple threads) + _JoltBodyInterface = &_JoltPhysicsSystem->GetBodyInterface(); + + // Optional step: Before starting the physics simulation you can optimize the broad phase. This improves collision detection performance (it's pointless here because we only have 2 bodies). + // You should definitely not call this every frame or when e.g. streaming in a new level section as it is an expensive operation. + // Instead insert all new objects in batches instead of 1 at a time to keep the broad phase efficient. + _JoltPhysicsSystem->OptimizeBroadPhase(); + const uint32_t availableThreads = std::thread::hardware_concurrency() - 1; + _JoltJobSystem = new JPH::JobSystemThreadPool(JPH::cMaxPhysicsJobs, JPH::cMaxPhysicsBarriers, availableThreads); + } + + void DynamicWorld::ReInit() + { + _registeredCharacters = std::map(); + + // Initialize Jolt Physics + ProjectSettings settings; + if (Engine::GetProject()) + { + settings = Engine::GetProject()->Settings; + } + + const uint32_t MaxBodies = settings.MaxPhysicsBodies; + const uint32_t NumBodyMutexes = 0; + const uint32_t MaxBodyPairs = settings.MaxPhysicsBodyPair; + const uint32_t MaxContactConstraints = settings.MaxPhysicsContactConstraints; + + _JoltPhysicsSystem = CreateRef(); + _JoltPhysicsSystem->Init(MaxBodies, NumBodyMutexes, MaxBodyPairs, MaxContactConstraints, JoltBroadphaseLayerInterface, JoltObjectVSBroadphaseLayerFilter, JoltObjectVSObjectLayerFilter); // A body activation listener gets notified when bodies activate and go to sleep // Note that this is called from a job so whatever you do here needs to be thread safe. // Registering one is entirely optional. @@ -460,7 +507,7 @@ namespace Nuake } } - void DynamicWorld::SetCharacterControllerPosition(const Entity & entity, const Vector3 & position) + void DynamicWorld::SetCharacterControllerPosition(const Entity& entity, const Vector3 & position) { const uint32_t entityHandle = entity.GetHandle(); if (_registeredCharacters.find(entityHandle) != _registeredCharacters.end()) @@ -672,8 +719,8 @@ namespace Nuake // If you take larger steps than 1 / 90th of a second you need to do multiple collision steps in order to keep the simulation stable. // Do 1 collision step per 1 / 60th of a second (round up). int collisionSteps = 1; - constexpr float minStepDuration = 1.0f / 90.0f; - constexpr int maxStepCount = 32; + const float minStepDuration = 1.0f / static_cast(Engine::GetProject()->Settings.PhysicsStep); + const int maxStepCount = Engine::GetProject()->Settings.MaxPhysicsSubStep; if(ts > minStepDuration) { diff --git a/Nuake/src/Physics/DynamicWorld.h b/Nuake/src/Physics/DynamicWorld.h index f84c6131..faf8e2d9 100644 --- a/Nuake/src/Physics/DynamicWorld.h +++ b/Nuake/src/Physics/DynamicWorld.h @@ -65,6 +65,8 @@ namespace Nuake public: DynamicWorld(); + void ReInit(); + void DrawDebug(); void SetGravity(const Vector3& g); diff --git a/Nuake/src/Physics/PhysicsManager.h b/Nuake/src/Physics/PhysicsManager.h index 8beba2a3..8f98a954 100644 --- a/Nuake/src/Physics/PhysicsManager.h +++ b/Nuake/src/Physics/PhysicsManager.h @@ -46,6 +46,8 @@ namespace Nuake bool IsRunning() { return m_IsRunning; } void Step(Timestep ts); + void ReInit() { m_World->ReInit(); } + void Reset(); std::vector Raycast(const Vector3& from, const Vector3& to); diff --git a/Nuake/src/Rendering/PostFX/Volumetric.cpp b/Nuake/src/Rendering/PostFX/Volumetric.cpp index ab7907b7..ff0e743b 100644 --- a/Nuake/src/Rendering/PostFX/Volumetric.cpp +++ b/Nuake/src/Rendering/PostFX/Volumetric.cpp @@ -52,7 +52,7 @@ namespace Nuake { volumetricShader->SetUniform1i("u_StepCount", mStepCount); volumetricShader->SetUniform1f("u_FogAmount", mFogAmount); volumetricShader->SetUniform1i("u_LightCount", static_cast(lights.size())); - + volumetricShader->SetUniform1f("u_Exponant", mFogExponant); for (uint16_t i = 0; i < lights.size(); i++) { LightComponent& light = lights[i]; diff --git a/Nuake/src/Rendering/PostFX/Volumetric.h b/Nuake/src/Rendering/PostFX/Volumetric.h index 04aa5b93..e4d8fc4f 100644 --- a/Nuake/src/Rendering/PostFX/Volumetric.h +++ b/Nuake/src/Rendering/PostFX/Volumetric.h @@ -12,7 +12,7 @@ namespace Nuake { uint32_t mStepCount = 50; float mRenderRatio = 0.75f; float mFogAmount = 0.4f; - + float mFogExponant = 4.0f; Vector2 mSize; Texture* mDepth; @@ -31,6 +31,9 @@ namespace Nuake { inline void SetStepCount(unsigned int amount) { mStepCount = amount; } + void SetFogExponant(float expo) { mFogExponant = expo; } + float GetFogExponant() const { return mFogExponant; } + inline float GetFogAmount() const { return mFogAmount; } void SetFogAmount(float amount) { diff --git a/Nuake/src/Rendering/SceneRenderer.cpp b/Nuake/src/Rendering/SceneRenderer.cpp index ef7cda44..66dcf800 100644 --- a/Nuake/src/Rendering/SceneRenderer.cpp +++ b/Nuake/src/Rendering/SceneRenderer.cpp @@ -119,7 +119,8 @@ namespace Nuake // Renders all shadow maps ShadowPass(scene); - mGBuffer->QueueResize(framebuffer.GetSize()); + const Vector2 framebufferResolution = framebuffer.GetSize(); + mGBuffer->QueueResize(framebufferResolution); GBufferPass(scene); // SSAO @@ -134,7 +135,7 @@ namespace Nuake sceneEnv->mSSAO->Clear(); } - mShadingBuffer->QueueResize(framebuffer.GetSize()); + mShadingBuffer->QueueResize(framebufferResolution); ShadingPass(scene); // Blit depth buffer @@ -191,7 +192,6 @@ namespace Nuake Renderer::DrawQuad(); } framebuffer.Unbind(); - } else { @@ -209,7 +209,7 @@ namespace Nuake finalOutput = framebuffer.GetTexture(); // Copy final output to target framebuffer - mToneMapBuffer->QueueResize(framebuffer.GetSize()); + mToneMapBuffer->QueueResize(framebufferResolution); mToneMapBuffer->Bind(); { RenderCommand::Clear(); @@ -223,9 +223,50 @@ namespace Nuake } mToneMapBuffer->Unbind(); + ProjectSettings projectSettings = Engine::GetProject()->Settings; + + mOutlineBuffer->QueueResize(framebufferResolution); + mOutlineBuffer->Bind(); + { + RenderCommand::Clear(); + Shader* shader = ShaderManager::GetShader("Resources/Shaders/outline.shader"); + shader->Bind(); + + shader->SetUniform1i("u_EntityID", mOutlineEntityID == -1 ? -1 : mOutlineEntityID + 1); + shader->SetUniformTex("u_EntityTexture", mGBuffer->GetTexture(GL_COLOR_ATTACHMENT3).get(), 0); + shader->SetUniformVec4("u_OutlineColor", projectSettings.PrimaryColor); + shader->SetUniformTex("u_Depth", mGBuffer->GetTexture(GL_DEPTH_ATTACHMENT), 1); + shader->SetUniform1f("u_Radius", projectSettings.OutlineRadius); + Renderer::DrawQuad(); + } + mOutlineBuffer->Unbind(); + + framebuffer.Bind(); + { + RenderCommand::Clear(); + Shader* shader = ShaderManager::GetShader("Resources/Shaders/add.shader"); + shader->Bind(); + + shader->SetUniformTex("u_Source", mToneMapBuffer->GetTexture().get(), 0); + shader->SetUniformTex("u_Source2", mOutlineBuffer->GetTexture().get(), 1); + Renderer::DrawQuad(); + } + framebuffer.Unbind(); + + mToneMapBuffer->Bind(); + { + RenderCommand::Clear(); + Shader* shader = ShaderManager::GetShader("Resources/Shaders/copy.shader"); + shader->Bind(); + + shader->SetUniformTex("u_Source", framebuffer.GetTexture().get(), 1); + Renderer::DrawQuad(); + } + mToneMapBuffer->Unbind(); + if (sceneEnv->SSREnabled) { - sceneEnv->mSSR->Resize(framebuffer.GetSize()); + sceneEnv->mSSR->Resize(framebufferResolution); sceneEnv->mSSR->Draw(mGBuffer.get(), framebuffer.GetTexture(), mView, mProjection, scene.GetCurrentCamera()); framebuffer.Bind(); @@ -254,7 +295,7 @@ namespace Nuake framebuffer.Unbind(); } - mDOFBuffer->QueueResize(framebuffer.GetSize()); + mDOFBuffer->QueueResize(framebufferResolution); mDOFBuffer->Bind(); { RenderCommand::Clear(); @@ -293,7 +334,7 @@ namespace Nuake if (sceneEnv->BarrelDistortionEnabled) { - mBarrelDistortionBuffer->QueueResize(framebuffer.GetSize()); + mBarrelDistortionBuffer->QueueResize(framebufferResolution); mBarrelDistortionBuffer->Bind(); { RenderCommand::Clear(); @@ -330,7 +371,7 @@ namespace Nuake framebuffer.Unbind(); } - mVignetteBuffer->QueueResize(framebuffer.GetSize()); + mVignetteBuffer->QueueResize(framebufferResolution); mVignetteBuffer->Bind(); { RenderCommand::Clear(); @@ -344,6 +385,23 @@ namespace Nuake } mVignetteBuffer->Unbind(); + + ImGui::Begin("normals"); + ImGui::Image((void*)mToneMapBuffer->GetTexture(GL_COLOR_ATTACHMENT0)->GetID(), ImGui::GetContentRegionAvail(), ImVec2(0, 1), ImVec2(1, 0)); + ImGui::End(); + + framebuffer.Bind(); + { + RenderCommand::Clear(); + Shader* shader = ShaderManager::GetShader("Resources/Shaders/add.shader"); + shader->Bind(); + + shader->SetUniformTex("u_Source", finalOutput.get(), 0); + shader->SetUniformTex("u_Source2", mOutlineBuffer->GetTexture().get(), 1); + Renderer::DrawQuad(); + } + framebuffer.Unbind(); + framebuffer.Bind(); { RenderCommand::Clear(); @@ -355,40 +413,6 @@ namespace Nuake } framebuffer.Unbind(); - - { - mOutlineBuffer->QueueResize(framebuffer.GetSize()); - mOutlineBuffer->Bind(); - { - RenderCommand::Clear(); - Shader* shader = ShaderManager::GetShader("Resources/Shaders/outline.shader"); - shader->Bind(); - - shader->SetUniform1i("u_EntityID", mOutlineEntityID == -1 ? -1 : mOutlineEntityID + 1); - shader->SetUniformTex("u_EntityTexture", mGBuffer->GetTexture(GL_COLOR_ATTACHMENT3).get(), 0); - shader->SetUniform4f("u_OutlineColor", 97.0f / 255.0f, 0, 1.0f, 1.0f); - shader->SetUniformTex("u_Depth", mGBuffer->GetTexture(GL_DEPTH_ATTACHMENT), 1); - Renderer::DrawQuad(); - } - mOutlineBuffer->Unbind(); - - ImGui::Begin("normals"); - ImGui::Image((void*)mGBuffer->GetTexture(GL_COLOR_ATTACHMENT1)->GetID(), ImGui::GetContentRegionAvail(), ImVec2(0, 1), ImVec2(1, 0)); - ImGui::End(); - - framebuffer.Bind(); - { - RenderCommand::Clear(); - Shader* shader = ShaderManager::GetShader("Resources/Shaders/add.shader"); - shader->Bind(); - - shader->SetUniformTex("u_Source", mVignetteBuffer->GetTexture().get(), 0); - - shader->SetUniformTex("u_Source2", mOutlineBuffer->GetTexture(GL_COLOR_ATTACHMENT0).get(), 1); - Renderer::DrawQuad(); - } - framebuffer.Unbind(); - } glDepthMask(true); // Barrel distortion diff --git a/Nuake/src/Rendering/Textures/Texture.cpp b/Nuake/src/Rendering/Textures/Texture.cpp index 5bd1fc0b..a4e8354d 100644 --- a/Nuake/src/Rendering/Textures/Texture.cpp +++ b/Nuake/src/Rendering/Textures/Texture.cpp @@ -50,6 +50,8 @@ namespace Nuake if (format2 != 0) m_Format2 = format2; + m_Filtering = GL_LINEAR; + m_Format3 = GL_UNSIGNED_BYTE; if (format3 != 0) m_Format3 = format3; @@ -104,8 +106,8 @@ namespace Nuake glGenTextures(1, &m_RendererId); glBindTexture(GL_TEXTURE_2D, m_RendererId); glTexImage2D(GL_TEXTURE_2D, 0, m_Format2, size.x, size.y, 0, m_Format, m_Format3, NULL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_Filtering); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, m_Filtering); } Texture::~Texture() @@ -131,8 +133,13 @@ namespace Nuake void Texture::SetParameter(const GLenum& param, const GLenum& value) { + if (param == GL_TEXTURE_MIN_FILTER) + { + m_Filtering = value; + } + Bind(); - glTextureParameteri(GL_TEXTURE_2D, param, value); + glTexParameteri(GL_TEXTURE_2D, param, value); Unbind(); } diff --git a/Nuake/src/Rendering/Textures/Texture.h b/Nuake/src/Rendering/Textures/Texture.h index 28557b01..7acf66ae 100644 --- a/Nuake/src/Rendering/Textures/Texture.h +++ b/Nuake/src/Rendering/Textures/Texture.h @@ -25,6 +25,8 @@ namespace Nuake int m_Height; int m_BPP; // byte per pixel. + GLenum m_Filtering; + public: Texture(const std::string& path); // Load texture from file Texture(unsigned char* data, int len); // Used to load texture from a memory buffer diff --git a/Nuake/src/Resource/Project.cpp b/Nuake/src/Resource/Project.cpp index 5f96e1f3..0fa37e28 100644 --- a/Nuake/src/Resource/Project.cpp +++ b/Nuake/src/Resource/Project.cpp @@ -4,6 +4,8 @@ #include #include #include "../Core/Logger.h" +#include "Engine.h" +#include namespace Nuake { @@ -85,7 +87,21 @@ namespace Nuake if (j.contains("Description")) description = j["Description"]; - return CreateRef(projectName, description, path); + + Ref project = CreateRef(projectName, description, path); + + project->Settings = ProjectSettings(); + + if (j.contains("Settings")) + { + project->Settings.Deserialize(j["Settings"]); + + Engine::SetPhysicsStep(project->Settings.PhysicsStep); + + AudioManager::Get().SetGlobalVolume(project->Settings.GlobalVolume); + } + + return project; } json Project::Serialize() @@ -100,6 +116,10 @@ namespace Nuake if(EntityDefinitionsFile) SERIALIZE_VAL_LBL("EntityDefinition", EntityDefinitionsFile->Path); SERIALIZE_VAL(TrenchbroomPath); + + // Project Settings + j["Settings"] = Settings.Serialize(); + END_SERIALIZE(); } @@ -125,6 +145,17 @@ namespace Nuake this->TrenchbroomPath = j["TrenchbroomPath"]; } + if (j.contains("Settings")) + { + Settings = ProjectSettings(); + Settings.Deserialize(j["Settings"]); + Engine::GetCurrentWindow()->SetVSync(Settings.VSync); + + Engine::SetPhysicsStep(Settings.PhysicsStep); + + AudioManager::Get().SetGlobalVolume(Settings.GlobalVolume); + } + DefaultScene = Scene::New(); // Load default scene, a project can have no default scene set. @@ -150,5 +181,55 @@ namespace Nuake return true; // Success } + + json ProjectSettings::Serialize() + { + BEGIN_SERIALIZE(); + + SERIALIZE_VAL(VSync); + SERIALIZE_VAL(ShowGizmos); + SERIALIZE_VAL(ShowAxis); + SERIALIZE_VAL(ResolutionScale); + SERIALIZE_VAL(GizmoSize); + SERIALIZE_VAL(OutlineRadius); + SERIALIZE_VEC4(PrimaryColor); + SERIALIZE_VAL(SmoothCamera); + SERIALIZE_VAL(SmoothCameraSpeed); + SERIALIZE_VAL(PhysicsStep); + SERIALIZE_VAL(MaxPhysicsSubStep); + SERIALIZE_VAL(MaxPhysicsBodies); + SERIALIZE_VAL(MaxPhysicsBodyPair); + SERIALIZE_VAL(MaxPhysicsContactConstraints); + SERIALIZE_VAL(GlobalVolume); + SERIALIZE_VAL(MaxActiveVoiceCount); + END_SERIALIZE(); + } + + bool ProjectSettings::Deserialize(const json& j) + { + DESERIALIZE_VAL(VSync); + DESERIALIZE_VAL(ShowGizmos); + DESERIALIZE_VAL(ShowAxis); + DESERIALIZE_VAL(ResolutionScale); + DESERIALIZE_VAL(OutlineRadius); + DESERIALIZE_VAL(GizmoSize); + DESERIALIZE_VAL(SmoothCamera); + DESERIALIZE_VAL(SmoothCameraSpeed); + DESERIALIZE_VAL(PhysicsStep); + DESERIALIZE_VAL(MaxPhysicsSubStep); + DESERIALIZE_VAL(MaxPhysicsBodies); + DESERIALIZE_VAL(MaxPhysicsBodyPair); + DESERIALIZE_VAL(MaxPhysicsContactConstraints); + + DESERIALIZE_VAL(GlobalVolume); + DESERIALIZE_VAL(MaxActiveVoiceCount); + + if (j.contains("PrimaryColor")) + { + DESERIALIZE_VEC4(j["PrimaryColor"], PrimaryColor); + } + + return true; + } } diff --git a/Nuake/src/Resource/Project.h b/Nuake/src/Resource/Project.h index 3ed299ce..0be770d1 100644 --- a/Nuake/src/Resource/Project.h +++ b/Nuake/src/Resource/Project.h @@ -12,6 +12,25 @@ namespace Nuake { bool ShowGizmos = true; bool ShowAxis = true; + bool VSync = true; + float ResolutionScale = 1.0f; + float OutlineRadius = 4.0f; + float GizmoSize = 0.25f; + bool SmoothCamera = false; + float SmoothCameraSpeed = 0.2f; + Color PrimaryColor = Color(97.0f / 255.0f, 0, 1.0f, 1.0f); + int PhysicsStep = 90.0f; + int MaxPhysicsSubStep = 32; + int MaxPhysicsBodies = 4096; + int MaxPhysicsContactConstraints = 2048; + int MaxPhysicsBodyPair = 2048; + + // Audio + float GlobalVolume = 1.0f; + int MaxActiveVoiceCount = 16; + + json Serialize(); + bool Deserialize(const json& j); }; class Project : public ISerializable @@ -21,6 +40,8 @@ namespace Nuake std::string Description; std::string FullPath; + ProjectSettings Settings; + // Path of the trenchbroom .exe folder std::string TrenchbroomPath = ""; diff --git a/Nuake/src/Resource/StaticResources.cpp b/Nuake/src/Resource/StaticResources.cpp index 2dcaac89..412994b3 100644 --- a/Nuake/src/Resource/StaticResources.cpp +++ b/Nuake/src/Resource/StaticResources.cpp @@ -271529,122 +271529,125 @@ const std::string Resources_Shaders_outline_shader_path = R"(Resources/Shaders/o 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0d, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x75, 0x5f, 0x44, 0x65, 0x70, 0x74, 0x68, 0x3b, 0x0d, 0x0a, 0x0d, - 0x0a, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x46, 0x72, - 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, - 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x55, 0x56, - 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, - 0x69, 0x6e, 0x28, 0x29, 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, - 0x3d, 0x20, 0x75, 0x5f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x44, - 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x54, 0x41, 0x55, 0x20, 0x3d, - 0x20, 0x36, 0x2e, 0x32, 0x38, 0x33, 0x31, 0x38, 0x35, 0x33, 0x30, 0x3b, - 0x0d, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x73, 0x20, 0x3d, 0x20, 0x33, - 0x32, 0x2e, 0x30, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, - 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x61, 0x64, 0x69, 0x75, - 0x73, 0x20, 0x3d, 0x20, 0x34, 0x2e, 0x66, 0x3b, 0x0d, 0x0a, 0x09, 0x76, - 0x65, 0x63, 0x32, 0x20, 0x75, 0x76, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x55, - 0x56, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x09, 0x2f, - 0x2f, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x69, 0x64, - 0x64, 0x6c, 0x65, 0x0d, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6d, - 0x69, 0x64, 0x64, 0x6c, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, - 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, + 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x20, 0x75, 0x5f, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x3b, + 0x0d, 0x0a, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x46, + 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0d, 0x0a, 0x0d, + 0x0a, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x55, + 0x56, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, + 0x61, 0x69, 0x6e, 0x28, 0x29, 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x20, 0x3d, 0x20, 0x75, 0x5f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x44, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x54, 0x41, 0x55, 0x20, + 0x3d, 0x20, 0x36, 0x2e, 0x32, 0x38, 0x33, 0x31, 0x38, 0x35, 0x33, 0x30, + 0x3b, 0x0d, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x73, 0x20, 0x3d, 0x20, + 0x33, 0x32, 0x2e, 0x30, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0d, + 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x61, 0x64, 0x69, + 0x75, 0x73, 0x20, 0x3d, 0x20, 0x75, 0x5f, 0x52, 0x61, 0x64, 0x69, 0x75, + 0x73, 0x3b, 0x0d, 0x0a, 0x09, 0x76, 0x65, 0x63, 0x32, 0x20, 0x75, 0x76, + 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x55, 0x56, 0x3b, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x0d, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x20, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x0d, 0x0a, 0x09, + 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, + 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x2c, 0x20, 0x75, 0x76, 0x29, + 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, + 0x64, 0x65, 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, + 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, 0x44, 0x65, 0x70, 0x74, 0x68, 0x2c, + 0x20, 0x75, 0x76, 0x29, 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x09, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, + 0x63, 0x74, 0x20, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, + 0x32, 0x20, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x31, + 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x74, 0x65, + 0x78, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x28, 0x75, 0x5f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, - 0x65, 0x2c, 0x20, 0x75, 0x76, 0x29, 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x09, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x20, - 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, - 0x44, 0x65, 0x70, 0x74, 0x68, 0x2c, 0x20, 0x75, 0x76, 0x29, 0x2e, 0x72, - 0x3b, 0x0d, 0x0a, 0x09, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, - 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x20, 0x61, 0x73, 0x70, - 0x65, 0x63, 0x74, 0x20, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x0d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x76, - 0x65, 0x63, 0x32, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x28, 0x75, 0x5f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x2c, 0x20, 0x30, 0x29, 0x29, - 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x09, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x20, 0x68, 0x61, 0x73, 0x48, 0x69, 0x74, 0x20, 0x3d, - 0x20, 0x30, 0x2e, 0x30, 0x66, 0x3b, 0x0d, 0x0a, 0x09, 0x76, 0x65, 0x63, - 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, - 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, - 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, - 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x28, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2e, - 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x54, 0x41, 0x55, 0x3b, 0x20, - 0x69, 0x20, 0x2b, 0x3d, 0x20, 0x54, 0x41, 0x55, 0x20, 0x2f, 0x20, 0x73, - 0x74, 0x65, 0x70, 0x73, 0x29, 0x20, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x7b, 0x0d, 0x0a, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x53, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, - 0x61, 0x20, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x73, - 0x69, 0x6e, 0x28, 0x69, 0x29, 0x2c, 0x20, 0x63, 0x6f, 0x73, 0x28, 0x69, - 0x29, 0x29, 0x20, 0x2a, 0x20, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, - 0x2a, 0x20, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x3b, 0x0d, 0x0a, 0x09, - 0x09, 0x0d, 0x0a, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x57, 0x65, 0x20, 0x64, - 0x6f, 0x6e, 0x74, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x73, 0x69, - 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x69, 0x65, 0x77, 0x70, - 0x6f, 0x72, 0x74, 0x0d, 0x0a, 0x09, 0x09, 0x76, 0x65, 0x63, 0x32, 0x20, - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x20, 0x3d, 0x20, 0x75, - 0x76, 0x20, 0x2b, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x3b, 0x0d, - 0x0a, 0x09, 0x09, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x2e, - 0x78, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x73, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x2e, 0x78, 0x2c, 0x20, 0x30, 0x2e, - 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x39, 0x39, 0x39, 0x29, 0x3b, 0x0d, 0x0a, - 0x09, 0x09, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x2e, 0x79, - 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x55, 0x76, 0x2e, 0x79, 0x2c, 0x20, 0x30, 0x2e, 0x30, - 0x2c, 0x20, 0x30, 0x2e, 0x39, 0x39, 0x39, 0x29, 0x3b, 0x0d, 0x0a, 0x0d, - 0x0a, 0x09, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6c, 0x20, - 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, - 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, - 0x65, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x29, - 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x65, 0x2c, 0x20, 0x30, 0x29, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x0d, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x61, + 0x73, 0x48, 0x69, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x3b, + 0x0d, 0x0a, 0x09, 0x76, 0x65, 0x63, 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, + 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, + 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, + 0x09, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, + 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, + 0x20, 0x54, 0x41, 0x55, 0x3b, 0x20, 0x69, 0x20, 0x2b, 0x3d, 0x20, 0x54, + 0x41, 0x55, 0x20, 0x2f, 0x20, 0x73, 0x74, 0x65, 0x70, 0x73, 0x29, 0x20, + 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0d, 0x0a, 0x09, 0x09, 0x2f, + 0x2f, 0x20, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x69, 0x72, 0x63, + 0x75, 0x6c, 0x61, 0x72, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, + 0x63, 0x32, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x3d, 0x20, + 0x76, 0x65, 0x63, 0x32, 0x28, 0x73, 0x69, 0x6e, 0x28, 0x69, 0x29, 0x2c, + 0x20, 0x63, 0x6f, 0x73, 0x28, 0x69, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x61, + 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, 0x2a, 0x20, 0x72, 0x61, 0x64, 0x69, + 0x75, 0x73, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x0d, 0x0a, 0x09, 0x09, 0x2f, + 0x2f, 0x20, 0x57, 0x65, 0x20, 0x64, 0x6f, 0x6e, 0x74, 0x20, 0x77, 0x61, + 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x20, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x76, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x0d, 0x0a, 0x09, + 0x09, 0x76, 0x65, 0x63, 0x32, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x55, 0x76, 0x20, 0x3d, 0x20, 0x75, 0x76, 0x20, 0x2b, 0x20, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x55, 0x76, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x63, 0x6c, + 0x61, 0x6d, 0x70, 0x28, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, + 0x2e, 0x78, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x39, + 0x39, 0x39, 0x29, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x73, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x55, 0x76, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, + 0x6d, 0x70, 0x28, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x2e, + 0x79, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x39, 0x39, + 0x39, 0x29, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x09, 0x09, 0x75, 0x69, 0x6e, + 0x74, 0x20, 0x63, 0x6f, 0x6c, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, + 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x2c, 0x20, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x55, 0x76, 0x29, 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x09, + 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, + 0x74, 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, 0x44, 0x65, 0x70, 0x74, 0x68, + 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x76, 0x29, 0x2e, + 0x72, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x69, 0x66, 0x28, 0x63, 0x6f, 0x6c, + 0x20, 0x3d, 0x3d, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x20, 0x26, 0x26, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x75, - 0x5f, 0x44, 0x65, 0x70, 0x74, 0x68, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x55, 0x76, 0x29, 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x09, 0x09, - 0x69, 0x66, 0x28, 0x63, 0x6f, 0x6c, 0x20, 0x3d, 0x3d, 0x20, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x20, 0x26, 0x26, 0x20, 0x64, 0x65, 0x70, 0x74, - 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x21, 0x3d, 0x20, 0x30, - 0x2e, 0x30, 0x66, 0x20, 0x26, 0x26, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x3c, 0x20, 0x64, 0x65, 0x70, - 0x74, 0x68, 0x29, 0x0d, 0x0a, 0x09, 0x09, 0x7b, 0x0d, 0x0a, 0x09, 0x09, - 0x09, 0x68, 0x61, 0x73, 0x48, 0x69, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x2e, - 0x30, 0x66, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, - 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x4d, 0x69, 0x78, 0x20, 0x6f, 0x75, 0x74, - 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x62, 0x61, - 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x0d, 0x0a, 0x09, 0x09, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x20, - 0x3d, 0x20, 0x73, 0x6d, 0x6f, 0x6f, 0x74, 0x68, 0x73, 0x74, 0x65, 0x70, - 0x28, 0x30, 0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x39, 0x2c, 0x20, 0x69, - 0x6e, 0x74, 0x28, 0x63, 0x6f, 0x6c, 0x20, 0x21, 0x3d, 0x20, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x29, 0x20, 0x2a, 0x20, 0x68, 0x61, 0x73, 0x48, - 0x69, 0x74, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x66, 0x29, 0x3b, - 0x0d, 0x0a, 0x09, 0x09, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, - 0x72, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x78, 0x28, 0x66, 0x72, 0x61, 0x67, - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x75, 0x5f, 0x4f, 0x75, 0x74, - 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x29, 0x3b, 0x0d, 0x0a, 0x09, 0x7d, 0x0d, 0x0a, - 0x09, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x66, 0x72, - 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x61, 0x20, 0x3e, 0x20, - 0x30, 0x2e, 0x31, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x72, 0x61, - 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x61, 0x20, 0x3d, 0x20, 0x31, - 0x2e, 0x30, 0x66, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x46, - 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x6d, - 0x69, 0x78, 0x28, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x29, 0x2c, 0x20, - 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x6d, - 0x69, 0x64, 0x64, 0x6c, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, - 0x21, 0x3d, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x26, 0x26, - 0x20, 0x68, 0x61, 0x73, 0x48, 0x69, 0x74, 0x20, 0x3e, 0x20, 0x30, 0x2e, - 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a + 0x20, 0x3c, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x29, 0x0d, 0x0a, 0x09, + 0x09, 0x7b, 0x0d, 0x0a, 0x09, 0x09, 0x09, 0x68, 0x61, 0x73, 0x48, 0x69, + 0x74, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x3b, 0x0d, 0x0a, 0x09, + 0x09, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x4d, + 0x69, 0x78, 0x20, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x77, + 0x69, 0x74, 0x68, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x0d, 0x0a, 0x09, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x20, 0x3d, 0x20, 0x73, 0x6d, 0x6f, 0x6f, + 0x74, 0x68, 0x73, 0x74, 0x65, 0x70, 0x28, 0x30, 0x2e, 0x35, 0x2c, 0x20, + 0x30, 0x2e, 0x39, 0x2c, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x63, 0x6f, 0x6c, + 0x20, 0x21, 0x3d, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x29, 0x20, + 0x2a, 0x20, 0x68, 0x61, 0x73, 0x48, 0x69, 0x74, 0x20, 0x2a, 0x20, 0x31, + 0x30, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, 0x09, 0x09, 0x66, 0x72, + 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x6d, 0x69, + 0x78, 0x28, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, + 0x20, 0x75, 0x5f, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x29, 0x3b, + 0x0d, 0x0a, 0x09, 0x7d, 0x0d, 0x0a, 0x09, 0x0d, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x69, 0x66, 0x28, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x2e, 0x61, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x31, 0x29, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x2e, 0x61, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x3b, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0d, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, + 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x65, 0x63, + 0x34, 0x28, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x21, 0x3d, 0x20, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x20, 0x26, 0x26, 0x20, 0x68, 0x61, 0x73, 0x48, 0x69, + 0x74, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, + 0x7d, 0x0d, 0x0a }; - unsigned int Resources_Shaders_outline_shader_len = 1761; + unsigned int Resources_Shaders_outline_shader_len = 1791; // Data for file: Resources_Shaders_pbr_shader_path const std::string Resources_Shaders_pbr_shader_path = R"(Resources/Shaders/pbr.shader)"; @@ -274822,173 +274825,174 @@ const std::string Resources_Shaders_volumetric_shader_path = R"(Resources/Shader 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x0d, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x5f, 0x46, 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, - 0x69, 0x6e, 0x74, 0x20, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x47, 0x48, - 0x54, 0x20, 0x3d, 0x20, 0x32, 0x30, 0x3b, 0x0d, 0x0a, 0x75, 0x6e, 0x69, - 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x75, 0x5f, 0x4c, - 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x0d, 0x0a, - 0x0d, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x4c, 0x69, 0x67, - 0x68, 0x74, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, - 0x74, 0x34, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x76, 0x65, 0x63, 0x33, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x68, 0x61, 0x64, 0x6f, - 0x77, 0x6d, 0x61, 0x70, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x3b, 0x0d, 0x0a, 0x7d, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x75, 0x6e, - 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x20, - 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5b, 0x4d, 0x41, 0x58, - 0x5f, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5d, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, - 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, - 0x68, 0x61, 0x64, 0x6f, 0x77, 0x6d, 0x61, 0x70, 0x3b, 0x0d, 0x0a, 0x69, - 0x6e, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x55, 0x56, 0x3b, 0x0d, 0x0a, - 0x0d, 0x0a, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x46, - 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0d, 0x0a, 0x63, - 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x50, - 0x49, 0x20, 0x3d, 0x20, 0x33, 0x2e, 0x31, 0x34, 0x31, 0x35, 0x39, 0x32, - 0x36, 0x35, 0x33, 0x35, 0x38, 0x39, 0x37, 0x39, 0x33, 0x66, 0x3b, 0x0d, - 0x0a, 0x0d, 0x0a, 0x2f, 0x2f, 0x20, 0x4d, 0x69, 0x65, 0x20, 0x73, 0x63, - 0x61, 0x74, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x70, 0x70, - 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x48, 0x65, 0x6e, 0x79, 0x65, 0x79, 0x2d, 0x47, 0x72, - 0x65, 0x65, 0x6e, 0x73, 0x74, 0x65, 0x69, 0x6e, 0x20, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x0d, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x43, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x53, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, - 0x67, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 0x69, 0x67, 0x68, - 0x74, 0x44, 0x6f, 0x74, 0x56, 0x69, 0x65, 0x77, 0x29, 0x0d, 0x0a, 0x7b, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, - 0x66, 0x20, 0x2d, 0x20, 0x75, 0x5f, 0x46, 0x6f, 0x67, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x20, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x2f, 0x3d, 0x20, 0x28, 0x34, 0x2e, - 0x30, 0x66, 0x20, 0x2a, 0x20, 0x50, 0x49, 0x20, 0x2a, 0x20, 0x70, 0x6f, - 0x77, 0x28, 0x31, 0x2e, 0x30, 0x66, 0x20, 0x2b, 0x20, 0x75, 0x5f, 0x46, - 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2a, 0x20, 0x75, - 0x5f, 0x46, 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2d, - 0x20, 0x28, 0x32, 0x2e, 0x30, 0x66, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x46, - 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x29, 0x20, 0x2a, 0x20, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x6f, 0x74, 0x56, 0x69, 0x65, 0x77, - 0x2c, 0x20, 0x31, 0x2e, 0x35, 0x66, 0x29, 0x29, 0x3b, 0x0d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, - 0x76, 0x65, 0x63, 0x33, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x28, 0x76, - 0x65, 0x63, 0x33, 0x20, 0x46, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, 0x2c, - 0x20, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x29, 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x33, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x75, 0x5f, 0x43, 0x61, 0x6d, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, - 0x20, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x20, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x33, 0x20, 0x72, 0x61, 0x79, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x20, 0x3d, 0x20, 0x46, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, 0x20, 0x2d, - 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x61, 0x79, 0x20, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0d, 0x0a, 0x0d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, - 0x61, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x72, 0x61, 0x79, 0x56, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x29, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x61, - 0x79, 0x6d, 0x61, 0x72, 0x63, 0x68, 0x65, 0x64, 0x0d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x2f, 0x2f, 0x69, 0x66, 0x28, 0x72, 0x61, 0x79, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x31, 0x30, 0x30, 0x30, 0x2e, - 0x30, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x63, - 0x33, 0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, - 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x72, 0x61, 0x79, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x20, 0x2f, 0x20, 0x75, 0x5f, 0x53, 0x74, 0x65, 0x70, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x74, 0x65, 0x70, 0x20, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x33, 0x20, 0x72, 0x61, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x72, 0x61, 0x79, 0x56, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x20, 0x2f, 0x20, 0x72, 0x61, 0x79, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x33, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x72, 0x61, - 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2a, - 0x20, 0x73, 0x74, 0x65, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, - 0x20, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, - 0x74, 0x6f, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, - 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x3d, 0x20, - 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x30, 0x66, 0x2c, 0x20, 0x30, - 0x2e, 0x30, 0x66, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, - 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x61, 0x79, 0x6d, 0x61, 0x72, 0x63, 0x68, - 0x69, 0x6e, 0x67, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, - 0x33, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0d, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x69, 0x6e, 0x74, - 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, - 0x75, 0x5f, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, - 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, 0x4c, 0x69, - 0x67, 0x68, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x6c, - 0x69, 0x67, 0x68, 0x74, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, - 0x72, 0x6d, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x65, - 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x33, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, - 0x73, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, 0x4c, - 0x69, 0x67, 0x68, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x78, 0x79, - 0x7a, 0x20, 0x2f, 0x20, 0x66, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, 0x4c, - 0x69, 0x67, 0x68, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x77, 0x3b, - 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x2f, 0x2f, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x20, 0x74, 0x6f, 0x20, 0x5b, 0x30, 0x2c, 0x31, 0x5d, 0x20, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x20, - 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, - 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, + 0x74, 0x3b, 0x0d, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x5f, 0x45, 0x78, 0x70, 0x6f, + 0x6e, 0x61, 0x6e, 0x74, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x4d, 0x41, 0x58, 0x5f, 0x4c, + 0x49, 0x47, 0x48, 0x54, 0x20, 0x3d, 0x20, 0x32, 0x30, 0x3b, 0x0d, 0x0a, + 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x69, 0x6e, 0x74, 0x20, + 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, + 0x63, 0x33, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0d, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x68, + 0x61, 0x64, 0x6f, 0x77, 0x6d, 0x61, 0x70, 0x3b, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x74, 0x72, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0d, 0x0a, 0x7d, 0x3b, 0x0d, 0x0a, 0x0d, + 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4c, 0x69, 0x67, + 0x68, 0x74, 0x20, 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5b, + 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5d, 0x3b, 0x0d, + 0x0a, 0x0d, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x6d, 0x61, 0x70, 0x3b, + 0x0d, 0x0a, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x55, 0x56, + 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, + 0x34, 0x20, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, + 0x0d, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x20, 0x50, 0x49, 0x20, 0x3d, 0x20, 0x33, 0x2e, 0x31, 0x34, 0x31, + 0x35, 0x39, 0x32, 0x36, 0x35, 0x33, 0x35, 0x38, 0x39, 0x37, 0x39, 0x33, + 0x66, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x2f, 0x2f, 0x20, 0x4d, 0x69, 0x65, + 0x20, 0x73, 0x63, 0x61, 0x74, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x20, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x48, 0x65, 0x6e, 0x79, 0x65, 0x79, + 0x2d, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x74, 0x65, 0x69, 0x6e, 0x20, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x0d, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x53, 0x63, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x69, 0x6e, 0x67, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x44, 0x6f, 0x74, 0x56, 0x69, 0x65, 0x77, 0x29, + 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, + 0x31, 0x2e, 0x30, 0x66, 0x20, 0x2d, 0x20, 0x75, 0x5f, 0x46, 0x6f, 0x67, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3b, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x2f, 0x3d, 0x20, + 0x28, 0x34, 0x2e, 0x30, 0x66, 0x20, 0x2a, 0x20, 0x50, 0x49, 0x20, 0x2a, + 0x20, 0x70, 0x6f, 0x77, 0x28, 0x31, 0x2e, 0x30, 0x66, 0x20, 0x2b, 0x20, + 0x75, 0x5f, 0x46, 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, + 0x2a, 0x20, 0x75, 0x5f, 0x46, 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x20, 0x2d, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x66, 0x20, 0x2a, 0x20, + 0x75, 0x5f, 0x46, 0x6f, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x29, + 0x20, 0x2a, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x6f, 0x74, 0x56, + 0x69, 0x65, 0x77, 0x2c, 0x20, 0x31, 0x2e, 0x35, 0x66, 0x29, 0x29, 0x3b, + 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, + 0x0a, 0x0d, 0x0a, 0x76, 0x65, 0x63, 0x33, 0x20, 0x43, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x28, 0x76, 0x65, 0x63, 0x33, 0x20, 0x46, 0x72, 0x61, 0x67, 0x50, + 0x6f, 0x73, 0x2c, 0x20, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x29, 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x75, 0x5f, + 0x43, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x20, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x0d, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x72, 0x61, 0x79, 0x56, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x46, 0x72, 0x61, 0x67, 0x50, 0x6f, + 0x73, 0x20, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, + 0x61, 0x79, 0x20, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x20, 0x72, 0x61, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, + 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x72, 0x61, 0x79, + 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x29, 0x3b, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x61, 0x79, 0x6d, 0x61, 0x72, 0x63, 0x68, 0x65, 0x64, 0x0d, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x72, 0x61, 0x79, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x31, 0x30, 0x30, 0x30, + 0x2e, 0x30, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x33, + 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x72, 0x61, 0x79, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x20, 0x2f, 0x20, 0x75, 0x5f, 0x53, 0x74, 0x65, + 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x74, 0x65, 0x70, 0x20, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, + 0x65, 0x63, 0x33, 0x20, 0x72, 0x61, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x72, 0x61, 0x79, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x20, 0x2f, 0x20, 0x72, 0x61, 0x79, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, + 0x65, 0x63, 0x33, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x72, + 0x61, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x2a, 0x20, 0x73, 0x74, 0x65, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, + 0x2f, 0x20, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, + 0x33, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x3d, + 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x30, 0x66, 0x2c, 0x20, + 0x30, 0x2e, 0x30, 0x66, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x66, 0x29, 0x3b, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, + 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x61, 0x79, 0x6d, 0x61, 0x72, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, + 0x63, 0x33, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0d, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x69, 0x6e, + 0x74, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, + 0x20, 0x75, 0x5f, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, + 0x65, 0x63, 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, + 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x70, 0x65, 0x72, 0x73, 0x70, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x64, 0x69, 0x76, 0x69, 0x64, + 0x65, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, + 0x65, 0x63, 0x33, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, + 0x64, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x78, + 0x79, 0x7a, 0x20, 0x2f, 0x20, 0x66, 0x72, 0x61, 0x67, 0x50, 0x6f, 0x73, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x77, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x72, - 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x7a, 0x3b, 0x0d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x44, 0x65, - 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, - 0x65, 0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x73, 0x68, 0x61, 0x64, - 0x6f, 0x77, 0x6d, 0x61, 0x70, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, - 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x78, 0x79, 0x29, 0x2e, 0x72, 0x3b, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x28, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x44, 0x65, 0x70, - 0x74, 0x68, 0x20, 0x3e, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x44, 0x65, 0x70, 0x74, 0x68, 0x20, 0x26, 0x26, 0x20, 0x63, 0x6c, 0x6f, - 0x73, 0x65, 0x73, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x20, 0x3c, 0x20, - 0x39, 0x39, 0x39, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x61, 0x63, 0x63, 0x75, 0x6d, - 0x46, 0x6f, 0x67, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x6c, - 0x69, 0x67, 0x68, 0x74, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x3b, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x2b, - 0x3d, 0x20, 0x28, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x53, 0x63, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x64, 0x6f, 0x74, - 0x28, 0x72, 0x61, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2c, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x29, 0x2e, 0x78, 0x78, 0x78, - 0x20, 0x2a, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x63, 0x6f, 0x6c, - 0x6f, 0x72, 0x20, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x5b, 0x30, 0x2c, 0x31, 0x5d, 0x20, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, + 0x20, 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x73, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x20, 0x2b, 0x20, 0x30, 0x2e, + 0x35, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, + 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x7a, 0x3b, + 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x44, + 0x65, 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, + 0x72, 0x65, 0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x6d, 0x61, 0x70, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x6a, + 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x78, 0x79, 0x29, 0x2e, 0x72, + 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, + 0x66, 0x20, 0x28, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x44, 0x65, + 0x70, 0x74, 0x68, 0x20, 0x3e, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x20, 0x26, 0x26, 0x20, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x73, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x20, 0x3c, + 0x20, 0x39, 0x39, 0x39, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x61, 0x63, 0x63, 0x75, + 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x29, + 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x20, + 0x2b, 0x3d, 0x20, 0x28, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x53, + 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x64, 0x6f, + 0x74, 0x28, 0x72, 0x61, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2c, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x29, 0x2e, 0x78, 0x78, + 0x78, 0x20, 0x2a, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x70, 0x72, 0x6f, 0x6a, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2e, @@ -275012,106 +275016,106 @@ const std::string Resources_Shaders_volumetric_shader_path = R"(Resources/Shader 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x2f, 0x3d, 0x20, 0x75, 0x5f, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, - 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x20, 0x2a, 0x20, 0x34, 0x2e, - 0x30, 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, 0x2f, 0x2f, 0x20, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x73, 0x20, 0x64, 0x65, 0x70, - 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x20, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x73, - 0x2e, 0x0d, 0x0a, 0x76, 0x65, 0x63, 0x33, 0x20, 0x57, 0x6f, 0x72, 0x6c, - 0x64, 0x50, 0x6f, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x70, 0x74, - 0x68, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x65, 0x70, 0x74, - 0x68, 0x29, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x20, 0x3d, 0x20, 0x64, 0x65, 0x70, 0x74, - 0x68, 0x20, 0x2a, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x31, 0x2e, - 0x30, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x34, 0x20, 0x63, 0x6c, 0x69, 0x70, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x76, - 0x65, 0x63, 0x34, 0x28, 0x55, 0x56, 0x20, 0x2a, 0x20, 0x32, 0x2e, 0x30, - 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x31, - 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, - 0x63, 0x34, 0x20, 0x76, 0x69, 0x65, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x49, - 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x2a, 0x20, 0x63, 0x6c, 0x69, 0x70, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0d, 0x0a, 0x0d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x65, 0x72, 0x73, - 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x64, 0x69, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x69, - 0x65, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x2f, 0x3d, 0x20, 0x76, 0x69, 0x65, 0x77, 0x53, - 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x77, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, - 0x65, 0x63, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x70, 0x61, - 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, - 0x20, 0x49, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x20, 0x2a, 0x20, 0x76, - 0x69, 0x65, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x77, 0x6f, 0x72, 0x6c, - 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, - 0x0d, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, - 0x29, 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, - 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x75, 0x5f, 0x44, 0x65, - 0x70, 0x74, 0x68, 0x2c, 0x20, 0x55, 0x56, 0x29, 0x2e, 0x72, 0x3b, 0x0d, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x67, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x57, - 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x44, - 0x65, 0x70, 0x74, 0x68, 0x28, 0x64, 0x65, 0x70, 0x74, 0x68, 0x29, 0x3b, - 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, - 0x20, 0x66, 0x6f, 0x67, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, - 0x30, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x69, 0x6e, 0x74, 0x20, - 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x75, - 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, - 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, - 0x67, 0x20, 0x2b, 0x3d, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x28, 0x67, + 0x63, 0x63, 0x75, 0x6d, 0x46, 0x6f, 0x67, 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, + 0x0a, 0x0d, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x74, 0x73, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20, + 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x0d, 0x0a, 0x76, 0x65, 0x63, + 0x33, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x46, 0x72, + 0x6f, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x28, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x29, 0x20, 0x7b, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x20, + 0x3d, 0x20, 0x64, 0x65, 0x70, 0x74, 0x68, 0x20, 0x2a, 0x20, 0x32, 0x2e, + 0x30, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x63, 0x6c, 0x69, + 0x70, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x55, 0x56, + 0x20, 0x2a, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, + 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x69, 0x65, + 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x49, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2a, 0x20, 0x63, 0x6c, 0x69, + 0x70, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, + 0x2f, 0x20, 0x50, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x20, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x76, 0x69, 0x65, 0x77, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2f, 0x3d, + 0x20, 0x76, 0x69, 0x65, 0x77, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x77, 0x3b, 0x0d, 0x0a, 0x0d, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x77, 0x6f, + 0x72, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x49, 0x6e, 0x76, 0x56, 0x69, + 0x65, 0x77, 0x20, 0x2a, 0x20, 0x76, 0x69, 0x65, 0x77, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0d, + 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, + 0x3b, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, 0x76, 0x6f, 0x69, 0x64, + 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x0d, 0x0a, 0x7b, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, + 0x65, 0x28, 0x75, 0x5f, 0x44, 0x65, 0x70, 0x74, 0x68, 0x2c, 0x20, 0x55, + 0x56, 0x29, 0x2e, 0x72, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, + 0x65, 0x63, 0x33, 0x20, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, + 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, + 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x28, 0x64, + 0x65, 0x70, 0x74, 0x68, 0x29, 0x3b, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x66, 0x6f, 0x67, 0x20, 0x3d, + 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2c, 0x20, 0x30, 0x2c, 0x20, + 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x28, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, + 0x20, 0x69, 0x20, 0x3c, 0x20, 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0d, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x67, 0x20, 0x2b, 0x3d, 0x20, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x5b, 0x69, 0x5d, 0x29, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x45, 0x78, + 0x70, 0x6f, 0x6e, 0x61, 0x6e, 0x74, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x46, 0x72, + 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, + 0x63, 0x34, 0x28, 0x66, 0x6f, 0x67, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, + 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x46, 0x72, 0x61, + 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, + 0x34, 0x28, 0x6d, 0x69, 0x78, 0x28, 0x66, 0x6f, 0x67, 0x2c, 0x20, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x39, 0x66, 0x29, + 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x31, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x2f, 0x2f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x67, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2a, 0x20, 0x31, 0x30, + 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x75, - 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5b, 0x69, 0x5d, 0x29, 0x3b, - 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0d, 0x0a, 0x0d, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, - 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x66, 0x6f, 0x67, 0x2c, - 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x2f, 0x2f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, - 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x6d, 0x69, 0x78, 0x28, 0x66, - 0x6f, 0x67, 0x2c, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x56, + 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, + 0x7a, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, + 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, + 0x2f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, + 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, + 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x78, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x70, 0x61, + 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, + 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x2c, 0x20, + 0x31, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x46, + 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, + 0x65, 0x63, 0x34, 0x28, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5b, 0x30, 0x5d, 0x29, 0x2c, 0x20, - 0x30, 0x2e, 0x39, 0x66, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x31, 0x29, - 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x46, 0x72, 0x61, - 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, - 0x34, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x2a, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, - 0x66, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x46, - 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, - 0x65, 0x63, 0x34, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, - 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x30, - 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x66, 0x29, 0x3b, 0x0d, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, - 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x77, - 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x2c, 0x20, 0x77, 0x6f, 0x72, - 0x6c, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, - 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x7a, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x2f, 0x2f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, - 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x46, 0x72, 0x61, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2c, 0x20, 0x75, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5b, - 0x30, 0x5d, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, - 0x7d + 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0d, 0x0a, 0x7d }; - unsigned int Resources_Shaders_volumetric_shader_len = 4237; + unsigned int Resources_Shaders_volumetric_shader_len = 4256; } } diff --git a/Nuake/src/Scene/EditorCamera.cpp b/Nuake/src/Scene/EditorCamera.cpp index b9f11f74..09658010 100644 --- a/Nuake/src/Scene/EditorCamera.cpp +++ b/Nuake/src/Scene/EditorCamera.cpp @@ -5,6 +5,7 @@ #include "src/Core/Logger.h" #include +#include namespace Nuake { @@ -49,8 +50,10 @@ namespace Nuake } } - Yaw = glm::mix(Yaw, TargetYaw, 1.0f); - Pitch = glm::mix(Pitch, TargetPitch, 1.0f); + const bool smoothCamera = Engine::GetProject()->Settings.SmoothCamera; + const float smoothCameraSpeed = Engine::GetProject()->Settings.SmoothCameraSpeed; + Yaw = glm::mix(Yaw, TargetYaw, smoothCamera ? smoothCameraSpeed : 1.0f); + Pitch = glm::mix(Pitch, TargetPitch, smoothCamera ? smoothCameraSpeed : 1.0f); if (!controlled) { diff --git a/Nuake/src/UI/ImUI.cpp b/Nuake/src/UI/ImUI.cpp index 06e3fde0..9703524d 100644 --- a/Nuake/src/UI/ImUI.cpp +++ b/Nuake/src/UI/ImUI.cpp @@ -1,5 +1,6 @@ #include "ImUI.h" #include +#include namespace Nuake { @@ -17,9 +18,15 @@ namespace Nuake { bool PrimaryButton(const std::string& name, const Vector2& size) { - ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(97, 0, 255, 255)); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(97, 0, 255, 200)); - ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(97, 0, 255, 255)); + Color color = Color(97.0f / 255.0f, 0, 1.0f, 1.0f); + if (Nuake::Engine::GetProject()) + { + color = Nuake::Engine::GetProject()->Settings.PrimaryColor; + } + + ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(color.r * 255.0f, color.g * 255.0f, color.b * 255.0f, 255)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(color.r * 255.0f, color.g * 255.0f, color.b * 255.0f, 200)); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(color.r * 255.0f, color.g * 255.0f, color.b * 255.0f, 255)); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ButtonPadding); @@ -36,9 +43,15 @@ namespace Nuake { bool SecondaryButton(const std::string& name, const Vector2& size) { + Color color = Color(97.0f / 255.0f, 0, 1.0f, 1.0f); + if (Nuake::Engine::GetProject()) + { + color = Nuake::Engine::GetProject()->Settings.PrimaryColor; + } + ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(0, 0, 0, 0)); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(97, 0, 255, 200)); - ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(97, 0, 255, 255)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(color.r * 255.0f, color.g * 255.0f, color.b * 255.0f, 200)); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, IM_COL32(color.r * 255.0f, color.g * 255.0f, color.b * 255.0f, 255)); ImGui::PushStyleColor(ImGuiCol_Border, PrimaryCol); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 2.0f); diff --git a/Nuake/src/Window.cpp b/Nuake/src/Window.cpp index 4540a4d7..bfa20ff6 100644 --- a/Nuake/src/Window.cpp +++ b/Nuake/src/Window.cpp @@ -101,7 +101,12 @@ namespace Nuake // Create viewports const Vector2 defaultResolution = Vector2(1, 1); m_Framebuffer = CreateRef(true, defaultResolution); - m_Framebuffer->SetTexture(CreateRef(defaultResolution, GL_RGB)); + + Ref outputTexture = CreateRef(defaultResolution, GL_RGB); + outputTexture->SetParameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST); + outputTexture->SetParameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + m_Framebuffer->SetTexture(outputTexture); m_Framebuffer->SetTexture(CreateRef(defaultResolution, GL_RED_INTEGER, GL_R32I, GL_INT), GL_COLOR_ATTACHMENT1); // Entity ID InitImgui(); @@ -142,7 +147,8 @@ namespace Nuake cam->AspectRatio = size.x / size.y; - m_Scene->m_EditorCamera->OnWindowResize(size.x, size.y); + float resolutionScale = glm::clamp(Engine::GetProject()->Settings.ResolutionScale, 0.5f, 2.0f); + m_Scene->m_EditorCamera->OnWindowResize(size.x * resolutionScale, size.y * resolutionScale); if (Engine::IsPlayMode()) { diff --git a/Resources/Shaders/outline.shader b/Resources/Shaders/outline.shader index e22a2983..63288309 100644 --- a/Resources/Shaders/outline.shader +++ b/Resources/Shaders/outline.shader @@ -20,6 +20,7 @@ uniform usampler2D u_EntityTexture; uniform vec4 u_OutlineColor; uniform sampler2D u_Depth; +uniform float u_Radius; out vec4 FragColor; in vec2 a_UV; @@ -30,7 +31,7 @@ void main() const float TAU = 6.28318530; const float steps = 32.0; - float radius = 4.f; + float radius = u_Radius; vec2 uv = a_UV; // sample middle diff --git a/Resources/Shaders/volumetric.shader b/Resources/Shaders/volumetric.shader index 54721ee1..c4e5db64 100644 --- a/Resources/Shaders/volumetric.shader +++ b/Resources/Shaders/volumetric.shader @@ -35,6 +35,7 @@ uniform sampler2D u_Depth; uniform vec3 u_CamPosition; uniform int u_StepCount; uniform float u_FogAmount; +uniform float u_Exponant; const int MAX_LIGHT = 20; uniform int u_LightCount; @@ -59,7 +60,7 @@ const float PI = 3.141592653589793f; float ComputeScattering(float lightDotView) { float result = 1.0f - u_FogAmount ; - result /= (4.0f * PI * pow(1.0f + u_FogAmount * u_FogAmount - (2.0f * u_FogAmount) * lightDotView, 1.5f)); + result /= (4.0f * PI * pow(1.0f + u_FogAmount * u_FogAmount - (1.0f * u_FogAmount) * lightDotView, 1.5f)); return result; } @@ -69,8 +70,8 @@ vec3 ComputeVolumetric(vec3 FragPos, Light light) vec3 rayVector = FragPos - startPosition; // Ray Direction float rayLength = length(rayVector); // Length of the raymarched - //if(rayLength > 1000.0) - // return vec3(1.0, 1.0, 1.0); + if(rayLength > 1000.0) + return vec3(0.0); float stepLength = rayLength / u_StepCount; // Step length vec3 rayDirection = rayVector / rayLength; vec3 step = rayDirection * stepLength; // Normalized to step length direction @@ -93,7 +94,7 @@ vec3 ComputeVolumetric(vec3 FragPos, Light light) if (closestDepth > currentDepth && closestDepth < 999) { //accumFog = vec3(light.color); - accumFog += (ComputeScattering(dot(rayDirection, light.direction)).xxx * light.color ); + accumFog += (ComputeScattering(dot(rayDirection, light.direction)).xxx * light.color); //accumFog = vec3(projCoords.x, projCoords.y, 1.0); } @@ -102,7 +103,7 @@ vec3 ComputeVolumetric(vec3 FragPos, Light light) } accumFog /= u_StepCount; - return accumFog * 4.0; + return accumFog; } // Converts depth to World space coords. @@ -128,7 +129,7 @@ void main() vec3 fog = vec3(0, 0, 0); for (int i = 0; i < u_LightCount; i++) { - fog += ComputeVolumetric(globalFragmentPosition, u_Lights[i]); + fog += ComputeVolumetric(globalFragmentPosition, u_Lights[i]) * u_Exponant; } FragColor = vec4(fog, 1.0);