Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Standard shader mobile?

Discussion in 'Shaders' started by o1o101, Jun 30, 2016.

  1. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    637
    Now I have a quick question about the standard shader, I have looked online but most threads are outdated.
    As of now, how is performance on mobile? Is it much more expensive than a legacy bumped diffuse? Is it better to only use the standard shader on things that need it?

    Thanks
     
    siddharth3322 likes this.
  2. Namey5

    Namey5

    Joined:
    Jul 5, 2013
    Posts:
    188
    I'm not one that works with mobile devices, but yes it would be. The standard shader incorporates numerous other things that the legacy diffuse does not; reflection, specularity, etc.
     
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,248
    And both of those can, ironically, be disabled on a per material basis in Unity 5.4! (And most of the other stuff, like parallax and detail textures, are disabled by default for mobile.)

    It'll still be slower though just because it is a more complex shader.
     
    siddharth3322, o1o101 and Namey5 like this.
  4. Eliotz

    Eliotz

    Joined:
    Jul 18, 2015
    Posts:
    81
    newer devices like galaxy alpha have no problem with the standard shader it ran 60 fps like its nothing, however older devices (like: galaxy note 2, galaxy express 2) had a very small performance impact (somewhere around 2 - 5 fps) so it's worth while trying out the standard shader.

    I personally would switch to standard shader because it literary looks 10 times better while having a small performance drop.

    Standard shader can look really ugly at times on OpenGL ES 2.0 devices so I would use a legacy shader for those devices or maybe look for somet costom pbr shader in the in the asset store, maybe there is something that will work around those that appear on OpenGL ES 2.0 devices using the standard shader.
     
    o1o101 likes this.
  5. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    637
    Thanks everyone! I am targeting a Galaxy S3/Nexus 4 and newer, I'm still not sure the performance difference using legacy bumped specular, vs using reflections and specular on the standard shader, of course it is a more bloated shader, but is performance that much worse/noticeable especially on the 2013 + devices ?
     
  6. Eliotz

    Eliotz

    Joined:
    Jul 18, 2015
    Posts:
    81
    I don't think that you should be worrying as much about performance as you should for how it will look on OpenGL 2.0 devices and I don't know how it looks on other devices but it look pretty crappy on note 2, so will need some kind of fallback probably for those devices if there is no alternative that works.

    But for devices that support OpenGL 3.0 you can definitely use standard shader because most people won't even notice the performance difference.

    I'd say you just make your game look as good as you can on OpenGL 3.0 devices and on OpenGL 2.0 you just take some legacy shader that works without showing any artifacts. I don't think you should really spend too much time on GL 2.0 devices, because that technology will be only history in next couple years.
     
    o1o101 likes this.