Trying to undersand Frame Debugger Batch Cause

Hello folks,

I’m currently working on something and using the frame debugger there are some batch causes that I don’t quite understand and therefore thought to ask for some help/explanations in the community.
For example :

  • Object has an odd negative scaling : for this one I can see that sometimes an object has a -1 value but how does that break the current batch ?
  • Objects are affected by different lightmap configurations : this one is not quite clear to met and don’t know how to try to prevent/fix that.

Thanks

Any chance you figured out what “different lightmap configurations” means?

Any reason nobody answered this question?

Here’s some details about these batch breaking reasons:

  • Odd negative scaling : if a transform’s scale has an odd number of negative scaling values (either X, Y or Z) then we need to reverse the polygon winding so that front face culling becomes back face culling, for instance. This changes the GPU raster state, and thus breaks the batch. For instance, a scale value of (-1,1,1) will do this but (-1,1,-1) will not because the latter actually amounts to a 180° rotation, not a mirroring.
  • Different lightmap configurations: most probably this is due to using different lightmap index. When lightmaps are baked, this resolves in a number of textures and draw calls using one and then another will cause a batch break. To prevent that you can try increasing the max lightmap size, in the lightmapper settings.

Hope that clarifies this.