From e2f2c512e2d298b7d52ede19504fc0b969c96127 Mon Sep 17 00:00:00 2001 From: arby Date: Thu, 27 Oct 2022 23:10:41 +0200 Subject: [PATCH] Fixed incorrect lower bound setting in an algorithm --- src/8.guest/2021/2.csm/shadow_mapping.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/8.guest/2021/2.csm/shadow_mapping.cpp b/src/8.guest/2021/2.csm/shadow_mapping.cpp index e3011e9..10f2e77 100644 --- a/src/8.guest/2021/2.csm/shadow_mapping.cpp +++ b/src/8.guest/2021/2.csm/shadow_mapping.cpp @@ -676,11 +676,11 @@ glm::mat4 getLightSpaceMatrix(const float nearPlane, const float farPlane) const auto lightView = glm::lookAt(center + lightDir, center, glm::vec3(0.0f, 1.0f, 0.0f)); float minX = std::numeric_limits::max(); - float maxX = std::numeric_limits::min(); + float maxX = std::numeric_limits::lowest(); float minY = std::numeric_limits::max(); - float maxY = std::numeric_limits::min(); + float maxY = std::numeric_limits::lowest(); float minZ = std::numeric_limits::max(); - float maxZ = std::numeric_limits::min(); + float maxZ = std::numeric_limits::lowest(); for (const auto& v : corners) { const auto trf = lightView * v;