There are some limitations to per-instance uniforms, including lacking sampler2D. They recommend a potential workarround using an array of textures.
Per-instance uniforms do not support textures, only regular scalar and vector types. As a workaround, you can pass a texture array as a regular uniform, then pass the index of the texture to be drawn using a per-instance uniform.
a Texture2DArray is just a single file with each texture set in a grid.
If this is the case, then from the Shader perspective, this just means using a single file and changing UV positions around for each actual texture, I suppose?
a Texture2DArray could work, you could also create an array of textures
uniform sampler2D textures[4]; # for various images
uniform sampler2DArray textures; # for sprite-sheet style images
instance uniform int texture_index;
Chances are the “instance” uniforms are tied into a GPU instancing system which can have unique per-instance data, but not entire textures piped along with the draw call.