microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.55k stars 506 forks source link

SpriteBatch support for 2D arrays #107

Open walbourn opened 6 years ago

walbourn commented 6 years ago

SpriteBatch and it's shaders could be made to leverage a per-sprite array index in addition to texture UVs to be able to pack textures into a 2D texture array. This would require Direct3D hardware feature level 10.0.

walbourn commented 4 years ago

While this could be done with a custom shader, the problem is the lack of input constant data through SpriteBatch since the primary value of this would be to be able to render sprites from different array indices in one call without a flush.