summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-18 20:14:01 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-12-18 20:14:01 +0000
commitb0cdba0a59fdfc709f18cff042f3757b7bdd9a91 (patch)
tree918532954c904dc9a7ce35553e2f4285ed86828e
parentRemoved unnecessary rounding of view extents (diff)
downloadilt-b0cdba0a59fdfc709f18cff042f3757b7bdd9a91.tar.bz2
ilt-b0cdba0a59fdfc709f18cff042f3757b7bdd9a91.tar.xz
ilt-b0cdba0a59fdfc709f18cff042f3757b7bdd9a91.zip
Invert shadow mapper orthographic project z... because glmOrtho is 'helpful'
-rw-r--r--gfx/gl/shadowMapper.cpp2
1 files changed, 1 insertions, 1 deletions
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;