Question about unlit and lit shaders performance

Hello everyone

I know that using unlit shaders have a positive performance impact over using lit shaders, even using really simple ones like Lambert .

But Can I have a scene with both unlit and lit elements? for example using unlit shaders for the environment objects and using a lit shader for the character? or having just a light on the scene kills the performance benefit of using only unlit shading?

Thanks!

You can combine those, absolutely. But default, if you create a material in the Editor, it would use lighting, and as you mentioned, that is more expensive.

But you can turn off lighting and skybox on the material, and use Emissive part of it (texture, tint), and that is super cheap as it does not do any lighting.

2 Likes

But note that having a single directional light (with or without shadows) is not that expensive even on 10 years old devices, so it all depends on what you’re after.

Great, thanks for the quick answer @mvaligursky !