We need to consider that a glTF texture is not a Babylon texture.
Here is how the mapping goes:
- glTF textureInfo → Babylon.js Texture
- glTF texture → Babylon.js InternalTexture
- glTF image → no equivalent
glTF textureInfo is not a top-level glTF object with a name. Multiple glTF textureInfo can point to the same glTF texture. Multiple glTF texture can point to the same glTF image.
Maybe storing a name on the Babylon.js InternalTexture would work?