Home Unity

DrawInstanced vs DrawProcedural

geroppo
null
Offline / Send Message
geroppo null
Hi!
I'm currently trying to render a large amount of objects using the instancing technique, but I'm using DrawProcedural since I'm using a compute shader to generate the objects dinamically every frame, and that means storing the results in a compute buffer which I then bind to a material for rendering.
The problem is that I'm getting very poor performance with DrawProcedural. Drawing 4000 instances of a mesh with 600 vertices with DrawProcedural takes around 10ms, while rendering it with DrawInstanced takes 7ms.
I can't figure out what is DrawInstanced doing that seems to be more optimized, also I'm using a shader with  the bare minimum requirements, so it's not like I'm fillrate bound or have very fat vertex/fragment shaders.
Any ideas?
Sign In or Register to comment.