So… some documentation? Limits? Restrictions? Usage? Anything?
Please PLEASE tell me this isn’t going to be like batching again - it works, but kinda, sorta, then stops working with absolutely no clue why and no documentation to help us make it work.
Would instancing work out of the box for the standard shader at the moment?
Will it recognize same meshes (with same material) and use instancing for them if dynamic batching is enabled?
Or do we need to write a special shader to use instancing at the moment?
What are the plans for the release of 5.4? Will instancing be available for standard shader out of the box and applied automatically if dynamic batching is enabled?
This is a really great addition. Thanks for the holiday surprise!
Can Unity turn off dynamic batching for meshes that support instancing? The dynamic batching combination negates the benefits of instancing, and in my testing it’s the difference between 4MM triangles at 35 FPS and 16MM triangles at 75 FPS.
My understanding is that it replaces what would normally be dynamically batched so you don’t have to do anything. This is because the shader will be cooked up for it.
That’s what I would like to have happen, but unfortunately it’s not how it currently works. If meshes can be dynamically batched, that happens before instancing. The number in my post are the difference between allowing dynamic batching for my test meshes and forcing it off.
Does the standard shader that ships with B1 have the modifications to work with instancing? If not, has anyone made the modifications to the standard shader and could share it? I’m not hugely shader savvy (so can’t make the changes myself) but I’d love to be able to start experimenting with GPU instancing.
We do realize it’s not the best idea to tie instancing with dynamic batching as albeit sharing some similar batching criteria, these are two fundamentally different ways to do draw call batching and people want to use instancing without dynamic batching other stuff.
We will make them two separate switches before final release.
I am mostly worried about this (from the “docs”):
“Objects affected by multiple lights can’t be instanced efficiently. We are working on an improvement though.”
If this is not solved, and I mean solved entirely, then instancing will be of little use in many real world cases…
Hey @yuanxing_cai , the switches sounds good but I do think that instancing should just be picked over dynamic batching if it’s avaible, even when both are on. Unchecking dynamic batching would disable it too for platforms where instancing isn’t supported. I hope that’s considered. Thanks!
In my case it’s incredibly useful regardless, and it would be lit perfectly fine as I’d perform my own lighting in shader. But I understand where you’re coming from for general use cases… hope support is forthcoming.
Don’t forget dynamic batching does not have the same characteristics at all. Vertex limitations. You can’t really be sharing these two settings…
I’m not sure what hardware supports instancing but as far as I know it would nearly always be better to use Instancing. Is there a scenario where one might want dynamic batching ever, over instancing where hw support is there?
My point exactly hippo - but right now it seems to be the other way around That should be fixed and I’m just afraid unity will say “there’s a switch use that” and not fix it - hence the comment. There definitely should be a switch too though.