How I can realize Hardware Instancing for using with SpriteBatch and Texture2D

I need to place 2d sprites in 3d space but for different objects, I have a different world matrix, and the same texture, view, and projection matrix. Cause I need to draw each object in the new batch. How can I batch these objects in one draw call?

Spritebatch can’t do instancing, you’ll have to set up the instance vertex buffers yourself.

How I can do this, maybe there are some articles about this?

This sample is a good start: GitHub - Eastrall/MonoGame-HardwareInstancing

1 Like