optimize demo3d bsp render by sorting faces based on material

This commit is contained in:
asrael 2026-04-15 01:43:54 -05:00
parent cf43538518
commit 728b393a8e
3 changed files with 109 additions and 78 deletions

View file

@ -12,6 +12,9 @@ typedef struct demo3d_bsp_render_state {
pxl8_gfx_material* materials;
pxl8_mesh* mesh;
u8* render_face_flags;
u32* visible_faces;
u32* mat_offsets;
u32* mat_write_pos;
u32 num_materials;
u32 num_faces;
bool exterior;