diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-12-28 15:13:01 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-12-28 15:13:05 +0000 |
commit | 80cfd4e0d5e928c2ffed9c4510441fb950908665 (patch) | |
tree | 480f819d4bb7eaf7ad6f86c9a2f9bce3c91b09c2 /gfx/gl/shadowMapper.cpp | |
parent | Render some train bodies to test shadowing (diff) | |
download | ilt-80cfd4e0d5e928c2ffed9c4510441fb950908665.tar.bz2 ilt-80cfd4e0d5e928c2ffed9c4510441fb950908665.tar.xz ilt-80cfd4e0d5e928c2ffed9c4510441fb950908665.zip |
Initial support for multiple shadow maps in the same texture
Diffstat (limited to 'gfx/gl/shadowMapper.cpp')
-rw-r--r-- | gfx/gl/shadowMapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index 5691de9..76d4390 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -33,7 +33,7 @@ ShadowMapper::ShadowMapper(const glm::ivec2 & s) : size {s} glBindFramebuffer(GL_FRAMEBUFFER, 0); } -glm::mat4x4 +std::array<glm::mat4x4, 1> ShadowMapper::update(const SceneProvider & scene, const glm::vec3 & dir, const Camera & camera) const { auto viewExtents = camera.extentsAtDist(1) + camera.extentsAtDist(1000); @@ -67,7 +67,7 @@ ShadowMapper::update(const SceneProvider & scene, const glm::vec3 & dir, const C scene.shadows(*this); glCullFace(GL_BACK); - return lightViewProjection; + return {lightViewProjection}; } ShadowMapper::FixedPoint::FixedPoint() : Program {shadowFixedPoint_vs}, viewProjectionLoc {*this, "viewProjection"} { } |