HDRP Billboard Shader Help

I’ve wasted a day trying to figure this out. None of the videos or posts online seem to help or offer any good solutions. This is the closest solution I’ve come to.

What I’m trying to do is create a simple tree billboard shader. I want to render 10,000 quads as a single mesh and each quad to face the camera like in this example:

I used turbo forest in my project before I upgraded to the new Unity but not I can’t use the old shader so I’m trying to recreate it in Shader Graph.

The shader works great for a mesh with a single quad. But as soon as my mesh has more than one the rotation breaks such as in this example:

I’m really struggling here. Shaders are not my strength at all. Could someone offer some help please? This seems like a simple problem.


5851222–621550–tree_package.unitypackage (168 KB)

You need to bake the pivot of the sub-meshes into the vertex data (preferably into a UV channel) and then use that to rotate the vertices around the baked point. (If you can’t do that, you’re out of luck)