When I use a custom lighting model in a surface shader it seems to break static batching, no matter how simple that lighting model is (ie. I just return the albedo directly with no processing). Is this expected behavior? Is there something that needs to be done in the shader to fix up batching?
My test was to take a default shader and just add the custom lighting code. Worked before, as soon as I added:
Yes. As I mentioned, by looking at the stats, I can see that switching between Cutout/Diffuse and this slight alteration of that shader results in far fewer meshes batching.
Sorry, I didn’t see project in the request. I will file a new bug with a project that repros on my end. FWIW, with the shader I sent I was seeing half the number of objects batched compared to the standard Cutout->Diffuse.