draw: increase far Z, separate path for space quads, fix billboard batching

This commit is contained in:
veclavtalica
2025-02-26 13:27:09 +03:00
parent 5f3920fdba
commit a36459397e
10 changed files with 190 additions and 59 deletions

View File

@ -23,7 +23,7 @@ extern float camera_2d_zoom;
extern double depth_range_low, depth_range_high;
#define QUAD_ELEMENT_BUFFER_LENGTH (65536 / 6)
#define QUAD_ELEMENT_BUFFER_LENGTH ((65536 * 1) / 6)
#define CIRCLE_VERTICES_MAX 2048
/* TODO: limit to only most necessary */
@ -217,6 +217,7 @@ typedef struct ElementIndexedQuadWithoutColorWithoutTexture {
Vec2 v3;
} ElementIndexedQuadWithoutColorWithoutTexture;
/* TODO: rename to space quad */
/* TODO: no color variant */
typedef struct ElementIndexedBillboard {
/* upper-left */
@ -334,6 +335,9 @@ void push_quad_payload_to_vertex_buffer_builder(struct QuadBatch batch,
Vec2 uv0, Vec2 uv1, Vec2 uv2, Vec2 uv3,
Color color);
void finally_draw_space_quads_batch(const MeshBatch *batch,
const TextureKey texture_key);
void finally_draw_text(FontData const *font_data,
size_t len,
Color color,