From e914cad0ddfb26b0992dc3659b136d4714ccc4de Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Sun, 5 Jan 2025 23:43:30 +0300 Subject: [PATCH] infer texture mode for triangles --- src/rendering/twn_triangles.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rendering/twn_triangles.c b/src/rendering/twn_triangles.c index 06d329a..477926c 100644 --- a/src/rendering/twn_triangles.c +++ b/src/rendering/twn_triangles.c @@ -100,6 +100,12 @@ void finally_draw_uncolored_space_traingle_batch(const MeshBatch *batch, command.primitive_count = (GLsizei)(3 * primitives_len); + /* TODO: support alpha blended case, with distance sort */ + TextureMode mode = textures_get_mode(&ctx.texture_cache, texture_key); + if (mode == TEXTURE_MODE_GHOSTLY) + mode = TEXTURE_MODE_SEETHROUGH; + use_texture_mode(mode); + DeferredCommand final_command = { .type = DEFERRED_COMMAND_TYPE_DRAW, .draw = command