Will a custom shader help me increase performance?

Hello

My project is a universe with multiple galaxies and each galaxy with about 250 star systems.
So there might be a lot of objects on the screen depending on the zoom of the camera. To display a star i make use of 3 plane meshes imported with 2 triangles (not the default plane from unity) and have the the built in additive particle shader on each of them. Each mesh has different texture, color, rotation speed and direction and the materials color tint change. The planes are inside a billboard object, which faces the camera.

The problem is that there can be a lot of draw callbacks just from the stars, and there is lots of other things too like nebula.

So i was asking myself if replacing this design with a custom shader would help performance. Having only one mesh, which would reduce draw callbacks by 2/3 for the stars. The shader should be like the additive particle shader but support 3 textures each with parameters for rotation and color and tint.
Take in count that the reduction of draw callbacks would be around 500 per galaxy.

Since i have no experience with shader coding i wanted to ask the community first, before i start working on it. Could take me a few weeks. And if there is no gain i would not want to waste time on it.

Check the image to see how the design currently looks.

Batch as much as you can to bring down drawcalls.

You’ll need to use the same material for all of the stars if you want them to batch well, so you’ll need a custom shader and…

  • Try and keep information at the vertex level rather than the material level; store colour in vertex RGB and rotation speed in vertex A (then rotate the UVs in the vertex shader).
  • Atlas all of your star textures together to ensure that everything uses the same texture.

Probably best to use some sort of LOD system for far away galaxies. A texture on a flat plane will probably do just fine.

Thanks for your answer.

Thats some good hints i will try. I have a LOD group and it helps a lot but still not enough. It helps for low quality settings but for high settings with bigger lod bias i still want to optimize it.
Will try your suggestions today.