I have a shader using _Time.x to pan a texture. I got it looking how I wanted on a iPhone 6s, but then when testing on a iPad and iPhone 5c, its moving super slow. Is the _Time speed different for different devices? If so, is there an easy way to combat this?
_Time.x is supposed to be time x 20 time / 20, you might try using _Time.y which is just time unmodified. It’s possible there’s a bug that on some platforms so _Time.x isn’t being multiplied.
edit: cuz I dum
Little correction. _Time.x should be time / 20. _Time = (t/20, t, t2, t3). @bgolus is right otherwise, you probably want to use _Time.y.
Also, I saw a similar problem related to float precision. The animation wasn’t just slow on some devices. It was jerky because of insufficient float precision. It turns out that fixed/half(lowp/mediump) is automatically converted to float(highp) on some mobile gpus and left untouched on others.
My experience with _Time.xyz values on mobile is that after some point they do reset or hit an infinite wall or something.
Maybe a precision thing or not, i always use a custom timer which is clamped between some reasonable values and that prevents unwanted results.
Also on this topic you should pretty much always be using frac() when dealing with _Time, ie:
uv.xy += frac(_Time.y * _uvPanSpeed.xy);
The precision of float starts to break down in UVs far more obviously if you don’t; basically if the UVs themselves are big numbers the texture will start to appear to be a lower resolution or streaked. If you do the frac() they won’t do this, but eventually the motion of the panning might become less smooth or stepped. If _Time is half / mediump this will happen in about a minute using _Time.y, with float / highp this should be ~5 days.
i have this issue too…
how to solve this…