Tutorial: Myth-busting "Best Practices" in Unreal Engine

This is an interesting question! If I understand correctly, you’re asking whether there’s a performance difference between having 100 different objects with 100 unique materials VS having 100 different objects with 100 Material Instances derived from the same master material.

The answer is yes, there will be a performance drawback in the first case:

  • 100 Unique Materials:
    Each material change involves a GPU state change, which can increase the number of draw calls and add significant overhead. Managing 100 distinct GPU states is more computationally expensive. Additionally, each unique material requires its own shader code and associated GPU memory for constant buffers, further impacting performance.

  • 100 Material Instances:
    Material Instances share the same shader program as their parent material, so state changes are minimal. Parameter changes for Material Instances are handled via uniform updates, which are much faster than switching between different shaders. Moreover, Material Instances reuse the base material’s shader, consuming minimal additional memory for their parameters, which significantly improves efficiency.

However, if you meant assigning the same material to 100 different objects versus assigning the same (only one) Material Instance to 100 different objects, there would be no performance difference in that case.

1 Like