Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gfx: Sprite: sort/draw sprites back-to-front always
Prior to this change sprite draw order was not something we could specify, now we can by changing the Z value of sprites (sprites further away / with greater Z values are drawn first), which is obviously desirable for layering and alpha blending purposes. The implementation here is rather naive: we sort all sprites each frame based on their Z value; but its performance is quite good with ~half a million sprites and so is good enough for now. Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
- Loading branch information