With SRP batcher, should I use multiple materials or multiple meshes?

So for a smaller example, I’m making a 3D keyboard with each key being interactable (should play a click animation on its own).

I’ve seen discussions about using less materials is better, and of course batching meshes together.

I’m wondering for the keyboard case, would it be better to :

  1. use the same mesh with same UV map for all identical keys and create different materials for EACH key (same shader).
  2. use different meshes for each key with their own UV map, and use one texture that contains all keys.

Since SRP Batcher claims to allow as many materials as possible, would either way be viable nowadays?

#2, duplicate meshes, multiple mats UV offset.

I believe one of the primary benefits to SRP is that it can handle many more materials within the project without losing too much performance, whereas batched/static rendering would prefer you keep both meshes and mats low.

1 Like