Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ShadowGrant Struct Reference

One caster's claim on the atlas: what it wanted, what it kept, and why the difference. More...

#include <ShadowPlan.hpp>

Public Member Functions

bool denied () const
bool reduced () const

Public Attributes

Entity light {}
 The light that asked. Carried so a reader can name it rather than an index.
u32 requested = 0
 Tiles asked for: a sun's cascade set, a cube's six faces, or one.
u32 granted = 0
 Tiles kept. 0 means this light casts no shadow at all this frame.
AtlasRefusal refusal = AtlasRefusal::None

Detailed Description

One caster's claim on the atlas: what it wanted, what it kept, and why the difference.

granted < requested with no refusal is impossible — something gave way and the reason is the whole point of recording this.

Definition at line 32 of file ShadowPlan.hpp.

Member Function Documentation

◆ denied()

bool esengine::ShadowGrant::denied ( ) const
inline

Definition at line 43 of file ShadowPlan.hpp.

References granted.

Referenced by esengine::ShadowPlanReport::hasSameDenial().

◆ reduced()

bool esengine::ShadowGrant::reduced ( ) const
inline

Definition at line 44 of file ShadowPlan.hpp.

References granted, and requested.

Member Data Documentation

◆ granted

u32 esengine::ShadowGrant::granted = 0

Tiles kept. 0 means this light casts no shadow at all this frame.

Definition at line 38 of file ShadowPlan.hpp.

Referenced by esengine::claimTiles(), denied(), reduced(), and esengine::renderer_shadowStatus().

◆ light

Entity esengine::ShadowGrant::light {}

The light that asked. Carried so a reader can name it rather than an index.

Definition at line 34 of file ShadowPlan.hpp.

Referenced by esengine::ShadowPlanReport::hasSameDenial().

◆ refusal

AtlasRefusal esengine::ShadowGrant::refusal = AtlasRefusal::None

Why it did not get what it asked for, from the FIRST attempt that failed — which is the answer to "why not what I asked", not "why not one less".

Definition at line 41 of file ShadowPlan.hpp.

Referenced by esengine::claimTiles(), esengine::ShadowPlanReport::hasSameDenial(), and esengine::renderer_shadowStatus().

◆ requested

u32 esengine::ShadowGrant::requested = 0

Tiles asked for: a sun's cascade set, a cube's six faces, or one.

Definition at line 36 of file ShadowPlan.hpp.

Referenced by esengine::ShadowPlanReport::hasSameDenial(), reduced(), and esengine::renderer_shadowStatus().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/renderer/store/ShadowPlan.hpp