- Home /
Tiled textures become pixelated on android
Hi, I have run in to the following problem:
I have a large road object in my game and it uses a texture map, that is tiled many times. It shows fine in the editor but when I tested it on Android device (Nexus 7), texture on my road object was very pixelated/low quality. After I played around I noticed that this happens only if the texture is being tiled many times. The same material looks fine on a small plane, but when I scale the plane and tile the texture, it becomes pixelated.
Answer by VivienS · Feb 25, 2014 at 10:42 AM
I heard that these kinds of problems appear, because the UV coordinates as used in the shader are of too low precision (that means the pixelated look is caused by rounding errors). If you have access to the shader code, try using bigger precision variables for the UV coordinates (float instead of fixed or half). Or, if you have access to the UV coordinates of the object that uses the tiled texture, try to "wrap the texture around" by UV-placing instead of wrapped textures (see examples below).
Hi, Thanks, I've been having this problem in my game, your answer really helped. Dividing my plane into squares and making each one have 0-1 uv coords fixed the issue for me. Strangely when I tried replacing all the halfs and fixeds with floats in my shader it didn't resolve the issue, any idea why?
The important variable in the shader (with surface shaders) is the struct Input { float2 uv_$$anonymous$$ainTex; }; Did you change this variable? I had a similar problem when using fixed2 uv_$$anonymous$$ainTex;. It disappears when I changed fixed to float. From what I've read, the actual precision (afer compilation) depends also on the hardware. So if your objects UVs are very big and you run on old hardware, you may still get rounding errors with floats. (Have to admit though, my knowledge here is rather small ;))
I couldn't figure it out so I just went with dividing up the plane, I am running on mobile hardware, so it is low precision, although Unitys water shader seems to have some way around this issue, but I don't know how. Anyway thanks for the help.
Your answer
![](https://koobas.hobune.stream/wayback/20220613094903im_/https://answers.unity.com/themes/thub/images/avi.jpg)