I just tried to add one more GUI.Image texture and suddenly it looks like it was successfully batched in one draw-call. Looks like a magick to me. Or am I missing something?
Here is: playground
Here is how I added the second texture:
var image = new BABYLON.GUI.Image("but", "textures/grass.png");
image.width = 0.2;
image.height = "40px";
advancedTexture.addControl(image);
var image2 = new BABYLON.GUI.Image("but2", "textures/fire.png");
image2.top = 100;
image2.width = 0.2;
image2.height = "80px";
advancedTexture.addControl(image2);
Draw calls before I added a second image: 3
Draw calls after: 3
The second texture didn’t add additional draw call. Looks like it automatically batches new textures? Or am I should use spritesheets created by my own for GUI images? I didn’t find any info on that.