Original Post
Hi all,
I'm currently losing my mind. I'm trying to render 65536 cubes using a single DrawInstancedPrimitives call. I've set up the excellent example at float4x4 to render 65536 cubes and it does so in about 0.3ms on my machine. Doing the 65,536 cubes in my project, however, currently takes 60.0ms.
As far as I can tell, I'm only doing one thing differently: I'm changing the instance VertexBuffer in the VertexBufferBinding each frame. If I comment out the Draw call, drawing only takes about 4ms. At first I thought it the speed problems were due to changing the buffers, but that's not it. I can draw just the first 256 cubes in the buffer without any performance problems.
Any help? I'm about to start ripping my hair out.
I'm currently losing my mind. I'm trying to render 65536 cubes using a single DrawInstancedPrimitives call. I've set up the excellent example at float4x4 to render 65536 cubes and it does so in about 0.3ms on my machine. Doing the 65,536 cubes in my project, however, currently takes 60.0ms.
As far as I can tell, I'm only doing one thing differently: I'm changing the instance VertexBuffer in the VertexBufferBinding each frame. If I comment out the Draw call, drawing only takes about 4ms. At first I thought it the speed problems were due to changing the buffers, but that's not it. I can draw just the first 256 cubes in the buffer without any performance problems.
Any help? I'm about to start ripping my hair out.