RPTools/maptool

[Maintenance]: Fog of war rendering is memory intensive

Closed this issue · 0 comments

Describe the problem

In scenes with complex Fog of War, the rendering is both laggy and performs lots of memory allocations. The bulk of this comes from the need to intersect the exposed area with the visible area into order create the Soft FoW effect.

The improvement you'd like to see

In addition to caching the exposed areas and the visible areas, we should cache the cleared area so we don't have to perform intersections on Area. For bonus points, cache all these various areas in a single structure since they tend to get invalidated together.

Expected Benefits

Rendering will be more streamlined, both in terms of peformance and readability.

Additional Context

No response