I should probably have looked into improving performance before creating the other issue #17 ...
Better late than never though. After some profiling, the circular masks of the effect icons turned out to be the culprit of the downgraded performance when enabling the Adjust Token Effects HUD setting.
This PR attempts to remidy that by rendering each effect icon once with the circular clipping enabled to a cached texture and then reusing that texture every time an effect is drawn.
This effectively eliminates any performance bottleneck and drawing them this way seems to be as fast as the regular foundry drawing code. At least I cannot meassure any downgraded performance.
I should probably have looked into improving performance before creating the other issue #17 ... Better late than never though. After some profiling, the circular masks of the effect icons turned out to be the culprit of the downgraded performance when enabling the Adjust Token Effects HUD setting.
This PR attempts to remidy that by rendering each effect icon once with the circular clipping enabled to a cached texture and then reusing that texture every time an effect is drawn. This effectively eliminates any performance bottleneck and drawing them this way seems to be as fast as the regular foundry drawing code. At least I cannot meassure any downgraded performance.