microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.47k stars 393 forks source link

SpriteBatch updated with sampler-version of Begin #73

Closed walbourn closed 4 years ago

walbourn commented 4 years ago

SpriteBatch has two rendering modes;

In the second case, I originally only let you set it at creation time. My primary motivation was to avoid having to have many permutations of the sprite VS/PS shaders and root-signature.

One of the advantages of the heap-based sampler is that it can be changed easily between rendering batch. I therefore added support in the form of an alternative Begin() method to let you provide a new heap-based sampler to use with rendering.