UnityURP-MobileDrawMeshInstancedIndirectExample icon indicating copy to clipboard operation
UnityURP-MobileDrawMeshInstancedIndirectExample copied to clipboard

Provide clear information about performance

Open kukumberman opened this issue 10 months ago • 0 comments

According to your statement - it can handle 10 million instances https://github.com/ColinLeung-NiloCat/UnityURP-MobileDrawMeshInstancedIndirectExample?tab=readme-ov-file#can-this-demo-runs-on-midrange-mobile

Grass position buffer per instance takes 12 bytes (float3) https://github.com/ColinLeung-NiloCat/UnityURP-MobileDrawMeshInstancedIndirectExample/blob/master/Assets/URPMobileGrassInstancedIndirectDemo/InstancedIndirectGrass/Core/CullingCompute.compute#L9

So count of 10M takes only 120 MB of VRAM (there is also dynamic buffer of visible grass indices which takes max 40 MB).

In my case only number of visible instances has impact on performance.

Here is my benchmark on Redmi Note 11 (Adreno 610).

Mesh (11 vertices, 7 triangles)

visible count tris count fps
100k 700k 25
50k 350k 35

Mesh (3 vertices, 1 triangle)

visible count tris count fps
100k 100k 30
50k 50k 36

I appreciate your work and I learned and lot 🤩

kukumberman avatar Jan 13 '25 15:01 kukumberman