Weird shader stretching on Android build

I’m currently working with the following shader from the asset store:

I’m working on a game that is essentially an endless runner, so it’s a moving, dynamic world. The problem I am experiencing is not happening in my editor, but does happen on my Android build to my Galaxy S9.

When my player starts, the water shader looks like this:

After my player moves along the world, the shader starts to appear like this:

The longer my player runs, the more extreme this pixelation/stretching is. I’ve experimented with having the plane follow my player or be stationary in the world. I’ve also experimented with various sizes of the plane, from very small to very large and it happens in all cases. I’ve also modified the shader settings themselves in a variety of ways with no success.

Any idea as to what might be happening here? Is there something I can do in my project settings or on the shader to remove this problem from Android (and possibly other) builds? I really like this way this shader looks in my game, so I’m hoping to continue to use it.

Also, I’m using 2019.3

Looks like the UV coordinates aren’t using floats.

1 Like

Opened the shader code, replaced “fixed” with “float”, rebuilt…problem gone. No noticeable performance hit at the moment either.

Thanks, this has been driving me crazy for days!

1 Like