Quick note about light cookies

A tip for Unity users: If you have a light in your scene and you are using a cookie on that light, that’s going to break dynamic batching; You’ll get more drawcalls and worst performance. Remove that cookie at least on low-end devices!

Discussion2 Comments

  1. brda says:

    Argh, just figured this out the hard way. Any ideas why on earth this breaks dynamic batching?

    • admin says:

      I’ve been reading about lights in Unity since you asked this, and…

      In my test I had 2 directional lights, 1 of them using a light cookie. Using the light cookie increased draw calls, affecting performance; I thought that the issue had something to do with dynamic batching.

      My guess now is that it’s not because it breaks dynamic batching; using a cookie might be forcing this light to be rendered using pixel lighting (which requires another pass) instead of vertex lighting. The thing is: if without a cookie this light is rendered using vertex lighting, this may be the real problem, not the batching.

      So, I’ll run some tests and see if this is the case!

Add a Comment