|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Who owns which square of the one shadow texture. More...
#include "../../core/Types.hpp"#include "./LightConstants.hpp"#include <glm/glm.hpp>#include <algorithm>#include <vector>

Go to the source code of this file.
Classes | |
| struct | esengine::ShadowTile |
| One tile's square, in atlas texels. More... | |
| class | esengine::ShadowAtlas |
| A square texture divided into a grid of cells, handed out as square blocks. More... | |
Namespaces | |
| namespace | esengine |
Enumerations | |
| enum class | esengine::AtlasRefusal : u8 { esengine::None = 0 , esengine::TileBudget , esengine::TooLarge , esengine::NoSpace } |
| Why a claim was turned down. Three different answers on purpose: raising the atlas size fixes NoSpace and neither of the others. More... | |
Functions | |
| const char * | esengine::refusalName (AtlasRefusal why) |
| The refusal as a word, for a log line and, later, for a reader. | |
Who owns which square of the one shadow texture.
The RHI has no array textures, so every shadow map a frame renders shares one atlas — and something has to say where each lands. That was four hard-coded quadrants, which is why exactly one light could cast.
A tile's rect leaves here as DATA the shader indexes, not an expression it recomputes, so tiles of different sizes cost the shader nothing: what a light reads is an origin and a side either way.
Definition in file ShadowAtlas.hpp.