Texture resolution being scaled down when to much pressure is put on Unity engine?

I am developing an iOS app that rotates an image across a plane by changing it’s image offset. Basically, this is a treadmill simulator game. But if the user runs really really fast, the texture that is placed on the plane is being scaled down in display resolution somehow by Unity automatically. In other words, if Unity is being tasked real hard… the texture is losing resolution! What could be done to either prevent this or correct it as it is happening? Any idea’s?

You are scrolling too much. You need to wrap your texture value.

ie if (x>1024) x=-1024;

Due to texture coordinate precision.

So you mean the value I end up using for the offset is too high and that’s what causes that?

That’s not actually what’s happening. UVs should stay near the 0…1 range as much as possible. Instead of something like “textureOffset += speed * Time.deltaTime”, use “textureOffset = (textureOffset + speed * Time.deltaTime) % 1”.

–Eric

Well, I just tried making sure the value doesn’t exceed 1024… and unfortunately it’s still happening. Any idea’s?

scroll in the 0…1 zone. Eric above posted code using mod to wrap it in the 0…1 zone. What I meant was just an example, I should have been clearer.

In my own engine I set up opengl so texture coords were shorts for a tighter packing of the vert struct. I didn’t think to answer that unity might use 0…1 coordinate range.

I will try governing it not go outside the 0.0 to 1.0 range and try again… Thank you for your input!

Awesome! That looks to have resolved the situation! You rock HippoCoder! THANK YOU!