18 releases (breaking)

new 0.15.0 Dec 1, 2024
0.13.0 Dec 1, 2024
0.12.0 Oct 24, 2024

#474 in Graphics APIs

Download history 188/week @ 2024-10-05 385/week @ 2024-10-12 1221/week @ 2024-10-19 74/week @ 2024-10-26 11/week @ 2024-11-02 1/week @ 2024-11-09 4/week @ 2024-11-16 2/week @ 2024-11-23 416/week @ 2024-11-30

427 downloads per month
Used in 2 crates (via canvasette)

LGPL-3.0-or-later

100KB
515 lines

spright

spright is a high performance sprite renderer for wgpu.

It does exactly one thing, and that's draw a lot of sprites to the screen as fast as it can.

Performance notes

Minimize the total number of textures

The fewer textures you use, the better. Every time a different texture is used, a different bind group needs to be used and a separate draw call issued.

Minimize texture switching

Even if you have multiple textures, if they're being drawn together it can still be relatively efficient. However, if e.g. sprites are alternating between textures, then a separate draw call will need to be issued for each texture used. In the worst case, the number of draw calls could be the number of sprites you want to draw!

Dependencies

~7–38MB
~649K SLoC