I am trying to scroll a texture using its uv in Unity but I don't get the result I need.
The aim is to have two components, the speed and the direction. I would like to define the direction in normalized values and the speed should influence the velocity of the scrolling according to the direction.
If I change the speed at runtime, I don't want to have some hiccups but maybe this should not be handled but the GPU.
How can I do that in a better way, maybe using matrix ?
Here is an example but the result is not as good as expected.
uv.xy = uv.xy + frac(_Time.y * float2(_Direction.x, _Direction.y));