From 4632788c4bef265e58630473eed5559bf125a726 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 00:29:24 +0100 Subject: Skybox image: power-of-two resize; upload at FRAME_RENDER_START - The material system rejects textures whose dimensions are not multiples of 4 ("Image dimensions must be multiple of 4!"), so scale the decoded image to the next power of two (bilinear). 798x798 -> 1024x1024. The invalid VTF also crashed the renderer after the apply. - Move skybox_update() out of the VGUI paint hook into the FRAME_RENDER_START FrameStageNotify stage. ITexture::Download only regenerates bits when the material system considers the frame render-safe; during paint it returned early, the regenerator never ran (no pixels), and a later upload of the empty VTF crashed. - Log the regenerator entry so the log shows whether the upload path ran. --- src/menu.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/menu.cpp') diff --git a/src/menu.cpp b/src/menu.cpp index 92131d4..7ffc84a 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -816,7 +816,6 @@ void outer_draw() { fullbright_update(); world_tint_update(); fog_update(); - skybox_update(); gui_handle_input(); // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr; -- cgit v1.2.3