hi all,i searched this forum ,found many people got billboard by use tag disablebatching,this is very low performance, and no way to get baching billboard work??
Batching shader based billboarding is not possible. Billboard shaders general work by rotating a quad around it’s center, which it gets from the mesh’s pivot. When Unity batches meshes it combines multiple meshes into a single mesh with one pivot that is either at the center of the scene or the pivot of one of the meshes in the batch. The result is instead of billboarding the entire batched mesh spins around.
Unity’s sprites and particles don’t have this problem and can batch because the billboarding is done on the CPU so the meshes are already oriented toward the camera.
If you want to do efficient billboards you’ll either want to look into instancing, or geometry shader techniques. You can also do manual batching and custom shaders where you combine the meshes together in script and then store the pivots in the mesh’s extra UVs rather than using the mesh matrices.
I posted an example using such stuff a while ago, perhaps it’s useful:
https://forum.unity3d.com/threads/gpu-instancing.376635/page-6#post-2721552
thanks all,but i want can run with opengles2.0。and some opengles3.0 mobile not support gpuinstance…