I made a template (of a piece of cloud) in my project and placed it anywhere on the sky. Batch group did not work on the template because it was using a custom shader, but I found that the drawcalls did not increase when clouds increased. Did the engine do something for me automatically?
I found that only the cloud on screen will increase the drawcalls. If I place the cloud regularly and keep a certain amount of cloud templates on screen, the drawcalls may keep in a low level.
No the engine will not batch automatically. For that you need to create batch groups and assign them on your models.
Most likely what’s happening here is frustum culling, which is an optimization that the engine does internally to avoid rendering models that aren’t in view.
For static batching, you can use your own custom shaders on batched geometry.
But for dynamic batching you do indeed need shader support. I’m not sure if it’s doable to add support on a custom shader, normally you will be overriding a standard material using shader chunks.
In any case here are the required shader chunks for dynamic batching to work: