diff --git a/src/pp/pp_vis/pp_vis_core.c b/src/pp/pp_vis/pp_vis_core.c index c4dbb65c..b33175f4 100644 --- a/src/pp/pp_vis/pp_vis_core.c +++ b/src/pp/pp_vis/pp_vis_core.c @@ -2947,6 +2947,7 @@ void V_TickForever(WaveLaneCtx *lane) // emitter.count = CeilF32(Kibi(64) * frame->dt); // emitter.count = CeilF32(Mebi(32) * frame->dt); + // emitter.count = CeilF32(Mebi(8) * frame->dt); // emitter.count = Mebi(16); // emitter.count = Mebi(2); // emitter.count = Kibi(32); diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index e236b355..bf0888e2 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -1533,11 +1533,20 @@ void UI_EndFrame(UI_Frame *frame, i32 vsync) for (u64 pre_index = 0; pre_index < boxes_count; ++pre_index) { UI_Box *box = boxes_pre[pre_index]; + GC_Run raw_run_unscaled = box->glyph_run; + GC_Run raw_run = UI_ScaleRun(frame->arena, raw_run_unscaled, box->solved_scale); b32 is_visible = 1; is_visible = is_visible && (box->desc.tint.w >= 0.0025); is_visible = is_visible && (box->screen_rect.p1.x - box->screen_rect.p0.x > 0.0025); is_visible = is_visible && (box->screen_rect.p1.y - box->screen_rect.p0.y > 0.0025); + is_visible = is_visible && ( + !G_IsRefNil(box->raw_texture) || + !SPR_IsSheetKeyNil(box->desc.sprite_sheet) || + (AnyBit(box->desc.flags, UI_BoxFlag_DrawText) && raw_run.ready) || + box->desc.tint.a * box->desc.background_color.a >= 0.0025 + ); + if (is_visible || AnyBit(frame->frame_flags, UI_FrameFlag_Debug)) { Vec4 debug_lin = is_visible ? LinearFromSrgb(box->desc.debug_color) : LinearFromSrgb(box->desc.invisible_debug_color); @@ -1572,9 +1581,6 @@ void UI_EndFrame(UI_Frame *frame, i32 vsync) } } - // Text rects - GC_Run raw_run_unscaled = box->glyph_run; - GC_Run raw_run = UI_ScaleRun(frame->arena, raw_run_unscaled, box->solved_scale); if (AnyBit(box->desc.flags, UI_BoxFlag_DrawText) && raw_run.ready) { f32 max_baseline_length = CeilF32(DimsFromRng2(box->screen_rect).x);