Search Unity

Question Lit shader not shiny on android

Discussion in 'Universal Render Pipeline' started by tsp120, Nov 15, 2022.

  1. tsp120

    tsp120

    Joined:
    Dec 6, 2013
    Posts:
    15
    I'm using URP and have a "Lit" shader on my object. I have it set to metallic, with smoothness set to 1 and specular highlights checked. The effect gives my object a very shiny look in the editor.

    When I build the game on android, the shininess disappears and the object appears more flat. Back in the editor, if I turn specular highlights off it seems to replicate what the game looks like on android (not shiny). So it might suggest to me that the specular highlights aren't working in android.

    I made sure I'm using the same quality setting in the android build. (High)

    Any idea where to look to fix this? Could it be some kind of limitation with android that I'm unaware of? I've hit a roadblock in terms of what I know to check and mess around with.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Which Unity version? If not the latest, tried the latest lts?
    If the latest, did you try fully uninstalling the app and then building the shiny varient?
    If it still happens, does this happen in a fresh project?
    If so, does it happen on another android phone?
    If so, both using GLES3 and vulkan?
    If so, make a bug report and maybe try 2020 lts or the beta?
     
  3. tsp120

    tsp120

    Joined:
    Dec 6, 2013
    Posts:
    15
    specular.png

    I'm using Unity 2020.3.22 at the moment.

    I created a new project with a simple sphere and a simple character and was able to replicate the issue. The top is a screenshot from my editor in play mode, the bottom is a screenshot from my android mobile device after it was ported. You'll see the specular reflection of the direction light on the objects in the PC version, but not the android.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    The steps are the same. See if it's fixed in the latest 2020 lts. If not, check different Graphics APIs and 2021 lts and make a bug report
     
  5. tsp120

    tsp120

    Joined:
    Dec 6, 2013
    Posts:
    15
    Thanks.

    The issue appear to be solved by upgrading the project to a 2021 version. At first, I noticed the specular highlights but they weren't as obvious as in the editor. In my previous debugging before I upgraded I had switched OpenGLES3 to be first in the graphics API over Vulkan to see if that made a difference. I switched that back to put Vulkan first and then the specular highlights showed in the android build in the newer version of Unity. Granted, the highlights look a little different from the editor but it's got me in a position to play with and get it to my liking.

    Thanks again!
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Glad it works!
    If you can reproduce a different result in editor compared to android (if both are on the same Quality settings) please make a bug report.