简体   繁体   中英

"Rotate" a texture around a sphere using Shader Graph?

Let's say I have a sphere with a certain rotation and a texture on it. Is there a way to have a material on a different sphere with that same texture, such that the sphere will display the texture at the same rotation of the first sphere without having to alter the transform, thus looking identical?

Basically, if I could input the desired eulerAngles as a shader graph parameter to offset/rotate the texture to match the rotation of another object at runtime using a script. How can I do this?

TLDR: I want to add a Vector3 property to my shader graph that offsets/rotates a texture about a sphere as if that sphere were rotated.

Figured it out. Using cubemaps and the Rotate Around Axis Node solved everything!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM