Performance Question

If you have a wall with a material and skirting board with another material, so they can be assigned different colors etc at runtime.

Is there a performance difference between having two meshes and two materials

or

Combining the meshes, so it is a single item but still has two materials

Thx

In the case of a wall and a skirting board, merging the two will be a little bit more performant. You can basically think of it as drawing the combined geo once, then drawing each of the materials vs drawing the wall geo then it’s material and then moving on to the skirting board geo and its material - so the one is 3 steps, the other is 4 steps. It’s not always as straightforward though, so sometimes you have a few other things to consider depending on the object you’re rendering.

Sjoerd de Jong has a nice explanation of this in his real-time rendering overview course

Thanks for the link, I will review the information it contains.