summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-28 19:29:53 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-12-28 19:29:53 +0000
commitaaff59af171545cc16632881aefb19449a7c491a (patch)
treeab7923c987bdd8c4f95bf310abcb5171283f08c9 /gfx/gl/shadowMapper.h
parentLight camera centre not required, view camera position suffices (diff)
downloadilt-aaff59af171545cc16632881aefb19449a7c491a.tar.bz2
ilt-aaff59af171545cc16632881aefb19449a7c491a.tar.xz
ilt-aaff59af171545cc16632881aefb19449a7c491a.zip
Generate a single shadow band and region definition
Diffstat (limited to 'gfx/gl/shadowMapper.h')
-rw-r--r--gfx/gl/shadowMapper.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gfx/gl/shadowMapper.h b/gfx/gl/shadowMapper.h
index 2b9bc85..d5f091e 100644
--- a/gfx/gl/shadowMapper.h
+++ b/gfx/gl/shadowMapper.h
@@ -11,7 +11,11 @@ class ShadowMapper {
public:
ShadowMapper(const glm::ivec2 & size);
- std::array<glm::mat4x4, 1> update(const SceneProvider &, const glm::vec3 & direction, const Camera &) const;
+ template<std::size_t S> struct Definitions {
+ std::array<glm::mat4x4, S> projections;
+ std::array<glm::vec4, S> regions;
+ };
+ Definitions<1> update(const SceneProvider &, const glm::vec3 & direction, const Camera &) const;
class FixedPoint : public Program {
public: