disallow ghostly billboards, reenable skybox in scenery demo

This commit is contained in:
veclavtalica 2025-01-05 19:59:23 +03:00
parent 3bfa86066e
commit cb6c1df0be
2 changed files with 6 additions and 2 deletions

View File

@ -202,7 +202,7 @@ static void ingame_tick(State *state) {
generate_terrain(scn); generate_terrain(scn);
draw_terrain(scn); draw_terrain(scn);
// draw_skybox("/assets/miramar/miramar_*.tga"); draw_skybox("/assets/miramar/miramar_*.tga");
draw_fog(0.9f, 1.0f, 0.05f, (Color){ 140, 147, 160, 255 }); draw_fog(0.9f, 1.0f, 0.05f, (Color){ 140, 147, 160, 255 });
} }

View File

@ -157,7 +157,11 @@ void finally_draw_billboard_batch(struct MeshBatch const *batch,
command.element_count = 6 * (GLsizei)primitives_len; command.element_count = 6 * (GLsizei)primitives_len;
command.range_end = 6 * (GLsizei)primitives_len; command.range_end = 6 * (GLsizei)primitives_len;
use_texture_mode(textures_get_mode(&ctx.texture_cache, texture_key)); /* 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 = { DeferredCommand final_command = {
.type = DEFERRED_COMMAND_TYPE_DRAW, .type = DEFERRED_COMMAND_TYPE_DRAW,