Comparing unlit shaders to lit shaders

When creating a shader, you can decide how the material reacts to light. Most shaders that are used in mobile games are classified as either lit or unlit.

Unlit shaders are the fastest and cheapest shading models. Use an unlit shader if you are targeting a lower-end device. Several key points to consider include:

  • Lighting does not affect an unlit shading model. This means that many calculations, for example specularity calculations, are not needed. The result is either cheaper or faster rendering.
  • Using a stylized art direction that resembles a cartoon works well with unlit shading. This art style is worth considering when you are making games for mobile platforms.

    Lit shaders use more processing power than unlit shaders. However:

  • Light affects a lit shader and it enables the surface to have specularity.
  • This is probably the shading model that is most used in mobile games today.

The following image shows a comparison between a lit and an unlit object:

The same tower mesh and texture set have been applied, but are using different shaders. Lights do not affect unlit shaders, so they need less computation. This results in a better gaming performance, especially on less-powerful devices.

Previous Next