Search Unity

Weird shader stretching on Android build

Discussion in 'Shaders' started by tsp120, Sep 26, 2019.

  1. tsp120

    tsp120

    Joined:
    Dec 6, 2013
    Posts:
    15
    I'm currently working with the following shader from the asset store:

    https://assetstore.unity.com/packages/vfx/shaders/mobile-depth-water-shader-89541

    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:

    20190926_093906.jpg

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

    20190926_093922.jpg

    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
     
  2. tmcthee

    tmcthee

    Joined:
    Mar 8, 2013
    Posts:
    119
  3. tsp120

    tsp120

    Joined:
    Dec 6, 2013
    Posts:
    15
    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!
     
    tmcthee likes this.