Minor fixes

This commit is contained in:
SirLynix 2023-11-12 12:51:56 +01:00
parent 2ff2cd4a9c
commit 86e26008b3
10 changed files with 7 additions and 11 deletions

View File

@ -9,7 +9,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Config.hpp>
#include <NazaraUtils/Algorithm.hpp>
#include <NazaraUtils/TypeTraits.hpp>
#include <string>
#ifdef NAZARA_COMPILER_MSVC

View File

@ -9,7 +9,6 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Unicode.hpp>
#include <NazaraUtils/Algorithm.hpp>
#include <NazaraUtils/FunctionRef.hpp>
#include <string>

View File

@ -9,7 +9,6 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Graphics/FramePipelinePass.hpp>
#include <NazaraUtils/Algorithm.hpp>
#include <functional>
#include <list>
#include <string>

View File

@ -8,7 +8,6 @@
#define NAZARA_GRAPHICS_MATERIALPASSREGISTRY_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <NazaraUtils/Algorithm.hpp>
#include <list>
#include <string>
#include <unordered_map>

View File

@ -2,7 +2,7 @@
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <NazaraUtils/Algorithm.hpp>
#include <NazaraUtils/TypeTraits.hpp>
#include <stdexcept>
#include <Nazara/Graphics/Debug.hpp>

View File

@ -5,6 +5,7 @@
#include <Nazara/Core/StringExt.hpp>
#include <Nazara/Core/Algorithm.hpp>
#include <Nazara/Core/Error.hpp>
#include <NazaraUtils/FunctionTraits.hpp>
#include <Utfcpp/utf8.h>
#include <cinttypes>
#include <Nazara/Core/Debug.hpp>

View File

@ -26,9 +26,7 @@ fn ComputeDirectionalLightShadow(light: DirectionalLight, shadowmap: depth_sampl
break;
}
}
if (cascadeIndex >= light.cascadeCount)
cascadeIndex = light.cascadeCount - u32(1);
cascadeIndex = min(cascadeIndex, light.cascadeCount - u32(1));
let lightProjPos = light.viewProjMatrices[cascadeIndex] * vec4[f32](worldPos, 1.0);
let shadowCoords = lightProjPos.xyz / lightProjPos.w;

View File

@ -212,7 +212,7 @@ namespace Nz
inline void OpenGLCommandBuffer::Execute(const GL::Context* context, const InsertDebugLabelCommand& command)
{
if (context->glDebugMessageInsert)
context->glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_MARKER, 0, GL_DEBUG_SEVERITY_NOTIFICATION, command.label.size(), command.label.data());
context->glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_MARKER, 0, GL_DEBUG_SEVERITY_NOTIFICATION, SafeCast<GLsizei>(command.label.size()), command.label.data());
}
inline void OpenGLCommandBuffer::Execute(const GL::Context* context, const MemoryBarrier& command)