diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-06 12:48:40 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-06 14:03:33 +0100 |
commit | 10998a8302b3d7651b4afc046311961eb2dea2c8 (patch) | |
tree | 1b58847ae898f9d3c7fa807bfcaa4b4103d6f35f /gfx/gl/shadowStenciller.h | |
parent | Add LightDirection class (diff) | |
download | ilt-10998a8302b3d7651b4afc046311961eb2dea2c8.tar.bz2 ilt-10998a8302b3d7651b4afc046311961eb2dea2c8.tar.xz ilt-10998a8302b3d7651b4afc046311961eb2dea2c8.zip |
Use LightDirection for calculating/passing all light dir components
Diffstat (limited to 'gfx/gl/shadowStenciller.h')
-rw-r--r-- | gfx/gl/shadowStenciller.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gfx/gl/shadowStenciller.h b/gfx/gl/shadowStenciller.h index 2edb955..03efced 100644 --- a/gfx/gl/shadowStenciller.h +++ b/gfx/gl/shadowStenciller.h @@ -5,13 +5,15 @@ #include "gfx/models/texture.h" #include "glArrays.h" +class LightDirection; + class ShadowStenciller { public: ShadowStenciller(); [[nodiscard]] static glTexture createStencilTexture(GLsizei width, GLsizei height); - void setLightDirection(const Direction3D & lightDir, const Direction3D & lightDirUp); + void setLightDirection(const LightDirection & lightDir); void renderStencil(const glTexture &, const MeshBase &, const Texture::AnyPtr texture) const; private: @@ -19,6 +21,5 @@ private: Program shadowCaster; Program::RequiredUniformLocation viewProjectionLoc {shadowCaster, "viewProjection"}; - glm::mat4 lightDirMat {}; std::array<glm::mat4, 8> viewProjections; }; |