From 34348b2dde891dc24e530573370e46459148ef9a Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sun, 20 Nov 2022 16:26:21 +0100 Subject: [PATCH] Minor fixes --- src/Nazara/Graphics/ForwardFramePipeline.cpp | 3 +-- src/Nazara/Graphics/SubmeshRenderer.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Nazara/Graphics/ForwardFramePipeline.cpp b/src/Nazara/Graphics/ForwardFramePipeline.cpp index b0d67b709..b49a7b7fe 100644 --- a/src/Nazara/Graphics/ForwardFramePipeline.cpp +++ b/src/Nazara/Graphics/ForwardFramePipeline.cpp @@ -292,7 +292,6 @@ namespace Nz const Matrix4f& viewProjMatrix = lightData->camera->GetViewerInstance().GetViewProjMatrix(); Frustumf frustum = Frustumf::Extract(viewProjMatrix); - GetDebugDrawer().DrawFrustum(frustum, Nz::Color::Blue); std::size_t visibilityHash = 5U; @@ -371,7 +370,6 @@ namespace Nz std::size_t depthVisibilityHash = visibilityHash; m_visibleLights.clear(); - for (const LightData& lightData : m_lightPool) for (auto it = m_lightPool.begin(); it != m_lightPool.end(); ++it) { const LightData& lightData = *it; @@ -597,6 +595,7 @@ namespace Nz }); lightData->camera->UpdateFOV(spotLight.GetOuterAngle() * 2.f); + lightData->camera->UpdateZNear(0.01f); lightData->camera->UpdateZFar(spotLight.GetRadius()); lightData->camera->UpdateViewport(Recti(0, 0, SafeCast(shadowMapSize), SafeCast(shadowMapSize))); diff --git a/src/Nazara/Graphics/SubmeshRenderer.cpp b/src/Nazara/Graphics/SubmeshRenderer.cpp index a637ac962..97878439a 100644 --- a/src/Nazara/Graphics/SubmeshRenderer.cpp +++ b/src/Nazara/Graphics/SubmeshRenderer.cpp @@ -57,7 +57,6 @@ namespace Nz const auto& depthTexture2D = Graphics::Instance()->GetDefaultTextures().depthTextures[UnderlyingCast(ImageType::E2D)]; const auto& depthTextureCube = Graphics::Instance()->GetDefaultTextures().depthTextures[UnderlyingCast(ImageType::Cubemap)]; const auto& whiteTexture2D = Graphics::Instance()->GetDefaultTextures().whiteTextures[UnderlyingCast(ImageType::E2D)]; - const auto& whiteTextureCube = Graphics::Instance()->GetDefaultTextures().whiteTextures[UnderlyingCast(ImageType::Cubemap)]; const auto& defaultSampler = graphics->GetSamplerCache().Get({}); TextureSamplerInfo samplerInfo;