Some of my shaders work fine on desktop but behave strangely on mobile devices. After some tests it appears a quite common random value function is the culprit. Using the following shader on a sprite results in a flickering image like this

float rng(vec2 seed)
{ return fract(sin(dot(seed * floor(TIME*12.0), vec2(12.9898,78.233))) * 438.5453); }
COLOR.rgb = vec3(rng(floor(33*SCREEN_UV)), rng(floor(22*SCREEN_UV)), rng(floor(SCREEN_UV)));
However, on mobile devices the random pattern just shows in some parts and then quickly disappears, leaving a single color area. Any explanations and suggestions are highly appreciated.