I’m talking about the script listed here: http://wiki.unity3d.com/index.php/Animated_Color_Procedural_Texture
I’m trying to create something along the lines of the third or fifth examples in the image, however mine are always coming out as animated lines instead. could someone with more experience with sine waves and graphs help me out here?
Many thanks
The patterns are changing because the code uses Time.time. Remove Time.time from the following two lines and replace it with a constant, and the pattern will remain fixed:
var green = Mathf.Sin(x*.5+Time.time+Mathf.Sin(y*.23)*.8)/5+.5;
var blue = Mathf.Sin(x*.3+Time.time+Mathf.Sin(x*.43)*.4)/5+.5;
You may want to run the app as-is and output Time.time each frame. When you get a pattern you like, you can then replace Time.time with the output value.
Note once you have the constant you want, you only need to call Calculate() once (perhaps in Start()), not every frame in Update().