How to use large texture atlases in my shaders on mobile devices This is a frustrating discovery. I have ported my desktop game to mobile and discovered that floating point precision in my shaders is not good. I have large animations which I store per frame on a texture atlas. I try to keep as many non unique frames in their own sections and piece them together e.g. a sword that doesn't animate for 4 frames is a node that attaches to the hand piece. This preserves memory. However the texture atlases are so big that, when I use shaders, it breaks the animation completely. Here's an example of one of the shaders that wraps the animated backgrounds (scrolling clouds) precision highp float precision highp int precision highp sampler2D varying vec2 vTexCoord varying vec4 vColor uniform sampler2D texture this script animates and wraps an animated background from one atlas uniform float x frame start x uniform float y frame start y uniform float w frame width uniform float h frame height uniform float offsetx wrap by x amount uniform float offsety wrap by y amount void main() vec2 origin vec2(x, y) vec2 size vec2(w, h) Get the texture coordinate vec2 texCoord vTexCoord Make its lower left be at (0,0) and it's upper right be at (1,1) texCoord (texCoord origin) size Apply the offest texCoord texCoord vec2(offsetx,offsety) Apply the wrapping texCoord fract(texCoord) Convert back to texture atlas coordinates texCoord (texCoord size) origin gl FragColor texture2D(texture, texCoord) vColor For most backgrounds, the animations are small and don't cause problems. But some backgrounds are large and their texture atlas is large. The floating point precision breaks down and the animation tears. I don't have much mobile experience. How can I use large textures atlases for animations without the x y coordinates breaking due to loss of floating point precision?