summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-04 19:34:18 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-12-04 19:34:18 +0000
commit8c23e26ad7a356061e2292f25e7b1e561223e22f (patch)
tree39007efd3dfd3ddc1b57097cca2d76ae894990cd /gfx/gl/shadowMapper.cpp
parentExplicit ShadowMapper size only, no default (diff)
downloadilt-8c23e26ad7a356061e2292f25e7b1e561223e22f.tar.bz2
ilt-8c23e26ad7a356061e2292f25e7b1e561223e22f.tar.xz
ilt-8c23e26ad7a356061e2292f25e7b1e561223e22f.zip
Centre shadow map at 0,0 until we can do better
Diffstat (limited to 'gfx/gl/shadowMapper.cpp')
-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 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);