summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 18:03:09 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 18:03:09 +0100
commitccd5256bfacf27ed81fbf13087ba04978d6913f8 (patch)
tree8729b2e3e9bc7a43c1babb0376ea8b67fb5c9af5 /CONTEXT.md
parentChams: material fallbacks and FindMaterial diagnostics (diff)
downloadhl2h-ccd5256bfacf27ed81fbf13087ba04978d6913f8.tar.gz
hl2h-ccd5256bfacf27ed81fbf13087ba04978d6913f8.zip
Chams: tint through $color/$color2 and log the chosen material
ColorModulate alone left the forced material white. Also set the shader's $color and $color2 vars (IMaterialVar SetVecValue 3-float) and restore them to white after the draw. Log which fallback material was selected.
Diffstat (limited to '')
-rw-r--r--CONTEXT.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index 1fe24a0..60a5a91 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -287,11 +287,16 @@ vocabulary / decisions.
287- Uses `IVModelRender::ForcedMaterialOverride` (slot 1) with 287- Uses `IVModelRender::ForcedMaterialOverride` (slot 1) with
288 `models/debug/debugwhite` and draws twice: first with 288 `models/debug/debugwhite` and draws twice: first with
289 `MATERIAL_VAR_IGNOREZ` (1 << 15) set through `IMaterial::SetMaterialVarFlag` 289 `MATERIAL_VAR_IGNOREZ` (1 << 15) set through `IMaterial::SetMaterialVarFlag`
290 (slot 29) for the through-wall pass, then without it. `IMaterial:: 290 (slot 29) for the through-wall pass, then without it. Colour is applied via
291 ColorModulate` (slot 28) applies the configured colour. The shared material's 291 `IMaterial::ColorModulate` (slot 28) **and** the shader's `$color`/`$color2`
292 flag and colour are restored to (false, white) after the draw. 292 vars (IMaterialVar slot 11, SetVecValue 3-float slot 11), because some forced
293 materials ignore ColorModulate. The shared material's flag and colour are
294 restored to (false, white) after the draw.
293- Material lookup walks the `IMaterialSystem` list (`world_find_material`), with 295- Material lookup walks the `IMaterialSystem` list (`world_find_material`), with
294 `FindMaterial` (slot 71) as the fallback for a not-yet-resident material. 296 `FindMaterial` (slot 71) as the fallback. Candidates, in order:
297 `models/debug/debugwhite{2,3}`, `vgui/white`,
298 `debug/debugtranslucentsinglecolor`, `debug/debugwireframevertexcolorignorez`.
299 The chosen material name is logged.
295- Feature is off by default; `[chams] active/bind/walls/r/g/b`, with a 300- Feature is off by default; `[chams] active/bind/walls/r/g/b`, with a
296 "Through walls" toggle and colour picker in the Visuals card. 301 "Through walls" toggle and colour picker in the Visuals card.
297- This is a flat material override, not stencil outlines; depth handling is 302- This is a flat material override, not stencil outlines; depth handling is