diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-02-18 17:14:31 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-02-18 19:02:27 +0000 |
| commit | d8464a28c6066931dd638653e2a082e2640191dc (patch) | |
| tree | 18134e3ee51c9fd423b9395b90c3f19b6e54cfc3 /gfx/gl/shadowMapper.h | |
| parent | Add Renderable::preFrame for doing non-const frame prep work (diff) | |
| download | ilt-d8464a28c6066931dd638653e2a082e2640191dc.tar.bz2 ilt-d8464a28c6066931dd638653e2a082e2640191dc.tar.xz ilt-d8464a28c6066931dd638653e2a082e2640191dc.zip | |
Fix up the preFrame process to use both frustums
(camera and directional light frustums)
This has made the whole preFrame process far more fiddly and repetitive
than I'd like, but it does work. Maybe we can tidy it up later.
Diffstat (limited to 'gfx/gl/shadowMapper.h')
| -rw-r--r-- | gfx/gl/shadowMapper.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gfx/gl/shadowMapper.h b/gfx/gl/shadowMapper.h index 951e29c..82374cb 100644 --- a/gfx/gl/shadowMapper.h +++ b/gfx/gl/shadowMapper.h @@ -1,6 +1,7 @@ #pragma once #include "config/types.h" +#include "gfx/frustum.h" #include "gfx/gl/shadowStenciller.h" #include "lib/glArrays.h" #include "program.h" @@ -22,6 +23,7 @@ public: using Definitions = std::vector<glm::mat4x4>; using Sizes = std::vector<RelativePosition3D>; + const Frustum & preFrame(const LightDirection & direction, const Camera &); [[nodiscard]] Definitions update(const SceneProvider &, const LightDirection & direction, const Camera &) const; class ShadowProgram : public Program { @@ -77,5 +79,10 @@ private: glFrameBuffer depthMapFBO; glTexture depthMap; TextureAbsCoord size; + + Definitions definitions; + Sizes sizes; + Frustum frustum; + mutable ShadowStenciller shadowStenciller; }; |
