We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b45566 commit 6fc5b5cCopy full SHA for 6fc5b5c
Assets/Shaders/2D/Effects/ColorCycle.shader
@@ -51,10 +51,10 @@ Shader "UnityLibrary/2D/Effects/ColorCycle"
51
float gray = tex2D(_MainTex, i.uv).r;
52
53
// get scrolling
54
- float scroll = frac(_Time.x*_Speed);
+ float scroll = frac(gray + _Time.x*_Speed);
55
56
// get gradient color from texture
57
- fixed4 col = tex2D(_GradientTex,float2(gray+scroll,0.5));
+ fixed4 col = tex2D(_GradientTex,float2(scroll,0.5));
58
59
return col;
60
}
0 commit comments