Hi!
I have a few objects that use UV offset animations, by using this code:
renderer.material.SetTextureOffset("_MainTex", new Vector2(0, offset));
For example, there is a river flowing downstream. It uses a 256x256 texture, which displays really really bad on the iPhone, like it was 16x16. Even worse, sometimes it displays right, and sometimes I get this problem (without any recompile, just entering the game level again).
The shader on the object is a vertex colored shader:
Shader " Vertex Colored" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
ColorMaterial AmbientAndDiffuse
Lighting Off
SetTexture [_MainTex]
{
Combine texture * primary, texture * primary
}
SetTexture [_MainTex]
{
constantColor [_Color]
Combine previous * constant DOUBLE, previous * constant
}
}
}
Fallback "VertexLit", 1
}
Please let me know if there is anything I could do about this, to make it display right all the time.
Thanks a lot!