From 10998a8302b3d7651b4afc046311961eb2dea2c8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 6 Oct 2024 12:48:40 +0100 Subject: Use LightDirection for calculating/passing all light dir components --- gfx/gl/shadowStenciller.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gfx/gl/shadowStenciller.h') 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 viewProjections; }; -- cgit v1.2.3