SRP. Why batching through material?

Hello developers.

I have a question.

Why SRP instead of combining in one pass, divides them into three? With that there is one material, one texture?

This is because a limit of vertices, the distance?

How can we improve the situation?

Vertices:
4575889--425824--upload_2019-5-24_19-27-6.png

The profiler provides information on why it’s not bacthed together.
On the last two screenshots it says “SRP: Node have different shaders”.

So he writes because on top of ANOTHER SHADER, this question is why it splits into three and shuffles, not batching in one pass?

Look at the screenshots, I’ve marked in red the same Shader, the same material. But he draws three times instead of one.

But there are 2 more draw calls in between the ones you highlighted. Presumably those use different shaders, thus splitting the batches.

It’s hard to say why things got ordered in this way without knowing much more about your scene.

True.

On what principle does it divide objects? Distance from each other? In the hierarchy?

Example:

There are 6 groups of objects on the stage.

3 groups have different shaders (* * *)
3 groups have the same Shader and material (+ + +)

According to the logic they need to join together in a 4 rendering.
*
*
*

      • (batching)

Right? And it turns out:

Up. I wait.