How to combine multiple Textures into one?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ulty
:warning: Old Version Published before Godot 3 was released.

I have 3 different textures and want to draw them a few hundred times next to each other based on the current layout of my ship.
Normally I would just use Sprites for this but I’m dealing with a large number of instances here and I would rather like to combine the textures into one large texture.

Can anyone explain how this would be done ?

can’t help much but I think shaders are the way.

Gokudomatic2 | 2016-04-18 08:17

Here is the effect I’m going for.
Right now it is done with a few hundred individual draw_rect calls and I would like to just draw a single Texture instead and update it if the layout of the ship changes.
enter image description here

ulty | 2016-04-20 18:53

I’m considering tile maps as well and will probably implement it via tile maps to see how well it works. But as an alternative I would like to be able to generate a Large Texture from Code to see if there are any performance gains and or other oddities.

ulty | 2016-04-20 19:09