You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the shadow atlas plugin re-allocates space for every shadow map every frame. This is fine for small amounts of shadow casters, but can incur a performance cost as the amount grows.
Possible solution
Each shadow caster already stores an id value that is used to find its shadow map's location in the atlas. When the id is -1, it means that the shadow map hasn't been allocated yet. This can be used to detect new shadow casters being created between frames, and only allocate room for these.
Likewise, each possible location (Slot) for a shadow map contains the id of its corresponding caster. If no caster has this id, then the one that had it no longer exists.
The text was updated successfully, but these errors were encountered:
Problem
Currently, the shadow atlas plugin re-allocates space for every shadow map every frame. This is fine for small amounts of shadow casters, but can incur a performance cost as the amount grows.
Possible solution
Each shadow caster already stores an
id
value that is used to find its shadow map's location in the atlas. When theid
is-1
, it means that the shadow map hasn't been allocated yet. This can be used to detect new shadow casters being created between frames, and only allocate room for these.Likewise, each possible location (
Slot
) for a shadow map contains theid
of its corresponding caster. If no caster has this id, then the one that had it no longer exists.The text was updated successfully, but these errors were encountered: