From b0cdba0a59fdfc709f18cff042f3757b7bdd9a91 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 18 Dec 2022 20:14:01 +0000 Subject: Invert shadow mapper orthographic project z... because glmOrtho is 'helpful' --- gfx/gl/shadowMapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx') diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index c6b28ac..65c77c5 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -54,7 +54,7 @@ ShadowMapper::update(const SceneProvider & scene, const glm::vec3 & dir, const C } const auto lightProjection = [](const auto & x, const auto & y, const auto & z) { - return glm::ortho(x.first, x.second, y.first, y.second, z.first, z.second); + return glm::ortho(x.first, x.second, y.first, y.second, -z.second, -z.first); }(extents_minmax(CompareBy {0}), extents_minmax(CompareBy {1}), extents_minmax(CompareBy {2})); const auto lightViewProjection = lightProjection * lightView; -- cgit v1.2.3