diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-20 16:24:14 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-20 16:24:14 +0100 |
commit | 5b6a6f3b241fea6d19521ddbb705e27d5e4c0268 (patch) | |
tree | 2c7fd705a6cff4be087f62b9ce940b413f8942b4 /gfx/gl/shadowStenciller.cpp | |
parent | Misc readability fixes (diff) | |
download | ilt-5b6a6f3b241fea6d19521ddbb705e27d5e4c0268.tar.bz2 ilt-5b6a6f3b241fea6d19521ddbb705e27d5e4c0268.tar.xz ilt-5b6a6f3b241fea6d19521ddbb705e27d5e4c0268.zip |
Move lots of maths helpers to inline, constexpr, templates
Always for working with different dimensions/types
Diffstat (limited to 'gfx/gl/shadowStenciller.cpp')
-rw-r--r-- | gfx/gl/shadowStenciller.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/gl/shadowStenciller.cpp b/gfx/gl/shadowStenciller.cpp index eab4797..86b77e4 100644 --- a/gfx/gl/shadowStenciller.cpp +++ b/gfx/gl/shadowStenciller.cpp @@ -24,8 +24,8 @@ ShadowStenciller::setLightDirection(const LightDirection & lightDir) { viewProjections = [&lightDir]<GLint... Ep>(std::integer_sequence<GLint, Ep...>) { constexpr float STEP = two_pi / STENCIL_ANGLES<decltype(two_pi)>; - return std::array { - rotate_pitch(half_pi - lightDir.position().y) * rotate_yaw((Ep * STEP) - lightDir.position().x)...}; + return std::array {rotate_pitch<4>(half_pi - lightDir.position().y) + * rotate_yaw<4>((Ep * STEP) - lightDir.position().x)...}; }(std::make_integer_sequence<GLint, STENCIL_ANGLES<GLint>>()); } |