Is there a particular reason GPU instancing doesn’t work when light probes are involved? I would think this could be solved with MaterialPropertyBlocks, right? Just pass in each light probe data set to the property blocks and GPU instancing would work.
It is odd also because in my game view before I hit play, I have ~270 draw calls. However when I hit play, it suddenly goes up to over 1000, and the reason it says is that the objects can’t be GPU instanced because they use different light probes. There is no difference in the scene before and after I hit play as far as hierarchy or additional meshes.
Almost like when not playing it can instance them (or atleast it is reporting so), but when playing it cannot.
Any thoughts would be so much appreciated. Thanks!
Actually it appears when not in play mode it also gives the reason for using different light probes, it just happens a lot less / is more successful at instancing the renderers.
After further research, it appears the discrepancy before and after hitting play was because of static batching. I had to turn it off for instanced objects.
However I still don’t know why some objects give a reason of not being able to instance when they share the same mesh. It says they are using different light probes, but that doesn’t seem to be a problem other places.
Ah! I think this is a bug. It appears that spot lights break instancing, even if they are baked. Once I disabled them all, the materials instanced fine. I just baked lighting so I don’t see any reason any of them wouldn’t be baked. They were marked to be baked and appear to have taken effect in the lightmaps.