Home Unity

Is unlit shader the same as surface shader with shadows disabled?

grand marshal polycounter
Offline / Send Message
Alex_J grand marshal polycounter
You got the theory and practice of occlusion culling. This means that if a thing is not visible on camera space, you don't call it to be rendered.

DOes this extend to shadow casting and lighting calculations? For instance, I have two characters. One has a legacy unlit shader, and the other has standard pbr, but with only an emmisive map and shadows disabled. So it can look the same even if no lights in the scene.

What is the difference behind the scenes? Is there any significant change? I wiill test for myself, but with limited knowledge I can still easily miss important details. So if oyu know anything about this, I appreciate you helping me understand. Thanks!

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Unlit shader doesn't change occlusion at all. Whatever camera logic is being applied already stays that way.

    But unlit shader is significantly faster because it doesn't reference scene lighting at all. If you want an unlit shader to receive shadows, I think you'll need to add that.
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    perfect yeah thats what i was getting it. Like, if i have a surface shader with all shadows disabled, it probably is still looking for certain lighting information still. I'd expect anyway.
Sign In or Register to comment.