From 8c23e26ad7a356061e2292f25e7b1e561223e22f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 4 Dec 2022 19:34:18 +0000 Subject: Centre shadow map at 0,0 until we can do better --- gfx/gl/shadowMapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index 1169524..4acdb39 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -35,7 +35,7 @@ ShadowMapper::ShadowMapper(const glm::ivec2 & s) : size {s} glm::mat4x4 ShadowMapper::update(const SceneProvider & scene, const glm::vec3 & dir) const { - const glm::vec3 centre {1200.F, 1200.F, 0.F}; + const glm::vec3 centre {0.F, 0.F, 0.F}; const glm::vec3 range = glm::normalize(dir) * 1800.F; const auto lightProjection = glm::ortho(-1200.F, 1200.F, -1200.F, 1200.F, 0.F, 3600.F); const auto lightView = glm::lookAt(centre - range, centre, north); -- cgit v1.2.3