Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
ShadowCaster2D.hpp File Reference

Marks an entity as a 2D shadow occluder for the Lit lighting path. More...

#include "../../core/Types.hpp"
#include "../../core/Reflection.hpp"
#include "../../math/Math.hpp"
#include <vector>
Include dependency graph for ShadowCaster2D.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esengine::ecs::ShadowCaster2D
 A 2D shadow occluder. The box is centred on the entity's world position and turns with it; its size is its own, which is how a collider is placed too. More...

Namespaces

namespace  esengine
namespace  esengine::ecs

Detailed Description

Marks an entity as a 2D shadow occluder for the Lit lighting path.

The render collect path turns each enabled caster into a world-space ring — its own outline, or the four edges of a box — placed by its Transform, and the 2D shadow pass DRAWS what that ring hide from each casting light into a screen-space mask. A Lit fragment then reads its light's channel of that mask. Drawn rather than solved per pixel, which is what lets a scene hold as many occluders as it has walls.

Definition in file ShadowCaster2D.hpp.