Hey forum, I am seeking some info on the GPU instancing for SpeedTree in Unity 5.5
I am read in the release notes that GPU Instancing for SpeedTree was supported, however I don’t see any drawcall/performance improvments.
Is there some sort of setup required? If so does anyone have info on how to get it setup?
And lastly, is there any drawbacks of using GPU instancing?
For now you have to disable light probes on trees to make them instance-able. We are working on a solution to eliminate this limitation though.
As for performance boost, it depends. You need to profile your specific scenes on specific hardware configurations. In general, instancing only gives you benefits when you are CPU bound.
@yuanxing_cai Thanks for the info, I made sure to disable light probes already.
I can’t really tell if it is working or not, is there a way to check? In the frame debugger the speedtree billboards are listed as “Draw Dynamic”
Is there somewhere in player settings or anything else that is necessary to get it going?
Also, what should I be expecting for batches, when using dynamic batching for my SpeedTree billboards, they batch to around 30 batches, will I be seeing any improvements with instancing?
@yuanxing_cai I did some more testing, so I take it that the GPU instancing only works for the actual mesh and not the billboard.
Is there a way to enable GPU instancing for SpeedTree billboards?
Thanks @zeroyao ! I got it going on the SpeedTree meshes, and it seems to batch them VERY well.
Is there any reason why it is not implemented for the billboards? If so is their a quick was to implement it to the billboard shader? I am really keen to do some benchmarks/testing.
If it is very complicated to add to the billboards, do you have an ETA otherwise? Also, on open GLES 2.0 it is not supported, so would it fall back to dynamic batching instead of GPU instancing or what would happen?
No specific reason, but we are focusing on other tasks like making lightprobes work with instancing. We will investigate more in billboard instancing in the future, as instancing simple geometries is not always a win.
When instancing is not an viable option on your platform, Unity automatically fallbacks to dynamic and static batching.