MeshInstanceRenderer : is only main-threaded?

I just run some stress testing, spawning 150k entities.

I do wonder, if mesh instance rendering is only main threaded?

Following to that, what is Batch.Fill.InstanceProperties?
Should I assume, this is part of mesh instance rendering?

I know I do run test in editor and there are overheads etc. But is it expected for my GPU, to be used at 50% capacity in such case?

Btw
Link to MeshInstanceRendererSystem.cs is broken
https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/ECSJobDemos/Packages/com.unity.entities/Unity.Rendering.Hybrid/MeshInstanceRendererSystem.cs

from

Unity-Technologies/EntityComponentSystemSamples / Documentation //content / ecs_in_detail.md
https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/Documentation/content/ecs_in_detail.md


I’m pretty sure it’s main threaded. The system has some parallel jobs, but they are all completed within the system (so they do help performance a bit). End of the day though, the MeshInstanceRendererSystem just calls Graphics.DrawInstanced().

We are working on improving this by adding new API’s that let us drive Graphics.DrawMeshInstanced in much more efficient ways. Our goal is naturally to have near zero work performed on the main thread for rendering lots of instances.

1 Like

Thx guys.
Yep it would be nice some further feature, which increases performance for none changing environment, or in general.
But 150k rendered instances by itself, is just like crazy, even they do nothing than rendering :wink: