mach/src/gfx
Stephen Gutekanst b261a8177f 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>
2024-05-22 18:13:26 -07:00
..
atlas all: use mach.math instead of std.math; fixes hexops/mach#1021 2024-01-18 22:34:12 -07:00
font gfx: font: account for glyph bearings 2023-10-05 20:35:33 -07:00
main.zig module: support merging module lists 2024-05-06 14:03:57 -07:00
sprite.wgsl gfx: Sprite: minor shader simplification 2024-05-22 08:24:40 -07:00
Sprite.zig gfx: Sprite: sort/draw sprites back-to-front always 2024-05-22 18:13:26 -07:00
SpritePipeline.zig module: rename events -> systems, remove 'event arguments' 2024-05-08 13:39:07 -07:00
text.wgsl gfx: Text: add ability to change font color 2024-05-22 08:22:25 -07:00
Text.zig gfx: Text: add ability to change font color 2024-05-22 08:22:25 -07:00
TextPipeline.zig wip 2024-05-22 08:21:33 -07:00
TextStyle.zig wip 2024-05-22 08:21:33 -07:00
util.zig all: use mach.math instead of std.math; fixes hexops/mach#1021 2024-01-18 22:34:12 -07:00