M
M
malan2013-08-05 11:01:33
Search Engine Optimization
malan, 2013-08-05 11:01:33

Dynamic batching?

I came across a situation where the same objects on the stage increased the number of DCs and did not batch. After digging I found:

A little about dynamic batching:
900 vertices (not triangles, GPU needs vertices, not tris) is the maximum number of vertices in a mesh after batching, that is, a mesh assembled from meshes with the same material. But this does not mean that in general a maximum of 900 vertices can be batched, the engine will collect another mesh of no more than 900 vertices and send it to render.
300 vertices is the maximum number of vertices for a mesh to be dynamically batched, while the shader should use only the vertex position, its normal and UV coordinate, no more.
180 vertices - if the shader uses an additional UV coordinate and tangents.
It is undesirable to use object scaling. (more details in the link above)
Plus, if dynamic batching is needed, then multi-pass shaders cannot be used.
Also, as practice shows, if the shader uses tangents for normal mapping, then dynamic batching stops working no matter how many vertices there are in the mesh.

Maybe someone else knows something interesting?
But the question is not about that. The artist made an explosion effect. On one stage, he needed 8 DC, and the other 100 DC were batched. Using the same explosion in another scene, it didn't batch at all and the DC grew by the full 120 DC. By getting rid of all light sources, except for one directional, it was possible to achieve that the ratio of batched and non-batched DC became 50 to 50.
Has anyone come across this? Are there any other nuances of using dynamic batching?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor_Sib, 2013-08-05
@Igor_Sib

In my opinion, if the size is different, then they don’t batch.

D
DmitryKav, 2014-01-30
@DmitryKav

1. When there are several realtime sources in the scene, the render becomes multi-pass. Hence the increase in dc.
2. Check the materials of the particles.
3. Does the explosion give 8 dc in an empty scene with one directional light?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question