
It looks like you're new here. If you want to get involved, click one of these buttons!
Hi! I am currently racking my brain about a method I have seen to rotate objects around an axis in a shader rather than computing it via Update(). Looking at a sample game unity made (Trash Dash), they have created a shader to do this.
I was wondering if this is possible to do via Shadergraph, plugging it into the "Vertex Position" of PBR Master/ Unlit Master node.
My Current Method is to do it via script in Update() doing
transform.Rotate(Vector3.Up * 50 * Time.deltaTime);
Can anybody suggest a method of achieving the same effect via Shadergraph?
Thanks for taking the time to read!
Comments
Interesting. Would like to know if this is possible with Shaders.
It's actually super simple. The important thing is to set the position node's coordinate space to object.
Realistically you should probably also rotate the normal vector and maybe tangent vector with the same method. Otherwise your shading will look weird.
Thankyou mate :) I feel silly now as I have attempted to use Rotate about axis, but just used it wrong 🤣 Thankyou for the help kind sir