I was wondering if there is a faster way to merge two or more textures? Please see the example:
I do not really like that I have to basically convert the data twice (readPixels() + createImageBitmap()).
**In case it is relevant. Use cases:
The use case, at least I hope so, would be performance. For instance, I have an atlas texture with HUD elements. Right now, for every element, I need 1 plane (uv mapping). In effect, my “over actor” health bar with an actual bar, a visibilty, hit chance and an armor indicator take 12 draw calls per actor. Rendering 4 actors and the fps go down to 50’ish.
Another use case would be if you have a character and want to have a texture for skin colour and a texture for clothing. E.g. a green alien with a red shirt or a pale humanoid with a blue sweater (same model). Assuming you do not want to generate all the permunations as a build step.