Performance question: sprites/polygons / big layers

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kozaluss

Hellou good people!

The question is for someone, who knows how GODOT works behind the scenes to draw sprites/polygons on screen.

Let’s assume I have a big layer (10 times bigger than the screen size).
Now… I can draw it in several ways:

  • draw it as one big sprite
  • draw it as many smaller sprites aligned at edges
  • draw it as a big multitriangular polygon
  • draw it as many smaller multitriangular polygons

Now… the intuition tells me, that using polygon approach will be more efficient, than using sprites, as there will be less overhead with transparent pixels and also more triangles makes it easier for gpu to determine whether draw one or not.

What I am not sure about is if there will be a noticeable difference between using one complicated polygon and many smaller polygons. I would assume, that many polygons would be easier, as bounding boxes can quickly rule out all offscreen ones. But on the other hand same goes for individual triangles.

Therefore question is - which method would be best in such situation?
Thanks in advance for help and answers :).