diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-17 18:26:24 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-17 18:26:24 +0100 |
commit | 9a43f9e749f9f51cb37dabd9c1d33f2ee9441b2f (patch) | |
tree | f701bb3b75d4207c40557dd502fb85df9740615e /gfx/gl/shadowStenciller.h | |
parent | Remove magic number for stencil view angles (diff) | |
download | ilt-9a43f9e749f9f51cb37dabd9c1d33f2ee9441b2f.tar.bz2 ilt-9a43f9e749f9f51cb37dabd9c1d33f2ee9441b2f.tar.xz ilt-9a43f9e749f9f51cb37dabd9c1d33f2ee9441b2f.zip |
Re-express viewProjections calculations as a fold expression
Diffstat (limited to 'gfx/gl/shadowStenciller.h')
-rw-r--r-- | gfx/gl/shadowStenciller.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gfx/gl/shadowStenciller.h b/gfx/gl/shadowStenciller.h index 03efced..ac83eb1 100644 --- a/gfx/gl/shadowStenciller.h +++ b/gfx/gl/shadowStenciller.h @@ -9,6 +9,8 @@ class LightDirection; class ShadowStenciller { public: + template<typename T> static constexpr T STENCIL_ANGLES = 8; + ShadowStenciller(); [[nodiscard]] @@ -21,5 +23,5 @@ private: Program shadowCaster; Program::RequiredUniformLocation viewProjectionLoc {shadowCaster, "viewProjection"}; - std::array<glm::mat4, 8> viewProjections; + std::array<glm::mat4, STENCIL_ANGLES<size_t>> viewProjections; }; |