Ricardo Quesada wrote:
your solution seems to be good.
Do you know if it is possible to set a precision for certain uniform ? In particular, is it possible to do
uniform highp vec4 CC_Time ?
Yes, it’s possible. And this method is described in my first message:
Solution is quite simple (however I’m uncertain about performance). CC_Time should have a highp precision qualifier. I have tested this solution for about an hour and it seems the animation stayed smooth.
Personally I prefer the solution described in my second message, since it’s less expensive: it’s better to have highp in the vertex shader, because vertex shader is called by GPU thousands times rarer than the fragment one. Although maybe this performance saving is so insignificant that it’s not even worth to bother with it.
The drawback of this method is that it’s hard to make it all-purpose: its idea is that I shorten the range of values in the vertex shader:
scroll_speed = fract(0.1 * CC_Time.g);