summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shadowMapper.h')
-rw-r--r--gfx/gl/shadowMapper.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gfx/gl/shadowMapper.h b/gfx/gl/shadowMapper.h
index 36371eb..cd1b975 100644
--- a/gfx/gl/shadowMapper.h
+++ b/gfx/gl/shadowMapper.h
@@ -8,16 +8,19 @@ class SceneProvider;
class Camera;
#include <gfx/models/texture.h>
+
class ShadowMapper {
public:
explicit ShadowMapper(const glm::ivec2 & size);
static constexpr std::size_t SHADOW_BANDS {4};
+
struct Definitions {
std::array<glm::mat4x4, SHADOW_BANDS> projections {};
std::array<glm::vec4, SHADOW_BANDS> regions {};
size_t maps {};
};
+
[[nodiscard]] Definitions update(const SceneProvider &, const glm::vec3 & direction, const Camera &) const;
class FixedPoint : public Program {
@@ -29,6 +32,7 @@ public:
private:
RequiredUniformLocation viewProjectionLoc;
};
+
class DynamicPoint : public Program {
public:
DynamicPoint();
@@ -40,6 +44,7 @@ public:
RequiredUniformLocation viewProjectionLoc;
RequiredUniformLocation modelLoc;
};
+
FixedPoint fixedPoint, dynamicPointInst;
DynamicPoint dynamicPoint;