I have a plane and I’d like to adjust the y positions of the vertices in the shader.
Actually moving them is simple enough, but I was wondering what the best way of getting the random values for heights was?
Would I need a random function inside the shader to get a value within a range?
Hey bud, Are you trying to scroll your texture with the shader or something like that ?
You would be looking to do this in the Surf shader function
You could call to the _Time property and multiply it by a set of values based on the x and y you set it. yo could then effect them with random values passed into the vars holding the x and y values.
I could go on.
the code would look similar to this…
fixed yScrollValue = _ScrollYSpeed * _Time;
you might make _ScrollYSpeed an accessible parameter in the inspector for the shader allowing you to adjust/tweak it visually afterwards.
You could be looking for a a small function to run on a float in your code like so…