0
\$\begingroup\$

i need to add a flow effect to my river so that the water can flow along the path described by the mesh i created. Using ShaderGraph shader i added a time node multiplied with a screen position and hooked into a Tiling and Offset node but the water keep moving in a global direction only.

Please note that i'm using Instant River tool to create the river mesh https://unitylist.com/p/loq/Instant-River

I noticed in its script he's using some methods to rotate and align the UVs, so it should work with any material, but i don't know how to align my shader.

I'm wondering if it's possible to achieve the result with Shader Graph or not. Any idea?

enter image description here

enter image description here

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I managed to solve the problem myself using a Normal Unpack node before the Tiling and Offset one. This gives an orientation along the UVs. I post the solution here for anyone facing the same issue.

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ You should really delete the screen position and normal unpack nodes and just use a UV node instead if you want UVs. \$\endgroup\$
    – DMGregory
    Jun 1, 2021 at 13:49
  • \$\begingroup\$ i tried but it's not working. the UVs don't follow the mesh orientation \$\endgroup\$
    – bibrosko
    Jun 1, 2021 at 14:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .