From 00c230752bda69fdaae96b0bccaff22c8b84f383 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:31:40 +0000 Subject: [PATCH 01/18] Update Camera Struct --- .../ERS_STRUCT_Camera/ERS_STRUCT_Camera.h | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h index 50bca23d25..d7b3b8f366 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h @@ -115,44 +115,6 @@ struct ERS_STRUCT_Camera { */ void GetClipBoundires(float &NearClip, float &FarClip); - // /** - // * @brief Helper function, sets the camera's maximum and minimum freeflying movement speeds. - // * - // * @param MinSpeed Slowest speed that the user can set the camera's keys to move in units per second. - // * @param MaxSpeed Fastest speed that the user can set the camera's keys to move in units per second. - // */ - // void SetMovementSpeedBoundries(float MinSpeed, float MaxSpeed); - - // /** - // * @brief Helper Function, gets the camera's maximum and minimum freeflying movement speeds. - // * - // * @param MinSpeed Slowest speed that the user can set the camera's keys to move in units per second. - // * @param MaxSpeed Fastest speed that the user can set the camera's keys to move in units per second. - // */ - // void GetMovementSpeedBoundries(float &MinSpeed, float &MaxSpeed); - - // /** - // * @brief Helper function, Sets the speed of the camera. - // * - // * @param Speed Desired speed in units per second. - // * @param EnforceSpeedBoundries Enable/disable hard boundry enforcement. - // */ - // void SetMovementSpeed(float Speed, bool EnforceSpeedBoundries = true); - - // /** - // * @brief Gets the mouse sensitivity multiplier. - // * - // * @param Sensitivity Mouse sensitivity multiplier. - // */ - // void GetMouseSensitivity(float &Sensitivity); - - // /** - // * @brief Sets the mouse sensitivity multiplier. - // * - // * @param Sensitivity Mouse sensitivity multiplier. - // */ - // void SetMouseSensitivity(float Sensitivity); - /** * @brief Gets the current field of view angle. * From 46843dde46df85e76ec85906a84f64d0239f822d Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:31:48 +0000 Subject: [PATCH 02/18] Update Camera Struct --- .../Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h index d7b3b8f366..d34f5807df 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h @@ -56,14 +56,6 @@ struct ERS_STRUCT_Camera { - // /** - // * @brief Processes keyboard input for the camera. - // * - // * @param Direction Direction currently being pressed. - // * @param DeltaTime Frame time used to ensure speed isn't tied to framerate - // */ - // void ProcessKeyboard(CameraMovement Direction, float DeltaTime); - // /** // * @brief Processed mouse movement across the camera's viewport. // * From 341e1095473fd18a0e4c5529736bdfd2264a5e71 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:31:56 +0000 Subject: [PATCH 03/18] Update Camera Struct --- .../ERS_STRUCT_Camera/ERS_STRUCT_Camera.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h index d34f5807df..f9cf1e7abd 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h @@ -56,23 +56,6 @@ struct ERS_STRUCT_Camera { - // /** - // * @brief Processed mouse movement across the camera's viewport. - // * - // * @param XOffset Pixels moved in the x direction - // * @param Yoffset Pixels moved in the y direction - // * @param ConstrainPitch Stops the camera from turning above/bleow vertical - // */ - // void ProcessMouseMovement(float XOffset, float Yoffset, GLboolean ConstrainPitch = true); - - // /** - // * @brief Handles the mouse scrolling inputs - // * - // * @param YOffset mouse scroll amount - // */ - // void ProcessMouseScroll(float YOffset); - - /** * @brief Updates the camera's matricies, should be called once per frame. From a9d80f46a271fb1b50bc8ef9a967255302f21ea6 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:32:02 +0000 Subject: [PATCH 04/18] Update Camera Struct --- Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h index f9cf1e7abd..758d5f3e07 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h @@ -55,7 +55,6 @@ struct ERS_STRUCT_Camera { ~ERS_STRUCT_Camera(); - /** * @brief Updates the camera's matricies, should be called once per frame. From 4bd614934448752eb738f02ccdf28f59ef73b1c6 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:32:17 +0000 Subject: [PATCH 05/18] Update Camera Struct --- .../ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp index 02bafdf09c..1d7aba6481 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp @@ -13,65 +13,6 @@ ERS_STRUCT_Camera::~ERS_STRUCT_Camera() { } -// // Callbacks -// void ERS_STRUCT_Camera::ProcessKeyboard(CameraMovement Direction, float DeltaTime) { - -// // Calculate Velocity -// float Velocity = MovementSpeed_ * DeltaTime; - -// // Update Position(s) -// if (Direction == FORWARD) -// Position_ += Front_ * Velocity; -// if (Direction == BACKWARD) -// Position_ -= Front_ * Velocity; -// if (Direction == LEFT) -// Position_ -= Right_ * Velocity; -// if (Direction == RIGHT) -// Position_ += Right_ * Velocity; -// if (Direction == UP) -// Position_ += Up_ * Velocity; -// if (Direction == DOWN) -// Position_ -= Up_ * Velocity; - -// } -// void ERS_STRUCT_Camera::ProcessMouseMovement(float XOffset, float YOffset, GLboolean ConstrainPitch) { - -// // Change Offset By Sensitivity -// XOffset *= MouseSensitivity_; -// YOffset *= MouseSensitivity_; - -// // Update Pitch/Yaw -// Orientation_.y += XOffset; -// Orientation_.p += YOffset; - - - -// // Bound Pitch -// if (ConstrainPitch) { - -// if (Orientation_.p > 89.0f) { -// Orientation_.p = 89.0f; -// } -// if (Orientation_.p < -89.0f) { -// Orientation_.p = -89.0f; -// } -// } - -// } -// void ERS_STRUCT_Camera::ProcessMouseScroll(float YOffset) { - -// // Update Movement Speed -// MovementSpeed_ += (MovementSpeed_*(float)YOffset/10.0f); - -// // Adjust Movement Speed -// if (MovementSpeed_ < MinMovementSpeed_) -// MovementSpeed_ = MinMovementSpeed_; -// if (MovementSpeed_ > MaxMovementSpeed_) -// MovementSpeed_ = MaxMovementSpeed_; - -// } - - // Update Matricies void ERS_STRUCT_Camera::Update() { From 261d67d93bc92cb3584143ebc010820a7b1fb5f8 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:32:25 +0000 Subject: [PATCH 06/18] Update Camera Struct --- .../ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp index 1d7aba6481..5c14a9281f 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp @@ -50,23 +50,6 @@ void ERS_STRUCT_Camera::GetClipBoundires(float &NearClip, float &FarClip) { NearClip = NearClip_; FarClip = FarClip_; } -// void ERS_STRUCT_Camera::SetMovementSpeedBoundries(float MinSpeed, float MaxSpeed) { -// MinMovementSpeed_ = MinSpeed; -// MaxMovementSpeed_ = MaxSpeed; -// } -// void ERS_STRUCT_Camera::GetMovementSpeedBoundries(float &MinSpeed, float &MaxSpeed) { -// MinSpeed = MinMovementSpeed_; -// MaxSpeed = MaxMovementSpeed_; -// } -// void ERS_STRUCT_Camera::SetMovementSpeed(float Speed, bool EnforceSpeedBoundries) { -// if (EnforceSpeedBoundries) { -// Speed = std::max(MinMovementSpeed_, Speed); -// Speed = std::min(MaxMovementSpeed_, Speed); -// MovementSpeed_ = Speed; -// } else { -// MovementSpeed_ = Speed; -// } -// } void ERS_STRUCT_Camera::SetFOV(float FOV) { FOV_ = FOV; } From 1a12d4d9bbceb3ad8014ca1fafc45d3573f43d52 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:32:31 +0000 Subject: [PATCH 07/18] Update Camera Struct --- .../Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp index 5c14a9281f..8805d32a4a 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.cpp @@ -62,12 +62,6 @@ float ERS_STRUCT_Camera::GetFOV() { void ERS_STRUCT_Camera::SetAspectRatio(float AspectRatio) { AspectRatio_ = AspectRatio; } -// void ERS_STRUCT_Camera::GetMouseSensitivity(float &Sensitivity) { -// Sensitivity = MouseSensitivity_; -// } -// void ERS_STRUCT_Camera::SetMouseSensitivity(float Sensitivity) { -// MouseSensitivity_ = Sensitivity; -// } void ERS_STRUCT_Camera::SetRotation(glm::vec3 Rotation) { Orientation_ = Rotation; } From 68bd7dab2e76959aed52f2573d8a0ed6f9ec3294 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:33:06 +0000 Subject: [PATCH 08/18] Update Camera Struct --- .../GUI_Window_ObjectProperties.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp b/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp index 21256c3aa6..40c5b2dcdd 100644 --- a/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp +++ b/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp @@ -368,16 +368,8 @@ void GUI_Window_ObjectProperties::Draw() { } ImGui::EndChild(); - - - - } - - - - } // End System Controls Window @@ -385,8 +377,6 @@ void GUI_Window_ObjectProperties::Draw() { } - - } From 59c975bc938742a87cbf2bd83a9534ee20f6c3be Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:49:21 +0000 Subject: [PATCH 09/18] Apply Scene Camera Parameters --- .../ERS_CLASS_VisualRenderer.cpp | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp index 4d478c09ac..bc6a211eb2 100644 --- a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp +++ b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp @@ -66,6 +66,24 @@ void ERS_CLASS_VisualRenderer::UpdateViewports(float DeltaTime, ERS_CLASS_SceneM ProjectUtils_->ModelLoader_->AssetStreamingManager_->UpdateSceneStreamingQueue(SceneManager->Scenes_[SceneManager->ActiveScene_].get(), Cameras); + // // Update Camera Location If System Running + // if (!IsEditorMode_ && Index == 0 && Scene->ActiveSceneCameraIndex != -1) { + // Viewport->Camera->SetPosition(Scene->SceneCameras[Scene->ActiveSceneCameraIndex]->Pos_); + // Viewport->Camera->SetRotation(Scene->SceneCameras[Scene->ActiveSceneCameraIndex]->Rot_); + // } + + // Apply Scene Camera Transforms + ERS_STRUCT_Scene* Scene = ProjectUtils_->SceneManager_->Scenes_[ProjectUtils_->SceneManager_->ActiveScene_].get(); + if (!IsEditorMode_ && Scene->ActiveSceneCameraIndex != -1) { + ERS_STRUCT_Camera* Camera = Viewports_[0]->Camera.get(); + ERS_STRUCT_SceneCamera* SceneCamera = Scene->SceneCameras[Scene->ActiveSceneCameraIndex].get(); + Camera->SetAspectRatio(SceneCamera->AspectRatio_); + Camera->SetClipBoundries(SceneCamera->NearClip_, SceneCamera->FarClip_); + Camera->SetFOV(SceneCamera->FOV_); + Camera->SetPosition(SceneCamera->Pos_); + Camera->SetRotation(SceneCamera->Rot_); + Camera->SetStreamingPriority(SceneCamera->StreamingPriority_); + } // Set Depth Shader For Shadow System DepthMapShader_ = Shaders_[ERS_FUNCTION_FindShaderByName(std::string("_DepthMap"), &Shaders_)].get(); @@ -445,12 +463,12 @@ void ERS_CLASS_VisualRenderer::UpdateViewport(int Index, ERS_CLASS_SceneManager* } - // Update Camera Location If System Running - if (!IsEditorMode_ && Index == 0 && Scene->ActiveSceneCameraIndex != -1) { - Viewport->Camera->SetPosition(Scene->SceneCameras[Scene->ActiveSceneCameraIndex]->Pos_); - Viewport->Camera->SetRotation(Scene->SceneCameras[Scene->ActiveSceneCameraIndex]->Rot_); + // // Update Camera Location If System Running + // if (!IsEditorMode_ && Index == 0 && Scene->ActiveSceneCameraIndex != -1) { + // Viewport->Camera->SetPosition(Scene->SceneCameras[Scene->ActiveSceneCameraIndex]->Pos_); + // Viewport->Camera->SetRotation(Scene->SceneCameras[Scene->ActiveSceneCameraIndex]->Rot_); - } + // } // Render From 6d98c75126b3428adb85ae1b471a2bc159f48a82 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:52:35 +0000 Subject: [PATCH 10/18] Apply Scene Camera Parameters --- .../ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp index bc6a211eb2..f884553b2b 100644 --- a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp +++ b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp @@ -77,7 +77,9 @@ void ERS_CLASS_VisualRenderer::UpdateViewports(float DeltaTime, ERS_CLASS_SceneM if (!IsEditorMode_ && Scene->ActiveSceneCameraIndex != -1) { ERS_STRUCT_Camera* Camera = Viewports_[0]->Camera.get(); ERS_STRUCT_SceneCamera* SceneCamera = Scene->SceneCameras[Scene->ActiveSceneCameraIndex].get(); - Camera->SetAspectRatio(SceneCamera->AspectRatio_); + if (SceneCamera->EnforceAspectRatio_) { + Camera->SetAspectRatio(SceneCamera->AspectRatio_); + } Camera->SetClipBoundries(SceneCamera->NearClip_, SceneCamera->FarClip_); Camera->SetFOV(SceneCamera->FOV_); Camera->SetPosition(SceneCamera->Pos_); From ed6388909c900f8a1437c87fd556fd99ab9cdb92 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:57:56 +0000 Subject: [PATCH 11/18] Apply Scene Camera Parameters --- .../ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp index f884553b2b..18e0eb2285 100644 --- a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp +++ b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp @@ -344,10 +344,7 @@ void ERS_CLASS_VisualRenderer::UpdateViewport(int Index, ERS_CLASS_SceneManager* bool MouseXInRange = (MousePositionX >= WindowTopLeftCornerX) && (MousePositionX < WindowBottomRightCornerX); bool MouseYInRange = (MousePositionY >= WindowTopLeftCornerY) && (MousePositionY < WindowBottomRightCornerY); bool MouseInRange = MouseXInRange && MouseYInRange; - - // Update FOV - Viewport->Camera->SetFOV(SystemUtils_->RendererSettings_->FOV_); // Check If Input Enabled bool EnableCameraMovement = !Cursors3D_->IsUsing(); From 3ac350aa1187ee57f8aa499454a338c9de188471 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:58:42 +0000 Subject: [PATCH 12/18] Apply Scene Camera Parameters --- .../GUI_Window_RenderingSettings.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/Core/Editor/Windows/GUI_Window_RenderingSettings/GUI_Window_RenderingSettings.cpp b/Source/Core/Editor/Windows/GUI_Window_RenderingSettings/GUI_Window_RenderingSettings.cpp index 22d3b04f45..2bfeb1b58f 100644 --- a/Source/Core/Editor/Windows/GUI_Window_RenderingSettings/GUI_Window_RenderingSettings.cpp +++ b/Source/Core/Editor/Windows/GUI_Window_RenderingSettings/GUI_Window_RenderingSettings.cpp @@ -143,12 +143,6 @@ void GUI_Window_RenderingSettings::Draw() { } } - // FOV Slider - ImGui::SliderFloat("FOV", &Settings->FOV_, 0.0f, 180.0f); - - - - ImGui::Separator(); ImGui::TextColored(ImVec4(0.2f, 0.8f, 0.2f, 1.0f), "Shadow Maps"); From 2c2684ac43ee9f78202055aad098e674f0d8f910 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 06:58:57 +0000 Subject: [PATCH 13/18] Apply Scene Camera Parameters --- .../ERS_STRUCT_RendererSettings/ERS_STRUCT_RendererSettings.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/Core/Structures/ERS_STRUCT_RendererSettings/ERS_STRUCT_RendererSettings.h b/Source/Core/Structures/ERS_STRUCT_RendererSettings/ERS_STRUCT_RendererSettings.h index 6c613faf41..685a509ab7 100644 --- a/Source/Core/Structures/ERS_STRUCT_RendererSettings/ERS_STRUCT_RendererSettings.h +++ b/Source/Core/Structures/ERS_STRUCT_RendererSettings/ERS_STRUCT_RendererSettings.h @@ -39,7 +39,4 @@ struct ERS_STRUCT_RendererSettings { unsigned long long CurrentVRAMUsage_ = 0; unsigned long long CurrentRAMUsage_ = 0; - - float FOV_ = 70.0f; - }; \ No newline at end of file From b1e381dda0d232d23d95be2d866b050d19d0c54e Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 07:04:13 +0000 Subject: [PATCH 14/18] Apply Scene Camera Parameters --- Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h index 758d5f3e07..dde6d55b2c 100644 --- a/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h +++ b/Source/Core/Structures/ERS_STRUCT_Camera/ERS_STRUCT_Camera.h @@ -168,7 +168,7 @@ struct ERS_STRUCT_Camera { // Internal Camera State Information float MovementSpeed_ = 0.2f; /** Date: Sun, 14 Aug 2022 07:11:19 +0000 Subject: [PATCH 15/18] Apply Scene Camera Parameters --- .../GUI_Window_ObjectProperties.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp b/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp index 40c5b2dcdd..3d3ffac520 100644 --- a/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp +++ b/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp @@ -293,6 +293,10 @@ void GUI_Window_ObjectProperties::Draw() { ImGui::SameLine(); ImGui::HelpMarker("Sets the maximum distance after which geometry is ignored."); + ImGui::SliderInt("Asset Streaming Priority", &Camera->StreamingPriority_, 0, 10); + ImGui::SameLine(); + ImGui::HelpMarker("Sets the priority of the camera on a scale from 1-10."); + ImGui::Spacing(); ImGui::Checkbox("Enforce Aspect Ratio", &Camera->EnforceAspectRatio_); From 8aadaaf8d3f8a17aacb715db31637bc4baf7970d Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 07:11:32 +0000 Subject: [PATCH 16/18] Apply Scene Camera Parameters --- .../GUI_Window_ObjectProperties.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp b/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp index 3d3ffac520..e9c1484fff 100644 --- a/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp +++ b/Source/Core/Editor/Windows/GUI_Window_ObjectProperties/GUI_Window_ObjectProperties.cpp @@ -293,12 +293,18 @@ void GUI_Window_ObjectProperties::Draw() { ImGui::SameLine(); ImGui::HelpMarker("Sets the maximum distance after which geometry is ignored."); + + ImGui::Spacing(); + + ImGui::SliderInt("Asset Streaming Priority", &Camera->StreamingPriority_, 0, 10); ImGui::SameLine(); ImGui::HelpMarker("Sets the priority of the camera on a scale from 1-10."); + ImGui::Spacing(); + ImGui::Checkbox("Enforce Aspect Ratio", &Camera->EnforceAspectRatio_); ImGui::SameLine(); ImGui::HelpMarker("Manually override the camera's aspect ratio. Will cause letterboxing if the ratios don't match."); From 34bb428fc78fed9c5be6263370038ee707a1fb26 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 07:14:02 +0000 Subject: [PATCH 17/18] Apply Scene Camera Parameters --- .../Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp b/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp index c8417444e7..6d933cb431 100644 --- a/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp +++ b/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp @@ -273,6 +273,7 @@ std::map ERS_CLASS_AssetStreamingManager::CalculateCameraMaxU for (unsigned int i = 0; i < Cameras.size(); i++) { TotalCameraPriorities += Cameras[i]->GetStreamingPriority(); } + TotalCameraPriorities = std::min(1, TotalCameraPriorities); // Calculate Percentage Of Total Updates Each Camera Should Have std::vector CameraUpdatePercentages; From 5394519fc6443c231ea04d489006ff327899b0da Mon Sep 17 00:00:00 2001 From: datacrystals Date: Sun, 14 Aug 2022 07:17:32 +0000 Subject: [PATCH 18/18] Apply Scene Camera Parameters --- .../Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp b/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp index 6d933cb431..ed8ed78b6b 100644 --- a/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp +++ b/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AssetStreamingManager.cpp @@ -273,7 +273,7 @@ std::map ERS_CLASS_AssetStreamingManager::CalculateCameraMaxU for (unsigned int i = 0; i < Cameras.size(); i++) { TotalCameraPriorities += Cameras[i]->GetStreamingPriority(); } - TotalCameraPriorities = std::min(1, TotalCameraPriorities); + TotalCameraPriorities = std::max(1, TotalCameraPriorities); // Calculate Percentage Of Total Updates Each Camera Should Have std::vector CameraUpdatePercentages;