Clone imported material. And instantiate textures?

I’m importing a scene with several objects, wich all use the same material with an albedo- & a normal-texture. After loading the scene, I iterate over the objects, clone the material and add a unique lightmap to each object. Everything works fine.
With every material clone I create (of course) new (not instanced) albedo and normal textures. So i end up with a lot of identical textures, visible in the scene explorer.
Should I reassign ONE instance of aledo & normal texture to my material clones, to get rid off the cloned textures? Would this lead to a better performance and a smaller memory consumption?

The textures objects might be duplicated, but the internal textures (i.e. the gl resources used) are the same.
The clones are helpful if you want to control different parameters when rendering those materials/textures. you don’t have to clone the material, you can reuse the same material if it doesn’t change between meshes

1 Like

Ok. Thanks for clarification.

1 Like