Godot version
v4.1.1.stable
godot-cpp version
4.4
System information
Windows 10
Issue description
This is caused because of the brute force approach when generating a SDF for the countries. This incurs a frame drop when assigning a province to a new country. It is easier to notice when the camera is in movement. I confirmed that this is the case because of the subviewports and not any other logic.
The fix is implementing a JFA algorithm for doing this in a more efficient manner. This paper can be used to achieve just that.
Another approach could be to move this to a compute shaders, this might result in faster times, but it has to be tested.
Godot version
v4.1.1.stable
godot-cpp version
4.4
System information
Windows 10
Issue description
This is caused because of the brute force approach when generating a SDF for the countries. This incurs a frame drop when assigning a province to a new country. It is easier to notice when the camera is in movement. I confirmed that this is the case because of the subviewports and not any other logic.
The fix is implementing a JFA algorithm for doing this in a more efficient manner. This paper can be used to achieve just that.
Another approach could be to move this to a compute shaders, this might result in faster times, but it has to be tested.