Do Layered Material Instances cost as much as Materials? (in terms of shader compilation)

So my scene has 1000 unique static mesh objects, and there are ~10 materials shared among them. I’m going to convert the system to use unique material instances for every single object, all of which will use Material Layers. I think this is okay because:

1 This would not increase draw calls at all since, even if i share materials between objects, they are still treated as separate so i will always have 1000 draw calls at best.

  1. Im still safe in terms of memory because I will only be using a total of ~20 textures shared between all these materials.

… The main question is will this incur enormous shader compilations or are material instances which use layers a lot faster / smaller than regular materials?

Are all those materials same type? Like all are wood, stone, wall etc? Can all of them be rendered by same master material?

Asking because i have idea:

  • make master material that uses Atlas texture. like 8192x8192 that is split in 4x4 atlas, so each tile would be 2048x2048.
  • then you can use flipbook node to set index of what cell/tile you want for material.
    That would make most of your materials into same shader/material.

Material Layers are nice when you have some different types of layers. For eg. Snow, grass water. While snow calculates based of angle of surface to up vector. Grass would check for open and mostly flat areas (and use some noise texture) and water/wet would check for height range. So for mixing in different ways yes use layers.

ps.
those 20 textures are different surface types (all with diffuse, ambient and normal textures), or those are 20 textures (about 6 different surfaces, each having 3 textures).