Search Unity

difference between unity sprites default shader and Mobile/Diffuse Shader

Discussion in 'Shaders' started by alex1st1, Jan 16, 2020.

  1. alex1st1

    alex1st1

    Joined:
    Jan 26, 2019
    Posts:
    275
    Hi All!
    Do you know the difference between unity sprites default shader and Mobile/Diffuse Shader?
    Which is better for mobile 2d game and why?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    The Sprite/Default shader is intended for sprites, and because of that has features for pixel perfect display, supports split alpha on older OpenGL ES devices that don't support compressed image formats with alpha, and can properly handle the Sprite component color setting.

    The Mobile/Diffuse shader is a very simple lit shader, and doesn't do any of the above. It's also roughly 10 times more expensive to render, and doesn't necessarily respect sprite ordering. It's still really cheap compared to most lit shaders, and even slightly cheaper the the Sprite/Diffuse shader, which is a combination of both.

    The Sprite/Default shader is very close to the cheapest shader Unity ships with.
     
    Eater_Games likes this.