From b97ac5d495ce82e6f1cf051c3f3a29ff38c91982 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 00:21:55 +0100 Subject: Skybox image: fix HDR sky binding; clip checkbox/arrow drawing The HDR sky materials use the "sky" shader with $hdrcompressedtexture (DXT5). Assigning an RGBA8 procedural texture there sampled as compressed data and rendered black. Point $hdrbasetexture at the image, undefine $hdrcompressedtexture (and its 0/1/2 variants) so the shader falls back, and call IMaterial::Refresh (37) because the sky shader binds textures in SHADER_INIT, which is otherwise cached. GUI: draw_checkbox and the card expand chevron ignored the content clip, so cards scrolled out of view leaked header widgets outside the window. Log the first regenerator call (size/pitch/first pixel) for diagnosis. --- CONTEXT.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 5bd0436..b07e407 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -144,6 +144,10 @@ vocabulary / decisions. `x`, `y`, `category` and an `expanded` bitmask (card index order). Every feature now persists an `active` and `bind` pair, including movement, melee and spread. +- All card contents are clipped to the scrolling content rect, including + checkboxes and the expand chevron; only clipped fills/text were handled + before, so cards scrolled out of view leaked header widgets outside the + window. - **Colour control (`CK_COLOR`)**: row shows a live swatch; clicking the row expands an inline picker (saturation/value square + hue bar + hex/RGB preview) instead of three RGB sliders, growing the card in place so it @@ -377,9 +381,15 @@ vocabulary / decisions. `IVTFTexture::ImageData(frame,face,mip)` (39). `IVTFTexture`'s virtual destructor occupies two slots, so Width=15, Height=16, RowSizeInBytes=19. - The texture is assigned with `IMaterialVar::SetTextureValue` to - `$basetexture`, plus `$hdrbasetexture` / `$hdrcompressedtexture` when those - vars exist, on every material in the `SkyBox textures` group or named - `skybox/*`. The same image is mapped onto all six faces. + `$basetexture` and `$hdrbasetexture` on every material in the `SkyBox + textures` group or named `skybox/*`. The same image maps onto all six faces. +- HDR sky materials use the `sky` shader, whose texture binding happens in + `SHADER_INIT`: it samples `$hdrcompressedtexture` (DXT5) when defined and + otherwise `$hdrbasetexture`. Putting an RGBA8 texture into the DXT5 slot + renders black, so `$hdrcompressedtexture` (+ its `0/1/2` variants) is + `SetUndefined()` and `$hdrbasetexture` is pointed at our texture instead. + The shader state is then rebuilt with `IMaterial::Refresh()` (slot 37), + otherwise the old bindings stay cached. - Original textures are recorded per material/var (texture pointer plus the string as a fallback) and restored when the feature is disabled. Records survive level changes so a reused sky material can still be restored; the -- cgit v1.2.3