summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 00:21:55 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 00:21:55 +0100
commitb97ac5d495ce82e6f1cf051c3f3a29ff38c91982 (patch)
tree7b16b311fb9fea94d4d160cc4cdd634f13033c25 /CONTEXT.md
parentSkybox image: decode PNG ourselves to avoid symbol interposition (diff)
downloadhl2h-b97ac5d495ce82e6f1cf051c3f3a29ff38c91982.tar.gz
hl2h-b97ac5d495ce82e6f1cf051c3f3a29ff38c91982.zip
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.
Diffstat (limited to 'CONTEXT.md')
-rw-r--r--CONTEXT.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index 5bd0436..b07e407 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -144,6 +144,10 @@ vocabulary / decisions.
144 `x`, `y`, `category` and an `expanded` bitmask (card index order). Every 144 `x`, `y`, `category` and an `expanded` bitmask (card index order). Every
145 feature now persists an `active` and `bind` pair, including movement, melee 145 feature now persists an `active` and `bind` pair, including movement, melee
146 and spread. 146 and spread.
147- All card contents are clipped to the scrolling content rect, including
148 checkboxes and the expand chevron; only clipped fills/text were handled
149 before, so cards scrolled out of view leaked header widgets outside the
150 window.
147- **Colour control (`CK_COLOR`)**: row shows a live swatch; clicking the row 151- **Colour control (`CK_COLOR`)**: row shows a live swatch; clicking the row
148 expands an inline picker (saturation/value square + hue bar + hex/RGB 152 expands an inline picker (saturation/value square + hue bar + hex/RGB
149 preview) instead of three RGB sliders, growing the card in place so it 153 preview) instead of three RGB sliders, growing the card in place so it
@@ -377,9 +381,15 @@ vocabulary / decisions.
377 `IVTFTexture::ImageData(frame,face,mip)` (39). `IVTFTexture`'s virtual 381 `IVTFTexture::ImageData(frame,face,mip)` (39). `IVTFTexture`'s virtual
378 destructor occupies two slots, so Width=15, Height=16, RowSizeInBytes=19. 382 destructor occupies two slots, so Width=15, Height=16, RowSizeInBytes=19.
379- The texture is assigned with `IMaterialVar::SetTextureValue` to 383- The texture is assigned with `IMaterialVar::SetTextureValue` to
380 `$basetexture`, plus `$hdrbasetexture` / `$hdrcompressedtexture` when those 384 `$basetexture` and `$hdrbasetexture` on every material in the `SkyBox
381 vars exist, on every material in the `SkyBox textures` group or named 385 textures` group or named `skybox/*`. The same image maps onto all six faces.
382 `skybox/*`. The same image is mapped onto all six faces. 386- HDR sky materials use the `sky` shader, whose texture binding happens in
387 `SHADER_INIT`: it samples `$hdrcompressedtexture` (DXT5) when defined and
388 otherwise `$hdrbasetexture`. Putting an RGBA8 texture into the DXT5 slot
389 renders black, so `$hdrcompressedtexture` (+ its `0/1/2` variants) is
390 `SetUndefined()` and `$hdrbasetexture` is pointed at our texture instead.
391 The shader state is then rebuilt with `IMaterial::Refresh()` (slot 37),
392 otherwise the old bindings stay cached.
383- Original textures are recorded per material/var (texture pointer plus the 393- Original textures are recorded per material/var (texture pointer plus the
384 string as a fallback) and restored when the feature is disabled. Records 394 string as a fallback) and restored when the feature is disabled. Records
385 survive level changes so a reused sky material can still be restored; the 395 survive level changes so a reused sky material can still be restored; the