How to do billboard shader with Shadergraph

Hi, I’m having trouble with creating a billboard shader with shadergraph. It is for a simple quad with a texture and I want all axis to align with view, so it should look exactly like a particle with view render alignment.

This is what I got so far. In general it seems to work, but the object is rotating a little bit (and sometimes scaling, depending on the view direction), if I rotate the camera when near the object.
Anybody know what’s going on here? What am I doing wrong and how can I fix it?
Thank you.

Here is a subgraph solution I made based on the

This graph will “billboard” any mesh with rotation (0,0,0) and uniform scale:
mesh look at camera shader graph

It calculates “look at camera” rotation and applies it to vertex, normal and tangent.

Hi, to fix rotation you need to do to this.[143768-безымянныи.png|143768]
That’s because you’re using Quad. It doesn’t use the same axis as cube does, for example. You need to change axis to fix this. And rotate it if it needs.

to fix rotation you need to do to this

Thank you guys for pasting those, very elegant.
Maybe you can you help me in the right direction based on the mentioned billboard shader?

posted a flollowup on this here: