I can say for sure that the second method costs less. You are using one shader instead of a shader for each material.
You also use one texture instead of multiple ones.
If you can use a single texture and a single material then you will get better performance–it will be lower processing, lower memory usage and also lower draw calls because each material to and object adds a draw call.