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> |
||
|---|---|---|
| .. | ||
| atlas | ||
| font | ||
| main.zig | ||
| sprite.wgsl | ||
| Sprite.zig | ||
| SpritePipeline.zig | ||
| text.wgsl | ||
| Text.zig | ||
| TextPipeline.zig | ||
| TextStyle.zig | ||
| util.zig | ||