Search Unity

Migrating materials to LWRP

Discussion in 'Shaders' started by eco_bach, Mar 10, 2019.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Trying to convert some materials to use in the LWRP.
    Can anyone tell me what the 'equivalent' would be to the non-scriptable pipeline Standard shader in the LWRP?
    And also, what is the difference between the Lit, SimpleLit and Unlit shaders in the LWRP?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,343
    LWRP vs Built in forward (this is a simplification)
    Lit = Standard
    These are “PBR” shaders. Specifically both try to replicate energy conservation and Fresnel reflectance, and other physical shading phenomena. Both use roughly the same major inputs of Albedo (Base Map), Metallic or Specular with roughness in the alpha, Occlusion, and Emission. How they work is very different though, so the same smoothness between the two may not match. Occlusion is also read from the green channel in Lit instead of the red channel as it was in Standard, which let’s you use a single texture for both Metallic and Occlusion.

    Simple Lit = Legacy/Specular Bump or Standard on GLES 2.0 devices
    Old school Blinn-Phong specular. Basically what everyone used before the recent PBR revolution. Inputs are similar to the Specular setup of the Lit or Standard shaders, but uses a simpler lighting model that’s somewhere between the old Specular Bump, or the mode the Standard Shader automatically fell back to on older mobile devices. Unlike the Specular Bump shader, it uses a smoothness value similar to the Lit or Standard shaders rather than an explicit specular power.

    Unlit = Unlit
    They’re unlit. All single pass Unlit shaders actually work in both, assuming your unlit shaders are actually unlit and don’t try to use any lighting information which the Built in renderers didn’t actually enforce that. Those that do use light information or use multiple passes will be totally broken.