Search Unity

Flashing Textures on Android only

Discussion in 'General Graphics' started by kumagostudios, Sep 14, 2018.

  1. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Hello fellow developers! I am experiencing an issue that's driving me nuts as nothing I've done seems to fix it. On Android only builds of my mobile game, the textures flash (as if directional lights are turned on and off). I can't for the life of me figure out why. My game is similar to an infinite runner where the background is a 3d object that is continuously translated and then repositioned for reuse on the next cycle.

    Some things I've tried that haven't worked -
    1. Removing number of fill and rim directional lights
    2. Soft shadows instead of hard
    3. Clipping planes adjustment - currently 0.3~1000 and tried 0.01~100
    4. Removed trees that would intersect the terrain
    5. Change Main camera angle
    6. Removed Post Processing Behavior on main camera

    Rendering path is forward and projection is orthographic in my game. Any ideas are greatly appreciated! I am at my wits end. Lighting is Realtime and uses Post-Processing plugin.
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    WHich android? is it mali gpu? especially 400mp ish? they have 16bit precision in fragment, common cause of confusion.
     
    kumagostudios likes this.
  3. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Hi Neo! It's a Oneplus 5T, according to specs a Adreno 540 GPU and a screen of 1080 x 2160 pixels, 18:9 ratio (~401 ppi density). Do you have any suggestions what I should look into?
     
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Sorry I don't know much about adreno
     
    kumagostudios likes this.
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,023
    Which Unity version?
     
    kumagostudios likes this.
  6. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    Latest version 2018.2.8f1 Personal on OSX. However I experienced this even before I updated, on one of the 2018.1 versions, but I don't remember what my last one was before I upgraded. I am running my APK on a Oneplus 5T.

    Do you have any suggestions on how I should proceed? I am at my wits end!
     
  7. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    It's okay, I appreciate you for trying to help!
     
    neoshaman likes this.
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,023
    A bug report would help a lot.

    I was asking about Unity version, because there was a similar bug on 2018.2 reported, but if you had it on 2018.1 as well, this is likely to be a different one.
     
  9. kumagostudios

    kumagostudios

    Joined:
    Jul 29, 2017
    Posts:
    14
    After an ENTIRE WEEK I've discovered the issue! I converted the shader from "Mobile/Vertex Lit" to "Standard (Specular setup)" and it fixed it on my phone. Why does this only occur for Android and not iPhone? Also is there a big performance difference between the two? I assumed Vertex Lit would be more performant.
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,023
    Mobile/VertexLit is likely to be much faster than Standard (Specular setup), but you need to check the performance on the devices you want to run your application on.
     
  11. Manidanm

    Manidanm

    Joined:
    Jan 11, 2019
    Posts:
    1
    I am using Huawei Mali GPU Mobile I am also facing the same issue