How to rotate object in vertex shader relatively?

I want to rotate object on Y axis in vertex shader to save performance, when object is not rotated everything works fine but when I rotate this object in editor axis seems to stay the same and everything breaks.
How to rotate this object relatively in shader graph?
Here is my current setup:


Thanks for any help!

is what you’re trying to do in here?

After some trial and error I was able to make this node setup:


which will keep the rotation axis even when you rotate your object

1 Like