From 592f33653eeafcba19efb0dfeb2703e35246274c Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Mon, 14 Mar 2016 04:44:53 +0100 Subject: [PATCH] Better shadows for recording --- include/Engine/Rendering/ShadowPass.h | 4 ++-- resources/Schema/Components/Camera.xml | 2 +- src/Engine/Editor/EditorSystem.cpp | 4 ++-- src/Engine/Rendering/Renderer.cpp | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/Engine/Rendering/ShadowPass.h b/include/Engine/Rendering/ShadowPass.h index 122fbddd..082fc41d 100644 --- a/include/Engine/Rendering/ShadowPass.h +++ b/include/Engine/Rendering/ShadowPass.h @@ -69,7 +69,7 @@ private: std::array m_LightProjection; std::array m_LightView; - GLfloat m_NearFarPlane[2] = { -34.f, 27.f }; + GLfloat m_NearFarPlane[2] = { -128.f, 128.f }; GLuint m_ResolutionSizeWidth = 1024 * 2; GLuint m_ResolutionSizeHeight = 1024 * 2; @@ -78,7 +78,7 @@ private: bool m_EnableShadows = true; int m_CurrentNrOfSplits = 4; - float m_SplitWeight = 0.962f; + float m_SplitWeight = 0.7f; std::array m_shadowFrusta; diff --git a/resources/Schema/Components/Camera.xml b/resources/Schema/Components/Camera.xml index 00edcc00..49b79040 100644 --- a/resources/Schema/Components/Camera.xml +++ b/resources/Schema/Components/Camera.xml @@ -2,5 +2,5 @@ 59 0.01 - 5000 + 300 \ No newline at end of file diff --git a/src/Engine/Editor/EditorSystem.cpp b/src/Engine/Editor/EditorSystem.cpp index 27576d5d..76165081 100644 --- a/src/Engine/Editor/EditorSystem.cpp +++ b/src/Engine/Editor/EditorSystem.cpp @@ -83,6 +83,7 @@ void EditorSystem::Update(double dt) } } m_EditorWorldSystemPipeline->Update(actualDelta); + } ComponentWrapper& cameraTransform = m_EditorCamera["Transform"]; Field ori = cameraTransform["Orientation"]; @@ -95,7 +96,6 @@ void EditorSystem::Update(double dt) ori.y(newOri.y); Field pos = cameraTransform["Position"]; pos += m_EditorCameraInputController->Movement() * glm::inverse(glm::quat(ori)) * (float)actualDelta; - } } void EditorSystem::Enable() @@ -122,7 +122,7 @@ void EditorSystem::Enable() void EditorSystem::Disable() { - m_EditorCameraInputController->Disable(); + //m_EditorCameraInputController->Disable(); m_EventBroker->Publish(Events::LockMouse()); Events::SetCamera e; e.CameraEntity = m_ActualCamera; diff --git a/src/Engine/Rendering/Renderer.cpp b/src/Engine/Rendering/Renderer.cpp index 8db7e7d3..a330ec39 100644 --- a/src/Engine/Rendering/Renderer.cpp +++ b/src/Engine/Rendering/Renderer.cpp @@ -19,6 +19,7 @@ void Renderer::Initialize() { m_SSAO_Quality = m_Config->Get("SSAO.Quality", 0); m_GLOW_Quality = m_Config->Get("GLOW.Quality", 0); + m_MSAA_Level = m_Config->Get("MSAA.Level", 0); InitializeWindow(); InitializeRenderPasses();